|
|
@@ -44,7 +44,12 @@ Page({
|
|
|
onLoad: function(options) {
|
|
|
if (wx.getStorageSync('userid')) {
|
|
|
// 获取用户信息
|
|
|
- app.utils.getHwUserInfo(this)
|
|
|
+ app.utils.getHwUserInfo(this);
|
|
|
+ wx.$watch('userinfo', this, (data) => {
|
|
|
+ this.setData({
|
|
|
+ userinfo: data
|
|
|
+ })
|
|
|
+ })
|
|
|
} else {
|
|
|
wx.reLaunch({
|
|
|
url: '/pages/login/login',
|
|
|
@@ -63,9 +68,7 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function() {
|
|
|
- this.setData({
|
|
|
- userinfo: wx.getStorageSync('userinfo')
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
|
|
|
/**
|