| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- 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<undefined>) {
- Column() {
- Text('温馨提示')
- .fontSize(14)
- .fontColor('Color.Black')
- .margin({ top: 14, bottom: 8 })
- Text('已阅读并同意《用户协议》和《隐私政策》')
- .fontSize(13)
- .fontColor($r('sys.color.mask_secondary'))
- .margin({ bottom: 19 })
- Column() {
- YTButton({
- btContent: '同意并登入',
- btHeight: 37,
- click: () => {
- YTToast.getInstance().hide()
- const loginData: ReqString = AppStorage.get<ReqString>('captchaLogin')!
- if (item.text == '验证码登录') {
- if (!loginData.phonenumber || !loginData.captcha) {
- IBestToast.show({
- message: "请输入手机号或验证码"
- })
- return
- }
- YTRequest.phonenumberLogin(AppStorage.get<ReqString>('captchaLogin')!)
- }
- if (item.text == '华为登录') {
- YTRequest.huaweiLogin()
- }
- }
- })
- YTButton({
- btContent: '不同意',
- btHeight: 37,
- bgc: Color.White,
- btFontColor: '#80000000',
- click: () => {
- YTToast.getInstance().hide()
- }
- })
- }
- .padding({ left: 16, right: 16 })
- }
- .width(280)
- .height(160)
- .backgroundColor(Color.White)
- .borderRadius(8)
- .margin({ bottom: 28 })
- }
|