shish 5 лет назад
Родитель
Сommit
3fbf760ccd

+ 43 - 10
ghsApp/src/pagesClient/official/index.vue

@@ -207,19 +207,52 @@ export default {
 				})
 			},
   },
-  onLoad() {
-    this.jweixinFn({
-      title: "更懂您的花卉宝",
-      pagePath: "pagesClient/official/index",
-      imageUrl: ""
-    });
-    console.log(' this.getLoginInfo.shopId',this.getLoginInfo)
+  onLoad(props) {
+    if(props.scene){
+      console.log('scene',props.scene)
+      const scene = decodeURIComponent(props.scene);
+      var sceneItem = scene.split("&");
+      var arr, name, value;
+      var sceneArray = new Array();
+      for (var i = 0, l = sceneItem.length; i < l; i++) {
+        arr = sceneItem[i].split("=");
+        name = arr[0];
+        value = arr[1];
+        sceneArray[name] = value;
+      }
+      if(sceneArray.hdShopAdminId){
+        this.option.hdShopAdminId = sceneArray.hdShopAdminId
+      }
+      if(sceneArray.ghsShopAdminId){
+        this.option.ghsShopAdminId = sceneArray.ghsShopAdminId
+      }
+    }
   },
+  onShareAppMessage(res) {
+
+    let ghsShopAdminId = 0
+    if(this.getLoginInfo.shopAdminId){
+      ghsShopAdminId = this.getLoginInfo.shopAdminId
+    }
+
+    let hdShopAdminId = 0
+    if(this.option.ghsShopAdminId){
+      hdShopAdminId = this.option.ghsShopAdminId
+    }
+
+    //查看分享的路径,不要删除 shish 20210517
+    console.log("pagesClient/official/index?ghsShopAdminId="+ghsShopAdminId+"&hdShopAdminId="+hdShopAdminId)
+
+    return {
+      title: "更懂您的花惠宝",
+      desc: "",
+      imgUrl: "",
+      path: "pagesClient/official/index?ghsShopAdminId="+ghsShopAdminId+"&hdShopAdminId="+hdShopAdminId,
+    }
+
+	},
   computed: {
     ...mapGetters(["getLoginInfo"])
-  },
-  onLoad() {
-    console.log(this.getLoginInfo)
   }
 }
 </script>

+ 4 - 16
ghsApp/src/pagesInvite/inviteGhsShop.vue

@@ -65,24 +65,12 @@ export default {
       }).catch(err => {})
     },
     goToMallPt () {
-      this.pageTo({url: `/pagesClient/official/index?ghsShopAdminId=${this.loginInfo.shopAdminId}`})
+
       //查看分享的路径,不要删除 shish 20210517
-			// console.log('pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId)
+			console.log('pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId)
+
+      this.pageTo({url: `/pagesClient/official/index?ghsShopAdminId=${this.loginInfo.shopAdminId}`})
 
-			// getWeixinId().then(res => {
-			// 	uni.navigateToMiniProgram({
-			// 		appId: res.data.ghs.miniAppId,
-			// 		path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
-			// 		//develop 开发版 trial 体验版 release 正式版
-			// 		envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-			// 		extraData: {
-			// 			//'hdShopAdminId': this.loginInfo.shopAdminId
-			// 		},
-			// 		success(res) {
-			// 			// 打开成功
-			// 		}
-			// 	})
-			// })
     },
   }
 }

+ 1 - 0
ghsApp/src/pagesInvite/inviteShop.vue

@@ -65,6 +65,7 @@ export default {
       }).catch(err => {})
     },
     goToMallPt () {
+
       //查看分享的路径,不要删除 shish 20210517
 			console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
 

+ 13 - 6
hdApp/src/pagesClient/official/index.vue

@@ -134,20 +134,27 @@ export default {
     ...mapGetters(["getLoginInfo"])
   },
   onShareAppMessage(res) {
-    
-    console.log('option',this.options)
-    console.log('option1',this.option)
-    console.log('option2',res)
+
+    let hdShopAdminId = 0
+    if(this.getLoginInfo.shopAdminId){
+      hdShopAdminId = this.getLoginInfo.shopAdminId
+    }
+
+    let ghsShopAdminId = 0
+    if(this.option.ghsShopAdminId){
+      ghsShopAdminId = this.option.ghsShopAdminId
+    }
 
     //查看分享的路径,不要删除 shish 20210517
-    console.log("pagesClient/official/index?ghsShopAdminId="+this.option.ghsShopAdminId+"&hdShopAdminId="+this.getLoginInfo.shopAdminId)
+    console.log("pagesClient/official/index?ghsShopAdminId="+ghsShopAdminId+"&hdShopAdminId="+hdShopAdminId)
 
     return {
       title: "更懂您的花惠宝",
       desc: "",
       imgUrl: "",
-      path: "pagesClient/official/index?ghsShopAdminId="+this.option.ghsShopAdminId+"&hdShopAdminId="+this.getLoginInfo.shopAdminId,
+      path: "pagesClient/official/index?ghsShopAdminId="+ghsShopAdminId+"&hdShopAdminId="+hdShopAdminId,
     }
+
 	},
   mounted() {},
   onLoad(props) {

+ 4 - 16
hdApp/src/pagesInvite/inviteHdShop.vue

@@ -65,24 +65,12 @@ export default {
       }).catch(err => {})
     },
     goToMallPt () {
-      this.pageTo({url: `/pagesClient/official/index?hdShopAdminId=${this.loginInfo.shopAdminId}`})
+
       //查看分享的路径,不要删除 shish 20210517
-			// console.log('pagesClient/official/index','ghsShopAdminId='+ this.loginInfo.shopAdminId)
+			console.log('pagesClient/official/index','hdShopAdminId='+ this.loginInfo.shopAdminId)
+
+      this.pageTo({url: `/pagesClient/official/index?hdShopAdminId=${this.loginInfo.shopAdminId}`})
 
-			// getWeixinId().then(res => {
-			// 	uni.navigateToMiniProgram({
-			// 		appId: res.data.hd.miniAppId,
-			// 		path: 'pagesClient/official/index?ghsShopAdminId='+this.loginInfo.shopAdminId,
-			// 		//develop 开发板 trial 体验版 release 正式版
-			// 		envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-			// 		extraData: {
-			// 			//'ghsShopAdminId': this.loginInfo.shopAdminId
-			// 		},
-			// 		success(res) {
-			// 			// 打开成功
-			// 		}
-			// 	})
-			// });
     },
   }
 }

+ 1 - 3
hdApp/src/pagesInvite/inviteShop.vue

@@ -74,9 +74,7 @@ export default {
 					path: 'pagesClient/official/index?hdShopAdminId='+this.loginInfo.shopAdminId,
 					//develop 开发版 trial 体验版 release 正式版
 					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-					extraData: {
-						//'hdShopAdminId': this.loginInfo.shopAdminId
-					},
+					extraData: {},
 					success(res) {
 						// 打开成功
 					}