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
yuzhilin
2024-04-19 10:31:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20c32839315fd5e78b217c2ab4371512d67fbc09
20c32839
1 parent
bccb3468
H5稿件头部样式
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmh.png
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmrb.png
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
20c3283
import { Logger, NumberFormatterUtils } from 'wdKit';
import { Logger, NumberFormatterUtils
, DateTimeUtils
} from 'wdKit';
import {
Action,
ContentDetailDTO,
...
...
@@ -14,15 +14,15 @@ import DetailViewModel from '../viewmodel/DetailViewModel';
import { ImageAndTextWebComponent } from './ImageAndTextWebComponent';
import router from '@ohos.router';
import { RecommendList } from '../components/view/RecommendList'
import { CommonConstants } from 'wdConstant'
import { CommonConstants } from 'wdConstant'
;
import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import { PageRepository } from '../repository/PageRepository';
import { detailedSkeleton } from './skeleton/detailSkeleton'
import { detailedSkeleton } from './skeleton/detailSkeleton';
const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
const TAG = 'ImageAndTextPageComponent'
@Component
export struct ImageAndTextPageComponent {
scroller: Scroller = new Scroller();
...
...
@@ -32,7 +32,7 @@ export struct ImageAndTextPageComponent {
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State isPageEnd: boolean = false
@State publishTime: string = ''
build() {
Column() {
if (!this.isPageEnd) {
...
...
@@ -40,10 +40,10 @@ export struct ImageAndTextPageComponent {
} else {
// 发布时间
Row() {
Image($r('app.media.icon_ren_min_ri_bao'))
.width(70)
Image(this.contentDetailData[0]?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))
.width(80)
.height(28)
Text(this.contentDetailData[0]?
.publishTime)
Text(this
.publishTime)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.font_size_13'))
.height('100%')
...
...
@@ -151,6 +151,8 @@ export struct ImageAndTextPageComponent {
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans;
let dateTime = DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
this.publishTime = DateTimeUtils.formatDate(dateTime,PATTERN_DATE_CN_RN)
if (this.contentDetailData[0]?.recommendShow === 1) {
this.getRecommend()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
20c3283
import { CommonConstants } from 'wdConstant'
import { ContentDTO,CompDTO } from 'wdBean'
import { ContentDTO, CompDTO } from 'wdBean'
import { ProcessUtils } from '../../utils/ProcessUtils';
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
...
...
@@ -59,13 +60,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 })
// .offset({x:16})
.onClick(() => {
if (item.objectType != '0') {
console.log(item.objectId)
}
ProcessUtils.processPage(item)
})
})
}.listDirection(Axis.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
// .backgroundColor($r("app.color.color_FE4B05"))
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmh.png
0 → 100644
View file @
20c3283
4.05 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmrb.png
0 → 100644
View file @
20c3283
4.26 KB
Please
register
or
login
to post a comment