pyh 2 years ago
parent
commit
7ec30ce4f7
4 changed files with 23 additions and 12 deletions
  1. 1
    3
      pages/Text/srow.vue
  2. 11
    6
      pages/order/goodslist.vue
  3. 8
    2
      pages/system/setting.vue
  4. 3
    1
      pages/system/system.vue

+ 1
- 3
pages/Text/srow.vue View File

@@ -163,9 +163,7 @@
"eid": "1004",
"interface": "Goods/GetGoodsImg",
"goodsid": [
"6917878170114", "6920118519550", "6920118519567", "6920118519567A", "6920118519567B",
"6920118542007","6920118542008", "6920118550522"
"6901209204876",
]
}
}

+ 11
- 6
pages/order/goodslist.vue View File

@@ -78,10 +78,13 @@
<view class="goods-list flex-sub">
<!-- #ifndef MP-WEIXIN -->
<view class="padding text-grey text-xl text-center margin-t100" v-show="showList.length == 0 & !loading">
<view class=" cuIcon-more padding"></view>
<text>该分类没有数据</text>
</view>
<!-- #endif -->
@@ -371,8 +374,7 @@
//赋值图片数据
assignPic(){
var goodsPic = uni.getStorageSync('pic')
console.log('缓存中的图片',goodsPic);
// #ifndef MP-WEIXIN
for(let i = 0; i<this.goodsList.length; i ++){
this.goodsList[i].pic = ''
var picValue = uni.getStorageSync('pic'+this.goodsList[i].goodsid)
@@ -380,6 +382,7 @@
this.goodsList[i].pic = picValue
}
}
// #endif
},
@@ -388,7 +391,9 @@
handData(value=[]){
this.goodsList = value
this.goodsNum = value.length
// #ifndef MP-WEIXIN
this.assignPic()
// #endif
//这里开始处理图片
this.brandName = this.listCat(this.goodsList,'brand')//品牌
this.catName = this.listCat(this.goodsList,'cat')//分类
@@ -415,17 +420,17 @@
pageindex: this.pageindex,//this.fetchData[this.slideBarCur].pageindex,
pagecount: this.maxIndex,//每页数量
}
console.log('全部商品请求',moment().format('mm:ss'));
console.log('全部商品请求',moment().format('mm:ss'),this.reparam(param));
var goods = new Promise((resolve,reject)=>{
this.$webSockRe(this.reparam(param),30,false).then(res=>{
this.$webSockRe(this.reparam(param),300,false).then(res=>{
if(res.interface == 'Order/GetGoodsInfo'){
if(res.data.data.length == this.maxIndex){//继续请求
this.showList = this.showList.concat(value.data.data)
this.showList = this.showList.concat(res.data.data)
console.log(this.showList,res.data.data);
this.pageindex += 1
this.GetGoodsInfo()
}else{
this.showList = this.showList.concat(value.data.data)
this.showList = this.showList.concat(res.data.data)
this.loading = false
this.pageindex = 0
this.handData(this.showList)

+ 8
- 2
pages/system/setting.vue View File

@@ -43,14 +43,14 @@
</view>
<!-- #ifndef MP-WEIXIN -->
<view class="cu-item" @click="getAllGoodsPic()">
<view class="content">
<text class="iconfont icon-pic-fill text-red padding-lr-sm text-xl"></text>
<text class="text-grey">获取所有商品图片</text>
</view>
<view class="action">
<view class="cu-load" :class="loading?'loading ':'over'" v-if="loading">
<text class="text-red">
{{ loadingNum }}
@@ -64,6 +64,12 @@
</view>
</view>
<!-- #endif -->
<view class="cu-item">
<view class="content " @click="clearPic()">
<text class="iconfont icon-set text-black padding-lr-sm text-xl"></text>

+ 3
- 1
pages/system/system.vue View File

@@ -90,7 +90,7 @@
</view>
</view>
<!-- #ifndef MP-WEIXIN -->
<view class="cu-item" @click="checkVersion()">
<view class="content">
<text class="iconfont icon-product1 text-gray text-lg margin-right-xs"></text>
@@ -100,6 +100,8 @@
<view class="">{{ version }}</view>
</view>
</view>
<!-- #endif -->
<view class="cu-item" >
<view class="content">

Loading…
Cancel
Save