Showing
2 changed files
with
59 additions
and
112 deletions
| 1 | -import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage' | ||
| 2 | -import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule' | ||
| 3 | -import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index' | ||
| 4 | - | ||
| 5 | -@CustomDialog | ||
| 6 | -export struct CustomProtocolDialog { | ||
| 7 | - controller: CustomDialogController | ||
| 8 | - | ||
| 9 | - cancel: () => void = () => { | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | - confirm: () => void = () => { | ||
| 13 | - } | ||
| 14 | - | ||
| 15 | - build() { | ||
| 16 | - Column() { | ||
| 17 | - Text("温馨提示") | ||
| 18 | - .fontColor("#222222") | ||
| 19 | - .fontSize(18) | ||
| 20 | - .width("100%") | ||
| 21 | - .fontWeight(FontWeight.Bold) | ||
| 22 | - .textAlign(TextAlign.Center) | ||
| 23 | - .margin({ top: 20 }) | ||
| 24 | - Text() { | ||
| 25 | - Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666") | ||
| 26 | - Span("《用户协议》").fontSize(14).fontColor("#ED2800").onClick(()=>{ | ||
| 27 | - let bean={contentID:"1",pageID:""} as Params | ||
| 28 | - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) | ||
| 29 | - this.controller.close() | ||
| 30 | - }) | ||
| 31 | - Span("及").fontSize(14).fontColor("#666666") | ||
| 32 | - Span("《隐私政策》").fontSize(14).fontColor("#ED2800").onClick(()=>{ | ||
| 33 | - let bean={contentID:"2",pageID:""} as Params | ||
| 34 | - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) | ||
| 35 | - this.controller.close() | ||
| 36 | - }) | ||
| 37 | - Span("后进行登录").fontSize(14).fontColor("#666666") | ||
| 38 | - }.margin({ top: 12, left: 16, right: 16 }) | ||
| 39 | - | ||
| 40 | - Divider().color("#999999").width("100%").margin({ top: 14 }).height('1vp') | ||
| 41 | - Row() { | ||
| 42 | - Text('放弃登录') | ||
| 43 | - .fontSize(16) | ||
| 44 | - .fontColor("#999999") | ||
| 45 | - .layoutWeight(1) | ||
| 46 | - .fontWeight(FontWeight.Medium) | ||
| 47 | - .textAlign(TextAlign.Center) | ||
| 48 | - .onClick(() => { | ||
| 49 | - this.controller.close() | ||
| 50 | - if (this.cancel) { | ||
| 51 | - this.cancel() | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - }) | ||
| 55 | - .height('100%') | ||
| 56 | - // Divider().color("#999999").height('100%').width('0.5vp') | ||
| 57 | - Text('同意并登录') | ||
| 58 | - .fontSize(16) | ||
| 59 | - .fontColor("#ED2800") | ||
| 60 | - .layoutWeight(1) | ||
| 61 | - .fontWeight(FontWeight.Medium) | ||
| 62 | - .textAlign(TextAlign.Center) | ||
| 63 | - .border({ | ||
| 64 | - width: { left: 1 }, | ||
| 65 | - color: "#999999", | ||
| 66 | - style: { left: BorderStyle.Solid } | ||
| 67 | - | ||
| 68 | - }) | ||
| 69 | - .onClick(() => { | ||
| 70 | - this.controller.close() | ||
| 71 | - if (this.confirm) { | ||
| 72 | - this.confirm() | ||
| 73 | - } | ||
| 74 | - }) | ||
| 75 | - .height('100%') | ||
| 76 | - }.layoutWeight(1).justifyContent(FlexAlign.Center) | ||
| 77 | - }.height(161).backgroundColor(Color.White).borderRadius(6).width('74%') | ||
| 78 | - } | ||
| 79 | -} |
| 1 | import { Logger, EmitterEventId, EmitterUtils, DateTimeUtils,CustomToast, StringUtils, NetworkUtil } from 'wdKit' | 1 | import { Logger, EmitterEventId, EmitterUtils, DateTimeUtils,CustomToast, StringUtils, NetworkUtil } from 'wdKit' |
| 2 | -import { CustomProtocolDialog } from './CustomProtocolDialog' | ||
| 3 | import router from '@ohos.router' | 2 | import router from '@ohos.router' |
| 4 | import { LoginViewModel } from './LoginViewModel' | 3 | import { LoginViewModel } from './LoginViewModel' |
| 5 | import { LoginInputComponent } from './LoginInputComponent' | 4 | import { LoginInputComponent } from './LoginInputComponent' |
| @@ -57,18 +56,6 @@ struct LoginPage { | @@ -57,18 +56,6 @@ struct LoginPage { | ||
| 57 | maskColor:"#00000000" | 56 | maskColor:"#00000000" |
| 58 | }) | 57 | }) |
| 59 | 58 | ||
| 60 | - dialogController: CustomDialogController = new CustomDialogController({ | ||
| 61 | - builder: CustomProtocolDialog({ | ||
| 62 | - cancel: () => { | ||
| 63 | - | ||
| 64 | - }, | ||
| 65 | - confirm: () => { | ||
| 66 | - this.requestLogin() | ||
| 67 | - } | ||
| 68 | - }), | ||
| 69 | - customStyle: true, | ||
| 70 | - alignment:DialogAlignment.Center | ||
| 71 | - }) | ||
| 72 | loginViewModel = new LoginViewModel() | 59 | loginViewModel = new LoginViewModel() |
| 73 | @State isProtocol:boolean=false | 60 | @State isProtocol:boolean=false |
| 74 | onCodeSend() { | 61 | onCodeSend() { |
| @@ -467,32 +454,58 @@ struct ProtocolComponent { | @@ -467,32 +454,58 @@ struct ProtocolComponent { | ||
| 467 | Column() { | 454 | Column() { |
| 468 | Text("温馨提示") | 455 | Text("温馨提示") |
| 469 | .fontColor("#222222") | 456 | .fontColor("#222222") |
| 470 | - .fontSize(18) | 457 | + .fontSize("35lpx") |
| 458 | + .lineHeight("50lpx") | ||
| 471 | .width("100%") | 459 | .width("100%") |
| 472 | - .fontWeight(FontWeight.Bold) | 460 | + .fontWeight(500) |
| 473 | .textAlign(TextAlign.Center) | 461 | .textAlign(TextAlign.Center) |
| 474 | - .margin({ top: 20 }) | 462 | + .margin({ top: "38lpx" }) |
| 475 | Text() { | 463 | Text() { |
| 476 | - Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666") | ||
| 477 | - Span("《用户协议》").fontSize(14).fontColor("#ED2800").onClick(() => { | 464 | + Span("为保障您的合法权益,请阅读并同意") |
| 465 | + .fontSize("27lpx") | ||
| 466 | + .lineHeight("42lpx") | ||
| 467 | + .fontWeight(400) | ||
| 468 | + .fontColor("#666666") | ||
| 469 | + | ||
| 470 | + Span("《用户协议》") | ||
| 471 | + .fontSize("27lpx") | ||
| 472 | + .lineHeight("42lpx") | ||
| 473 | + .fontWeight(400) | ||
| 474 | + .fontColor("#ED2800") | ||
| 475 | + .onClick(() => { | ||
| 478 | let bean = { contentID: "1", pageID: "" } as Params | 476 | let bean = { contentID: "1", pageID: "" } as Params |
| 479 | WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | 477 | WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) |
| 480 | }) | 478 | }) |
| 481 | - Span("及").fontSize(14).fontColor("#666666") | ||
| 482 | - Span("《隐私政策》").fontSize(14).fontColor("#ED2800").onClick(() => { | 479 | + Span("及").fontSize("27lpx") |
| 480 | + .lineHeight("42lpx") | ||
| 481 | + .fontWeight(400) | ||
| 482 | + .fontColor("#666666") | ||
| 483 | + Span("《隐私政策》") | ||
| 484 | + .fontSize("27lpx") | ||
| 485 | + .lineHeight("42lpx") | ||
| 486 | + .fontWeight(400) | ||
| 487 | + .fontColor("#ED2800") | ||
| 488 | + .onClick(() => { | ||
| 483 | let bean = { contentID: "2", pageID: "" } as Params | 489 | let bean = { contentID: "2", pageID: "" } as Params |
| 484 | WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | 490 | WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) |
| 485 | }) | 491 | }) |
| 486 | - Span("后进行登录").fontSize(14).fontColor("#666666") | ||
| 487 | - }.margin({ top: 12, left: 16, right: 16 }) | ||
| 488 | - | ||
| 489 | - Divider().color("#999999").width("100%").margin({ top: 14 }).height('1vp') | 492 | + Span("后进行登录") |
| 493 | + .fontSize("27lpx") | ||
| 494 | + .lineHeight("42lpx") | ||
| 495 | + .fontWeight(400) | ||
| 496 | + .fontColor("#666666") | ||
| 497 | + }.margin({ top: "23lpx", left: "31lpx", right: "31lpx" }) | ||
| 498 | + .wordBreak(WordBreak.BREAK_ALL) | ||
| 499 | + .textAlign(TextAlign.Start) | ||
| 500 | + | ||
| 501 | + Divider().color("#f5f5f5").width("100%").margin({ top: "27lpx" }).height('1lpx').strokeWidth('1lpx') | ||
| 490 | Row() { | 502 | Row() { |
| 491 | Text('放弃登录') | 503 | Text('放弃登录') |
| 492 | - .fontSize(16) | 504 | + .fontSize("31lpx") |
| 505 | + .fontWeight(500) | ||
| 506 | + .lineHeight("42lpx") | ||
| 493 | .fontColor("#999999") | 507 | .fontColor("#999999") |
| 494 | .layoutWeight(1) | 508 | .layoutWeight(1) |
| 495 | - .fontWeight(FontWeight.Medium) | ||
| 496 | .textAlign(TextAlign.Center) | 509 | .textAlign(TextAlign.Center) |
| 497 | .onClick(() => { | 510 | .onClick(() => { |
| 498 | if (this.cancelMethod) { | 511 | if (this.cancelMethod) { |
| @@ -500,18 +513,26 @@ struct ProtocolComponent { | @@ -500,18 +513,26 @@ struct ProtocolComponent { | ||
| 500 | } | 513 | } |
| 501 | }) | 514 | }) |
| 502 | .height('100%') | 515 | .height('100%') |
| 503 | - // Divider().color("#999999").height('100%').width('0.5vp') | 516 | + |
| 517 | + Divider() | ||
| 518 | + .width("1lpx") | ||
| 519 | + .strokeWidth('1lpx') | ||
| 520 | + .vertical(true) | ||
| 521 | + .height('100%') | ||
| 522 | + .color("#F5F5F5") | ||
| 523 | + | ||
| 524 | + | ||
| 504 | Text('同意并登录') | 525 | Text('同意并登录') |
| 505 | - .fontSize(16) | 526 | + .fontSize("31lpx") |
| 527 | + .fontWeight(500) | ||
| 528 | + .lineHeight("42lpx") | ||
| 506 | .fontColor("#ED2800") | 529 | .fontColor("#ED2800") |
| 507 | .layoutWeight(1) | 530 | .layoutWeight(1) |
| 508 | - .fontWeight(FontWeight.Medium) | ||
| 509 | .textAlign(TextAlign.Center) | 531 | .textAlign(TextAlign.Center) |
| 510 | .border({ | 532 | .border({ |
| 511 | width: { left: 1 }, | 533 | width: { left: 1 }, |
| 512 | - color: "#999999", | 534 | + color: "#F5F5F5", |
| 513 | style: { left: BorderStyle.Solid } | 535 | style: { left: BorderStyle.Solid } |
| 514 | - | ||
| 515 | }) | 536 | }) |
| 516 | .onClick(() => { | 537 | .onClick(() => { |
| 517 | if (this.agreeMethod) { | 538 | if (this.agreeMethod) { |
| @@ -519,8 +540,13 @@ struct ProtocolComponent { | @@ -519,8 +540,13 @@ struct ProtocolComponent { | ||
| 519 | } | 540 | } |
| 520 | }) | 541 | }) |
| 521 | .height('100%') | 542 | .height('100%') |
| 522 | - }.layoutWeight(1).justifyContent(FlexAlign.Center) | ||
| 523 | - }.height(161).backgroundColor(Color.White).borderRadius(6).width('74%') | 543 | + }.layoutWeight(1) |
| 544 | + .justifyContent(FlexAlign.Center) | ||
| 545 | + } | ||
| 546 | + .backgroundColor(Color.White) | ||
| 547 | + .borderRadius("12lpx") | ||
| 548 | + .width("528lpx") | ||
| 549 | + .height("309lpx") | ||
| 524 | 550 | ||
| 525 | }.width('100%') | 551 | }.width('100%') |
| 526 | .height('100%') | 552 | .height('100%') |
-
Please register or login to post a comment