支付宝优化
This commit is contained in:
@@ -121,33 +121,35 @@
|
||||
type: "",
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
async onLoad(options) {
|
||||
// if ( e.type == 'list' || e.type == 'index') {
|
||||
// this.shopId = e.shopId;
|
||||
// this.init();
|
||||
// }
|
||||
|
||||
console.log(e)
|
||||
uni.cache.set('forceUpdate',1)
|
||||
if (e.q) {
|
||||
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
|
||||
// #ifdef MP-WEIXIN
|
||||
if (options.q) {
|
||||
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
|
||||
uni.cache.set('shopId',this.shopId)
|
||||
this.tokenShow = false;
|
||||
// 等待登录结果返回
|
||||
// if (!uni.cache.get('token')) {
|
||||
// await this.$onLaunched;
|
||||
// }
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
} else{
|
||||
this.shopId = e.shopId;
|
||||
this.type = e.type;
|
||||
if ( e.amount ) { this.amount = e.amount; }
|
||||
uni.cache.set('shopId',this.shopId)
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
|
||||
uni.cache.set('shopId',this.shopId)
|
||||
// #endif
|
||||
|
||||
if (options.shopId) {
|
||||
this.shopId = options.shopId
|
||||
uni.cache.set('shopId',this.shopId)
|
||||
}
|
||||
if (options.type) {
|
||||
this.type = options.type
|
||||
}
|
||||
if ( options.amount ) { this.amount = options.amount; }
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user