import { IBestToast } from '../../../../Index'; import { BasicType, reqString } from '../models'; import { yTRequest } from '../utils/YTRequest'; import { yTToast } from '../utils/YTToast'; import { YtButton } from './YtButton'; @Builder export function AgreePrivacy(item: BasicType) { Column() { Text('温馨提示') .fontSize(14) .fontColor('#FF000000') .margin({ top: 14, bottom: 8 }) Text('已阅读并同意《用户协议》和《隐私政策》') .fontSize(13) .fontColor($r('sys.color.mask_secondary')) .margin({ bottom: 19 }) Column() { YtButton({ btContent: '同意并登入', btHeight: 37, click: () => { yTToast.hide() const loginData: reqString = AppStorage.get('captchaLogin')! if (item.text == '验证码登录') { if (!loginData.phonenumber || !loginData.captcha) { IBestToast.show({ message: "请输入手机号或验证码" }) return } yTRequest.phonenumberLogin(AppStorage.get('captchaLogin')!) } if (item.text == '华为登录') { yTRequest.huaweiLogin() } } }) YtButton({ btContent: '不同意', btHeight: 37, bgc: Color.White, btFontColor: '#80000000', click: () => { yTToast.hide() } }) } .padding({ left: 16, right: 16 }) } .width(280) .height(160) .backgroundColor(Color.White) .borderRadius(8) .margin({ bottom: 28 }) }