Browse Source

打开APP

shish 4 years ago
parent
commit
c6d536f2be

+ 3 - 6
ghsApp/src/admin/home/mall.vue

@@ -28,7 +28,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters({ loginInfo: "getLoginInfo" })
+    ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
   },
   methods: {
     init() {
@@ -75,10 +75,6 @@ export default {
         })
         // #endif
         // #ifdef APP-PLUS
-        if(CURRENT_ENV == 'dev'){
-          that.$msg("开发环境不允许跳转")
-          return false
-        }
         if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
           plus.share.getServices(function(s){
             var sweixin
@@ -88,9 +84,10 @@ export default {
                   sweixin = t;
               }
             }
+            let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
             if (sweixin && sweixin.nativeClient) {
               sweixin.launchMiniProgram({
-                id: 'gh_73b8b357d19a',
+                id: miniOriginalId,
                 path: '/pagesPurchase/ghsProduct?shopId='+ that.loginInfo.shopId+'&id=0&ghsShopAdminId='+that.loginInfo.shopAdminId+'&fromCg=1',
                 type: 0
               });

+ 1 - 1
ghsApp/src/admin/item/components/ItemStock.vue

@@ -22,7 +22,7 @@
 	</view>
 	<text class="bottom-button" @click.stop="goToOrderDetail(info.id)">销售记录</text>
 	<text class="bottom-button" @click.stop="goToStockDetail(info.id)">库存明细</text>
-	<text class="bottom-button" @click.stop="goToProduct(info.id)">分享</text>
+	<text class="bottom-button" @click.stop="goToProduct(info.id)">打开分享</text>
 	<text class="bottom-button" @click.stop="moreToDo(info)">更多</text>
 </view>
 </template>

+ 3 - 6
ghsApp/src/admin/item/list.vue

@@ -77,7 +77,7 @@ export default {
 	},
 	computed:{
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
-		...mapGetters({ loginInfo: "getLoginInfo" })
+		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
 	},
 	onShow(){
 	},
@@ -267,10 +267,6 @@ export default {
 			})
 			// #endif
 			// #ifdef APP-PLUS
-			if(CURRENT_ENV == 'dev'){
-				that.$msg("开发环境不允许跳转")
-				return false
-			}
 			if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
 				var sweixin
 				plus.share.getServices(function(s){
@@ -280,9 +276,10 @@ export default {
 							sweixin = t;
 						}
 					}
+            		let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
 					if (sweixin) { //&& sweixin.nativeClient
 						sweixin.launchMiniProgram({
-							id: 'gh_73b8b357d19a',
+							id: miniOriginalId,
 							path: 'admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id,
 							type: 0
 						});

+ 8 - 9
hdApp/src/admin/cg/mall.vue

@@ -26,7 +26,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters({ loginInfo: "getLoginInfo" })
+    ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
   },
   methods: {
     init() {
@@ -76,10 +76,7 @@ export default {
       // #endif
       // #ifdef APP-PLUS
       let that = this
-			if(CURRENT_ENV == 'dev'){
-				that.$msg("开发环境不允许跳转")
-				return false
-			}
+
       if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
         plus.share.getServices(function(s){
           var sweixin
@@ -90,20 +87,22 @@ export default {
             }
           }
           if (sweixin && sweixin.nativeClient) {
+            let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.mall ? that.dictInfo.miniOriginalId.current.mall : ''
+            console.log(miniOriginalId)
             sweixin.launchMiniProgram({
-              id: 'gh_73b8b357d19a',
-              path: '/pages/home/index?account='+self.loginInfo.shopId,
+              id: miniOriginalId,
+              path: '/pages/home/index?account='+that.loginInfo.shopId,
               type: 0
             });
           } else {
             that.$msg("没有找到微信服务")
             //that.$msg("获取微信失败:" + e.message)
-            //console.log(JSON.stringify(e));
+            console.log(JSON.stringify(e));
           }
         }, function(e){
             that.$msg("没有找到微信服务哦")
             //that.$msg("获取微信失败:" + e.message)
-            //console.log(JSON.stringify(e));
+            console.log(JSON.stringify(e));
         });
       } else {
 				this.$msg("即将跳转小程序,请安装微信")

+ 3 - 6
hdApp/src/admin/home/workbench.vue

@@ -128,7 +128,7 @@ export default {
       };
   },
   computed: {
-    ...mapGetters({ loginInfo: "getLoginInfo" })
+    ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
   },
   onLoad () {
    },
@@ -155,10 +155,6 @@ export default {
       // #endif
       // #ifdef APP-PLUS
       let that = this
-		if(CURRENT_ENV == 'dev'){
-			that.$msg("开发环境不允许跳转")
-			return false
-		}
       if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
         plus.share.getServices(function(s){
           var sweixin
@@ -169,8 +165,9 @@ export default {
             }
           }
           if (sweixin && sweixin.nativeClient) {
+            let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
             sweixin.launchMiniProgram({
-              id: 'gh_73b8b357d19a',
+              id: miniOriginalId,
               path: '/pagesPurchase/order',
               type: 0
             });