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
liyubing
2024-06-17 11:19:18 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
be2f8b5684be265e0e2e14a1303c63d767337b46
be2f8b56
2 parents
5514b987
240037d7
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
51 additions
and
35 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
sight_harmony/features/wdTracking/src/main/ets/common/PublicParams.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
be2f8b5
...
...
@@ -60,12 +60,14 @@ export struct WdWebLocalComponent {
.imageAccess(true)
.mixedMode(MixedMode.All)
.onlineImageAccess(true)
.enableNativeEmbedMode(true)
.layoutMode(WebLayoutMode.FIT_CONTENT)
// .enableNativeEmbedMode(true)
// .layoutMode(WebLayoutMode.FIT_CONTENT)
.nestedScroll({
scrollForward: NestedScrollMode.SELF_FIRST,
scrollBackward: NestedScrollMode.PARENT_FIRST
})// .height(this.webHeight)
})
.width('100%')
.height(this.webHeight)
.onPageBegin((event) => {
this.onPageBegin(event?.url);
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
be2f8b5
...
...
@@ -63,6 +63,14 @@ export struct Card9Component {
this.textArr = titleInitRes.textArr;
}
formatTime(timeStamp: number) {
let todayDate = new Date().setHours(0,0,0,0);
let paramsDate = new Date(timeStamp).setHours(0,0,0,0);
let isToday = todayDate === paramsDate
let format: string = isToday ? 'HH:mm' : 'MM月dd日 HH:mm';
return DateTimeUtils.formatDate(timeStamp, format)
}
build() {
Column() {
// 顶部标题,最多两行
...
...
@@ -208,7 +216,7 @@ export struct Card9Component {
.margin({ right: 5 })
.fillColor(item.newsTitleColor)
Text(
DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm"
))
Text(
this.formatTime(item.publishTime
))
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_222222'))
.fontWeight(600)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
View file @
be2f8b5
...
...
@@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent {
buildItemCard(item: ContentDTO, index: number) {
Column() {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls
[0]
.url : '')
Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls
?.[0]?
.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
// .height(95)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
be2f8b5
...
...
@@ -19,8 +19,8 @@ export struct ZhSingleRow02 {
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -53,7 +53,7 @@ export struct ZhSingleRow02 {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
be2f8b5
...
...
@@ -43,8 +43,8 @@ export struct ZhSingleRow03 {
// @State reserveStatus: reserveItem[] = []
@State reservedIds: string[] = [];
@State loadImg: boolean = false;
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -78,7 +78,7 @@ export struct ZhSingleRow03 {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
@@ -260,7 +260,7 @@ export struct ZhSingleRow03 {
.fontSize(12)
.textAlign(TextAlign.Start)
.fontFamily('PingFang SC-Semibold')
.fontWeight(
6
00)
.fontWeight(
5
00)
Image($r('app.media.timeline_rect'))
.width(4)
.height(3)
...
...
@@ -270,7 +270,7 @@ export struct ZhSingleRow03 {
.fontColor(0x000000)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
.fontWeight(
6
00)
.fontWeight(
5
00)
Text('开始直播')
.fontColor(0xC8C8C8)
.fontSize(12)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponentNew.ets
View file @
be2f8b5
...
...
@@ -681,15 +681,23 @@ export struct TopNavigationComponentNew {
} else {
ToastUtils.showToast('暂无早晚报信息', 1000)
}
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
}).catch((err: string) => {
ToastUtils.showToast('暂无早晚报信息', 1000)
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
})
} else {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
let timer = setInterval(() => {
this.isClickMorningEveningPaper = false
clearInterval(timer);
}, 1000);
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomeNavComponent.ets
View file @
be2f8b5
...
...
@@ -120,15 +120,15 @@ export struct PeopleShipHomePageNavComponent {
}
.height('100%')
Blank()
// 分享
Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))
.width('24vp')
.height('24vp')
.objectFit(ImageFit.Auto)
.margin({ right: '10vp' })
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
})
// 分享 分享暂不展示
// Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))
// .width('24vp')
// .height('24vp')
// .objectFit(ImageFit.Auto)
// .margin({ right: '10vp' })
// .onClick(() => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
// })
}
.width('100%')
.height('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
be2f8b5
...
...
@@ -9,8 +9,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@State compDTO: CompDTO = {} as CompDTO
@State pageId: string = '';
@State pageName: string = '';
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -44,7 +44,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
be2f8b5
...
...
@@ -18,8 +18,8 @@ export struct LiveHorizontalCardComponent {
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@State initMoreWidth: number = 16;
@State moreWidth:number = 16
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
...
...
@@ -53,7 +53,7 @@ export struct LiveHorizontalCardComponent {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth =
16
this.moreWidth =
22
}
this.resetMoreTips()
}
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
View file @
be2f8b5
...
...
@@ -33,13 +33,11 @@ struct LoginProtocolWebview {
this.contentID = params.contentID
}
if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
this.webUrl = this.userProtocol
this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
this.webUrl = SPHelper.default.getSync(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
} else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
this.webUrl = this.privateProtocol
this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
this.webUrl = SPHelper.default.getSync(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
}else if(params.contentID == "3"){ //注销协议
this.webUrl =
await SPHelper.default.get
(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
this.webUrl =
SPHelper.default.getSync
(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
} else if(params.contentID == "4"){ //华为用户认证协议
this.webUrl = this.huaweiAuthProtocol
} else if(params.contentID == "5"){ //收集个人信息明示清单
...
...
sight_harmony/features/wdTracking/src/main/ets/common/PublicParams.ets
View file @
be2f8b5
...
...
@@ -21,7 +21,7 @@ export class PublicParams {
"isSign": AccountManagerUtils.isLoginSync() ? "1" : "0",
"environment": PublicParams.getEnv(),
"os": AppUtils.getOSName(),
"actionTime":
new Date().getTime() * 0.001
,
"actionTime":
Math.log(new Date().getTime() / 1000)
,
"channel": AppUtils.getAppChannel(),
"version": AppUtils.getAppVersionName(),
"deviceId": DeviceUtil.clientId(),
...
...
Please
register
or
login
to post a comment