恢复商品和详情页面

This commit is contained in:
Dev
2026-10-22 15:41:39 +08:00
parent 0ef4ac4cea
commit b9122fd6c8
37 changed files with 2489 additions and 2 deletions
@@ -159,6 +159,14 @@ Page({
this.init(false);
},
gotoGoodsDetail(e) {
const { index } = e.detail;
const { spuId } = this.data.goodsList[index];
wx.navigateTo({
url: `/pages/goods/details/index?spuId=${spuId}`,
});
},
handleAddCart() {
Toast({
context: this,
@@ -18,7 +18,7 @@
<t-empty t-class="empty-tips" size="240rpx" description="暂无相关商品" />
</view>
<view class="category-goods-list" wx:if="{{goodsList.length}}">
<goods-list wr-class="wr-goods-list" goodsList="{{goodsList}}" bind:addcart="handleAddCart" />
<goods-list wr-class="wr-goods-list" goodsList="{{goodsList}}" bind:click="gotoGoodsDetail" bind:addcart="handleAddCart" />
</view>
<load-more wx:if="{{goodsList.length > 0}}" status="{{loadMoreStatus}}" no-more-text="没有更多了" />
</view>