AgreePrivacy.ets 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { BasicType } from '../../models';
  2. import { yTToast } from '../../utils/arkts/utils/YTToast';
  3. import { YTButton } from '../generalComp/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.hide()
  21. item.loginType!.isAgreePrivacy = true
  22. item.loginType?.executeLogin()
  23. }
  24. })
  25. YTButton({
  26. btContent: '不同意',
  27. btHeight: 37,
  28. bgc: Color.White,
  29. btFontColor: '#80000000',
  30. click: () => {
  31. yTToast.hide()
  32. }
  33. })
  34. }
  35. .padding({ left: 16, right: 16 })
  36. }
  37. .width(280)
  38. .height(160)
  39. .backgroundColor(Color.White)
  40. .borderRadius(8)
  41. .margin({ bottom: 28 })
  42. }