| | |
| | | </view> |
| | | |
| | | <view class="bottom-fixed colCen"> |
| | | <view class="verification-Code" @click="changeWay()"> |
| | | <view v-if="issh" class="verification-Code" @click="changeWay()"> |
| | | {{ifPasslogin?'验证码':'密码'}}登录 |
| | | </view> |
| | | </view> |
| | | <view class="explain-text rowCen"> |
| | | <switch type="checkbox" @change="changeread" :checked='isread' style="transform:scale(0.6)"/> |
| | | 登陆代表已详细阅读并同意<text @click="goPage('agreement')">《用户协议》</text>和<text @click="goPage('policy')">《隐私政策》</text> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | issh:false, |
| | | ifPasslogin: false, |
| | | pass: '', |
| | | phone: '', |
| | |
| | | showPass: true, |
| | | second: 60, |
| | | canGetCode: true, |
| | | prevent: true, |
| | | clientid:"" |
| | | prevent: true |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.shShow(); |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['login']), |
| | |
| | | changeread(e){ |
| | | this.isread = e.target.value |
| | | }, |
| | | shShow() |
| | | { |
| | | var that=this; |
| | | this.$u.api.comminInt({}).then(e => { |
| | | console.log(e) |
| | | that.hasshow=true; |
| | | // #ifdef APP-PLUS |
| | | if (plus.os.name == 'iOS') { |
| | | if (e.data.basic.iosExamine && plus.runtime.version == e.data.basic.IosExamineV) { |
| | | console.log('1') |
| | | that.issh=true; |
| | | } else { |
| | | console.log(0) |
| | | that.issh=false; |
| | | } |
| | | } |
| | | // #endif |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | dologin() { |
| | | var that = this; |
| | | // #ifdef APP-PLUS |
| | | plus.push.getClientInfoAsync((info) => { |
| | | that.clientid = info["clientid"]; |
| | | }); |
| | | // #endif |
| | | |
| | | let clientInfo = uni.getStorageSync('clientInfo'); |
| | | var pushCid=""; |
| | | if(clientInfo&&clientInfo.clientid) |
| | | { |
| | | pushCid=clientInfo.clientid; |
| | | } |
| | | if(this.isread){ |
| | | if (this.ifPasslogin) { |
| | | //密码登录 |
| | |
| | | }).catch(function (err) { |
| | | }) |
| | | } else { |
| | | let strsr={ |
| | | mobile: this.phone, |
| | | captcha: this.code, |
| | | pushCid:pushCid |
| | | }; |
| | | console.log(strsr) |
| | | //验证码登录 |
| | | this.$u.api.mobileLogin({ |
| | | mobile: this.phone, |
| | | captcha: this.code, |
| | | push_cid:this.clientid |
| | | pushCid:pushCid |
| | | }).then(e => { |
| | | that.login(e.data.userinfo); |
| | | if(e.code != 0) return that.$alert(e.msg) |
| | |
| | | url: './setInviteCode' |
| | | }) |
| | | } |
| | | else if (e.data.userinfo.isPwd == 'N') { |
| | | /* else if (e.data.userinfo.isPwd == 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | | } else { |
| | | } */else { |
| | | //更新pushcid |
| | | getApp().updatePushCid(); |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |