shish 2 месяцев назад
Родитель
Сommit
c60496ec24
2 измененных файлов с 33 добавлено и 25 удалено
  1. 5 1
      hdApp/src/pagesClient/official/apply.vue
  2. 28 24
      hdApp/src/pagesClient/official/result.vue

+ 5 - 1
hdApp/src/pagesClient/official/apply.vue

@@ -133,7 +133,7 @@ import { checkShop } from '@/api/shop'
 import { ghsInfo } from "@/api/ghs/index";
 import { getMobile } from "@/api/auth";
 import {getHasMap} from "@/api/express"
-import { persistInviteContext, tryBindPendingInvite, optionHasInviteContext, clearPendingInvite, restorePendingInviteFromLegacy, getRegisterInviteParams, expireInviteIfNeeded } from "@/utils/pendingGhsInvite";
+import { persistInviteContext, tryBindPendingInvite, optionHasInviteContext, clearPendingInvite, restorePendingInviteFromLegacy, getRegisterInviteParams, expireInviteIfNeeded, getGhsProductQueryFromPending } from "@/utils/pendingGhsInvite";
 export default {
   name: "apply-data",
   components: {
@@ -448,6 +448,8 @@ export default {
 
         }
 
+        const registerInviteQuery = getGhsProductQueryFromPending()
+
         const goAfterRegister = () => {
           //去失信人员列表
           if(this.option.fromType && this.option.fromType == 2){
@@ -462,6 +464,8 @@ export default {
                 that.$util.pageTo({url: "/admin/ghsProduct/detail?id="+that.option.itemId+'&ghsId='+ghsId, type:2})
               }
             })
+          }else if (registerInviteQuery) {
+            this.$util.pageTo({url: "/pagesClient/official/result", query: registerInviteQuery, type:2})
           }else{
             this.$util.pageTo({url: "/pagesClient/official/result", type:2})
           }

+ 28 - 24
hdApp/src/pagesClient/official/result.vue

@@ -1,13 +1,7 @@
 <template>
 	<appResult title="注册成功">
     <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="goIndex()" style="padding-left:80upx;padding-right:80upx;">进入首页</button>
-      <button class="admin-button-com blue big" v-else @click="beginCg()" >开始购买</button>
-    </view>
+    <button class="admin-button-com blue big" @click="beginCg()">开始购买</button>
 	</appResult>
 </template>
 <script>
@@ -28,6 +22,11 @@ export default {
     },
     onLoad () {
       restorePendingInviteFromLegacy()
+      if (this.option && this.option.shopId) {
+        this.fromCg = this.option.fromCg || 1
+        this.scene = 'pending'
+        return
+      }
       const pending = getPendingInvite()
       if (pending) {
         this.fromCg = pending.fromCg || 0
@@ -51,31 +50,36 @@ export default {
       init(){
 
       },
-      goIndex(){
-        this.$util.pageTo({url: "/admin/home/workbench", type:3})
+      goPurchasePage(query) {
+        this.$util.pageTo({ url: "/pagesPurchase/ghsProduct", query: query, type: 2 })
       },
       beginCg(){
         const pendingQuery = getGhsProductQueryFromPending()
         if (pendingQuery) {
-          this.$util.pageTo({url: "/pagesPurchase/ghsProduct", query: pendingQuery, type:2})
+          this.goPurchasePage(pendingQuery)
+          return
+        }
+        if (this.option && this.option.shopId) {
+          this.goPurchasePage({
+            shopId: this.option.shopId,
+            id: this.option.id || 0,
+            ghsShopAdminId: this.option.ghsShopAdminId || 0,
+            fromCg: this.option.fromCg || 0
+          })
           return
         }
         if(this.fromCg == 1){
-          // #ifdef APP-PLUS
-          this.$util.pageTo({url: "/admin/home/workbench", type:3})
-          // #endif
-          // #ifdef MP-WEIXIN
           let ghsCgOption = uni.getStorageSync('ghsCgOption')
-          this.$util.pageTo({url: "/pagesPurchase/ghsProduct", query:ghsCgOption, type:2})
-          // #endif
-        }else{
-          // #ifdef APP-PLUS
-          this.$util.pageTo({url: "/admin/home/workbench", type:3})
-          // #endif
-          // #ifdef MP-WEIXIN
-          this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {scene:this.scene},type:2})
-          // #endif
+          if (ghsCgOption && ghsCgOption.shopId) {
+            this.goPurchasePage(ghsCgOption)
+            return
+          }
+        }
+        if(this.scene){
+          this.goPurchasePage({ scene: this.scene })
+          return
         }
+        this.$util.pageTo({ url: "/pagesPurchase/order", type: 2 })
       },
       goBack() {
         uni.navigateBack()
@@ -94,4 +98,4 @@ export default {
 		margin-bottom: 20upx;
 		width: 100%;
 	}
-</style>
+</style>