Commit fec9e467 authored by wanghuihui's avatar wanghuihui

修改onload执行的东西都放到onshow,为了避免登陆成功不刷新的问题

parent 7645b796
...@@ -27,6 +27,12 @@ Page({ ...@@ -27,6 +27,12 @@ Page({
loginPhoneShow: false loginPhoneShow: false
}, },
onLoad: function(options) { onLoad: function(options) {
},
onReady: function() {
},
onShow: function() {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
//获取用户的登录信息 //获取用户的登录信息
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
...@@ -39,13 +45,6 @@ Page({ ...@@ -39,13 +45,6 @@ Page({
} }
this.getSetUp(); this.getSetUp();
}, },
onReady: function() {
},
onShow: function() {
console.log(5)
},
getUserMsg() { getUserMsg() {
let that = this; let that = this;
util.request(api.UserIndex).then(function (res) { util.request(api.UserIndex).then(function (res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment