Showing
15 changed files
with
134 additions
and
47 deletions
| @@ -53,7 +53,7 @@ export struct Card5Component { | @@ -53,7 +53,7 @@ export struct Card5Component { | ||
| 53 | } | 53 | } |
| 54 | ) | 54 | ) |
| 55 | .aspectRatio(343 / 225) | 55 | .aspectRatio(343 / 225) |
| 56 | - if (this.titleShowPolicy === 1 || this.titleShowPolicy === null || this.titleShowPolicy === '') { | 56 | + if (!!this.titleShowPolicy) { |
| 57 | Row() | 57 | Row() |
| 58 | .borderRadius( | 58 | .borderRadius( |
| 59 | { | 59 | { |
| @@ -206,6 +206,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -206,6 +206,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 206 | } | 206 | } |
| 207 | for (const element of listData.list) { | 207 | for (const element of listData.list) { |
| 208 | let contentDTO = new ContentDTO() | 208 | let contentDTO = new ContentDTO() |
| 209 | + console.info(TAG, 'element.appStyle'+`${element.appStyle}`) | ||
| 209 | contentDTO.appStyle = this.changeCommon(element.appStyle) | 210 | contentDTO.appStyle = this.changeCommon(element.appStyle) |
| 210 | contentDTO.newsTitle = element.title; | 211 | contentDTO.newsTitle = element.title; |
| 211 | contentDTO.newsSummary = element.description; | 212 | contentDTO.newsSummary = element.description; |
| @@ -158,6 +158,7 @@ export struct OperRowListView { | @@ -158,6 +158,7 @@ export struct OperRowListView { | ||
| 158 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) | 158 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) |
| 159 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) | 159 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) |
| 160 | console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) | 160 | console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) |
| 161 | + | ||
| 161 | // 评论需要数据 | 162 | // 评论需要数据 |
| 162 | /* this.publishCommentModel.targetId = this.contentDetailData.newsId + '' | 163 | /* this.publishCommentModel.targetId = this.contentDetailData.newsId + '' |
| 163 | this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' | 164 | this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' |
| @@ -172,6 +172,7 @@ export struct DetailPlayShortVideoPage { | @@ -172,6 +172,7 @@ export struct DetailPlayShortVideoPage { | ||
| 172 | this.queryNewsInfoOfUser() | 172 | this.queryNewsInfoOfUser() |
| 173 | 173 | ||
| 174 | this.contentTrackingDict() | 174 | this.contentTrackingDict() |
| 175 | + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | contentTrackingDict() { | 178 | contentTrackingDict() { |
| @@ -45,7 +45,7 @@ export struct VideoChannelDetail { | @@ -45,7 +45,7 @@ export struct VideoChannelDetail { | ||
| 45 | @Prop @Watch('autoRefreshChange') autoRefresh: number = 0 | 45 | @Prop @Watch('autoRefreshChange') autoRefresh: number = 0 |
| 46 | @Consume barBackgroundColor: Color | 46 | @Consume barBackgroundColor: Color |
| 47 | private swiperController: SwiperController = new SwiperController() | 47 | private swiperController: SwiperController = new SwiperController() |
| 48 | - @Provide showComment: boolean = false | 48 | + @Consume showComment: boolean |
| 49 | @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0 | 49 | @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0 |
| 50 | @Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0 | 50 | @Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0 |
| 51 | @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 51 | @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| @@ -24,6 +24,8 @@ struct ChangeBindPhonePage { | @@ -24,6 +24,8 @@ struct ChangeBindPhonePage { | ||
| 24 | lastTime: number = 0 | 24 | lastTime: number = 0 |
| 25 | pageShowTime:number = 0; | 25 | pageShowTime:number = 0; |
| 26 | pageHideTime:number = 0; | 26 | pageHideTime:number = 0; |
| 27 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 28 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 27 | 29 | ||
| 28 | 30 | ||
| 29 | onPageShow() { | 31 | onPageShow() { |
| @@ -58,6 +60,7 @@ struct ChangeBindPhonePage { | @@ -58,6 +60,7 @@ struct ChangeBindPhonePage { | ||
| 58 | 60 | ||
| 59 | 61 | ||
| 60 | build() { | 62 | build() { |
| 63 | + Column(){ | ||
| 61 | Column() { | 64 | Column() { |
| 62 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { | 65 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { |
| 63 | router.back() | 66 | router.back() |
| @@ -156,6 +159,10 @@ struct ChangeBindPhonePage { | @@ -156,6 +159,10 @@ struct ChangeBindPhonePage { | ||
| 156 | .padding({ left: 25, right: 25 }) | 159 | .padding({ left: 25, right: 25 }) |
| 157 | 160 | ||
| 158 | }.width('100%').height('100%').alignItems(HorizontalAlign.Start) | 161 | }.width('100%').height('100%').alignItems(HorizontalAlign.Start) |
| 162 | + }.width("100%") | ||
| 163 | + .height("100%") | ||
| 164 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 165 | + | ||
| 159 | } | 166 | } |
| 160 | 167 | ||
| 161 | //发送验证码 | 168 | //发送验证码 |
| @@ -23,6 +23,8 @@ struct ForgetPasswordPage { | @@ -23,6 +23,8 @@ struct ForgetPasswordPage { | ||
| 23 | @State pageTitle:string = '找回密码'; | 23 | @State pageTitle:string = '找回密码'; |
| 24 | @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样 | 24 | @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样 |
| 25 | @State codeStateSuccess:boolean=false | 25 | @State codeStateSuccess:boolean=false |
| 26 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 27 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 26 | onCodeSend() { | 28 | onCodeSend() { |
| 27 | if (this.isCodeSend) { | 29 | if (this.isCodeSend) { |
| 28 | this.sendVerifyCode() | 30 | this.sendVerifyCode() |
| @@ -43,6 +45,7 @@ struct ForgetPasswordPage { | @@ -43,6 +45,7 @@ struct ForgetPasswordPage { | ||
| 43 | 45 | ||
| 44 | 46 | ||
| 45 | build() { | 47 | build() { |
| 48 | + Column(){ | ||
| 46 | Column() { | 49 | Column() { |
| 47 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { | 50 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { |
| 48 | router.back() | 51 | router.back() |
| @@ -79,6 +82,11 @@ struct ForgetPasswordPage { | @@ -79,6 +82,11 @@ struct ForgetPasswordPage { | ||
| 79 | .height('100%') | 82 | .height('100%') |
| 80 | .alignItems(HorizontalAlign.Start) | 83 | .alignItems(HorizontalAlign.Start) |
| 81 | .backgroundColor(Color.White) | 84 | .backgroundColor(Color.White) |
| 85 | + | ||
| 86 | + }.width("100%") | ||
| 87 | + .height("100%") | ||
| 88 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 89 | + | ||
| 82 | } | 90 | } |
| 83 | 91 | ||
| 84 | aboutToAppear() { | 92 | aboutToAppear() { |
| @@ -27,6 +27,8 @@ const TAG = "LoginPage" | @@ -27,6 +27,8 @@ const TAG = "LoginPage" | ||
| 27 | @Entry | 27 | @Entry |
| 28 | @Component | 28 | @Component |
| 29 | struct LoginPage { | 29 | struct LoginPage { |
| 30 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 31 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 30 | @State codeBtnState: boolean = false | 32 | @State codeBtnState: boolean = false |
| 31 | @State timeCount: number = 60 | 33 | @State timeCount: number = 60 |
| 32 | phoneController: TextInputController = new TextInputController() | 34 | phoneController: TextInputController = new TextInputController() |
| @@ -104,6 +106,7 @@ struct LoginPage { | @@ -104,6 +106,7 @@ struct LoginPage { | ||
| 104 | } | 106 | } |
| 105 | 107 | ||
| 106 | build() { | 108 | build() { |
| 109 | + Column(){ | ||
| 107 | Stack() { | 110 | Stack() { |
| 108 | RelativeContainer() { | 111 | RelativeContainer() { |
| 109 | 112 | ||
| @@ -242,8 +245,12 @@ struct LoginPage { | @@ -242,8 +245,12 @@ struct LoginPage { | ||
| 242 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) | 245 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) |
| 243 | 246 | ||
| 244 | }.width('100%') | 247 | }.width('100%') |
| 245 | - .height('100%') | 248 | + .height("100%") |
| 246 | .backgroundColor(Color.White) | 249 | .backgroundColor(Color.White) |
| 250 | + }.width("100%") | ||
| 251 | + .height("100%") | ||
| 252 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 253 | + | ||
| 247 | } | 254 | } |
| 248 | 255 | ||
| 249 | @Builder | 256 | @Builder |
| @@ -10,6 +10,8 @@ const TAG = 'LoginProtocolWebview'; | @@ -10,6 +10,8 @@ const TAG = 'LoginProtocolWebview'; | ||
| 10 | @Entry | 10 | @Entry |
| 11 | @Component | 11 | @Component |
| 12 | struct LoginProtocolWebview { | 12 | struct LoginProtocolWebview { |
| 13 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 14 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 13 | webUrl: string = '' | 15 | webUrl: string = '' |
| 14 | webviewController: webview.WebviewController = new webview.WebviewController() | 16 | webviewController: webview.WebviewController = new webview.WebviewController() |
| 15 | userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html" | 17 | userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html" |
| @@ -55,7 +57,7 @@ struct LoginProtocolWebview { | @@ -55,7 +57,7 @@ struct LoginProtocolWebview { | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | build() { | 59 | build() { |
| 58 | - | 60 | + Column(){ |
| 59 | Column() { | 61 | Column() { |
| 60 | Row() { | 62 | Row() { |
| 61 | Image($r("app.media.login_back_icon")) | 63 | Image($r("app.media.login_back_icon")) |
| @@ -88,5 +90,9 @@ struct LoginProtocolWebview { | @@ -88,5 +90,9 @@ struct LoginProtocolWebview { | ||
| 88 | }) | 90 | }) |
| 89 | .padding({bottom:this.contentID === "2" ? "40lpx" : 0 }) | 91 | .padding({bottom:this.contentID === "2" ? "40lpx" : 0 }) |
| 90 | } | 92 | } |
| 93 | + }.width("100%") | ||
| 94 | + .height("100%") | ||
| 95 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 96 | + | ||
| 91 | } | 97 | } |
| 92 | } | 98 | } |
| @@ -12,6 +12,8 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I | @@ -12,6 +12,8 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I | ||
| 12 | @Entry | 12 | @Entry |
| 13 | @Component | 13 | @Component |
| 14 | struct ModifyPasswordPage { | 14 | struct ModifyPasswordPage { |
| 15 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 16 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 15 | password_old: string = ''; | 17 | password_old: string = ''; |
| 16 | password_new: string = ''; | 18 | password_new: string = ''; |
| 17 | password_new_repeat: string = ''; | 19 | password_new_repeat: string = ''; |
| @@ -64,9 +66,13 @@ struct ModifyPasswordPage { | @@ -64,9 +66,13 @@ struct ModifyPasswordPage { | ||
| 64 | 66 | ||
| 65 | build() { | 67 | build() { |
| 66 | Column(){ | 68 | Column(){ |
| 69 | + Column(){ | ||
| 67 | this.TitleBackComponent('') | 70 | this.TitleBackComponent('') |
| 68 | this.ModifyPasswordLayout() | 71 | this.ModifyPasswordLayout() |
| 69 | } | 72 | } |
| 73 | + }.width("100%") | ||
| 74 | + .height("100%") | ||
| 75 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 70 | 76 | ||
| 71 | } | 77 | } |
| 72 | 78 |
| @@ -2,7 +2,7 @@ import ArrayList from '@ohos.util.ArrayList'; | @@ -2,7 +2,7 @@ import ArrayList from '@ohos.util.ArrayList'; | ||
| 2 | import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index'; | 2 | import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index'; |
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | import { LoginViewModel } from './LoginViewModel'; | 4 | import { LoginViewModel } from './LoginViewModel'; |
| 5 | -import { CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit'; | 5 | +import { BreakpointSystem, CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit'; |
| 6 | import { | 6 | import { |
| 7 | SpConstants | 7 | SpConstants |
| 8 | } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' | 8 | } from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants' |
| @@ -74,6 +74,19 @@ export struct SettingPasswordPage { | @@ -74,6 +74,19 @@ export struct SettingPasswordPage { | ||
| 74 | pageHideResetTime:number = 0; | 74 | pageHideResetTime:number = 0; |
| 75 | pageShowSetTime:number = 0; | 75 | pageShowSetTime:number = 0; |
| 76 | pageHideSetTime:number = 0; | 76 | pageHideSetTime:number = 0; |
| 77 | + @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | ||
| 78 | + private breakpointSystem = new BreakpointSystem(); | ||
| 79 | + @State percent:number = 1 | ||
| 80 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 81 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 82 | + | ||
| 83 | + currentChanged(){ | ||
| 84 | + if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ | ||
| 85 | + this.percent = 0.7 | ||
| 86 | + }else { | ||
| 87 | + this.percent = 1 | ||
| 88 | + } | ||
| 89 | + } | ||
| 77 | 90 | ||
| 78 | onPageShow(): void { | 91 | onPageShow(): void { |
| 79 | if (this.pageType === 0){//重置密码 | 92 | if (this.pageType === 0){//重置密码 |
| @@ -83,6 +96,10 @@ export struct SettingPasswordPage { | @@ -83,6 +96,10 @@ export struct SettingPasswordPage { | ||
| 83 | } | 96 | } |
| 84 | } | 97 | } |
| 85 | 98 | ||
| 99 | + calcHeight(value:number): number{ | ||
| 100 | + return value * this.percent | ||
| 101 | + } | ||
| 102 | + | ||
| 86 | onPageHide(): void { | 103 | onPageHide(): void { |
| 87 | if (this.pageType === 0){ | 104 | if (this.pageType === 0){ |
| 88 | this.pageHideResetTime = DateTimeUtils.getTimeStamp() | 105 | this.pageHideResetTime = DateTimeUtils.getTimeStamp() |
| @@ -104,7 +121,13 @@ export struct SettingPasswordPage { | @@ -104,7 +121,13 @@ export struct SettingPasswordPage { | ||
| 104 | } | 121 | } |
| 105 | } | 122 | } |
| 106 | 123 | ||
| 124 | + aboutToDisappear(): void { | ||
| 125 | + this.breakpointSystem.unregister(); | ||
| 126 | + } | ||
| 127 | + | ||
| 107 | aboutToAppear() { | 128 | aboutToAppear() { |
| 129 | + this.breakpointSystem.register(); | ||
| 130 | + this.currentChanged() | ||
| 108 | let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; | 131 | let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; |
| 109 | this.pageId = parseInt(params.pageID); | 132 | this.pageId = parseInt(params.pageID); |
| 110 | this.getPageListData(this.pageId) | 133 | this.getPageListData(this.pageId) |
| @@ -147,10 +170,48 @@ export struct SettingPasswordPage { | @@ -147,10 +170,48 @@ export struct SettingPasswordPage { | ||
| 147 | } | 170 | } |
| 148 | 171 | ||
| 149 | build() { | 172 | build() { |
| 150 | - Navigation() { | 173 | + Column(){ |
| 174 | + Column(){ | ||
| 175 | + this.TitleBackComponent('') | ||
| 151 | this.settingList() //滑动区域 | 176 | this.settingList() //滑动区域 |
| 152 | - }.titleMode(NavigationTitleMode.Mini) | ||
| 153 | - .title('') | 177 | + } |
| 178 | + }.width("100%") | ||
| 179 | + .height("100%") | ||
| 180 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 181 | + | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + @Builder TitleBackComponent(title:string){ | ||
| 185 | + RelativeContainer() { | ||
| 186 | + Text(title) | ||
| 187 | + .fontColor('#FF333333') | ||
| 188 | + .fontSize(`${this.calcHeight(18)}`) | ||
| 189 | + .textAlign(TextAlign.Center) | ||
| 190 | + .height(`${this.calcHeight(44)}`) | ||
| 191 | + .alignRules({ | ||
| 192 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 193 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 194 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 195 | + | ||
| 196 | + }) | ||
| 197 | + .id('titleContent') | ||
| 198 | + Image($r("app.media.login_back_icon")) | ||
| 199 | + .objectFit(ImageFit.Auto) | ||
| 200 | + .height(`${this.calcHeight(24)}`) | ||
| 201 | + .width(`${this.calcHeight(24)}`) | ||
| 202 | + .margin({ | ||
| 203 | + left: `${this.calcHeight(16)}`, top: `${this.calcHeight(8)}` | ||
| 204 | + }) | ||
| 205 | + .alignRules({ | ||
| 206 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 207 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 208 | + }) | ||
| 209 | + .onClick(() => { | ||
| 210 | + router.back() | ||
| 211 | + }) | ||
| 212 | + .id('backImage') | ||
| 213 | + | ||
| 214 | + }.height(`${this.calcHeight(44)}`) | ||
| 154 | } | 215 | } |
| 155 | 216 | ||
| 156 | // 页面布局 | 217 | // 页面布局 |
| @@ -176,7 +237,7 @@ export struct SettingPasswordPage { | @@ -176,7 +237,7 @@ export struct SettingPasswordPage { | ||
| 176 | }) | 237 | }) |
| 177 | } | 238 | } |
| 178 | }.width('100%') | 239 | }.width('100%') |
| 179 | - .padding({ left:"31lpx",right:"31lpx",top:"131lpx" }) | 240 | + .padding({ left:`${this.calcHeight(31)}lpx`,right:`${this.calcHeight(31)}lpx`,top:`${this.calcHeight(131)}lpx` }) |
| 180 | .height('100%') | 241 | .height('100%') |
| 181 | } | 242 | } |
| 182 | 243 | ||
| @@ -185,10 +246,10 @@ export struct SettingPasswordPage { | @@ -185,10 +246,10 @@ export struct SettingPasswordPage { | ||
| 185 | // 标题 | 246 | // 标题 |
| 186 | @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { | 247 | @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { |
| 187 | Column() { | 248 | Column() { |
| 188 | - Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1) | 249 | + Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(`${this.calcHeight(20)}`).maxLines(1) |
| 189 | } | 250 | } |
| 190 | .width('100%') | 251 | .width('100%') |
| 191 | - .height('75lpx') | 252 | + .height(`${this.calcHeight(75)}lpx`) |
| 192 | .alignItems(alignTitle) | 253 | .alignItems(alignTitle) |
| 193 | } | 254 | } |
| 194 | 255 | ||
| @@ -210,12 +271,12 @@ export struct SettingPasswordPage { | @@ -210,12 +271,12 @@ export struct SettingPasswordPage { | ||
| 210 | }) | 271 | }) |
| 211 | } | 272 | } |
| 212 | .alignItems(VerticalAlign.Center) | 273 | .alignItems(VerticalAlign.Center) |
| 213 | - .height('80lpx') | 274 | + .height(`${this.calcHeight(80)}lpx`) |
| 214 | .backgroundColor('#f5f5f5') | 275 | .backgroundColor('#f5f5f5') |
| 215 | - .borderRadius('4vp') | 276 | + .borderRadius(`${this.calcHeight(4)}`) |
| 216 | } | 277 | } |
| 217 | .width('100%') | 278 | .width('100%') |
| 218 | - .height('110lpx') | 279 | + .height(`${this.calcHeight(110)}lpx`) |
| 219 | .backgroundColor(0xffffff0) | 280 | .backgroundColor(0xffffff0) |
| 220 | .alignItems(VerticalAlign.Center) | 281 | .alignItems(VerticalAlign.Center) |
| 221 | } | 282 | } |
| @@ -235,12 +296,12 @@ export struct SettingPasswordPage { | @@ -235,12 +296,12 @@ export struct SettingPasswordPage { | ||
| 235 | }) | 296 | }) |
| 236 | } | 297 | } |
| 237 | .alignItems(VerticalAlign.Center) | 298 | .alignItems(VerticalAlign.Center) |
| 238 | - .height('80lpx') | 299 | + .height(`${this.calcHeight(80)}lpx`) |
| 239 | .backgroundColor('#f5f5f5') | 300 | .backgroundColor('#f5f5f5') |
| 240 | - .borderRadius('4vp') | 301 | + .borderRadius(`${this.calcHeight(4)}`) |
| 241 | } | 302 | } |
| 242 | .width('100%') | 303 | .width('100%') |
| 243 | - .height('110lpx') | 304 | + .height(`${this.calcHeight(110)}lpx`) |
| 244 | .backgroundColor(0xffffff0) | 305 | .backgroundColor(0xffffff0) |
| 245 | .alignItems(VerticalAlign.Center) | 306 | .alignItems(VerticalAlign.Center) |
| 246 | } | 307 | } |
| @@ -249,7 +310,7 @@ export struct SettingPasswordPage { | @@ -249,7 +310,7 @@ export struct SettingPasswordPage { | ||
| 249 | @Builder getCodeCell(item: AccoutPageDataModel) { | 310 | @Builder getCodeCell(item: AccoutPageDataModel) { |
| 250 | Row() { | 311 | Row() { |
| 251 | Stack() { | 312 | Stack() { |
| 252 | - Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp') | 313 | + Image($r('app.media.get_code_bg')).width('100%').borderRadius(`${this.calcHeight(4)}`) |
| 253 | Row() { | 314 | Row() { |
| 254 | TextInput({ placeholder: item.inputPlacholder }) | 315 | TextInput({ placeholder: item.inputPlacholder }) |
| 255 | .placeholderColor("#CCCCCC") | 316 | .placeholderColor("#CCCCCC") |
| @@ -264,10 +325,10 @@ export struct SettingPasswordPage { | @@ -264,10 +325,10 @@ export struct SettingPasswordPage { | ||
| 264 | .fontColor('#da3e22') | 325 | .fontColor('#da3e22') |
| 265 | } | 326 | } |
| 266 | .width('100%') | 327 | .width('100%') |
| 267 | - }.height('80lpx') | 328 | + }.height(`${this.calcHeight(80)}lpx`) |
| 268 | } | 329 | } |
| 269 | .width('100%') | 330 | .width('100%') |
| 270 | - .height('110lpx') | 331 | + .height(`${this.calcHeight(110)}lpx`) |
| 271 | .backgroundColor(0xffffff0) | 332 | .backgroundColor(0xffffff0) |
| 272 | .alignItems(VerticalAlign.Center) | 333 | .alignItems(VerticalAlign.Center) |
| 273 | } | 334 | } |
| @@ -275,7 +336,7 @@ export struct SettingPasswordPage { | @@ -275,7 +336,7 @@ export struct SettingPasswordPage { | ||
| 275 | // desc | 336 | // desc |
| 276 | @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { | 337 | @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) { |
| 277 | Column() { | 338 | Column() { |
| 278 | - Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'}) | 339 | + Text(item.compDesc).fontSize(`${this.calcHeight(12)}`).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`}) |
| 279 | .onClick(()=>{ | 340 | .onClick(()=>{ |
| 280 | if (item.compDesc == '忘记密码') { | 341 | if (item.compDesc == '忘记密码') { |
| 281 | this.showToastTip('密码不符合密码规范') | 342 | this.showToastTip('密码不符合密码规范') |
| @@ -283,7 +344,7 @@ export struct SettingPasswordPage { | @@ -283,7 +344,7 @@ export struct SettingPasswordPage { | ||
| 283 | }) | 344 | }) |
| 284 | } | 345 | } |
| 285 | .width('100%') | 346 | .width('100%') |
| 286 | - .height('85lpx') | 347 | + .height(`${this.calcHeight(85)}lpx`) |
| 287 | .alignItems(alignTitle) | 348 | .alignItems(alignTitle) |
| 288 | } | 349 | } |
| 289 | 350 | ||
| @@ -293,29 +354,29 @@ export struct SettingPasswordPage { | @@ -293,29 +354,29 @@ export struct SettingPasswordPage { | ||
| 293 | Text(item.compButtonTitle) | 354 | Text(item.compButtonTitle) |
| 294 | .layoutWeight(1) | 355 | .layoutWeight(1) |
| 295 | .fontColor("#FFFFFF") | 356 | .fontColor("#FFFFFF") |
| 296 | - .borderRadius(4) | ||
| 297 | - .fontSize(18) | 357 | + .borderRadius(`${this.calcHeight(4)}`) |
| 358 | + .fontSize(`${this.calcHeight(18)}`) | ||
| 298 | .textAlign(TextAlign.Center) | 359 | .textAlign(TextAlign.Center) |
| 299 | .fontWeight(FontWeight.Medium) | 360 | .fontWeight(FontWeight.Medium) |
| 300 | - .margin({ top: 26 }) | ||
| 301 | - .height(44) | 361 | + .margin({ top: `${this.calcHeight(26)}` }) |
| 362 | + .height(`${this.calcHeight(44)}`) | ||
| 302 | .backgroundColor("#ED2800") | 363 | .backgroundColor("#ED2800") |
| 303 | .enabled(this.btnStatus ? true : false) | 364 | .enabled(this.btnStatus ? true : false) |
| 304 | .opacity(this.btnStatus ? 1: 0.6) | 365 | .opacity(this.btnStatus ? 1: 0.6) |
| 305 | .onClick(() => { | 366 | .onClick(() => { |
| 306 | this.buttonClick() | 367 | this.buttonClick() |
| 307 | }) | 368 | }) |
| 308 | - }.padding({top:'25lpx'}) | 369 | + }.padding({top:`${this.calcHeight(25)}lpx`}) |
| 309 | .width('100%') | 370 | .width('100%') |
| 310 | } | 371 | } |
| 311 | 372 | ||
| 312 | // 标题 | 373 | // 标题 |
| 313 | @Builder getLogoCell(item: AccoutPageDataModel) { | 374 | @Builder getLogoCell(item: AccoutPageDataModel) { |
| 314 | Column() { | 375 | Column() { |
| 315 | - Image(item.compLogo).height('150lpx').width('150lpx') | 376 | + Image(item.compLogo).height(`${this.calcHeight(150)}lpx`).width(`${this.calcHeight(150)}lpx`) |
| 316 | } | 377 | } |
| 317 | .width('100%') | 378 | .width('100%') |
| 318 | - .height('200lpx') | 379 | + .height(`${this.calcHeight(200)}lpx`) |
| 319 | } | 380 | } |
| 320 | 381 | ||
| 321 | /***************************** 事件处理 ******************************************/ | 382 | /***************************** 事件处理 ******************************************/ |
| @@ -24,6 +24,8 @@ struct VerifyPhoneNumberPage { | @@ -24,6 +24,8 @@ struct VerifyPhoneNumberPage { | ||
| 24 | isFirst:boolean=true//是否第一次获取验证码 | 24 | isFirst:boolean=true//是否第一次获取验证码 |
| 25 | pageShowTime:number = 0; | 25 | pageShowTime:number = 0; |
| 26 | pageHideTime:number = 0; | 26 | pageHideTime:number = 0; |
| 27 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 28 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 27 | 29 | ||
| 28 | onCodeSend() { | 30 | onCodeSend() { |
| 29 | if (this.isCodeSend) { | 31 | if (this.isCodeSend) { |
| @@ -60,6 +62,7 @@ struct VerifyPhoneNumberPage { | @@ -60,6 +62,7 @@ struct VerifyPhoneNumberPage { | ||
| 60 | 62 | ||
| 61 | 63 | ||
| 62 | build() { | 64 | build() { |
| 65 | + Column(){ | ||
| 63 | Column() { | 66 | Column() { |
| 64 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { | 67 | Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => { |
| 65 | router.back() | 68 | router.back() |
| @@ -155,6 +158,9 @@ struct VerifyPhoneNumberPage { | @@ -155,6 +158,9 @@ struct VerifyPhoneNumberPage { | ||
| 155 | }.padding({ left: 25, right: 25 }).width('100%') | 158 | }.padding({ left: 25, right: 25 }).width('100%') |
| 156 | 159 | ||
| 157 | }.width('100%').height('100%').alignItems(HorizontalAlign.Start) | 160 | }.width('100%').height('100%').alignItems(HorizontalAlign.Start) |
| 161 | + }.width("100%") | ||
| 162 | + .height("100%") | ||
| 163 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 158 | } | 164 | } |
| 159 | 165 | ||
| 160 | //发送验证码 | 166 | //发送验证码 |
| @@ -32,6 +32,7 @@ export struct VideoChannelPage { | @@ -32,6 +32,7 @@ export struct VideoChannelPage { | ||
| 32 | @State indicatorWidth: number = 0 | 32 | @State indicatorWidth: number = 0 |
| 33 | // 传递给page的自动刷新通知 | 33 | // 传递给page的自动刷新通知 |
| 34 | @State autoRefresh2Page: number = 0 | 34 | @State autoRefresh2Page: number = 0 |
| 35 | + @Provide showComment: boolean = false | ||
| 35 | aboutToAppear(): void { | 36 | aboutToAppear(): void { |
| 36 | this.setBarBackgroundColor() | 37 | this.setBarBackgroundColor() |
| 37 | console.log(TAG, 'aboutToAppear') | 38 | console.log(TAG, 'aboutToAppear') |
-
Please register or login to post a comment