|
|
@@ -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>
|