html部分:
<checkbox-group @change="checkboxChange" class="xiaozi">
<checkbox :checked="ckstate"></checkbox>我已经阅读并同意
<text @click="tzflag" class="flag">服务条款</text>
</checkbox-group>
js部分:
// 验证服务条款
checkboxChange(e) {
this.ckstate = !this.ckstate;
},
validteFlag() {
if (!this.ckstate) {
uni.showToast({
title: '提示信息!',
icon: 'none',
duration: 5000
});
return false
}
return true
},
tzflag(){
this.$navTo('pages/addnew/tiaokuan')
},