| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="input-container colCen" v-else> |
| | | <view class="outSidebox rowCenBet" data-type='pass' :class="selectedInput=='code'?'outSidebox-active':''"> |
| | | <input @focus="changeType" @blur="cleanActive" data-type='code' type="number" v-model="code" placeholder="请输入验证码" |
| | |
| | | |
| | | if(this.isread){ |
| | | if (this.ifPasslogin) { |
| | | //密码登录 |
| | | var param = { |
| | | account: this.phone, |
| | | password: this.pass, |
| | |
| | | } |
| | | this.$u.api.login(param).then(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(){ |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }); |
| | | },1000) |
| | | },1000) */ |
| | | }).catch(function (err) { |
| | | }) |
| | | } else { |
| | | //验证码登录 |
| | | this.$u.api.mobileLogin({ |
| | | mobile: this.phone, |
| | | captcha: this.code, |
| | | push_cid:this.clientid |
| | | }).then(e => { |
| | | if(e.code != 0) return that.$alert(e.msg) |
| | | that.login(e.data.userinfo); |
| | | if(e.code != 0) return that.$alert(e.msg) |
| | | this.targetToIndex(e); |
| | | /* that.login(e.data.userinfo); |
| | | utils.setCache('userInfo', e.data.userinfo) |
| | | getApp().globalData.userInfo = e.data.userinfo |
| | | that.$alert('登录成功') |
| | |
| | | url: '../index/index' |
| | | }) |
| | | } |
| | | },1000) |
| | | },1000) */ |
| | | |
| | | }).catch(function (err) { |
| | | }) |
| | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | 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) |
| | | }, |
| | | |
| | | showPassfnc() { |
| | | this.showPass = !this.showPass |