You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
568 B
JavaScript
29 lines
568 B
JavaScript
|
2 years ago
|
//获取应用实例
|
||
|
|
const app = getApp()
|
||
|
|
|
||
|
|
Page({
|
||
|
|
data: {
|
||
|
|
userInfo: {}
|
||
|
|
},
|
||
|
|
onLoad: function () {
|
||
|
|
if (app.globalData.currentUser) {
|
||
|
|
this.setData({
|
||
|
|
userInfo: app.globalData.currentUser
|
||
|
|
})
|
||
|
|
}
|
||
|
|
},
|
||
|
|
goTo(e) {
|
||
|
|
wx.navigateTo({
|
||
|
|
url: e.target.dataset.link,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
logout() {
|
||
|
|
wx.clearStorage({
|
||
|
|
success: (res) => {
|
||
|
|
wx.reLaunch({
|
||
|
|
url: "/pages/login/login",
|
||
|
|
});
|
||
|
|
},
|
||
|
|
})
|
||
|
|
}
|
||
|
|
})
|