Showing
3 changed files
with
26 additions
and
47 deletions
| @@ -35,7 +35,7 @@ struct LaunchPage { | @@ -35,7 +35,7 @@ struct LaunchPage { | ||
| 35 | alignment: DialogAlignment.Center, | 35 | alignment: DialogAlignment.Center, |
| 36 | offset: { dx: 0, dy: '-24' }, | 36 | offset: { dx: 0, dy: '-24' }, |
| 37 | customStyle: true, | 37 | customStyle: true, |
| 38 | - autoCancel: false | 38 | + autoCancel: false, |
| 39 | }); | 39 | }); |
| 40 | 40 | ||
| 41 | onCancel() { | 41 | onCancel() { |
| @@ -110,6 +110,9 @@ struct LaunchPage { | @@ -110,6 +110,9 @@ struct LaunchPage { | ||
| 110 | if (dataModel.launchAdInfo.length) { | 110 | if (dataModel.launchAdInfo.length) { |
| 111 | //跳转广告页 | 111 | //跳转广告页 |
| 112 | this.jumpToAdvertisingPage(); | 112 | this.jumpToAdvertisingPage(); |
| 113 | + | ||
| 114 | + //WDRouterRule.jumpWithReplacePage(WDRouterPage.privacyPage) | ||
| 115 | + | ||
| 113 | }else { | 116 | }else { |
| 114 | //直接跳转首页 | 117 | //直接跳转首页 |
| 115 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | 118 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) |
| @@ -156,7 +159,7 @@ struct LaunchPage { | @@ -156,7 +159,7 @@ struct LaunchPage { | ||
| 156 | build(){ | 159 | build(){ |
| 157 | 160 | ||
| 158 | Stack({alignContent:Alignment.Bottom}){ | 161 | Stack({alignContent:Alignment.Bottom}){ |
| 159 | - Image($r('app.media.app_icon')) | 162 | + Image($r('app.media.LaunchPage_logo')) |
| 160 | .width('278lpx') | 163 | .width('278lpx') |
| 161 | .height('154lpx') | 164 | .height('154lpx') |
| 162 | .margin({ | 165 | .margin({ |
| @@ -3,59 +3,35 @@ import webview from '@ohos.web.webview'; | @@ -3,59 +3,35 @@ import webview from '@ohos.web.webview'; | ||
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | import { GlobalContext } from '../../utils/GlobalContext' | 4 | import { GlobalContext } from '../../utils/GlobalContext' |
| 5 | import { WDRouterRule } from 'wdRouter'; | 5 | import { WDRouterRule } from 'wdRouter'; |
| 6 | +import { LikeComponent } from 'wdComponent' | ||
| 6 | 7 | ||
| 7 | @Entry | 8 | @Entry |
| 8 | @Component | 9 | @Component |
| 9 | struct PrivacyPage { | 10 | struct PrivacyPage { |
| 10 | @State message: string = 'Hello World' | 11 | @State message: string = 'Hello World' |
| 11 | - webController: webview.WebviewController = new webview.WebviewController(); | ||
| 12 | - //@State params: object = router.getParams(); | 12 | + model: Record<string, string> = {} |
| 13 | + | ||
| 14 | + aboutToAppear(): void { | ||
| 15 | + | ||
| 16 | + this.model['contentId'] = '30044572938' //必须 | ||
| 17 | + this.model['userName'] = '人民日报网友5MbdHk' | ||
| 18 | + this.model['contentType'] = '8' //必须 | ||
| 19 | + this.model['title'] = '“神器”还是“安慰剂”?中学生“体考神器”调查' | ||
| 20 | + this.model['userHeaderUrl'] = "" | ||
| 21 | + this.model['channelId'] = "2002" //必须 | ||
| 22 | + //this.model['status'] = "1" //必须 | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + | ||
| 13 | 28 | ||
| 14 | build() { | 29 | build() { |
| 15 | Row() { | 30 | Row() { |
| 16 | Column() { | 31 | Column() { |
| 17 | - // Web component loading H5. | ||
| 18 | - Web({ src: 'https://www.baidu.com', controller: this.webController }) | ||
| 19 | - .zoomAccess(false) | ||
| 20 | - .width('100%') | ||
| 21 | - .height('100%') | ||
| 22 | - .aspectRatio(1) | ||
| 23 | - // .onConfirm((event) => { | ||
| 24 | - // AlertDialog.show({ | ||
| 25 | - // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message, | ||
| 26 | - // confirm: { | ||
| 27 | - // value: $r('app.string.web_alert_dialog_button_value'), | ||
| 28 | - // action: () => { | ||
| 29 | - // event?.result.handleConfirm(); | ||
| 30 | - // } | ||
| 31 | - // }, | ||
| 32 | - // cancel: () => { | ||
| 33 | - // event?.result.handleCancel(); | ||
| 34 | - // } | ||
| 35 | - // }); | ||
| 36 | - // return true; | ||
| 37 | - // }) | ||
| 38 | - // .onErrorReceive((event) => { | ||
| 39 | - // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') { | ||
| 40 | - // prompt.showToast({ | ||
| 41 | - // message: $r('app.string.internet_err'), | ||
| 42 | - // duration: Const.WebConstant_DURATION | ||
| 43 | - // }) | ||
| 44 | - // } | ||
| 45 | - // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') { | ||
| 46 | - // prompt.showToast({ | ||
| 47 | - // message: $r('app.string.internet_err'), | ||
| 48 | - // duration: Const.WebConstant_DURATION | ||
| 49 | - // }) | ||
| 50 | - // } | ||
| 51 | - // }) | ||
| 52 | - // .onProgressChange((event) => { | ||
| 53 | - // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) { | ||
| 54 | - // this.isLoading = false; | ||
| 55 | - // clearInterval(this.intervalLoading); | ||
| 56 | - // this.intervalLoading = -1; | ||
| 57 | - // } | ||
| 58 | - // }) | 32 | + |
| 33 | + LikeComponent({data: this.model,componentType:1}) | ||
| 34 | + | ||
| 59 | } | 35 | } |
| 60 | .width('100%') | 36 | .width('100%') |
| 61 | } | 37 | } |
| @@ -134,7 +134,7 @@ export default struct CustomDialogComponent { | @@ -134,7 +134,7 @@ export default struct CustomDialogComponent { | ||
| 134 | Text($r('app.string.dialog_text_privacy_statement')) | 134 | Text($r('app.string.dialog_text_privacy_statement')) |
| 135 | .width('90%') | 135 | .width('90%') |
| 136 | .fontColor($r('app.color.dialog_text_color')) | 136 | .fontColor($r('app.color.dialog_text_color')) |
| 137 | - .fontSize(13).margin({top:20}) | 137 | + .fontSize(14).margin({top:20}) |
| 138 | Row() { | 138 | Row() { |
| 139 | Text($r('app.string.dialog_button_disagree')) | 139 | Text($r('app.string.dialog_button_disagree')) |
| 140 | .fancy() | 140 | .fancy() |
-
Please register or login to post a comment