|
|
@@ -83,6 +83,19 @@
|
|
|
<text class="login-tip-line">使用本机号码快速登录销花宝</text>
|
|
|
</view>
|
|
|
<button class="login-btn login-btn--primary" @click="mobileLogin">本机号码一键登录</button>
|
|
|
+ <view class="login-agreement">
|
|
|
+ <checkbox-group @change="agreeItem">
|
|
|
+ <label class="login-agreement-label">
|
|
|
+ <checkbox value="1" class="login-checkbox" :checked="agree == 1" />
|
|
|
+ <text class="login-agreement-text">
|
|
|
+ 我已阅读并同意
|
|
|
+ <text class="login-agreement-link" @click.stop="goToService">《服务协议》</text>
|
|
|
+ 和
|
|
|
+ <text class="login-agreement-link" @click.stop="goToPrivacy">《隐私政策》</text>
|
|
|
+ </text>
|
|
|
+ </label>
|
|
|
+ </checkbox-group>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
|
|
|
|
@@ -207,22 +220,15 @@ export default {
|
|
|
checkAgreement(callback){
|
|
|
let that = this
|
|
|
if(this.agree == 0){
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请阅读并同意服务协议和隐私政策',
|
|
|
- confirmText: '同意',
|
|
|
- cancelText: '不同意',
|
|
|
- success(res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.agree = 1
|
|
|
- that.$forceUpdate()
|
|
|
- if(callback && typeof callback === 'function'){
|
|
|
- callback()
|
|
|
- }
|
|
|
- } else if (res.cancel) {
|
|
|
- // 用户选择不同意,不执行任何操作
|
|
|
- console.log('用户选择不同意')
|
|
|
- }
|
|
|
+ this.$util.confirmModal({
|
|
|
+ content: '登录前请阅读并同意服务协议和隐私政策',
|
|
|
+ okText: '同意',
|
|
|
+ cancelText: '不同意'
|
|
|
+ }, () => {
|
|
|
+ that.agree = 1
|
|
|
+ that.$forceUpdate()
|
|
|
+ if(callback && typeof callback === 'function'){
|
|
|
+ callback()
|
|
|
}
|
|
|
})
|
|
|
return false
|
|
|
@@ -310,7 +316,7 @@ export default {
|
|
|
},
|
|
|
mobileLogin(){
|
|
|
let that = this
|
|
|
-
|
|
|
+ this.checkAgreement(function(){
|
|
|
uni.showLoading({mask:true})
|
|
|
uni.preLogin({
|
|
|
provider: 'univerify',
|
|
|
@@ -384,10 +390,11 @@ export default {
|
|
|
} else {
|
|
|
uni.showToast({title: '登录失败...', duration: 3000, icon:'none'})
|
|
|
}
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- },
|
|
|
+ },
|
|
|
loginFun(){
|
|
|
let that = this
|
|
|
let mobile = this.mobile
|