@@ -17,8 +17,14 @@ Component({
methods: {
jumpGoodsDetail(e) {
const { item } = e.currentTarget.dataset
+ const page = getCurrentPages()
+ let id = item.id
+ if (page[page.length - 1].route === 'pages/collection/collection') {
+ id = item.product_id
+ }
+
wx.navigateTo({
- url: '/pages/goodsDetail/goodsDetail?product_id=' + item.id
+ url: '/pages/goodsDetail/goodsDetail?product_id=' + id
})
}
@@ -23,7 +23,7 @@ Page({
value: '2'
],
- active: '2',
+ active: '1',
objShopDetail: { shop_address: {} },
booLock: false
},