空值?
错误提示如下:
var app=getApp
Page({
data: {
username:null
},
onLoad: function (options) {
if (app.appData.userinfo == null){
wx.redirectTo({ url: “…/logs/logs”})
}else{
this.setData({ username: app.appData.userinfo.username })
}
},
onReady: function () {
},
onShow: function () {
},
onHide: function () {
},
onUnload: function () {
}
})