From 3d6a2785d5fb3e3d1766009bc22c8a4df15b7bb1 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Wed, 22 Jan 2025 00:26:39 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3119=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E7=94=A8=E6=88=B7=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=95=86=E5=93=81=E5=8D=A1=E7=89=87=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=AF=B9=E5=BA=94=E7=9A=84=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/shop/GoodsCon/index.vue | 2 +- pkg_common/views/room.vue | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) 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) },