环境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){
+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;
+2 -1
View File
@@ -87,7 +87,8 @@
</view>
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">
<text wx:if="{{item.inquiry_type ==2 || item.inquiry_type ==4}}">不接诊5分钟后自动取消</text>
<text wx:elif="{{item.inquiry_type ==3 || item.inquiry_type ==1}}">不接诊24小时后自动取消</text>
<text wx:elif="{{item.inquiry_type ==3 || (item.inquiry_type ==1 && item.inquiry_mode!=8 && item.inquiry_mode!=9)}}">不接诊24小时后自动取消</text>
<text wx:elif="{{item.inquiry_type ==1 && (item.inquiry_mode==8 || item.inquiry_mode==9)}}">不接诊72小时后自动取消</text>
</view>
</view>
<!-- aa -->