From 65eeada46a6e73e604e6d9806bd3084bd4d98427 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Mon, 25 Mar 2024 09:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E6=89=93=E5=BC=80=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/realstore-cart/realstore-cart.vue | 13 ++++++++++--- pages/plugins/realstore/detail/detail.vue | 12 +++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/components/realstore-cart/realstore-cart.vue b/components/realstore-cart/realstore-cart.vue index 46ac492b..107e3fc1 100644 --- a/components/realstore-cart/realstore-cart.vue +++ b/components/realstore-cart/realstore-cart.vue @@ -27,7 +27,7 @@ - + @@ -952,9 +952,16 @@ this.get_cart_data(); }, - // 商品url事件 - goods_url_event(e) { + // 商品事件 + goods_event(e) { + // 是否可以打开商品页面 if(app.globalData.data.is_realstore_forbid_to_goods_detail != 1) { + // 商品数据缓存处理 + var goods = this.cart.data[e.currentTarget.dataset.index]; + goods['id'] = goods.goods_id; + app.globalData.goods_data_cache_handle(goods.id, goods); + + // 调用公共打开url地址 app.globalData.url_event(e); } } diff --git a/pages/plugins/realstore/detail/detail.vue b/pages/plugins/realstore/detail/detail.vue index 677fe1d6..8243c1d5 100644 --- a/pages/plugins/realstore/detail/detail.vue +++ b/pages/plugins/realstore/detail/detail.vue @@ -166,7 +166,7 @@ - + @@ -883,9 +883,15 @@ return this.$refs.realstore_cart.get_buy_use_type_index(); }, - // 商品url事件 - goods_url_event(e) { + // 商品事件 + goods_event(e) { + // 是否可以打开商品页面 if(app.globalData.data.is_realstore_forbid_to_goods_detail != 1) { + // 商品数据缓存处理 + var goods = this.data_list[e.currentTarget.dataset.index]; + app.globalData.goods_data_cache_handle(goods.id, goods); + + // 调用公共打开url地址 app.globalData.url_event(e); } },