From e6c8811113d1dcff41a73a06bef08c9e9334cf25 Mon Sep 17 00:00:00 2001 From: fanfan Date: Tue, 22 Oct 2024 22:08:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/seckillDetail.vue | 54 +++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/pages/goods/seckillDetail.vue b/pages/goods/seckillDetail.vue index 27def5d..25a6021 100644 --- a/pages/goods/seckillDetail.vue +++ b/pages/goods/seckillDetail.vue @@ -213,7 +213,8 @@ - + @@ -737,24 +738,39 @@ }, //跳转京东小程序详情 toJDdetal() { - // #ifdef MP-WEIXIN - wx.navigateToMiniProgram({ - appId: 'wx91d27dbf599dff74', //app.json内容 - path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url), - extraData: { - foo: 'bar' - }, - envVersion: 'release', - success(res) { - // 打开成功 - console.log(res); - console.log("打开成功") - } - }) - // #endif - // #ifndef MP-WEIXIN - window.location.href = this.goods.link; - // #endif + if (this.goods.jd_short_url) { + wx.navigateToMiniProgram({ + appId: 'wx91d27dbf599dff74', //app.json内容 + path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url), + extraData: { + foo: 'bar' + }, + envVersion: 'release', + success(res) { + // 打开成功 + console.log(res); + console.log("打开成功") + } + }) + // #ifndef MP-WEIXIN + window.location.href = this.goods.link; + // #endif + } else { + // #ifdef MP-WEIXIN + wx.navigateToMiniProgram({ + appId: 'wx91d27dbf599dff74', + path: '/pages/item/detail/detail?sku=' + this.goods_sku_no, + envVersion: 'release', + success(res) { + // 打开成功 + console.log(res); + } + }) + // #endif + // #ifndef MP-WEIXIN + window.location.href = this.goods.link; + // #endif + } }, //修改价格 openPirce(type) {