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
王士厅
2024-08-05 17:24:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1b81eb46d2ddb860e27fca41f51222b8e4b6028c
1b81eb46
1 parent
5deda9f0
feat: 视频详情页,未展示发稿时间
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/DateTimeUtils.ts
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
sight_harmony/commons/wdKit/src/main/ets/utils/DateTimeUtils.ts
View file @
1b81eb4
...
...
@@ -38,6 +38,7 @@ export class DateTimeUtils {
// 日期+时间格式
static
readonly
PATTERN_DATE_TIME_DEFAULT
:
string
=
'yyyyMMddHHmmss'
;
// 年月日时分秒
static
readonly
PATTERN_DATE_TIME_HYPHEN
:
string
=
'yyyy-MM-dd HH:mm:ss'
;
// 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
static
readonly
PATTERN_DATE_TIME_HYPHEN_MM
:
string
=
'yyyy-MM-dd HH:mm'
;
// 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
static
readonly
PATTERN_DATE_TIME_HYPHEN_MS
:
string
=
'yyyy-MM-dd HH:mm:ss.SSS'
;
// 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
static
readonly
PATTERN_DATE_TIME_SLASH
:
string
=
'yyyy/MM/dd HH:mm:ss'
;
// 日期中包含正斜杠(forward slash '/')
static
readonly
PATTERN_DATE_TIME_BACK_SLASH
:
string
=
'yyyy\\MM\\dd HH:mm:ss'
;
// 日期中包含反斜杠(back slash '\')
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
View file @
1b81eb4
...
...
@@ -38,6 +38,7 @@ export struct PlayerProgressView {
ToastUtils.shortToast('网络出小差了,请检查下网络')
}, 10000)
} else {
// console.log("PlayerProgressView22", this.timer)
clearTimeout(this.timer)
this.loadingWidth = 1
this.showLoading = false
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
View file @
1b81eb4
...
...
@@ -2,6 +2,7 @@ import measure from '@ohos.measure'
import { ContentDetailDTO } from 'wdBean/Index'
import { DetailDialog } from './DetailDialog'
import { componentUtils } from '@kit.ArkUI'
import { DateTimeUtils } from 'wdKit'
const TAG = 'PlayerTitleView';
@Preview
...
...
@@ -152,7 +153,6 @@ export struct PlayerTitleView {
.fontSize(12)
.lineHeight(14)
.fontWeight(400)
.margin({ bottom: 8 })
.onClick(() => {
this.isOpenDetail = true
this.dialogController?.open()
...
...
@@ -198,9 +198,16 @@ export struct PlayerTitleView {
top: 4,
bottom: 4
})
.margin({ bottom: 8 })
}
}
Text(DateTimeUtils.formatDate(new Date(this.contentDetailData?.publishTime).getTime(), DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
.fontSize(12)
.fontColor(Color.White)
.opacity(0.7)
.lineHeight(16)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.margin({ top: 8, bottom: 8 })
}
.width(this.windowWidth - 150 + 'px')
...
...
Please
register
or
login
to post a comment