优化聊天界面
This commit is contained in:
@@ -35,7 +35,8 @@ Page({
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onShow(){
|
||||
let user_id = wx.getStorageSync("user_id");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let user_id = wx.getStorageSync("user_id_"+usertype);
|
||||
let is_bind_bank = wx.getStorageSync(user_id+'_is_bind_bank');
|
||||
this.setData({
|
||||
is_bind_bank: is_bind_bank
|
||||
@@ -51,8 +52,14 @@ Page({
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id', "");
|
||||
wx.setStorageSync('client_user_id', "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
let promise = wx.$TUIKit.logout();
|
||||
promise.then(function(imResponse) {
|
||||
console.log(imResponse.data); // 登出成功
|
||||
}).catch(function(imError) {
|
||||
console.warn('logout error:', imError);
|
||||
});
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
|
||||
Reference in New Issue
Block a user