UNIAPP listens to check the check box (choose to read the agreement) and then log in in the next step

Record the option to read the agreement before proceeding to the next step

<checkbox-group  @change="handleChange">
				<label >
					<checkbox  />
					<view >我已阅读并同意
					<text class="col-g" @click="handleXI">《用户协议》</text>
					<text class="col-g" @click="handleYX">《隐私协议》</text>
					</view>
				</label>
</checkbox-group>
data() {
			return {
				//判断是否勾选
				value: ''
			}
		},
handleChange(e) {
			 	this.value = e.detail.value;
				console.log(this.value);
				if(this.value.length == 0){
					uni.$u.toast('请勾选《用户协议》《隐私协议》!')
				}else{
					console.log('勾选成功')
				}
			},

By the way:
uni-app check box checkbox size adjustment
needs transform: scale(),
personally suggest 0.7 size is more appropriate,
the reference code is as follows

<checkbox
	style="transform: scale(0.7)"
	 :checked="item.isChecked"
	 :value="item.isChecked"
	 class="more"
></checkbox>

Guess you like

Origin blog.csdn.net/qq_37194189/article/details/130107542