shish 2 tahun lalu
induk
melakukan
e041a1c0aa

+ 1 - 1
ghsApp/src/admin/cp/class.vue

@@ -63,7 +63,7 @@ import AppUploader from '@/components/app-uploader'
 import OperateModule from '@/admin/home/components/module/operate'
 import AppWrapperEmpty from '@/components/app-wrapper-empty'
 import { list } from '@/mixins'
-import { getJhClassList,addJhClass,updateJhClass,delJhClass} from '@/api/jh'
+import { getJhClassList,addJhClass,updateJhClass,delJhClass} from '@/api/cp'
 export default {
 	name: 'item-class-list',
 	components: {

+ 2 - 2
ghsApp/src/admin/cp/components/cpItem.vue

@@ -4,14 +4,14 @@
 
         <image :src="`${constant.imgUrl}/icon/official8.png`" v-if="info.auth && info.auth == 1" mode="widthFix" class="official"></image>
 
-		<view class="img_bx" @click="pageTo({url: '/admin/jh/item?jhId='+info.id})">
+		<view class="img_bx" @click="pageTo({url: '/admin/cp/item?cpId='+info.id})">
 			<view v-if="info.status == 2" class="sold-out">
 				<view class="sold-out-xj">已下架</view>
 			</view>
 			<image :src="info.cover" style="width:160upx;height:160upx;" lazy-load="true" :lazy-load-margin="0"></image>
 
 		</view>
-		<view class="cmd-info_bx active" @click="pageTo({url: '/admin/jh/item?jhId='+info.id})">
+		<view class="cmd-info_bx active" @click="pageTo({url: '/admin/cp/item?cpId='+info.id})">
 			<view class="tit">
 				<text style="font-size:22upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
 				v-if="frontHide== 1">隐</text>

+ 13 - 13
ghsApp/src/admin/cp/item.vue

@@ -6,11 +6,11 @@
                 <scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
                             @scroll="scrolling" lower-threshold="100" @scrolltolower="scrollBottom">
 
-                    <block v-if="!$util.isEmpty(currentJhItemList)">
+                    <block v-if="!$util.isEmpty(currentCpItemList)">
                         <view class="item_list_bx selectAll">
                             <view class="item_list_title"></view>
-                            <view v-if="!$util.isEmpty(currentJhItemList)">
-                                <template v-for="(productItem, productIndex) in currentJhItemList">
+                            <view v-if="!$util.isEmpty(currentCpItemList)">
+                                <template v-for="(productItem, productIndex) in currentCpItemList">
                                     <view style="height:255upx" :key="productIndex">
                                         <ItemStock :info="productItem" @moreAction="moreAction" 
                                         @doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
@@ -29,7 +29,7 @@
                     </block>
                     <block v-else>
                         <view style="width:100%">
-                            <app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(currentJhItemList)" />
+                            <app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(currentCpItemList)" />
                         </view>
                     </block>
                 </scroll-view>
@@ -98,10 +98,10 @@
   import AppSearchModule from "@/components/module/app-search";
   import AppWrapperEmpty from "@/components/app-wrapper-empty";
   import ItemStock from "./components/term";
-  import jhMins from "@/mixins/jh";
+  import cpMins from "@/mixins/cp";
   import { mapGetters } from "vuex";
   import { getWeixinId } from "@/api/invite";
-  import { getJhItemList } from "@/api/jh";
+  import { getCpItemList } from "@/api/cp";
   import { print,cancelDiscountPrice,cancelPreSell } from '@/api/product';
   import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
   import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
@@ -115,7 +115,7 @@
           uniPopup,
           ModalModule
       },
-      mixins: [jhMins],
+      mixins: [cpMins],
       data() {
           return {
             autoLoad: false,
@@ -136,10 +136,10 @@
             breakFocus:false,
             breakShow:false,
             classIndex: 0,
-            globalJhClassList:[],
-            currentJhItemList:[],
+            globalCpClassList:[],
+            currentCpItemList:[],
             page:1,
-            currentJhId:0,
+            currentCpId:0,
             finishGetItem:0
           };
       },
@@ -153,7 +153,7 @@
         getWeixinId().then(res => {
             that.getAppIdList = res.data
         })
-        this.currentJhId = this.option.jhId ? this.option.jhId : 0
+        this.currentCpId = this.option.cpId ? this.option.cpId : 0
         that.getListFn()
 
       },
@@ -163,9 +163,9 @@
                 return false
             }
             let that = this
