AgreePrivacy.ets 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { BasicType } from '../../models';
  2. import { YTToast } from '../../utils/YTToast';
  3. import { YTButton } from './YTButton';
  4. @Builder
  5. export function agreePrivacy(item: BasicType<undefined>) {
  6. Column() {
  7. Text('温馨提示')
  8. .fontSize(14)
  9. .fontColor('Color.Black')
  10. .margin({ top: 14, bottom: 8 })
  11. Text('已阅读并同意《用户协议》和《隐私政策》')
  12. .fontSize(13)
  13. .fontColor($r('sys.color.mask_secondary'))
  14. .margin({ bottom: 19 })
  15. Column() {
  16. YTButton({
  17. btContent: '同意并登入',
  18. btHeight: 37,
  19. click: () => {
  20. YTToast.getInstance().hide()
  21. // if (item.text == '验证码登录') {
  22. // if (!loginData.phonenumber || !loginData.captcha) {
  23. // IBestToast.show({
  24. // message: "请输入手机号或验证码"
  25. // })
  26. // return
  27. // }
  28. //
  29. // // YTRequest.phonenumberLogin(AppStorage.get<ReqString>('captchaLogin')!)
  30. // }
  31. // if (item.text == '华为登录') {
  32. // // YTRequest.huaweiLogin()
  33. // }
  34. item.loginType!.isAgreePrivacy = true
  35. item.loginType?.executeLogin()
  36. },
  37. btlinear: {
  38. colors: [ ['#B9FD2A', 0.5], ['#F5FD6D', 1] ],
  39. angle: 135
  40. },
  41. btFontColor: '#212245',
  42. btFontSize: 14,
  43. })
  44. YTButton({
  45. btContent: '不同意',
  46. btHeight: 37,
  47. bgc: Color.White,
  48. btFontColor: '#80000000',
  49. click: () => {
  50. YTToast.getInstance().hide()
  51. }
  52. })
  53. }
  54. .padding({ left: 16, right: 16 })
  55. }
  56. .width(280)
  57. .height(160)
  58. .backgroundColor(Color.White)
  59. .borderRadius(8)
  60. .margin({ bottom: 28 })
  61. }