diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index 9c2f7c8..a1b18c2 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -27,18 +27,18 @@ @getphonenumber="decryptPhoneNumber"> - 手机号快捷登录 + 一键登录 - + @@ -50,7 +50,10 @@ 使用协议及隐私保护 - 为了更好地保障您的合法权益,请您阅读并同意 《用户协议》《隐私政策》。 + 为了更好地保障您的合法权益,请您阅读并同意 《用户协议》《隐私政策》 @@ -73,7 +76,7 @@ }, data() { return { - loginType:false, + loginType: false, // imgsrc:require('../../../BagStation/static/img/login-bg.png'), checked: false, userHandle: false, @@ -90,12 +93,12 @@ sessionKey: '', nickName: '', loginOut: uni.getStorageSync('loginOut') ? true : false, - scanningParams:null + scanningParams: null } }, onLoad(e) { - if(e.loginType){ - this.loginType = Boolean(e.loginType); + if (e.loginType) { + this.loginType = Boolean(e.loginType); } uni.clearStorageSync() // this.refreshLocation() @@ -103,10 +106,10 @@ provider: 'weixin', success: (loginRes) => { const code = loginRes.code - this.onceCode = code + this.onceCode = code oilIdentityApi.sendCode(this.onceCode).then(res => { if (res.code === 20000) { - if(e.scanningParams) { + if (e.scanningParams) { // 用于扫码进入油站详情页面 this.scanningParams = e.scanningParams } @@ -143,7 +146,7 @@ this.checked = val }, refuseLogin() { - uni.setStorageSync('loginType',false) + uni.setStorageSync('loginType', false) uni.switchTab({ url: '/pages/tabbar/home/home' }) @@ -164,8 +167,7 @@ }, url).then(res => { if (res.code == 20000) { this.loginSuccess(res) - }else{ - } + } else {} }) }, refuseEmpower() { @@ -204,7 +206,7 @@ if (this.count < 1) { oilIdentityApi.bindLoginByPhone(data, url).then(res => { if (res.code == 20000) { - this.loginSuccess(res) + this.loginSuccess(res) } }) } @@ -231,18 +233,18 @@ // } // }) // }, 1000); - if(this.scanningParams) { + if (this.scanningParams) { uni.redirectTo({ url: `/BagStation/pages/makeOrder/makeOrder?q=${this.scanningParams}` }) - return + return } // 这里有问题 uni.switchTab({ url: '/pages/tabbar/home/home' }) - }else{ - if(!this.loginType){ + } else { + if (!this.loginType) { this.refuseLogin() } } @@ -253,7 +255,7 @@ + \ No newline at end of file