环境token

This commit is contained in:
zoujiandong
2024-05-07 10:37:12 +08:00
parent 5130ea5c7a
commit 28d49809e6
9 changed files with 71 additions and 12 deletions
+7 -1
View File
@@ -118,7 +118,13 @@ Page({
app.imLogout();
url = "/Pages/yaoshi/home/home";
}
let token = wx.getStorageSync('AUTH_TOKEN_'+usertype);
let token = '';
const { envVersion } = wx.getAccountInfoSync().miniProgram;
if(envVersion=='release'){
token= wx.getStorageSync('AUTH_TOKEN_'+usertype)
}else{
token= wx.getStorageSync('DEV_AUTH_TOKEN_'+usertype)
}
console.log(token);
console.log(url);
if(token){