|
|
|
@ -26,7 +26,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
<view class="bottom-box"> |
|
|
|
<view class="bottom-left" @tap="toggle('carPopup')"> |
|
|
|
<view class="bottom-left-box"> |
|
|
|
@ -179,7 +180,8 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
indexList: [], |
|
|
|
pageNum: 1, //分页的页码 |
|
|
|
pages: 1, //分页的页码 |
|
|
|
totalPages: 0, |
|
|
|
shopList: [], |
|
|
|
info: 0, |
|
|
|
categoryId: '', //分类id |
|
|
|
@ -212,7 +214,8 @@ |
|
|
|
city: '', |
|
|
|
area: '', |
|
|
|
id: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
status: 'loadmore', |
|
|
|
rules: { |
|
|
|
consigneeName: { |
|
|
|
rules: [{ |
|
|
|
@ -244,6 +247,12 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.pages >= this.totalPages) return; |
|
|
|
this.status = 'loading'; |
|
|
|
this.pages = ++this.pages; |
|
|
|
this.getShareList(); |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
this.khid = options.khid; |
|
|
|
@ -601,17 +610,23 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
//点击分类获取商品列表 |
|
|
|
getShareList(id) { |
|
|
|
getShareList(id) { |
|
|
|
this.status = 'loading'; |
|
|
|
this.tui.request("/app/productShare/getShareList", "POST", { |
|
|
|
searchStr: this.searchName, |
|
|
|
id: this.khid, |
|
|
|
pageNum: this.pageNum, |
|
|
|
pageNum: this.pages, |
|
|
|
pageSize: '10' |
|
|
|
}, false, true).then((res) => { |
|
|
|
}, false, true).then((res) => { |
|
|
|
this.status = 'nomore'; |
|
|
|
if (res.code == 200) { |
|
|
|
this.shopList = res.result.shareList.records |
|
|
|
this.priceType = res.result.share.priceType |
|
|
|
this.shopId = res.result.shareList.records[0].shopId |
|
|
|
this.shopId = res.result.shareList.records[0].shopId |
|
|
|
if (this.pages == 1) { |
|
|
|
this.shopList = res.result.shareList.records |
|
|
|
} else { |
|
|
|
this.shopList = [...this.shopList, ...res.result.shareList.records] |
|
|
|
} |
|
|
|
for (var i = 0; i < this.shopList.length; i++) { |
|
|
|
if (res.result.share.priceType == 1) { //批发价 |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].wholesalePrice |
|
|
|
@ -619,7 +634,7 @@ |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].price |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.totalPages = res.result.shareList.pages |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
|