|
|
@@ -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) |