xugenyuan

ref |> 调整启动隐私弹框UI

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -46,52 +46,6 @@ export default struct CustomDialogComponent { @@ -46,52 +46,6 @@ export default struct CustomDialogComponent {
46 } 46 }
47 .width('90%').lineHeight(22) 47 .width('90%').lineHeight(22)
48 Row(){ 48 Row(){
49 -  
50 - // Button(){  
51 - // Text($r('app.string.privacy_text_title_policy'))  
52 - // .fontSize('27lpx')  
53 - // .fontColor(Color.Red)  
54 - // .margin({left:'10lpx',right:'10lpx'})  
55 - // }  
56 - // .width('90%')  
57 - // .height('56lpx')  
58 - // .margin({top:'54lpx',right:'19lpx'})  
59 - // .backgroundColor('#80000000')  
60 - // .onClick(() => {  
61 - //  
62 - // })  
63 - // Button(){  
64 - // Text($r('app.string.privacy_text_title_protocol'))  
65 - // .fontSize('27lpx')  
66 - // .fontColor(Color.Red)  
67 - // .margin({left:'10lpx',right:'10lpx'})  
68 - // }  
69 - // .width('90%')  
70 - // .height('56lpx')  
71 - // .margin({top:'54lpx',right:'19lpx'})  
72 - // .backgroundColor('#80000000')  
73 - // .onClick(() => {  
74 - //  
75 - // })  
76 -  
77 - // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {  
78 - // Button($r('app.string.privacy_text_title_policy'))  
79 - // .onClick(()=>{  
80 - // GlobalContext.getContext().setObject('isJumpPrivacy', true);  
81 - // })  
82 - // {  
83 - // // Text($r('app.string.privacy_text_title_policy'))  
84 - // // .fontSize($r('app.float.dialog_common_text_size'))  
85 - // // .width('50%')  
86 - // // .fontColor(Color.Red)  
87 - // // .onClick(() => {  
88 - // // GlobalContext.getContext().setObject('isJumpPrivacy', true);  
89 - // // })  
90 - // }  
91 - // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)  
92 - // }  
93 - // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)  
94 -  
95 Text($r('app.string.privacy_text_title_policy')) 49 Text($r('app.string.privacy_text_title_policy'))
96 .fontSize($r('app.float.dialog_common_text_size')) 50 .fontSize($r('app.float.dialog_common_text_size'))
97 .width('40%') 51 .width('40%')
@@ -100,14 +54,6 @@ export default struct CustomDialogComponent { @@ -100,14 +54,6 @@ export default struct CustomDialogComponent {
100 54
101 let bean={contentID:"2",pageID:""} as Params 55 let bean={contentID:"2",pageID:""} as Params
102 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) 56 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
103 -  
104 - //GlobalContext.getContext().setObject('isJumpPrivacy', true);  
105 - //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)  
106 - // router.pushUrl({  
107 - // url: 'pages/PrivacyPage'  
108 - // }).catch((error: Error) => {  
109 - // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));  
110 - // });  
111 }) 57 })
112 Text($r('app.string.privacy_text_title_protocol')) 58 Text($r('app.string.privacy_text_title_protocol'))
113 .fontSize($r('app.float.dialog_common_text_size')) 59 .fontSize($r('app.float.dialog_common_text_size'))
@@ -117,30 +63,25 @@ export default struct CustomDialogComponent { @@ -117,30 +63,25 @@ export default struct CustomDialogComponent {
117 63
118 let bean={contentID:"1",pageID:""} as Params 64 let bean={contentID:"1",pageID:""} as Params
119 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) 65 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
120 -  
121 - //GlobalContext.getContext().setObject('isJumpPrivacy', true);  
122 - //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)  
123 - // router.pushUrl({  
124 - // url: 'pages/PrivacyPage'  
125 - // }).catch((error: Error) => {  
126 - // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));  
127 - // });  
128 }) 66 })
129 } 67 }
130 .margin({ 68 .margin({
131 top:'36lpx', 69 top:'36lpx',
132 bottom:'21lpx' 70 bottom:'21lpx'
133 }).visibility(Visibility.None) 71 }).visibility(Visibility.None)
  72 + Row() {
134 Text($r('app.string.dialog_text_privacy_statement')) 73 Text($r('app.string.dialog_text_privacy_statement'))
135 - .width('90%')  
136 .fontColor($r('app.color.dialog_text_color')) 74 .fontColor($r('app.color.dialog_text_color'))
137 .fontSize(14).margin({top:20}) 75 .fontSize(14).margin({top:20})
  76 + }.width('90%')
  77 + .justifyContent(FlexAlign.Center)
138 78
139 Divider() 79 Divider()
140 .color('#f5f5f5') 80 .color('#f5f5f5')
141 .width('100%') 81 .width('100%')
142 .strokeWidth(1) 82 .strokeWidth(1)
143 - .padding({left:16,right:16,top:22}) 83 + .padding({top:22})
  84 + Row() {
144 Row() { 85 Row() {
145 Text($r('app.string.dialog_button_disagree')) 86 Text($r('app.string.dialog_button_disagree'))
146 .fancy() 87 .fancy()
@@ -148,24 +89,30 @@ export default struct CustomDialogComponent { @@ -148,24 +89,30 @@ export default struct CustomDialogComponent {
148 this.controller.close(); 89 this.controller.close();
149 this.cancel(); 90 this.cancel();
150 }) 91 })
151 - Blank()  
152 - .backgroundColor($r('app.color.dialog_blank_background_color'))  
153 - .width($r('app.float.dialog_blank_width'))  
154 - .height($r('app.float.dialog_blank_height')) 92 + }.width("50%")
  93 + // Blank()
  94 + // .backgroundColor($r('app.color.dialog_blank_background_color'))
  95 + // .width($r('app.float.dialog_blank_width'))
  96 + // .height($r('app.float.dialog_blank_height'))
  97 + Row() {
155 Text($r('app.string.dialog_button_agree')) 98 Text($r('app.string.dialog_button_agree'))
156 .fancyAgree() 99 .fancyAgree()
157 .onClick(() => { 100 .onClick(() => {
158 this.controller.close(); 101 this.controller.close();
159 this.confirm(); 102 this.confirm();
160 }) 103 })
161 - 104 + }.width("50%")
  105 + .height("100%")
  106 + .backgroundColor($r("app.color.dialog_fancy_text_right_color"))
162 } 107 }
163 - .margin({ bottom: '21lpx',top:'22lpx' })  
164 - 108 + .width("100%")
  109 + .height(44)
  110 + .margin({top: 1})
165 } 111 }
166 .width('528lpx') 112 .width('528lpx')
167 .borderRadius('15') 113 .borderRadius('15')
168 .backgroundColor(Color.White) 114 .backgroundColor(Color.White)
  115 + .clip(true)
169 116
170 } 117 }
171 118
@@ -182,7 +129,8 @@ export default struct CustomDialogComponent { @@ -182,7 +129,8 @@ export default struct CustomDialogComponent {
182 } 129 }
183 // Common text styles. 130 // Common text styles.
184 @Extend(Text) function fancyAgree () { 131 @Extend(Text) function fancyAgree () {
185 - .fontColor($r("app.color.dialog_fancy_text_right_color")) 132 + .backgroundColor($r("app.color.dialog_fancy_text_right_color"))
  133 + .fontColor($r("app.color.white"))
186 .fontSize(16) 134 .fontSize(16)
187 .textAlign(TextAlign.Center) 135 .textAlign(TextAlign.Center)
188 .fontWeight(FontWeight.Medium) 136 .fontWeight(FontWeight.Medium)