Преглед изворни кода

商城 解决门店分享 点不进去的问题

wangning пре 5 година
родитељ
комит
823fda8ca4
1 измењених фајлова са 4 додато и 6 уклоњено
  1. 4 6
      mallApp/src/pages/home/shop.vue

+ 4 - 6
mallApp/src/pages/home/shop.vue

@@ -118,21 +118,19 @@ export default {
         return false;
       }
       // #endif
-
+      let account = uni.getStorageSync('account')
       getShopUser().then(res => {
         // 设置分享
         let shareParams = {
           title: `${res.name}`, // 分享标题
           desc: "这家店不错推荐给你", // 分享内容
           imgUrl: "",
-          // #ifdef H5
-          pagePath: `${window.location.protocol}//mall.${this.$constant.firstHost}.com/#/pages/home/shop?account=${res.sjId}&introUserId=${res.id}`,
-          // #endif
           // #ifndef H5
-          pagePath: `/pages/home/shop?account=${res.sjId}&introUserId=${res.id}`
+          pagePath: `/pages/home/shop?account=${account}`
           // #endif
         };
         this.jweixinFn(shareParams);
+        console.log('分享地址',`/pages/home/shop?account=${account}`)
       });
     },
     _detail () {
@@ -147,7 +145,7 @@ export default {
           e.img = e.adImgUrl;
           return e;
         });
-        console.log('this.ad', JSON.stringify(this.ad))
+        // console.log('this.ad', JSON.stringify(this.ad))
         this.shop = res.data.shop;
         if (!this.$util.isEmpty(res.data.newUserGift)) {
           this.newUserGift = res.data.newUserGift;