| | |
| | | }) |
| | | } |
| | | }, |
| | | targetToIndex(e) |
| | | { |
| | | var that = this; |
| | | |
| | | that.login(e.data.userinfo); |
| | | utils.setCache('userInfo', e.data.userinfo) |
| | | getApp().globalData.userInfo = e.data.userinfo |
| | | that.$alert('登录成功') |
| | | setTimeout(function(){ |
| | | console.log(e.data.userinfo) |
| | | if(!e.data.userinfo.invitation_code) |
| | | { |
| | | uni.redirectTo({ |
| | | url: './setInviteCode' |
| | | }) |
| | | } |
| | | else if (e.data.userinfo.isPwd == 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | | } else { |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | | } |
| | | },1000) |
| | | }, |
| | | bindMobile(){ |
| | | var that = this; |
| | | if(!this.hasLogin && this.wxUser != ""){ |
| | |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | that.login(e.data.userinfo); |
| | | this.targetToIndex(e); |
| | | /* that.login(e.data.userinfo); |
| | | that.$alert('登录成功') |
| | | setTimeout(function() { |
| | | if (e.data.userinfo.isPwd == |
| | |
| | | url: '../index/index' |
| | | }) |
| | | } |
| | | }, 1000) |
| | | }, 1000) */ |
| | | }).catch(function (err) { |
| | | console.log(err) |
| | | }) |