shish 4 лет назад
Родитель
Сommit
45fbbd5bcf

+ 4 - 4
ghsApp/src/admin/home/mall.vue

@@ -10,7 +10,7 @@
     <!-- #ifdef MP-WEIXIN -->
     <view style="margin:50upx 0 0 30upx;font-size:30upx;">打开直接分享给客户</view>
     <div class="confirm-btn1">
-      <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">打开商城</button>
+      <button class="admin-button-com big blue" @click="goToMallPt()">打开商城</button>
     </div>
     <!-- #endif -->
   </view>
@@ -58,13 +58,13 @@ export default {
         this.imgUrl = res.data.imgUrl
       }).catch(err => {})
     },
-    goToMallPt (url) {
+    goToMallPt () {
       let self = this
-        console.log('pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId)
+        console.log('pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId+'&fromCg=1')
         uni.navigateToMiniProgram({
 					//姜枫-2021.04.13
 					appId: this.getappIdList.hd.miniAppId,
-					path: 'pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId,
+					path: 'pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId+'&fromCg=1',
 					//develop 开发版 trial 体验版 release 正式版
 					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
 					extraData: { 'shopId': this.loginInfo.shopId, 'id': 0, 'name':'', },

+ 25 - 5
hdApp/src/pagesClient/official/result.vue

@@ -1,8 +1,13 @@
 <template>
 	<appResult title="注册成功">
-      <view class="dec"></view>
-		<button class="admin-button-com blue big" v-if="scene==''" @click="goBack()" >返回</button>
-    <button class="admin-button-com blue big" v-else @click="beginCg()" >开始采购</button>
+    <view class="dec"></view>
+    <view v-if="fromCg == 1">
+      <button class="admin-button-com blue big" @click="beginCg()" >开始采购</button>
+    </view>
+    <view v-else>
+      <button class="admin-button-com blue big" v-if="scene==''" @click="goBack()" >返回</button>
+      <button class="admin-button-com blue big" v-else @click="beginCg()" >开始采购</button>
+    </view>
 	</appResult>
 </template>
 <script>
@@ -14,20 +19,35 @@ export default {
     },
     data(){
       return {
-        scene:''
+        scene:'',
+        fromCg:0
       }
     },
     onUnload() {
     },
     onLoad () {
+
+      //供应商打开小程序分享给客户,客户需要采购进来
+      let ghsCgOption = uni.getStorageSync('ghsCgOption')
+      if(ghsCgOption.fromCg){
+        this.fromCg = ghsCgOption.fromCg
+      }
+
+      //供应商打开太阳码分享给客户,客户需要采购进来
       let scene = uni.getStorageSync('ghsCgScene')
       if(scene){
         this.scene = scene
       }
+
     },
     methods:{
       beginCg(){
-        this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {scene:this.scene},type:2})
+        if(this.fromCg == 1){
+          let ghsCgOption = uni.getStorageSync('ghsCgOption')
+          this.$util.pageTo({url: "/pagesPurchase/ghsProduct", query:ghsCgOption, type:2})
+        }else{
+          this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {scene:this.scene},type:2})
+        }
       },
       goBack() {
         uni.navigateBack()

+ 6 - 0
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -319,9 +319,15 @@ export default {
 
 			this.init = false
 
+			//通过供应商小程序分享进采购页,注册的客户,注册后引导返回采购页
+			if(this.option.fromCg && this.option.fromCg == 1){
+				uni.setStorageSync('ghsCgOption', this.option)
+			}
+
 			//扫码采购 shish 20210614
 			if(this.option.scene){
 				
+				//通过供应商的太阳码进采购页,注册的客户,注册后引导返回采购页
 				uni.setStorageSync('ghsCgScene', this.option.scene)
 
 				const scene = decodeURIComponent(this.option.scene);

+ 13 - 2
hdApp/src/pagesPurchase/particulars.vue

@@ -5,7 +5,7 @@
       <view class="result-view">
         <view :class="['iconfont', 'iconchenggong']"></view>
         <view class="result-title">支付成功</view>
-        <view v-if="ghsCgScene!=''">
+        <view v-if="ghsCgScene!='' || fromCg == 1">
         <view>关闭页面后,微信下拉找到【花惠宝】小程序,如下图点采购可以再次下单</view>
         <view style="margin-bottom:30upx;margin-top:15upx;">
           <image class="image" :src="`${constant.imgUrl}/cg/hd_cg_route.png`" mode="widthFix"></image>
@@ -24,17 +24,25 @@ export default {
   data() {
     return {
       hasInit:false,
-      ghsCgScene:''
+      ghsCgScene:'',
+      fromCg:0
     }
   },
   onLoad () {
     this.hasInit = true
 
+    //供应商打开太阳码分享给客户,客户需要采购进来
     let scene = uni.getStorageSync('ghsCgScene')
     if(scene){
       this.ghsCgScene = scene
     }
 
+    //供应商打开小程序分享给客户,客户需要采购进来
+    let ghsCgOption = uni.getStorageSync('ghsCgOption')
+    if(ghsCgOption.cg){
+      this.fromCg = ghsCgOption.fromCg
+    }
+
   },
   onShow () {
     if(this.hasInit == false){
@@ -47,9 +55,12 @@ export default {
     },
     goHome () {
       uni.removeStorageSync('ghsCgScene')
+      uni.removeStorageSync('ghsCgOption')
       this.pageTo({url:"/admin/home/workbench",type:4})
     },
     goDetail() {
+      uni.removeStorageSync('ghsCgScene')
+      uni.removeStorageSync('ghsCgOption')
       this.pageTo({url: '/pagesPurchase/purDetails',query:{id:this.option.id,status:2}})
     }
   },