|
@@ -9,12 +9,12 @@
|
|
|
<app-search-module v-model="py" placeholder="这里搜索产品" @input="searchFn"/>
|
|
<app-search-module v-model="py" placeholder="这里搜索产品" @input="searchFn"/>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="padding:0 0upx 0 15upx;" >
|
|
<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>
|
|
</view>
|
|
|
<view class="scroll-middle_bx">
|
|
<view class="scroll-middle_bx">
|
|
|
<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
|
|
<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>
|
|
<text style="text-align: center;">{{ item.name || "" }}</text>
|
|
|
</div>
|
|
</div>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -22,11 +22,11 @@
|
|
|
<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
|
|
<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
|
|
|
@scroll="scrolling" lower-threshold="100" @scrolltolower="scrollBottom">
|
|
@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_bx selectAll">
|
|
|
<view class="item_list_title"></view>
|
|
<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">
|
|
<view style="height:255upx" :key="productIndex">
|
|
|
<ItemStock :info="productItem" @moreAction="moreAction"
|
|
<ItemStock :info="productItem" @moreAction="moreAction"
|
|
|
@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
|
|
@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
|
|
@@ -45,7 +45,7 @@
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
<view style="width:100%">
|
|
<view style="width:100%">
|
|
|
- <app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalJhList)" />
|
|
|
|
|
|
|
+ <app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalCpList)" />
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -80,7 +80,7 @@
|
|
|
<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
<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 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>
|
|
<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 style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -93,11 +93,11 @@
|
|
|
<script>
|
|
<script>
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
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 { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
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 { print,cancelDiscountPrice,cancelPreSell } from '@/api/product';
|
|
|
import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
|
|
import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
|
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
@@ -111,7 +111,7 @@
|
|
|
uniPopup,
|
|
uniPopup,
|
|
|
ModalModule
|
|
ModalModule
|
|
|
},
|
|
},
|
|
|
- mixins: [jhMins],
|
|
|
|
|
|
|
+ mixins: [cpMins],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
autoLoad: false,
|
|
autoLoad: false,
|
|
@@ -132,11 +132,11 @@
|
|
|
breakFocus:false,
|
|
breakFocus:false,
|
|
|
breakShow:false,
|
|
breakShow:false,
|
|
|
classIndex: 0,
|
|
classIndex: 0,
|
|
|
- globalJhClassList:[],
|
|
|
|
|
- globalJhList:[],
|
|
|
|
|
|
|
+ globalCpClassList:[],
|
|
|
|
|
+ globalCpList:[],
|
|
|
page:1,
|
|
page:1,
|
|
|
currentClassId:0,
|
|
currentClassId:0,
|
|
|
- finishGetJh:0
|
|
|
|
|
|
|
+ finishGetCp:0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -150,30 +150,30 @@
|
|
|
that.getAppIdList = res.data
|
|
that.getAppIdList = res.data
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- getJhClassMenu().then(res=>{
|
|
|
|
|
|
|
+ getCpClassMenu().then(res=>{
|
|
|
if(res.code == 1){
|
|
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.currentClassId = current.id
|
|
|
- that.getJhList()
|
|
|
|
|
|
|
+ that.getCpList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getJhList(){
|
|
|
|
|
- if(this.finishGetJh == 1){
|
|
|
|
|
|
|
+ getCpList(){
|
|
|
|
|
+ if(this.finishGetCp == 1){
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
let that = this
|
|
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){
|
|
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){
|
|
if(res.data.moreData == 1){
|
|
|
that.page++
|
|
that.page++
|
|
|
}else{
|
|
}else{
|
|
|
- that.finishGetJh = 1
|
|
|
|
|
|
|
+ that.finishGetCp = 1
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -182,11 +182,11 @@
|
|
|
this.classIndex = cur
|
|
this.classIndex = cur
|
|
|
this.page = 1
|
|
this.page = 1
|
|
|
this.currentClassId = item.id
|
|
this.currentClassId = item.id
|
|
|
- this.finishGetJh = 0
|
|
|
|
|
- this.getJhList()
|
|
|
|
|
|
|
+ this.finishGetCp = 0
|
|
|
|
|
+ this.getCpList()
|
|
|
},
|
|
},
|
|
|
scrollBottom(){
|
|
scrollBottom(){
|
|
|
- this.getJhList()
|
|
|
|
|
|
|
+ this.getCpList()
|
|
|
},
|
|
},
|
|
|
scrolling(){
|
|
scrolling(){
|
|
|
|
|
|