登录跳转代码:
if(res.data.status == 1){
console.log(res)
uni.setStorageSync('login_key','0')
until.loadUserInfo()
uni.switchTab({
url : '../../../home/home'
})
}
home页onLoad方法:
onLoad:function(option) {
console.log(uni.getStorageSync('userinfo'))
console.log('执行首页onLoad方法')
this.loadData()
},
非常困惑的是执行this.loadData()方法却不执行上面两个console,另外,下一步点击我的(tabbar页面)的onLoad方法全都不执行
1 个回复
7***@qq.com
艾格丽吴波