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
chenqs
2024-07-26 18:51:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0b73314076b024a713215737e31c04e8b0b4bb40
0b733140
1 parent
e7200e55
ref |> 添加H5提示页面
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
sight_harmony/products/phone/src/main/ets/pages/web/H5TipsPage.ets
sight_harmony/products/phone/src/main/resources/base/profile/main_pages.json
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
View file @
0b73314
...
...
@@ -36,6 +36,8 @@ export class WDRouterPage {
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// H5提示页面
static h5TipsPage = new WDRouterPage("phone", "ets/pages/web/H5TipsPage");
// 电子报页面
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
...
...
sight_harmony/products/phone/src/main/ets/pages/web/H5TipsPage.ets
0 → 100644
View file @
0b73314
import router from '@ohos.router';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params';
import { Logger } from 'wdKit';
import { CustomTitleUI } from 'wdComponent/src/main/ets/components/reusable/CustomTitleUI';
const TAG = 'H5TipsPage'
@Entry
@Component
struct H5TipsPage {
@State webUrl: string = '';
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
aboutToAppear() {
if (router.getParams()) {
let params = router.getParams() as Params
Logger.info(TAG, 'params.url:' + params.url);
if(params.url != undefined){
this.webUrl = params.url
}
}
}
build() {
Column() {
Blank().height(`${this.topSafeHeight}px`)
//标题栏目
CustomTitleUI({ titleName: '人民日报' })
Text('如需浏览,请长按网址复制后使用浏览器访问')
.fontSize(16)
.fontFamily('PingFang SC-Semibold')
.fontColor('#555555')
.textAlign(TextAlign.Center)
.margin({top: 80, left: 20, bottom: 16, right: 20})
.height(20)
Text(this.webUrl)
.fontSize(14)
.fontFamily('PingFang SC-Regular')
.fontColor('#999999')
.textAlign(TextAlign.Center)
.margin({left: 40, right: 40})
.height(40)
}
.backgroundColor(Color.White)
.width("100%")
.height("100%")
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/resources/base/profile/main_pages.json
View file @
0b73314
...
...
@@ -2,6 +2,7 @@
"src"
:
[
"pages/MainPage"
,
"pages/web/DefaultWebPage"
,
"pages/web/H5TipsPage"
,
"pages/ENewspaper"
,
"pages/ImageAndTextDetailPage"
,
"pages/MorningEveningPaperPage"
,
...
...
Please
register
or
login
to post a comment