| | |
| | | }) |
| | | } |
| | | }, |
| | | targetToIndex(e) |
| | | { |
| | | var that = this; |
| | | |
| | | that.login(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) |
| | | }, |
| | | wxlogin() { |
| | | var that = this; |
| | | if (this.isread) { |
| | |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data; |
| | | if(res.type == 'goUser'){ |
| | | that.login(e.data.userinfo); |
| | | that.$alert('登录成功') |
| | | setTimeout(function() { |
| | | if (res.userinfo.isPwd == |
| | | 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | | } else { |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | | } |
| | | }, 1000) |
| | | this.targetToIndex(e); |
| | | }else if(res.type == 'bindMobile'){ |
| | | uni.navigateTo({ |
| | | url: "./bindingPhone?wx="+encodeURIComponent(JSON.stringify(res.info)) |