Style(店铺):商品列表接口对接

This commit is contained in:
lifizer
2024-03-20 11:52:06 +08:00
parent f510226a16
commit f3f00a4e66
3 changed files with 188 additions and 5 deletions
+16 -5
View File
@@ -182,6 +182,9 @@
<text>{{ item.sales }}人已购买</text>
</view>
</view>
<view class="btn" @click="viewAllGoodHandle">
查看所有商品
</view>
</view>
<!-- 最新资讯 -->
<view
@@ -760,11 +763,14 @@ export default {
id: this.inn.id,
page: this.goodsPage,
limit: 12
}).then(data => {
const len = data.records.length;
if (len > 0) {
for (let i = 0; i < len; i++) {
this.goodsList.push(data.records[i]);
}).then(res => {
const { success, data } = res
if (success) {
const len = data.records.length
if (len > 0) {
for (let i = 0; i < len; i++) {
this.goodsList.push(data.records[i])
}
}
}
})
@@ -804,6 +810,11 @@ export default {
},
toggleMoreHandle(index) {
this.$set(this.infoArray[index], 'showMore', !this.infoArray[index].showMore)
},
viewAllGoodHandle() {
uni.navigateTo({
url: '/pagesInn/inn/innGoodList?id=' + this.inn.id,
})
}
}
}