8.26提交
This commit is contained in:
+24
-3
@@ -460,13 +460,31 @@ getBank(){
|
||||
})
|
||||
}
|
||||
},
|
||||
isHasToken(){
|
||||
let tokenStr=''
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=="develop" || envVersion=="trial"){
|
||||
tokenStr="DEV_CASE_TOKEN"
|
||||
}else{
|
||||
tokenStr="PROD_CASE_TOKEN"
|
||||
}
|
||||
let token = wx.getStorageSync(tokenStr);
|
||||
if(token){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.storeBindings = createStoreBindings(this, {
|
||||
store,
|
||||
fields: [,"active"],
|
||||
actions: ["updateActive"],
|
||||
});
|
||||
this.getAuthStatus();
|
||||
if(this.isHasToken()){
|
||||
this.getAuthStatus();
|
||||
}
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
this.storeBindings.destroyStoreBindings();
|
||||
@@ -486,8 +504,11 @@ getBank(){
|
||||
status:'',
|
||||
caseType:''
|
||||
})
|
||||
this.toggleDraft();
|
||||
this.handleRefresher();
|
||||
if(this.isHasToken()){
|
||||
this.toggleDraft();
|
||||
this.handleRefresher();
|
||||
}
|
||||
|
||||
|
||||
wx.getPrivacySetting({
|
||||
success: res => {
|
||||
|
||||
Reference in New Issue
Block a user