|
|
@ -7,8 +7,8 @@ Page({ |
|
|
|
* 页面的初始数据 |
|
|
|
*/ |
|
|
|
data: { |
|
|
|
mobile: '',//17637262085
|
|
|
|
password: ''//123456
|
|
|
|
mobile: '', //17637262085
|
|
|
|
password: '' //123456
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
@ -66,7 +66,7 @@ Page({ |
|
|
|
onShareAppMessage() { |
|
|
|
|
|
|
|
}, |
|
|
|
handleLogin () { |
|
|
|
handleLogin() { |
|
|
|
var that = this; |
|
|
|
if (that.data.mobile == '') { |
|
|
|
wx.showToast({ |
|
|
@ -96,17 +96,17 @@ Page({ |
|
|
|
password: that.data.password, |
|
|
|
wxCode: code |
|
|
|
}; |
|
|
|
api.getToken(params).then( (res) =>{ |
|
|
|
api.getToken(params).then((res) => { |
|
|
|
console.log(res); |
|
|
|
if (res.code == 0) { |
|
|
|
wx.setStorageSync('token', res.data.token); |
|
|
|
wx.setStorageSync('userId', res.data.userId); |
|
|
|
wx.setStorageSync('userTagKey', res.data.userTagKey); |
|
|
|
// this.getToken()
|
|
|
|
wx.setStorageSync('deptDataScopeList', JSON.stringify(res.data.deptDataScopeList)); |
|
|
|
wx.switchTab({ |
|
|
|
url: '/pages/home/home' |
|
|
|
}); |
|
|
|
} |
|
|
|
else { |
|
|
|
}); |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none', |
|
|
@ -127,22 +127,19 @@ Page({ |
|
|
|
mobile: e.detail.value |
|
|
|
}); |
|
|
|
}, |
|
|
|
getPassword (e) { |
|
|
|
getPassword(e) { |
|
|
|
this.setData({ |
|
|
|
password: e.detail.value |
|
|
|
}); |
|
|
|
}, |
|
|
|
toRegister(){ |
|
|
|
// wx.navigateTo({
|
|
|
|
// url: `/subpages/home/pages/newsDetail/newsDetail`
|
|
|
|
// })
|
|
|
|
toRegister() { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/formid/formid` |
|
|
|
}) |
|
|
|
}, |
|
|
|
forgotPwd(){ |
|
|
|
forgotPwd() { |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/forgotPwd/forgotPwd', |
|
|
|
url: '/pages/forgotPwd/forgotPwd', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |