diff --git a/manager/src/main.js b/manager/src/main.js index 47b0d45c..5c3ffde7 100644 --- a/manager/src/main.js +++ b/manager/src/main.js @@ -38,8 +38,16 @@ Vue.config.devtools = true; Vue.config.productionTip = false const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端 const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端 -Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品 - window.open(`${PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank') +Vue.prototype.linkTo = function (goodsId, skuId) { + // 跳转买家端商品 + let src; + if (skuId) { + src = `${PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`; + } else { + src = `${PC_URL}/goodsDetail?goodsId=${goodsId}`; + } + + window.open(src, "_blank"); }; Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码 return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}` diff --git a/manager/src/views/goods/goods-review/index.vue b/manager/src/views/goods/goods-review/index.vue index ecce2cad..9073fddb 100644 --- a/manager/src/views/goods/goods-review/index.vue +++ b/manager/src/views/goods/goods-review/index.vue @@ -2,7 +2,7 @@