环境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
+8 -1
View File
@@ -35,7 +35,14 @@ Page({
success (res) {
if (res.confirm) {
console.log('用户点击确定')
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
//wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
const { envVersion } = wx.getAccountInfoSync().miniProgram;
if(envVersion=='release'){
wx.setStorageSync('AUTH_TOKEN_'+usertype, '');
}else{
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype,'');
}
wx.setStorageSync('user_id_'+usertype, "");
wx.setStorageSync('client_user_id_'+usertype, "");
app.globalData.isLogin=false;