wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix: 19927 3:2横划卡-后台配置1个运营位,跳转设置--不跳转,鸿蒙端不应展示更多按钮
  fix: 19926 3:2横划卡-后台配置1个运营位,鸿蒙端封面图不正确,见对比截图
  fix: 地方精选卡修改边距
  换一换如果全部遍历过了则按钮置灰不让点击
  fix: 兴趣卡ui优化
  fix: 热点频道,横划卡只配1个运营位,折叠屏右侧展示缺少圆角
  fix |> 游客模式进入文章详情页显示关注按钮
  fix |> 修复竖屏直播横屏流,全屏后,直播标题与屏幕边缘间距不正确问题
  fix: 修复沉浸式播放,不断上滑切换视频,网络出小差弹出频繁
  fix: 标签问题优化,图集详情ui优化
  安卓时间对齐
  fix: 地方精选卡阴影shadow redius单位为px,用vp2px转换
  fix: 标签问题优化
  fix |> 修复进入文章详情页时关注按钮从已关注变成关注
Showing 22 changed files with 98 additions and 75 deletions
1 import { StringUtils } from './StringUtils'; 1 import { StringUtils } from './StringUtils';
2 import getLunar from './GetLunar'; 2 import getLunar from './GetLunar';
  3 +import { systemDateTime } from '@kit.BasicServicesKit';
