|
|
|
@ -5,7 +5,7 @@ Page({
|
|
|
|
|
imageUrl: getApp().globalData.imageUrl,
|
|
|
|
|
bgImage: "background-image: url(" + getApp().globalData.imageUrl + "/img_mybg.png)",
|
|
|
|
|
statusBarHeight: 0,
|
|
|
|
|
nickName: "",
|
|
|
|
|
nickName: "未登录",
|
|
|
|
|
avatarUrl: "",
|
|
|
|
|
btnShow: false
|
|
|
|
|
},
|
|
|
|
@ -31,7 +31,29 @@ Page({
|
|
|
|
|
avatarUrl: userInfo.avatarUrl,
|
|
|
|
|
btnShow: true
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setData({
|
|
|
|
|
nickName: '',
|
|
|
|
|
avatarUrl: '',
|
|
|
|
|
btnShow: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
layout() {
|
|
|
|
|
let that = this;
|
|
|
|
|
wx.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: "确定要退出嘛?",
|
|
|
|
|
success(res) {
|
|
|
|
|
if(res.confirm) {
|
|
|
|
|
wx.setStorageSync("userInfo", null);
|
|
|
|
|
wx.setStorageSync("token", "");
|
|
|
|
|
wx.setStorageSync("openid", "");
|
|
|
|
|
that.getUser();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|