diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 0a54af1..c45a880 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -777,7 +777,7 @@ export default { }, goRoom() { const params = { - goodsId: this.productId, + goodsId: this.id, goodsName: this.attr.productSelect.store_name, skuStr: this.attrValue, price: this.attr.productSelect.price, diff --git a/pkg_common/views/room.vue b/pkg_common/views/room.vue index cea4e93..c781a28 100644 --- a/pkg_common/views/room.vue +++ b/pkg_common/views/room.vue @@ -24,7 +24,7 @@ - + @@ -126,14 +126,35 @@ export default { this.token = uni.getStorageSync("login_status"); this.userInfo = uni.getStorageSync("userInfo"); this.uid = this.userInfo.uid + this.content = uni.getStorageSync(this.merName+this.uid+this.storeId) this.connectSocketInit() }, onUnload() { if (this.socketOpen) { this.socketTask.close(); } + uni.setStorageSync(this.merName+this.uid+this.storeId, this.content) }, methods: { + toGoods(item) { + console.log(item); + const itemJson = JSON.parse(item.msg_content) + if(!itemJson.goodsId) { + // 提示数据错误 + // uni.showToast({ + // title: '数据错误', + // icon: 'none' + // }) + return + } + + this.$yrouter.push({ + path: '/pages/shop/GoodsCon/index', + query: { + id: itemJson.goodsId + } + }) + }, wsJson(json) { return JSON.parse(json) },