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) {