提交 f1095194 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复账户注册页面不勾选隐私政策协议也能成功注册并登陆的问题

上级 34011dc2
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<uni-forms-item name="pwd2" v-model="formData.pwd2" required> <uni-forms-item name="pwd2" v-model="formData.pwd2" required>
<uni-easyinput :inputBorder="false" class="easyinput" placeholder="再次输入密码" type="password" v-model="formData.pwd2" trim="both" /> <uni-easyinput :inputBorder="false" class="easyinput" placeholder="再次输入密码" type="password" v-model="formData.pwd2" trim="both" />
</uni-forms-item> </uni-forms-item>
<uni-agreements></uni-agreements> <uni-agreements @setAgree="agree = $event"></uni-agreements>
<button class="send-btn" type="primary" @click="submit">注册并登录</button> <button class="send-btn" type="primary" @click="submit">注册并登录</button>
</uni-forms> </uni-forms>
</view> </view>
...@@ -32,7 +32,8 @@ import mixin from '../common/login-page.mixin.js'; ...@@ -32,7 +32,8 @@ import mixin from '../common/login-page.mixin.js';
'password':'', 'password':'',
'pwd2':'' 'pwd2':''
}, },
rules rules,
agree:false
} }
}, },
onReady() { onReady() {
...@@ -42,7 +43,13 @@ import mixin from '../common/login-page.mixin.js'; ...@@ -42,7 +43,13 @@ import mixin from '../common/login-page.mixin.js';
/** /**
* 触发表单提交 * 触发表单提交
*/ */
submit() { submit() {
if(!this.agree){
return uni.showToast({
title: '你未同意隐私政策协议',
icon: 'none'
});
}
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册