3 4
4 /** 5 /**
5 * 日期/时间工具 6 * 日期/时间工具
@@ -436,7 +437,8 @@ export class DateTimeUtils { @@ -436,7 +437,8 @@ export class DateTimeUtils {
436 * 获取文章发布时间 437 * 获取文章发布时间
437 * */ 438 * */
438 public static getCommentTime(publishTime: number): string { 439 public static getCommentTime(publishTime: number): string {
439 - let currentTime: number = new Date().getTime(); 440 + // let currentTime: number = new Date().getTime();
  441 + let currentTime: number = systemDateTime.getTime(false);
440 let timeGap = currentTime - publishTime; 442 let timeGap = currentTime - publishTime;
441 let timeStr = "" 443 let timeStr = ""
442 if (timeGap >= 60 * 60 * 1000 * 48) { 444 if (timeGap >= 60 * 60 * 1000 * 48) {
@@ -222,13 +222,7 @@ export struct Card10ComponentTimelineItem { @@ -222,13 +222,7 @@ export struct Card10ComponentTimelineItem {
222 .fontColor(this.isRead ? 0x848484 : '#222222') 222 .fontColor(this.isRead ? 0x848484 : '#222222')
223 .maxLines(2) 223 .maxLines(2)
224 .textOverflow({ overflow: TextOverflow.Ellipsis }) 224 .textOverflow({ overflow: TextOverflow.Ellipsis })
225 - .textIndent(  
226 - getNotesContentWidth(  
227 - this.contentDTO.seoTags || this.contentDTO.newTags,  
228 - this.contentDTO.objectType,  
229 - this.contentDTO.objectLevel  
230 - )  
231 - ) 225 + .textIndent(this.slideItem.objectType == '5' ? 38 : 0)
232 }.alignContent(Alignment.TopStart) 226 }.alignContent(Alignment.TopStart)
233 227
234 Blank() 228 Blank()
@@ -271,13 +265,7 @@ export struct Card10ComponentTimelineItem { @@ -271,13 +265,7 @@ export struct Card10ComponentTimelineItem {
271 .fontColor($r('app.color.color_222222')) 265 .fontColor($r('app.color.color_222222'))
272 .maxLines(2) 266 .maxLines(2)
273 .textOverflow({ overflow: TextOverflow.Ellipsis }) 267 .textOverflow({ overflow: TextOverflow.Ellipsis })
274 - .textIndent(  
275 - getNotesContentWidth(  
276 - this.contentDTO.seoTags || this.contentDTO.newTags,  
277 - this.contentDTO.objectType,  
278 - this.contentDTO.objectLevel  
279 - )  
280 - ) 268 + .textIndent(this.slideItem.objectType == '5' ? 38 : 0)
281 }.alignContent(Alignment.TopStart) 269 }.alignContent(Alignment.TopStart)
282 270
283 //bottom 评论等信息 271 //bottom 评论等信息
@@ -78,7 +78,8 @@ export struct Card11Component { @@ -78,7 +78,8 @@ export struct Card11Component {
78 getNotesContentWidth( 78 getNotesContentWidth(
79 this.contentDTO.seoTags || this.contentDTO.newTags, 79 this.contentDTO.seoTags || this.contentDTO.newTags,
80 this.contentDTO.objectType, 80 this.contentDTO.objectType,
81 - this.contentDTO.objectLevel 81 + this.contentDTO.objectLevel,
  82 + this.contentDTO.top
82 ) 83 )
83 ) 84 )
84 }.alignContent(Alignment.TopStart) 85 }.alignContent(Alignment.TopStart)
@@ -95,7 +95,8 @@ export struct Card20Component { @@ -95,7 +95,8 @@ export struct Card20Component {
95 getNotesContentWidth( 95 getNotesContentWidth(
96 this.contentDTO.seoTags || this.contentDTO.newTags, 96 this.contentDTO.seoTags || this.contentDTO.newTags,
97 this.contentDTO.objectType, 97 this.contentDTO.objectType,
98 - this.contentDTO.objectLevel 98 + this.contentDTO.objectLevel,
  99 + this.contentDTO.top
99 ) 100 )
100 ) 101 )
101 .width('100%') 102 .width('100%')
@@ -87,7 +87,8 @@ export struct Card2Component { @@ -87,7 +87,8 @@ export struct Card2Component {
87 getNotesContentWidth( 87 getNotesContentWidth(
88 this.contentDTO.seoTags || this.contentDTO.newTags, 88 this.contentDTO.seoTags || this.contentDTO.newTags,
89 this.contentDTO.objectType, 89 this.contentDTO.objectType,
90 - this.contentDTO.objectLevel 90 + this.contentDTO.objectLevel,
  91 + this.contentDTO.top
91 ) 92 )
92 ) 93 )
93 .width('100%') 94 .width('100%')
@@ -74,7 +74,8 @@ export struct Card3Component { @@ -74,7 +74,8 @@ export struct Card3Component {
74 getNotesContentWidth( 74 getNotesContentWidth(
75 this.contentDTO.seoTags || this.contentDTO.newTags, 75 this.contentDTO.seoTags || this.contentDTO.newTags,
76 this.contentDTO.objectType, 76 this.contentDTO.objectType,
77 - this.contentDTO.objectLevel 77 + this.contentDTO.objectLevel,
  78 + this.contentDTO.top
78 ) 79 )
79 ) 80 )
80 }.alignContent(Alignment.TopStart) 81 }.alignContent(Alignment.TopStart)
@@ -85,7 +85,8 @@ export struct Card4Component { @@ -85,7 +85,8 @@ export struct Card4Component {
85 getNotesContentWidth( 85 getNotesContentWidth(
86 this.contentDTO.seoTags || this.contentDTO.newTags, 86 this.contentDTO.seoTags || this.contentDTO.newTags,
87 this.contentDTO.objectType, 87 this.contentDTO.objectType,
88 - this.contentDTO.objectLevel 88 + this.contentDTO.objectLevel,
  89 + this.contentDTO.top
89 ) 90 )
90 ) 91 )
91 .width('100%') 92 .width('100%')
@@ -115,7 +115,8 @@ export struct Card5Component { @@ -115,7 +115,8 @@ export struct Card5Component {
115 getNotesContentWidth( 115 getNotesContentWidth(
116 this.contentDTO.seoTags || this.contentDTO.newTags, 116 this.contentDTO.seoTags || this.contentDTO.newTags,
117 this.contentDTO.objectType, 117 this.contentDTO.objectType,
118 - this.contentDTO.objectLevel 118 + this.contentDTO.objectLevel,
  119 + this.contentDTO.top
119 ) 120 )
120 ) 121 )
121 }.alignContent(Alignment.TopStart) 122 }.alignContent(Alignment.TopStart)
@@ -86,7 +86,8 @@ export struct Card6Component { @@ -86,7 +86,8 @@ export struct Card6Component {
86 getNotesContentWidth( 86 getNotesContentWidth(
87 this.contentDTO.seoTags || this.contentDTO.newTags, 87 this.contentDTO.seoTags || this.contentDTO.newTags,
88 this.contentDTO.objectType, 88 this.contentDTO.objectType,
89 - this.contentDTO.objectLevel 89 + this.contentDTO.objectLevel,
  90 + this.contentDTO.top
90 ) 91 )
91 ) 92 )
92 .width('100%') 93 .width('100%')
@@ -13,10 +13,10 @@ export struct Notes { @@ -13,10 +13,10 @@ export struct Notes {
13 @State objectLevel: number | string = -1 13 @State objectLevel: number | string = -1
14 @State newTags: string = '' 14 @State newTags: string = ''
15 @State seoTags: string = '' 15 @State seoTags: string = ''
16 - @State marginTop: number = 0; 16 + @State marginTop: number = -1;
17 17
18 build() { 18 build() {
19 - if (this.returnTypeTitleFn()) { 19 + if (returnTypeTitleFn(this.newTags, this.objectType, this.objectLevel)) {
20 Text(returnTypeTitleFn(this.newTags, this.objectType, this.objectLevel)) 20 Text(returnTypeTitleFn(this.newTags, this.objectType, this.objectLevel))
21 .fontSize($r('app.float.font_size_11')) 21 .fontSize($r('app.float.font_size_11'))
22 .padding({ 22 .padding({
@@ -31,23 +31,4 @@ export struct Notes { @@ -31,23 +31,4 @@ export struct Notes {
31 .margin({ top: this.marginTop}) 31 .margin({ top: this.marginTop})
32 } 32 }
33 } 33 }
34 -  
35 - returnTypeTitleFn(): string {  
36 - if (this.newTags) {  
37 - return this.newTags  
38 - }  
39 - if (this.objectType == 5) {  
40 - if (this.objectLevel == 24) {  
41 - return '调查'  
42 - }  
43 - return '专题'  
44 - }  
45 - if (this.objectType == 10) {  
46 - return 'H5'  
47 - }  
48 - if (this.objectType == 8) {  
49 - return '文章'  
50 - }  
51 - return ''  
52 - }  
53 } 34 }
@@ -205,6 +205,7 @@ struct CarouselLayout01CardView { @@ -205,6 +205,7 @@ struct CarouselLayout01CardView {
205 .backgroundColor(0xf5f5f5) 205 .backgroundColor(0xf5f5f5)
206 .borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0) 206 .borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0)
207 207
  208 + Stack() {
208 Row() 209 Row()
209 .width(CommonConstants.FULL_PARENT) 210 .width(CommonConstants.FULL_PARENT)
210 .height(60) 211 .height(60)
@@ -212,6 +213,14 @@ struct CarouselLayout01CardView { @@ -212,6 +213,14 @@ struct CarouselLayout01CardView {
212 direction: GradientDirection.Top, // 渐变方向:to Top/从下往上 213 direction: GradientDirection.Top, // 渐变方向:to Top/从下往上
213 colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]] 214 colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
214 }) 215 })
  216 + .position({
  217 + bottom: 10
  218 + })
  219 + }
  220 + .width(CommonConstants.FULL_PARENT)
  221 + .height(CommonConstants.FULL_PARENT)
  222 + .alignContent(Alignment.Bottom)
  223 +
215 Column() { 224 Column() {
216 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 225 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示
217 if (this.item.objectType === '2' || this.item.objectType === '4') { 226 if (this.item.objectType === '2' || this.item.objectType === '4') {
@@ -223,13 +232,13 @@ struct CarouselLayout01CardView { @@ -223,13 +232,13 @@ struct CarouselLayout01CardView {
223 // 文本信息 232 // 文本信息
224 Stack() { 233 Stack() {
225 if(this.item.objectType == '5'){ 234 if(this.item.objectType == '5'){
226 - Notes({ objectType: this.item.objectType,objectLevel:this.item.objectLevel }) 235 + Notes({ objectType: this.item.objectType,objectLevel:this.item.objectLevel, marginTop: 4 })
227 } else { 236 } else {
228 if (this.item.seoTags) { 237 if (this.item.seoTags) {
229 - Notes({ newTags: this.item.seoTags }) 238 + Notes({ newTags: this.item.seoTags, marginTop: 4 })
230 } 239 }
231 if (this.item.newTags) { 240 if (this.item.newTags) {
232 - Notes({ newTags: this.item.newTags }) 241 + Notes({ newTags: this.item.newTags, marginTop: 4 })
233 } 242 }
234 } 243 }
235 Text(`${this.item.newsTitle}`) 244 Text(`${this.item.newsTitle}`)
@@ -246,7 +255,8 @@ struct CarouselLayout01CardView { @@ -246,7 +255,8 @@ struct CarouselLayout01CardView {
246 getNotesContentWidth( 255 getNotesContentWidth(
247 this.item.seoTags || this.item.newTags, 256 this.item.seoTags || this.item.newTags,
248 this.item.objectType, 257 this.item.objectType,
249 - this.item.objectLevel 258 + this.item.objectLevel,
  259 + this.item.top
250 ) 260 )
251 ) 261 )
252 } 262 }
@@ -14,6 +14,7 @@ const TAG = 'Zh_Single_Column-09' @@ -14,6 +14,7 @@ const TAG = 'Zh_Single_Column-09'
14 @Entry 14 @Entry
15 @Component 15 @Component
16 export struct ZhSingleColumn09 { 16 export struct ZhSingleColumn09 {
  17 + @State fullyTraversed: boolean = false;
17 @State private pageModel: PageModel = new PageModel(); 18 @State private pageModel: PageModel = new PageModel();
18 @State pageId: string = ''; 19 @State pageId: string = '';
19 @State pageName: string = ''; 20 @State pageName: string = '';
@@ -24,6 +25,7 @@ export struct ZhSingleColumn09 { @@ -24,6 +25,7 @@ export struct ZhSingleColumn09 {
24 @State loadImg: boolean = false; 25 @State loadImg: boolean = false;
25 @State compIndex: number = 0; 26 @State compIndex: number = 0;
26 @State currentOperDataListIndex: number = 0; //记录换一换点击次数 27 @State currentOperDataListIndex: number = 0; //记录换一换点击次数
  28 + @State visitedIndices: Set<number> = new Set<number>();
27 29
28 async aboutToAppear(): Promise<void> { 30 async aboutToAppear(): Promise<void> {
29 this.loadImg = await onlyWifiLoadImg(); 31 this.loadImg = await onlyWifiLoadImg();
@@ -77,12 +79,21 @@ export struct ZhSingleColumn09 { @@ -77,12 +79,21 @@ export struct ZhSingleColumn09 {
77 } 79 }
78 80
79 shuffleArray(array: ContentDTO[]) { 81 shuffleArray(array: ContentDTO[]) {
80 - for (let i = array.length - 1; i > 0; i--) { 82 + for (let i = array.length - 1; i >= 0; i--) {
81 const j = Math.floor(Math.random() * (i + 1)); 83 const j = Math.floor(Math.random() * (i + 1));
  84 + console.info(`cj2024 shuffleArray i = ${i} array.length = ${array.length}`)
  85 +
  86 + // 记录被选中的索引 j
  87 + this.visitedIndices.add(j);
  88 + console.info(`cj2024 shuffleArray j = ${j} visitedIndices = ${this.visitedIndices.size}`)
82 const tempArray = array[i]; 89 const tempArray = array[i];
83 array[i] = array[j]; 90 array[i] = array[j];
84 array[j] = tempArray 91 array[j] = tempArray
85 } 92 }
  93 +
  94 + // 检查是否所有元素都被遍历过
  95 + this.fullyTraversed = this.visitedIndices.size === array.length;
  96 +
86 return array 97 return array
87 } 98 }
88 99
@@ -131,9 +142,9 @@ export struct ZhSingleColumn09 { @@ -131,9 +142,9 @@ export struct ZhSingleColumn09 {
131 .justifyContent(FlexAlign.SpaceBetween) 142 .justifyContent(FlexAlign.SpaceBetween)
132 .width('100%') 143 .width('100%')
133 144
134 - Grid() { 145 + Flex({wrap: FlexWrap.Wrap}) {
135 ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => { 146 ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => {
136 - GridItem() { 147 + Row() {
137 Stack({ alignContent: Alignment.TopEnd }) { 148 Stack({ alignContent: Alignment.TopEnd }) {
138 Image(this.loadImg ? item.coverUrl : '') 149 Image(this.loadImg ? item.coverUrl : '')
139 .backgroundColor(0xf5f5f5) 150 .backgroundColor(0xf5f5f5)
@@ -163,6 +174,7 @@ export struct ZhSingleColumn09 { @@ -163,6 +174,7 @@ export struct ZhSingleColumn09 {
163 .width('100%') 174 .width('100%')
164 .aspectRatio(2 / 1) 175 .aspectRatio(2 / 1)
165 } 176 }
  177 + .width('calc((100% - 6vp * 3) / 4)')
166 .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) 178 .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 })
167 .onClick(() => { 179 .onClick(() => {
168 if (this.activeIndexs.includes(index)) { 180 if (this.activeIndexs.includes(index)) {
@@ -174,23 +186,21 @@ export struct ZhSingleColumn09 { @@ -174,23 +186,21 @@ export struct ZhSingleColumn09 {
174 }) 186 })
175 }) 187 })
176 } 188 }
177 - .columnsTemplate('1fr 1fr 1fr 1fr') 189 + // .columnsTemplate('1fr 1fr 1fr 1fr')
178 .margin({ bottom: 5 }) 190 .margin({ bottom: 5 })
179 191
180 Row() { 192 Row() {
181 Row() { 193 Row() {
182 Text('换一换') 194 Text('换一换')
183 .fontSize(14) 195 .fontSize(14)
184 - .fontColor(this.compDTO?.operDataList.length > 8 && this.currentOperDataListIndex > 0 ? 0xed2800 : 0xB0B0B0) 196 + .fontColor(this.compDTO?.operDataList.length > 8 && !this.fullyTraversed ? 0xed2800 : 0xB0B0B0)
185 .margin({ right: 4 }) 197 .margin({ right: 4 })
186 Image(this.compDTO?.operDataList.length > 8 ? $r('app.media.icon_refresh') : $r('app.media.ic_refresh')) 198 Image(this.compDTO?.operDataList.length > 8 ? $r('app.media.icon_refresh') : $r('app.media.ic_refresh'))
187 .width(14) 199 .width(14)
188 .height(14) 200 .height(14)
189 } 201 }
190 .onClick(() => { 202 .onClick(() => {
191 - if (this.currentOperDataListIndex > 0) {  
192 - this.currentOperDataListIndex--  
193 - } else { 203 + if (this.fullyTraversed) {
194 return 204 return
195 } 205 }
196 if (this.compDTO?.operDataList.length > 8) { 206 if (this.compDTO?.operDataList.length > 8) {
@@ -60,8 +60,7 @@ export struct ZhSingleRow04 { @@ -60,8 +60,7 @@ export struct ZhSingleRow04 {
60 .margin({ bottom: 8 }) 60 .margin({ bottom: 8 })
61 .width('100%') 61 .width('100%')
62 .padding({ 62 .padding({
63 - left: $r('app.float.card_comp_pagePadding_lf'),  
64 - right: $r('app.float.card_comp_pagePadding_lf') 63 + right: 10
65 }) 64 })
66 65
67 // 列表内容 66 // 列表内容
@@ -74,8 +73,8 @@ export struct ZhSingleRow04 { @@ -74,8 +73,8 @@ export struct ZhSingleRow04 {
74 } 73 }
75 ) 74 )
76 .margin({ 75 .margin({
77 - right: index === this.compDTO.operDataList.length - 1 ? 26 : 0, left:  
78 - index === 0 ? $r('app.float.card_comp_pagePadding_lf') : 0, 76 + right: index === this.compDTO.operDataList.length - 1 ? 26 : 0,
  77 + left: index === 0 ? 2 : 0,
79 top: 6 78 top: 6
80 }) 79 })
81 .onClick(() => { 80 .onClick(() => {
@@ -167,7 +166,7 @@ struct localCard { @@ -167,7 +166,7 @@ struct localCard {
167 radius: 2, 166 radius: 2,
168 }) 167 })
169 .shadow({ 168 .shadow({
170 - radius: 5, 169 + radius: vp2px(5),
171 color: 'rgba(0, 0, 0, 0.10)', 170 color: 'rgba(0, 0, 0, 0.10)',
172 offsetX: 0, 171 offsetX: 0,
173 offsetY: 1 172 offsetY: 1
@@ -35,12 +35,17 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { @@ -35,12 +35,17 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
35 .width(14) 35 .width(14)
36 .height(14) 36 .height(14)
37 } 37 }
38 - }.justifyContent(FlexAlign.SpaceBetween) 38 + .visibility(this.showMore() ? Visibility.Visible : Visibility.None)
  39 + .onClick(() => {
  40 + ProcessUtils.compJumpPage(this.compDTO)
  41 + })
  42 + }
  43 + .justifyContent(FlexAlign.SpaceBetween)
39 .margin({ top: 8, bottom: 8 }) 44 .margin({ top: 8, bottom: 8 })
40 .width('100%') 45 .width('100%')
41 46
42 47
43 - Image($r("app.media.setting")) 48 + Image(this.compDTO.operDataList[0].coverUrl)
44 .aspectRatio(1.5) 49 .aspectRatio(1.5)
45 .width('100%') 50 .width('100%')
46 .borderRadius(4) 51 .borderRadius(4)
@@ -73,5 +78,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { @@ -73,5 +78,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
73 }) 78 })
74 } 79 }
75 80
  81 + showMore() {
  82 + return (!!this.compDTO.dataSourceType && this.compDTO.dataSourceType !== 'OBJECT_POS') || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
  83 + }
76 84
77 } 85 }
@@ -17,12 +17,13 @@ export function runWithAnimation( @@ -17,12 +17,13 @@ export function runWithAnimation(
17 } 17 }
18 18
19 export function getNotesContentWidth( 19 export function getNotesContentWidth(
20 - newTags: string,  
21 - objectType: number | string,  
22 - objectLevel: number | string, 20 + newTags?: string,
  21 + objectType?: number | string,
  22 + objectLevel?: number | string,
  23 + top?: number,
23 fontSize?: string | number | Resource 24 fontSize?: string | number | Resource
24 ) { 25 ) {
25 - let textContent: string = returnTypeTitleFn(newTags, objectType, objectLevel) 26 + let textContent: string = ''
26 let px = 0 27 let px = 0
27 const paddingRightAndLeft = vp2px(8) 28 const paddingRightAndLeft = vp2px(8)
28 const marginRight = vp2px(6); 29 const marginRight = vp2px(6);
@@ -30,7 +31,7 @@ export function getNotesContentWidth( @@ -30,7 +31,7 @@ export function getNotesContentWidth(
30 if(objectType == '5'){ 31 if(objectType == '5'){
31 textContent = returnTypeTitleFn('', objectType, objectLevel) 32 textContent = returnTypeTitleFn('', objectType, objectLevel)
32 } else { 33 } else {
33 - textContent = returnTypeTitleFn(newTags) 34 + textContent = returnTypeTitleFn(newTags, undefined, undefined, top)
34 } 35 }
35 36
36 if (textContent) { 37 if (textContent) {
@@ -57,7 +58,8 @@ export function getNotesContentWidth( @@ -57,7 +58,8 @@ export function getNotesContentWidth(
57 export function returnTypeTitleFn( 58 export function returnTypeTitleFn(
58 newTags?: string, 59 newTags?: string,
59 objectType?: number | string, 60 objectType?: number | string,
60 - objectLevel?: number | string 61 + objectLevel?: number | string,
  62 + top?: number
61 ): string { 63 ): string {
62 if (newTags) { 64 if (newTags) {
63 return newTags 65 return newTags
@@ -74,5 +76,8 @@ export function returnTypeTitleFn( @@ -74,5 +76,8 @@ export function returnTypeTitleFn(
74 if (objectType == 8) { 76 if (objectType == 8) {
75 return '文章' 77 return '文章'
76 } 78 }
  79 + if (top === 1) {
  80 + return '置顶'
  81 + }
77 return '' 82 return ''
78 } 83 }
@@ -219,7 +219,7 @@ @@ -219,7 +219,7 @@
219 <div class="cdescrip_text" v-if="details.rmhDesc" @click="skipCustomerNumberPage">{{details.rmhDesc}}</div> 219 <div class="cdescrip_text" v-if="details.rmhDesc" @click="skipCustomerNumberPage">{{details.rmhDesc}}</div>
220 </div> 220 </div>
221 <!-- @click.stop阻止事件冒泡 --> 221 <!-- @click.stop阻止事件冒泡 -->
222 - <template v-if="!isOwer"> 222 + <template v-if="!isOwer && showButton">
223 <div class="clook-btn clook" @click.stop="clookBtn" v-if="clookStatusSee || showClook"> 223 <div class="clook-btn clook" @click.stop="clookBtn" v-if="clookStatusSee || showClook">
224 <template v-if="clookBtnActive"> 224 <template v-if="clookBtnActive">
225 <img class="clook-loading anticon-spin" src="./image/loading_clock.svg" alt=""> 225 <img class="clook-loading anticon-spin" src="./image/loading_clock.svg" alt="">
@@ -50,6 +50,7 @@ const app = Vue.createApp({ @@ -50,6 +50,7 @@ const app = Vue.createApp({
50 const isRmh = ref(null) 50 const isRmh = ref(null)
51 const isNewspaper = ref(null) 51 const isNewspaper = ref(null)
52 const browseStr = ref('') 52 const browseStr = ref('')
  53 + const showButton = ref(false)
53 54
54 const state = reactive({ 55 const state = reactive({
55 clientHeight: 0, 56 clientHeight: 0,
@@ -644,11 +645,13 @@ const app = Vue.createApp({ @@ -644,11 +645,13 @@ const app = Vue.createApp({
644 if (state.isLogined == 1) { 645 if (state.isLogined == 1) {
645 // 已登录 646 // 已登录
646 if (window.config.VUE_BASE_NODE === 'dev') { 647 if (window.config.VUE_BASE_NODE === 'dev') {
  648 + showButton.value = true
647 showClook.value = true 649 showClook.value = true
648 } else { 650 } else {
649 clookStatus(true) // 查"关注"状态 , 更新按钮上的文字 651 clookStatus(true) // 查"关注"状态 , 更新按钮上的文字
650 } 652 }
651 } else { 653 } else {
  654 + showButton.value = true
652 showClook.value = true 655 showClook.value = true
653 } 656 }
654 } 657 }
@@ -1051,11 +1054,13 @@ const app = Vue.createApp({ @@ -1051,11 +1054,13 @@ const app = Vue.createApp({
1051 headers: state.appHeader, 1054 headers: state.appHeader,
1052 showError: false 1055 showError: false
1053 }) 1056 })
  1057 + showButton.value = true
1054 if (response.success) { 1058 if (response.success) {
1055 clookStatusSee.value = response.data[0].status == '1' ? false : true // '1' 是已关注 '0'是未关注 1059 clookStatusSee.value = response.data[0].status == '1' ? false : true // '1' 是已关注 '0'是未关注
1056 } 1060 }
1057 } else { 1061 } else {
1058 if (state.creatorID == state.details.rmhId) { 1062 if (state.creatorID == state.details.rmhId) {
  1063 + showButton.value = true
1059 isOwer.value = true 1064 isOwer.value = true
1060 clookStatusSee.value = false 1065 clookStatusSee.value = false
1061 nextTick(() => { 1066 nextTick(() => {
@@ -1090,6 +1095,7 @@ const app = Vue.createApp({ @@ -1090,6 +1095,7 @@ const app = Vue.createApp({
1090 const code = statusResponseMap.code 1095 const code = statusResponseMap.code
1091 const data = statusResponseMap.data 1096 const data = statusResponseMap.data
1092 if ([ 200, '0' ].includes(code)) { 1097 if ([ 200, '0' ].includes(code)) {
  1098 + showButton.value = true
1093 if (data) { 1099 if (data) {
1094 if (data[0].status == '1') { 1100 if (data[0].status == '1') {
1095 state.initClockStatus = !initStatus 1101 state.initClockStatus = !initStatus
@@ -1949,6 +1955,7 @@ const app = Vue.createApp({ @@ -1949,6 +1955,7 @@ const app = Vue.createApp({
1949 isNewspaper.value = false 1955 isNewspaper.value = false
1950 voteInit.value = false 1956 voteInit.value = false
1951 showClook.value = false 1957 showClook.value = false
  1958 + showButton.value = false
1952 optionList.value = [] 1959 optionList.value = []
1953 subjectList.value = [] 1960 subjectList.value = []
1954 channelList.value = [] 1961 channelList.value = []
@@ -2074,6 +2081,7 @@ const app = Vue.createApp({ @@ -2074,6 +2081,7 @@ const app = Vue.createApp({
2074 optionList, 2081 optionList,
2075 showClook, 2082 showClook,
2076 clookStatusSee, 2083 clookStatusSee,
  2084 + showButton,
2077 timeLine, 2085 timeLine,
2078 shareOpen, 2086 shareOpen,
2079 hasReadCount, 2087 hasReadCount,
@@ -20,7 +20,7 @@ export struct PlayerInfoComponent { @@ -20,7 +20,7 @@ export struct PlayerInfoComponent {
20 PlayerUIComponent({ playerController: this.playerController }) 20 PlayerUIComponent({ playerController: this.playerController })
21 .margin({ 21 .margin({
22 // bottom: this.bottomSafeHeight + 'px', 22 // bottom: this.bottomSafeHeight + 'px',
23 - top: this.topSafeHeight + 'px' 23 + top:this.isFullScreen ? 0 : this.topSafeHeight + 'px'
24 }) 24 })
25 } 25 }
26 .cachedCount(2) 26 .cachedCount(2)
@@ -59,7 +59,7 @@ export struct PlayerUIComponent { @@ -59,7 +59,7 @@ export struct PlayerUIComponent {
59 } 59 }
60 this.isFullScreen = true 60 this.isFullScreen = true
61 }) 61 })
62 - .visibility(this.isSmall ? Visibility.Visible : Visibility.Hidden) 62 + .visibility(!this.isFullScreen ? Visibility.Visible : Visibility.Hidden)
63 .margin({ top: 301}) // 195 + 211 - 105 63 .margin({ top: 301}) // 195 + 211 - 105
64 .position({ x: '96.8%' }) 64 .position({ x: '96.8%' })
65 .markAnchor({ x: '96.8%' }) 65 .markAnchor({ x: '96.8%' })
@@ -138,5 +138,6 @@ export struct PlayerProgressView { @@ -138,5 +138,6 @@ export struct PlayerProgressView {
138 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible) 138 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible)
139 } 139 }
140 } 140 }
  141 + .onDisAppear(() => clearTimeout(this.timer))
141 } 142 }
142 } 143 }
@@ -254,12 +254,17 @@ export struct MultiPictureDetailPageComponent { @@ -254,12 +254,17 @@ export struct MultiPictureDetailPageComponent {
254 if (this.followStatus == '0') { 254 if (this.followStatus == '0') {
255 Button({ type: ButtonType.Normal, stateEffect: true }) { 255 Button({ type: ButtonType.Normal, stateEffect: true }) {
256 Row() { 256 Row() {
257 - Text('+关注').fontSize(12).fontColor(0xffffff) 257 + Image($r('app.media.add'))
  258 + .width(12)
  259 + .height(12)
  260 + .margin({right: 3})
  261 +
  262 + Text('关注').fontSize(12).fontColor(0xffffff)
258 }.alignItems(VerticalAlign.Center) 263 }.alignItems(VerticalAlign.Center)
259 } 264 }
260 .borderRadius(4) 265 .borderRadius(4)
261 .backgroundColor('#ED2800') 266 .backgroundColor('#ED2800')
262 - .width(48) 267 + .width(54)
263 .height(24) 268 .height(24)
264 .onClick(() => { 269 .onClick(() => {
265 this.handleAccention() 270 this.handleAccention()
@@ -398,9 +403,8 @@ export struct MultiPictureDetailPageComponent { @@ -398,9 +403,8 @@ export struct MultiPictureDetailPageComponent {
398 .lineHeight(22) 403 .lineHeight(22)
399 .textOverflow({ overflow: TextOverflow.Ellipsis }) 404 .textOverflow({ overflow: TextOverflow.Ellipsis })
400 .margin({ 405 .margin({
401 - top: 4,  
402 left: 18, 406 left: 18,
403 - bottom: 4, 407 + bottom: 8,
404 right: 18 408 right: 18
405 }) 409 })
406 .maxLines(32) 410 .maxLines(32)