|
|
@ -11,11 +11,13 @@ Component({ |
|
|
addGlobalClass: true, |
|
|
addGlobalClass: true, |
|
|
multipleSlots: true |
|
|
multipleSlots: true |
|
|
}, |
|
|
}, |
|
|
|
|
|
properties: { |
|
|
|
|
|
height: { type: Number, value: 0 } |
|
|
|
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 页面的初始数据 |
|
|
* 页面的初始数据 |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
height: app.globalData.safeFragmentHeight, |
|
|
|
|
|
firstShow: false, |
|
|
firstShow: false, |
|
|
userInfo: null, |
|
|
userInfo: null, |
|
|
avatarUrl: '/assets/myinfo/user-icon.png', |
|
|
avatarUrl: '/assets/myinfo/user-icon.png', |
|
|
@ -71,6 +73,9 @@ Component({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handUserInfo: function(){ |
|
|
handUserInfo: function(){ |
|
|
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
var nickname = '' |
|
|
var nickname = '' |
|
|
if (app.globalData.userInfo.isAuth) { |
|
|
if (app.globalData.userInfo.isAuth) { |
|
|
nickname = app.globalData.userInfo.realName.substring(0, 14) |
|
|
nickname = app.globalData.userInfo.realName.substring(0, 14) |
|
|
@ -86,8 +91,7 @@ Component({ |
|
|
if(app.globalData.isVIP == 1 && app.globalData.userInfo.memberExpiredAt){ |
|
|
if(app.globalData.isVIP == 1 && app.globalData.userInfo.memberExpiredAt){ |
|
|
app.globalData.userInfo.memberExpiredAt = util.formatDate(new Date(app.globalData.userInfo.memberExpiredAt.replace(/\-/g, "/")), 'Y-M-D') |
|
|
app.globalData.userInfo.memberExpiredAt = util.formatDate(new Date(app.globalData.userInfo.memberExpiredAt.replace(/\-/g, "/")), 'Y-M-D') |
|
|
} |
|
|
} |
|
|
this.setData({ height: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight - 100), |
|
|
|
|
|
CustomBar: app.globalData.CustomBar, avatarUrl: app.globalData.userInfo.avatarUrl, userInfo: app.globalData.userInfo }) |
|
|
|
|
|
|
|
|
this.setData({ CustomBar: app.globalData.CustomBar, avatarUrl: app.globalData.userInfo.avatarUrl, userInfo: app.globalData.userInfo }) |
|
|
}, |
|
|
}, |
|
|
fetchUserInfo: function () { |
|
|
fetchUserInfo: function () { |
|
|
if (!app.globalData.token) { |
|
|
if (!app.globalData.token) { |
|
|
|