|
@ -25,6 +25,8 @@ Page({ |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
onLoad: function () { |
|
|
onLoad: function () { |
|
|
|
|
|
if (store.hasBindUserInfo()){ |
|
|
|
|
|
console.log('已经绑定微信') |
|
|
if (store.hasPhone()) { |
|
|
if (store.hasPhone()) { |
|
|
console.log('已经绑定手机号码') |
|
|
console.log('已经绑定手机号码') |
|
|
} else { |
|
|
} else { |
|
@ -33,10 +35,23 @@ Page({ |
|
|
url: '/pages/register/index', |
|
|
url: '/pages/register/index', |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('未绑定微信') |
|
|
|
|
|
wx.reLaunch({ |
|
|
|
|
|
url: '/pages/user/index', |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onShow: function () { |
|
|
onShow: function () { |
|
|
// 页面出现在前台时执行
|
|
|
// 页面出现在前台时执行
|
|
|
console.log('啦啦啦') |
|
|
console.log('啦啦啦') |
|
|
|
|
|
let segmentIndex = this.data.segmentIndex |
|
|
|
|
|
if (segmentIndex === 0 || segmentIndex === 1){ |
|
|
|
|
|
wx.pageScrollTo({ |
|
|
|
|
|
scrollTop: 0, |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
currPage: 1, |
|
|
currPage: 1, |
|
|
}) |
|
|
}) |
|
|