| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import { BasicType } from '../../models';
- import { yTRouter } from '../../utils/YTRouter';
- import { YTToast } from '../../utils/YTToast';
- import { YTButton } from './YTButton';
- @Extend(Span)
- function spanEx(click: () => void) {
- // .decoration({ type: TextDecorationType.Underline, color: $r('[basic].color.main_ac_color_dark') })
- .fontColor('rgba(0, 0, 0, 0.85)')
- .onClick(click)
- }
- @Builder
- export function agreePrivacy(item: BasicType<undefined>) {
- Column() {
- Text('温馨提示')
- .fontSize(14)
- .fontColor('Color.Black')
- .margin({ top: 14, bottom: 8 })
- Text() {
- Span('我已阅读并同意')
- // Span('《中国认证服务条款》')
- // .spanEx(() => {
- //
- // })
- //
- // Span('以及')
- Span('《樱桃小决定用户协议》')
- .spanEx(() => {
- yTRouter.router2userAgreement()
- })
- Span('和')
- Span('《隐私政策》')
- .spanEx(() => {
- yTRouter.router2Privacy()
- })
- Span('。')
- }
- .fontWeight(300)
- .fontColor('#FF686868')
- .fontSize(12)
- Column() {
- YTButton({
- btContent: '同意并登入',
- btHeight: 37,
- bgc:'rgba(253, 95, 229, 1)',
- btFontColor:Color.White,
- click: () => {
- YTToast.getInstance().hide()
- // if (item.text == '验证码登录') {
- // if (!loginData.phonenumber || !loginData.captcha) {
- // IBestToast.show({
- // message: "请输入手机号或验证码"
- // })
- // return
- // }
- //
- // // YTRequest.phonenumberLogin(AppStorage.get<ReqString>('captchaLogin')!)
- // }
- // if (item.text == '华为登录') {
- // // YTRequest.huaweiLogin()
- // }
- item.loginType!.isAgreePrivacy = true
- item.loginType?.executeLogin()
- }
- })
- 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 })
- }
|