-            getJhItemList({jhId:that.currentJhId,page:that.page}).then(res=>{
+            getCpItemList({cpId:that.currentCpId,page:that.page}).then(res=>{
                 if(res.code == 1){
-                    that.currentJhItemList = that.page == 1 ? res.data.list : that.currentJhItemList.concat(res.data.list)
+                    that.currentCpItemList = that.page == 1 ? res.data.list : that.currentCpItemList.concat(res.data.list)
                     if(res.data.moreData == 1){
                         that.page++
                     }else{

+ 27 - 27
ghsApp/src/admin/cp/list.vue

@@ -9,12 +9,12 @@
                       <app-search-module v-model="py" placeholder="这里搜索产品" @input="searchFn"/>
                   </view>
                   <view style="padding:0 0upx 0 15upx;" >
-                      <button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/jh/ptJhList' })">添加产品</button>
+                      <button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/cp/ptCpList' })">添加产品</button>
                   </view>
               </view>
               <view class="scroll-middle_bx">
                 <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-                    <div v-for="(item, index) in globalJhClassList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index,item)">
+                    <div v-for="(item, index) in globalCpClassList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index,item)">
                         <text style="text-align: center;">{{ item.name || "" }}</text>
                     </div>
                 </scroll-view>
@@ -22,11 +22,11 @@
                 <scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
                             @scroll="scrolling" lower-threshold="100" @scrolltolower="scrollBottom">
 
-                    <block v-if="!$util.isEmpty(globalJhList)">
+                    <block v-if="!$util.isEmpty(globalCpList)">
                         <view class="item_list_bx selectAll">
                             <view class="item_list_title"></view>
-                            <view v-if="!$util.isEmpty(globalJhList)">
-                                <template v-for="(productItem, productIndex) in globalJhList">
+                            <view v-if="!$util.isEmpty(globalCpList)">
+                                <template v-for="(productItem, productIndex) in globalCpList">
                                     <view style="height:255upx" :key="productIndex">
                                         <ItemStock :info="productItem" @moreAction="moreAction" 
                                         @doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
@@ -45,7 +45,7 @@
                     </block>
                     <block v-else>
                         <view style="width:100%">
-                            <app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(globalJhList)" />
+                            <app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(globalCpList)" />
                         </view>
                     </block>
                 </scroll-view>
@@ -80,7 +80,7 @@
           <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
               <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
   
-                  <view v-for="(item, index) in globalJhList" :key="index" @tap.stop="changeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
+                  <view v-for="(item, index) in globalCpList" :key="index" @tap.stop="changeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
                   <image :src="item.classCover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
                   <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
                   </view>
@@ -93,11 +93,11 @@
   <script>
   import AppSearchModule from "@/components/module/app-search";
   import AppWrapperEmpty from "@/components/app-wrapper-empty";
-  import ItemStock from "./components/jhItem";
-  import jhMins from "@/mixins/jh";
+  import ItemStock from "./components/cpItem";
+  import cpMins from "@/mixins/cp";
   import { mapGetters } from "vuex";
   import { getWeixinId } from "@/api/invite";
-  import { getJhClassMenu,getJhList } from "@/api/jh";
+  import { getCpClassMenu,getCpList } from "@/api/cp";
   import { print,cancelDiscountPrice,cancelPreSell } from '@/api/product';
   import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
   import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
@@ -111,7 +111,7 @@
           uniPopup,
           ModalModule
       },
-      mixins: [jhMins],
+      mixins: [cpMins],
       data() {
           return {
               autoLoad: false,
@@ -132,11 +132,11 @@
               breakFocus:false,
               breakShow:false,
               classIndex: 0,
-              globalJhClassList:[],
-                globalJhList:[],
+              globalCpClassList:[],
+                globalCpList:[],
                 page:1,
                 currentClassId:0,
-                finishGetJh:0
+                finishGetCp:0
           };
       },
       computed:{
@@ -150,30 +150,30 @@
             that.getAppIdList = res.data
         })
 
-        getJhClassMenu().then(res=>{
+        getCpClassMenu().then(res=>{
             if(res.code == 1){
-                that.globalJhClassList = res.data.list ? res.data.list : []
-                if(!this.$util.isEmpty(that.globalJhClassList)){
-                    let current = that.globalJhClassList[0]
+                that.globalCpClassList = res.data.list ? res.data.list : []
+                if(!this.$util.isEmpty(that.globalCpClassList)){
+                    let current = that.globalCpClassList[0]
                     that.currentClassId = current.id
-                    that.getJhList()
+                    that.getCpList()
                 }
             }
         })
       },
       methods: {
-        getJhList(){
-            if(this.finishGetJh == 1){
+        getCpList(){
+            if(this.finishGetCp == 1){
                 return false
             }
             let that = this
-            getJhList({classId:that.currentClassId,page:that.page}).then(res=>{
+            getCpList({classId:that.currentClassId,page:that.page}).then(res=>{
                 if(res.code == 1){
-                    that.globalJhList = that.page == 1 ? res.data.list : that.globalJhList.concat(res.data.list)
+                    that.globalCpList = that.page == 1 ? res.data.list : that.globalCpList.concat(res.data.list)
                     if(res.data.moreData == 1){
                         that.page++
                     }else{
-                        that.finishGetJh = 1
+                        that.finishGetCp = 1
                     }
                 }
             })
@@ -182,11 +182,11 @@
 			this.classIndex = cur
             this.page = 1
             this.currentClassId = item.id
-            this.finishGetJh = 0
-            this.getJhList()
+            this.finishGetCp = 0
+            this.getCpList()
 		},
 		scrollBottom(){
-            this.getJhList()
+            this.getCpList()
         },
         scrolling(){
 

+ 4 - 4
ghsApp/src/admin/cp/ptCpList.vue

@@ -20,7 +20,7 @@
                     <view scroll-y class="item_list_bx" style="width: 100%">
                         <template v-for="(productItem, productIndex) in globalClassItemListContrapose">
                             <view style="padding: 20upx 0">
-                            <ptJhItemInfo
+                            <ptCpItemInfo
                                 :isPrice="false"
                                 :key="productIndex"
                                 :info="productItem"
@@ -28,7 +28,7 @@
                                 :modifyStock="modifyStock"
                                 @selectItem="selectItem"
                                 @modifyAuth="modifyAuth"
-                            ></ptJhItemInfo>
+                            ></ptCpItemInfo>
                             </view>
                         </template>
                     </view>
@@ -44,7 +44,7 @@
     <script>
     import AppSearchModule from "@/components/module/app-search";
     import AppWrapperEmpty from "@/components/app-wrapper-empty";
-    import ptJhItemInfo from "./components/ptJhItem";
+    import ptCpItemInfo from "./components/ptCpItem";
     import productMins from "@/mixins/product";
     import productContraposeMins from "@/mixins/ptProductContrapose";
     import { mapGetters } from "vuex";
@@ -56,7 +56,7 @@
         components: {
             AppSearchModule,
             AppWrapperEmpty,
-            ptJhItemInfo
+            ptCpItemInfo
         },
         mixins: [productMins, productContraposeMins],
         data() {

+ 29 - 0
ghsApp/src/api/cp/index.js

@@ -0,0 +1,29 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+export const getCpItemList = data => {
+	return https.get('/cp-item/list', data)
+}
+
+export const getCpClassMenu = data => {
+	return https.get('/cp-class/get-menu', data)
+}
+
+export const getCpClassList = data => {
+	return https.get('/cp-class/list', data)
+}
+
+export const addCpClass = data => {
+	return https.get('/cp-class/add', data)
+}
+
+export const updateCpClass = data => {
+	return https.get('/cp-class/update', data)
+}
+
+export const delCpClass = data => {
+	return https.get('/cp-class/del', data)
+}
+
+export const getCpList = data => {
+	return https.get('/cp/list', data)
+}

+ 0 - 29
ghsApp/src/api/jh/index.js

@@ -1,29 +0,0 @@
-import https from '@/plugins/luch-request_0.0.7/request'
-
-export const getJhItemList = data => {
-	return https.get('/jh-item/list', data)
-}
-
-export const getJhClassMenu = data => {
-	return https.get('/jh-class/get-menu', data)
-}
-
-export const getJhClassList = data => {
-	return https.get('/jh-class/list', data)
-}
-
-export const addJhClass = data => {
-	return https.get('/jh-class/add', data)
-}
-
-export const updateJhClass = data => {
-	return https.get('/jh-class/update', data)
-}
-
-export const delJhClass = data => {
-	return https.get('/jh-class/del', data)
-}
-
-export const getJhList = data => {
-	return https.get('/jh/list', data)
-}

+ 0 - 0
ghsApp/src/mixins/jh.js → ghsApp/src/mixins/cp.js


+ 2 - 2
ghsApp/src/pages.json

@@ -411,12 +411,12 @@
 			]
 		},
 		{
-			"root": "admin/jh",
+			"root": "admin/cp",
 			"pages": [
 				{"path": "list","style": {"navigationBarTitleText": "产品列表"}},
 				{"path": "class","style": {"navigationBarTitleText": "产品分类"}},
 				{"path": "item","style": {"navigationBarTitleText": "花材"}},
-				{"path": "ptJhList","style": {"navigationBarTitleText": "平台产品"}}
+				{"path": "ptCpList","style": {"navigationBarTitleText": "平台产品"}}
 			]
 		},
 		{