|
@@ -69,34 +69,7 @@ Page({
|
|
|
|
|
|
|
|
|
},
|
|
|
- getUserData() {
|
|
|
- $api.getAuthinfo().then(res=>{
|
|
|
- wx.setNavigationBarTitle({
|
|
|
- title: '',
|
|
|
- })
|
|
|
- if(res.data.data.phone == null || res.data.data.phone==''){
|
|
|
- return
|
|
|
- }
|
|
|
- if(res.data.data.role==0){
|
|
|
- this.setData({
|
|
|
- status:3
|
|
|
- })
|
|
|
|
|
|
- }else{
|
|
|
- this.setData({
|
|
|
- usercode: res.data.data.usercode,
|
|
|
- userinfo: res.data.data,
|
|
|
- status:3
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err=>{
|
|
|
- this.setData({
|
|
|
- userinfo: {},
|
|
|
- status:0
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
|
@@ -163,15 +136,19 @@ Page({
|
|
|
$api.login(data)
|
|
|
.then(res=>{
|
|
|
//登录成功
|
|
|
+ wx.setStorage({
|
|
|
+ key: 'userInfo',
|
|
|
+ data: res.data.data,
|
|
|
+ })
|
|
|
//老用户直接进入系统
|
|
|
if(res.data.data.role != 0){
|
|
|
wx.switchTab({
|
|
|
url: '../index/index',
|
|
|
})
|
|
|
}
|
|
|
- //新用户
|
|
|
+ //新用户选择报名
|
|
|
_this.setData({
|
|
|
- status:res.data.data.status
|
|
|
+ status:3
|
|
|
})
|
|
|
wx.hideLoading();
|
|
|
wx.setNavigationBarTitle({
|
|
@@ -184,10 +161,7 @@ Page({
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
- wx.setStorage({
|
|
|
- key: 'userInfo',
|
|
|
- data: res.data.data,
|
|
|
- })
|
|
|
+
|
|
|
|
|
|
|
|
|
|