Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuanfeiyang02
2024-04-29 17:01:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6aea781d276d4d9e4254aee5392b4fc419f08c8
a6aea781
1 parent
1e70b514
feat:app启动页问题优化
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
47 deletions
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/PrivacyPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
a6aea78
...
...
@@ -35,7 +35,7 @@ struct LaunchPage {
alignment: DialogAlignment.Center,
offset: { dx: 0, dy: '-24' },
customStyle: true,
autoCancel: false
autoCancel: false
,
});
onCancel() {
...
...
@@ -110,6 +110,9 @@ struct LaunchPage {
if (dataModel.launchAdInfo.length) {
//跳转广告页
this.jumpToAdvertisingPage();
//WDRouterRule.jumpWithReplacePage(WDRouterPage.privacyPage)
}else {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
...
...
@@ -156,7 +159,7 @@ struct LaunchPage {
build(){
Stack({alignContent:Alignment.Bottom}){
Image($r('app.media.
app_icon
'))
Image($r('app.media.
LaunchPage_logo
'))
.width('278lpx')
.height('154lpx')
.margin({
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/PrivacyPage.ets
View file @
a6aea78
...
...
@@ -3,59 +3,35 @@ import webview from '@ohos.web.webview';
import router from '@ohos.router';
import { GlobalContext } from '../../utils/GlobalContext'
import { WDRouterRule } from 'wdRouter';
import { LikeComponent } from 'wdComponent'
@Entry
@Component
struct PrivacyPage {
@State message: string = 'Hello World'
webController: webview.WebviewController = new webview.WebviewController();
//@State params: object = router.getParams();
model: Record<string, string> = {}
aboutToAppear(): void {
this.model['contentId'] = '30044572938' //必须
this.model['userName'] = '人民日报网友5MbdHk'
this.model['contentType'] = '8' //必须
this.model['title'] = '“神器”还是“安慰剂”?中学生“体考神器”调查'
this.model['userHeaderUrl'] = ""
this.model['channelId'] = "2002" //必须
//this.model['status'] = "1" //必须
}
build() {
Row() {
Column() {
// Web component loading H5.
Web({ src: 'https://www.baidu.com', controller: this.webController })
.zoomAccess(false)
.width('100%')
.height('100%')
.aspectRatio(1)
// .onConfirm((event) => {
// AlertDialog.show({
// message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
// confirm: {
// value: $r('app.string.web_alert_dialog_button_value'),
// action: () => {
// event?.result.handleConfirm();
// }
// },
// cancel: () => {
// event?.result.handleCancel();
// }
// });
// return true;
// })
// .onErrorReceive((event) => {
// if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
// prompt.showToast({
// message: $r('app.string.internet_err'),
// duration: Const.WebConstant_DURATION
// })
// }
// })
// .onProgressChange((event) => {
// if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
// this.isLoading = false;
// clearInterval(this.intervalLoading);
// this.intervalLoading = -1;
// }
// })
LikeComponent({data: this.model,componentType:1})
}
.width('100%')
}
...
...
sight_harmony/products/phone/src/main/ets/pages/view/CustomDialogComponent.ets
View file @
a6aea78
...
...
@@ -134,7 +134,7 @@ export default struct CustomDialogComponent {
Text($r('app.string.dialog_text_privacy_statement'))
.width('90%')
.fontColor($r('app.color.dialog_text_color'))
.fontSize(1
3
).margin({top:20})
.fontSize(1
4
).margin({top:20})
Row() {
Text($r('app.string.dialog_button_disagree'))
.fancy()
...
...
Please
register
or
login
to post a comment