环境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
@@ -51,7 +51,13 @@ Page({
if (res.confirm) {
console.log('用户点击确定')
let usertype = wx.getStorageSync('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('AUTH_TOKEN_'+usertype, "");
wx.setStorageSync('user_id_'+usertype, "");
wx.setStorageSync('client_user_id_'+usertype, "");