王士厅

feat: 视频详情页,未展示发稿时间

... ... @@ -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 '\')
... ...
... ... @@ -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
... ...
... ... @@ -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')
... ...