chenjun

详情页与安卓保持一致

... ... @@ -43,7 +43,8 @@ export struct DetailDialog {
.height(200)
Row() {
Image($r("app.media.ic_close_white"))
Image($r("app.media.icon_arrow_left_white"))
.rotate({ angle: -90, centerX: '50%', centerY: '50%' })
.height(24).margin({ top: 20 }).onClick(() => {
this.controller.close()
if (this.isOpenDetail) {
... ...
... ... @@ -132,33 +132,33 @@ export struct PlayerTitleView {
.fontWeight(600)
.fontFamily('PingFang SC-Regular')
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 8 })
.margin({ bottom: 2 }) //8
/**
* 标题大于三行或存在简介显示查看详情按钮
*/
if (this.rmhPlatform == 1) {
if (this.titleHeight > 200 || this.summary) {
Text('查看详情 > ')
.padding({
left: 6,
right: 6,
top: 4,
bottom: 4
})
.borderRadius(2)
.backgroundColor('#99636363')
.fontFamily('PingFang SC-Regular')
.fontColor(Color.White)
.fontSize(12)
.lineHeight(14)
.fontWeight(400)
.onClick(() => {
this.isOpenDetail = true
this.dialogController?.open()
})
}
} else {
// if (this.rmhPlatform == 1) {
// if (this.titleHeight > 200 || this.summary) {
// Text('查看详情 > ')
// .padding({
// left: 6,
// right: 6,
// top: 4,
// bottom: 4
// })
// .borderRadius(2)
// .backgroundColor('#99636363')
// .fontFamily('PingFang SC-Regular')
// .fontColor(Color.White)
// .fontSize(12)
// .lineHeight(14)
// .fontWeight(400)
// .onClick(() => {
// this.isOpenDetail = true
// this.dialogController?.open()
// })
// }
// } else {
if(this.summary) {
Text() {
Span(this.clipText(this.summary, 14, 3, this.windowWidth - 150 - vp2px(50)))
... ... @@ -181,10 +181,11 @@ export struct PlayerTitleView {
.width(14)
.height(14)
.objectFit(ImageFit.Fill)
.verticalAlign(ImageSpanAlignment.CENTER)
.padding({
bottom: 4
})
.verticalAlign(ImageSpanAlignment.BOTTOM)
.margin({bottom:1})
// .padding({
// bottom: 4
// })
.onClick(() => {
this.isOpenDetail = true
this.dialogController?.open()
... ... @@ -193,13 +194,14 @@ export struct PlayerTitleView {
}
}
.padding({
left: 6,
left: 0,//6
right: 6,
top: 4,
top: 0,//4
bottom: 4
})
}
}
// }
Text(DateTimeUtils.formatDate(new Date(this.contentDetailData?.publishTime).getTime(), DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
.fontSize(12)
.fontColor(Color.White)
... ...