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: 音频悬浮窗Marquee代码回退
  fix: 20456 话题专题-大专题卡样式,上线分割线应为粗线条,通到屏幕两侧。
  fix: 20417 3:2横划卡、卡片中间的间距过大
  ref |> 调整直播频道直播回顾楼层参与人数使用统一转换方法
  fix |> 20369 根据关键字搜索号主,搜索结果号主tab,号主的名称里面没有对关键字高亮显示红色
  fix: 20234 【uat】
  fix |> 评论点赞数字颜色根据状态显示
  fix |> 评论内容与评论中间存在分割线颜色调整
  ref |> 调整直播详情预约/取消预约toast样式
  ref |> 直播详情人民号名称过长时截取规则和安卓保持一致
  fix: 20417 3:2横划卡、卡片中间的间距过大
  fix: 20394 频道中引用 常规专题【文章专题-头图卡】并上线后,客户端展示缺少标题和专题标识
  fix |> 返回稿件详情页刷新逻辑优化
Showing 17 changed files with 145 additions and 80 deletions
@@ -49,10 +49,5 @@ export enum EmitterEventId { @@ -49,10 +49,5 @@ export enum EmitterEventId {
49 // 全屏 49 // 全屏
50 FULL_SCREEN = 14, 50 FULL_SCREEN = 14,
51 51
52 - // app页面显示  
53 - APP_PAGE_SHOW = 102,  
54 - // app页面隐藏  
55 - APP_PAGE_HIDDEN = 103,  
56 -  
57 } 52 }
58 53
@@ -33,7 +33,6 @@ export struct WdWebLocalComponent { @@ -33,7 +33,6 @@ export struct WdWebLocalComponent {
33 @State progressOpacity: number = 1 33 @State progressOpacity: number = 1
34 @State durationStringTime: string = ''; 34 @State durationStringTime: string = '';
35 private progressTimerNumber: number = 0 35 private progressTimerNumber: number = 0
36 - private webIsLoaded:boolean = false  
37 @State isPause: boolean = true; 36 @State isPause: boolean = true;
38 controller: VideoController = new VideoController() 37 controller: VideoController = new VideoController()
39 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; 38 @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
@@ -41,6 +40,10 @@ export struct WdWebLocalComponent { @@ -41,6 +40,10 @@ export struct WdWebLocalComponent {
41 @State isFullScreen: boolean = false; 40 @State isFullScreen: boolean = false;
42 @State isEndPlay: boolean = false; 41 @State isEndPlay: boolean = false;
43 @State mode: CacheMode = CacheMode.None; 42 @State mode: CacheMode = CacheMode.None;
  43 +
  44 + @Consume @Watch('pageShowForUpdateData') pageShow :number
  45 + @Consume @Watch('pageHideForUpdateData') pageHide :number
  46 +
44 currentChanged(){ 47 currentChanged(){
45 ///折叠屏转换 暂停播放器 48 ///折叠屏转换 暂停播放器
46 this.controller.pause() 49 this.controller.pause()
@@ -51,6 +54,22 @@ export struct WdWebLocalComponent { @@ -51,6 +54,22 @@ export struct WdWebLocalComponent {
51 this.webviewControl.refresh() 54 this.webviewControl.refresh()
52 } 55 }
53 56
  57 + pageShowForUpdateData(){
  58 +
  59 + Logger.debug(TAG, 'APP_PAGE_SHOW'+this.isPageEnd);
  60 + let params = {'event':NativeCallH5Event.NativeCallH5EventPageWillAppear} as eventParams;
  61 + let jsonString = JSON.stringify(params);
  62 + if (this.isPageEnd) {
  63 + this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => {
  64 + Logger.debug(TAG, "from js data = " + data);
  65 + })
  66 + }
  67 + }
  68 +
  69 + pageHideForUpdateData(){
  70 +
  71 + }
  72 +
54 build() { 73 build() {
55 Column() { 74 Column() {
56 Row() { 75 Row() {
@@ -198,8 +217,8 @@ export struct WdWebLocalComponent { @@ -198,8 +217,8 @@ export struct WdWebLocalComponent {
198 Logger.debug(TAG, 'onPageEnd'); 217 Logger.debug(TAG, 'onPageEnd');
199 this.onWebPrepared() 218 this.onWebPrepared()
200 this.isPageEnd = true 219 this.isPageEnd = true
201 - this.webIsLoaded = true  
202 } 220 }
  221 +
203 onLoadIntercept: (url?: string) => boolean = () => { 222 onLoadIntercept: (url?: string) => boolean = () => {
204 Logger.debug(TAG, 'onLoadIntercept return false'); 223 Logger.debug(TAG, 'onLoadIntercept return false');
205 return false 224 return false
@@ -232,20 +251,6 @@ export struct WdWebLocalComponent { @@ -232,20 +251,6 @@ export struct WdWebLocalComponent {
232 } 251 }
233 } 252 }
234 253
235 - aboutToAppear(): void {  
236 - this.webIsLoaded = false  
237 - EmitterUtils.receiveEvent(EmitterEventId.APP_PAGE_SHOW, () => {  
238 - let params = {'event':NativeCallH5Event.NativeCallH5EventPageWillAppear} as eventParams;  
239 - let jsonString = JSON.stringify(params);  
240 - Logger.debug(TAG, 'APP_PAGE_SHOW'+this.webIsLoaded);  
241 - // if (this.webIsLoaded) {  
242 - // this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => {  
243 - // Logger.debug(TAG, "from js data = " + data);  
244 - // })  
245 - // }  
246 - })  
247 - }  
248 -  
249 @Builder 254 @Builder
250 videoComp(){ 255 videoComp(){
251 Video({ 256 Video({
@@ -63,7 +63,7 @@ export struct LiveFollowComponent { @@ -63,7 +63,7 @@ export struct LiveFollowComponent {
63 bottom: 0, 63 bottom: 0,
64 }) 64 })
65 //号主名称 65 //号主名称
66 - Text(this.rmhInfo.rmhName) 66 + Text(this.getRmhName())
67 .fontColor(Color.White) 67 .fontColor(Color.White)
68 .textOverflow({ overflow: TextOverflow.Ellipsis }) 68 .textOverflow({ overflow: TextOverflow.Ellipsis })
69 .maxLines(1) 69 .maxLines(1)
@@ -151,4 +151,11 @@ export struct LiveFollowComponent { @@ -151,4 +151,11 @@ export struct LiveFollowComponent {
151 } 151 }
152 }) 152 })
153 } 153 }
  154 +
  155 + getRmhName() {
  156 + if (this.rmhInfo.rmhName.length > 7) {
  157 + return this.rmhInfo.rmhName.substring(0, 7) + "..."
  158 + }
  159 + return this.rmhInfo.rmhName
  160 + }
154 } 161 }
@@ -28,11 +28,11 @@ export struct behindDivider { @@ -28,11 +28,11 @@ export struct behindDivider {
28 Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }) 28 Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
29 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 29 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
30 // 大专题 30 // 大专题
31 - if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {  
32 - Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })  
33 - } else { 31 + // if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
  32 + // Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
  33 + // } else {
34 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6}) 34 Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
35 - } 35 + // }
36 } else if (this.compDTO.compType === 'appStyle' 36 } else if (this.compDTO.compType === 'appStyle'
37 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 37 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01
38 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_02 38 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_02
@@ -246,14 +246,10 @@ export struct Card10ComponentTimelineItem { @@ -246,14 +246,10 @@ export struct Card10ComponentTimelineItem {
246 246
247 Stack() { 247 Stack() {
248 Image(this.loadImg ? this.slideItem.fullColumnImgUrls[0].url : '') 248 Image(this.loadImg ? this.slideItem.fullColumnImgUrls[0].url : '')
249 - .backgroundColor(0xf5f5f5) 249 + .backgroundColor(this.loadImg ? '' : 0xf5f5f5)
250 .width(117) 250 .width(117)
251 .height(78) 251 .height(78)
252 .objectFit(ImageFit.Contain) 252 .objectFit(ImageFit.Contain)
253 - .borderRadius($r('app.float.image_border_radius'))  
254 - .borderStyle(BorderStyle.Solid)  
255 - .borderWidth(0.5)  
256 - .borderColor($r('app.color.color_0D000000'))  
257 CardMediaInfo({ 253 CardMediaInfo({
258 contentDTO: this.createMediaInfoContent(this.slideItem) 254 contentDTO: this.createMediaInfoContent(this.slideItem)
259 }) 255 })
@@ -261,6 +257,10 @@ export struct Card10ComponentTimelineItem { @@ -261,6 +257,10 @@ export struct Card10ComponentTimelineItem {
261 .margin({ left: 12 }) 257 .margin({ left: 12 })
262 .alignContent(Alignment.BottomEnd) 258 .alignContent(Alignment.BottomEnd)
263 .height(78) 259 .height(78)
  260 + .borderRadius($r('app.float.image_border_radius'))
  261 + .borderStyle(BorderStyle.Solid)
  262 + .borderWidth(0.5)
  263 + .borderColor($r('app.color.color_0D000000'))
264 } else { 264 } else {
265 Column() { 265 Column() {
266 Stack() { 266 Stack() {
@@ -2,7 +2,7 @@ import { CompDTO, ContentDTO } from 'wdBean'; @@ -2,7 +2,7 @@ import { CompDTO, ContentDTO } from 'wdBean';
2 import { ProcessUtils } from 'wdRouter'; 2 import { ProcessUtils } from 'wdRouter';
3 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 3 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
4 import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; 4 import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
5 -import { DateTimeUtils } from 'wdKit/Index'; 5 +import { DateTimeUtils, NumberFormatterUtils } from 'wdKit/Index';
6 import { LottieView } from '../lottie/LottieView'; 6 import { LottieView } from '../lottie/LottieView';
7 import { router } from '@kit.ArkUI'; 7 import { router } from '@kit.ArkUI';
8 8
@@ -155,13 +155,6 @@ export struct LiveBigImage02Component { @@ -155,13 +155,6 @@ export struct LiveBigImage02Component {
155 } 155 }
156 156
157 private computeShowNum(count: number): string { 157 private computeShowNum(count: number): string {
158 - if (count >= 10000) {  
159 - let num = (count / 10000).toFixed(1)  
160 - if (Number(num.substring(num.length - 1)) == 0) {  
161 - num = num.substring(0, num.length - 2)  
162 - }  
163 - return num + '万人参加'  
164 - }  
165 - return `${count}人参加` 158 + return NumberFormatterUtils.formatNumberWithWan(count) + '人参加'
166 } 159 }
167 } 160 }
@@ -832,7 +832,7 @@ struct commentFooterView { @@ -832,7 +832,7 @@ struct commentFooterView {
832 if (this.item.id) { // 审核通过的才显示点赞 832 if (this.item.id) { // 审核通过的才显示点赞
833 Row({ space: 6 }) { 833 Row({ space: 6 }) {
834 Text(this.item.likeNum) 834 Text(this.item.likeNum)
835 - .fontColor($r('app.color.color_666666')) 835 + .fontColor(this.item.api_status?$r('app.color.color_ED2800') : $r('app.color.color_666666'))
836 .fontSize(14) 836 .fontSize(14)
837 837
838 Image(this.item.api_status ? $r('app.media.comment_like_select') : $r('app.media.comment_like_normal')) 838 Image(this.item.api_status ? $r('app.media.comment_like_select') : $r('app.media.comment_like_normal'))
1 import { CompDTO, ContentDTO, LiveRoomDataBean } from 'wdBean'; 1 import { CompDTO, ContentDTO, LiveRoomDataBean } from 'wdBean';
2 import { CommonConstants } from 'wdConstant/Index'; 2 import { CommonConstants } from 'wdConstant/Index';
3 -import { Logger } from 'wdKit/Index'; 3 +import { Logger, NumberFormatterUtils } from 'wdKit/Index';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
5 import PageViewModel from '../../viewmodel/PageViewModel'; 5 import PageViewModel from '../../viewmodel/PageViewModel';
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
@@ -98,15 +98,7 @@ export struct ZhGridLayout02NewsContent { @@ -98,15 +98,7 @@ export struct ZhGridLayout02NewsContent {
98 } 98 }
99 99
100 private computeShowNum(bean: LiveRoomDataBean): string { 100 private computeShowNum(bean: LiveRoomDataBean): string {
101 - let count = bean.pv  
102 - if (count >= 10000) {  
103 - let num = (count / 10000).toFixed(1)  
104 - if (Number(num.substring(num.length - 1)) == 0) {  
105 - num = num.substring(0, num.length - 2)  
106 - }  
107 - return num + '万人参加'  
108 - }  
109 - return `${count}人参加` 101 + return NumberFormatterUtils.formatNumberWithWan(bean.pv) + '人参加'
110 } 102 }
111 } 103 }
112 104
@@ -4,6 +4,7 @@ import { HttpUtils } from 'wdNetwork/Index' @@ -4,6 +4,7 @@ import { HttpUtils } from 'wdNetwork/Index'
4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' 4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
5 import { TrackConstants, TrackingContent } from 'wdTracking/Index' 5 import { TrackConstants, TrackingContent } from 'wdTracking/Index'
6 import MinePageDatasModel from '../../../model/MinePageDatasModel' 6 import MinePageDatasModel from '../../../model/MinePageDatasModel'
  7 +import { SearchShowRed, titleInitRes, textItem } from '../../../utils/searchShowRed'
7 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' 8 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
8 import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem' 9 import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem'
9 10
@@ -14,6 +15,7 @@ export struct FollowChildComponent{ @@ -14,6 +15,7 @@ export struct FollowChildComponent{
14 @State columnHeight:number = 202 15 @State columnHeight:number = 202
15 16
16 @State isLoadingAttention:boolean = false 17 @State isLoadingAttention:boolean = false
  18 + @State searchText:string = ""
17 19
18 aboutToAppear(): void { 20 aboutToAppear(): void {
19 if(this.type == 0 && StringUtils.isEmpty(this.data.introduction)){ 21 if(this.type == 0 && StringUtils.isEmpty(this.data.introduction)){
@@ -190,7 +192,20 @@ export struct FollowChildComponent{ @@ -190,7 +192,20 @@ export struct FollowChildComponent{
190 .margin({right: 11}) 192 .margin({right: 11})
191 193
192 Column(){ 194 Column(){
193 - Text(this.data.cnUserName) 195 + Text(){
  196 + if (StringUtils.isNotEmpty(this.searchText) && this.titleInit(this.data.cnUserName, this.searchText).titleMarked) {
  197 + ForEach(this.titleInit(this.data.cnUserName, this.searchText).textArr, (textItem: textItem) => {
  198 + if (textItem.isRed) {
  199 + Span(textItem.content)
  200 + .fontColor("#ED2800")
  201 + } else {
  202 + Span(textItem.content)
  203 + }
  204 + })
  205 + } else {
  206 + Span(this.data.cnUserName)
  207 + }
  208 + }
194 .fontWeight(400) 209 .fontWeight(400)
195 .fontSize(18) 210 .fontSize(18)
196 .lineHeight(22) 211 .lineHeight(22)
@@ -351,4 +366,21 @@ export struct FollowChildComponent{ @@ -351,4 +366,21 @@ export struct FollowChildComponent{
351 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) 366 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
352 } 367 }
353 } 368 }
  369 +
  370 + // 正则过滤检索词
  371 + createCaseInsensitiveRegex(str: string, pattern: string) {
  372 + let regex = new RegExp(pattern, 'gi');
  373 + return str.replace(regex, (match) => `<em>${match}</em>`);
  374 + }
  375 +
  376 + checkForPattern(str: string, pattern: string) {
  377 + let highlightedStr = this.createCaseInsensitiveRegex(str, pattern);
  378 + return highlightedStr;
  379 + }
  380 +
  381 + titleInit(str: string, pattern: string) {
  382 + const title = this.checkForPattern(str, pattern)
  383 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(title)
  384 + return titleInitRes
  385 + }
354 } 386 }
@@ -159,7 +159,7 @@ export struct ChildCommentComponent { @@ -159,7 +159,7 @@ export struct ChildCommentComponent {
159 .width('100%') 159 .width('100%')
160 .height(0.5) 160 .height(0.5)
161 .strokeWidth(0.5) 161 .strokeWidth(0.5)
162 - .backgroundColor($r('app.color.color_EDEDED')) 162 + .color($r('app.color.color_EDEDED'))
163 .margin({ top: 10, bottom: 10 }) 163 .margin({ top: 10, bottom: 10 })
164 } 164 }
165 165
1 import measure from '@ohos.measure' 1 import measure from '@ohos.measure'
2 -import { DisplayUtils } from 'wdKit' 2 +import { DisplayUtils, NumberFormatterUtils } from 'wdKit'
3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' 3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
4 import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent' 4 import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent'
5 import { Logger } from 'wdKit' 5 import { Logger } from 'wdKit'
@@ -366,14 +366,7 @@ export struct PeopleShipHomePageTopComponent { @@ -366,14 +366,7 @@ export struct PeopleShipHomePageTopComponent {
366 } 366 }
367 367
368 private computeShowNum(count: number) { 368 private computeShowNum(count: number) {
369 - if (count >= 10000) {  
370 - let num = ( count / 10000).toFixed(1)  
371 - if (Number(num.substring(num.length-1)) == 0) {  
372 - num = num.substring(0, num.length-2)  
373 - }  
374 - return num + '万'  
375 - }  
376 - return `${count}` 369 + return NumberFormatterUtils.formatNumberWithWan(count)
377 } 370 }
378 371
379 // 通过省份code获取IP问题 372 // 通过省份code获取IP问题
1 -import { ToastUtils } from 'wdKit/Index' 1 +import { StringUtils, ToastUtils } from 'wdKit/Index'
2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter/Index' 2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter/Index'
  3 +import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'
3 import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' 4 import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
4 5
5 @Component 6 @Component
6 export struct SearchCreatorComponent{ 7 export struct SearchCreatorComponent{
7 @ObjectLink item: SearchRmhDescription 8 @ObjectLink item: SearchRmhDescription
8 userName: string = '' 9 userName: string = ''
  10 + @State searchText:string = ""
9 11
10 aboutToAppear(): void { 12 aboutToAppear(): void {
11 const userNetName: string = this.item.creatorName; 13 const userNetName: string = this.item.creatorName;
@@ -38,7 +40,20 @@ export struct SearchCreatorComponent{ @@ -38,7 +40,20 @@ export struct SearchCreatorComponent{
38 .height('92lpx') 40 .height('92lpx')
39 .margin({bottom:'15lpx'}) 41 .margin({bottom:'15lpx'})
40 42
41 - Text(this.userName) 43 + Text(){
  44 + if (StringUtils.isNotEmpty(this.searchText) && this.titleInit(this.userName, this.searchText).titleMarked) {
  45 + ForEach(this.titleInit(this.userName, this.searchText).textArr, (textItem: textItem) => {
  46 + if (textItem.isRed) {
  47 + Span(textItem.content)
  48 + .fontColor("#ED2800")
  49 + } else {
  50 + Span(textItem.content)
  51 + }
  52 + })
  53 + } else {
  54 + Span(this.userName)
  55 + }
  56 + }
42 .fontSize('25lpx') 57 .fontSize('25lpx')
43 .fontWeight('400lpx') 58 .fontWeight('400lpx')
44 .lineHeight('35lpx') 59 .lineHeight('35lpx')
@@ -62,4 +77,21 @@ export struct SearchCreatorComponent{ @@ -62,4 +77,21 @@ export struct SearchCreatorComponent{
62 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) 77 WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
63 } 78 }
64 } 79 }
  80 +
  81 + // 正则过滤检索词
  82 + createCaseInsensitiveRegex(str: string, pattern: string) {
  83 + let regex = new RegExp(pattern, 'gi');
  84 + return str.replace(regex, (match) => `<em>${match}</em>`);
  85 + }
  86 +
  87 + checkForPattern(str: string, pattern: string) {
  88 + let highlightedStr = this.createCaseInsensitiveRegex(str, pattern);
  89 + return highlightedStr;
  90 + }
  91 +
  92 + titleInit(str: string, pattern: string) {
  93 + const title = this.checkForPattern(str, pattern)
  94 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(title)
  95 + return titleInitRes
  96 + }
65 } 97 }
@@ -282,7 +282,7 @@ export struct SearchResultContentComponent { @@ -282,7 +282,7 @@ export struct SearchResultContentComponent {
282 if (this.data_rmh != null && this.data_rmh.length > 0) { 282 if (this.data_rmh != null && this.data_rmh.length > 0) {
283 if (this.data_rmh.length === 1) { 283 if (this.data_rmh.length === 1) {
284 ListItem() { 284 ListItem() {
285 - FollowChildComponent({ data: this.bean, type: 1 }) 285 + FollowChildComponent({ data: this.bean, type: 1 ,searchText: decodeURI(this.keywords)})
286 }.padding({ left: "31lpx", right: "31lpx" }) 286 }.padding({ left: "31lpx", right: "31lpx" })
287 } else { 287 } else {
288 ListItem() { 288 ListItem() {
@@ -356,7 +356,7 @@ export struct SearchResultContentComponent { @@ -356,7 +356,7 @@ export struct SearchResultContentComponent {
356 ListItemGroup() { 356 ListItemGroup() {
357 ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => { 357 ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
358 ListItem() { 358 ListItem() {
359 - SearchCreatorComponent({ item: item }) 359 + SearchCreatorComponent({ item: item ,searchText: decodeURI(this.keywords)})
360 } 360 }
361 .width('150lpx') 361 .width('150lpx')
362 .height('100%') 362 .height('100%')
@@ -106,14 +106,14 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -106,14 +106,14 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
106 .aspectRatio(1.5) 106 .aspectRatio(1.5)
107 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 107 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
108 .objectFit(ImageFit.Contain) 108 .objectFit(ImageFit.Contain)
  109 + .borderRadius(4)
  110 + .border({width: 0.5, color: 0xf5f5f5})
109 CardMediaInfo({ 111 CardMediaInfo({
110 livePeopleNum:false, 112 livePeopleNum:false,
111 contentDTO: item 113 contentDTO: item
112 }) 114 })
113 } 115 }
114 .align(Alignment.BottomEnd) 116 .align(Alignment.BottomEnd)
115 - .borderRadius(4)  
116 - .border({width: 1, color: 0xf5f5f5})  
117 117
118 Text(item.newsTitle) 118 Text(item.newsTitle)
119 .fontSize($r("app.float.font_size_14")) 119 .fontSize($r("app.float.font_size_14"))
@@ -127,13 +127,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -127,13 +127,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
127 .lineHeight(19) 127 .lineHeight(19)
128 } 128 }
129 .height(this.compDTO.operDataList.length == 2 ? 190 : 148) 129 .height(this.compDTO.operDataList.length == 2 ? 190 : 148)
130 - .padding({ right: 16 }) 130 + .padding({ right: this.compDTO.operDataList.length >= 3 ? 8 : 12, left: index == 0 ? 20: 0 })
131 // .offset({x:16}) 131 // .offset({x:16})
132 .onClick(() => { 132 .onClick(() => {
133 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 133 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
134 ProcessUtils.processPage(item) 134 ProcessUtils.processPage(item)
135 }) 135 })
136 - .padding({ right: 16, left: index == 0 ? 20: 0 })  
137 }) 136 })
138 } 137 }
139 138
1 import font from '@ohos.font' 1 import font from '@ohos.font'
2 import { ContentDetailDTO } from 'wdBean/Index' 2 import { ContentDetailDTO } from 'wdBean/Index'
3 -import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' 3 +import { CustomToast, DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
4 import { LiveViewModel } from '../../viewModel/LiveViewModel' 4 import { LiveViewModel } from '../../viewModel/LiveViewModel'
5 import { HttpUtils } from 'wdNetwork/Index' 5 import { HttpUtils } from 'wdNetwork/Index'
6 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 6 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@@ -22,6 +22,24 @@ export struct LiveCountdownComponent { @@ -22,6 +22,24 @@ export struct LiveCountdownComponent {
22 liveViewModel: LiveViewModel = new LiveViewModel() 22 liveViewModel: LiveViewModel = new LiveViewModel()
23 pageParam: ParamType = {} 23 pageParam: ParamType = {}
24 24
  25 + @State toastText: ResourceStr = ""
  26 + dialogToast: CustomDialogController = new CustomDialogController({
  27 + builder: CustomToast({
  28 + bgColor: 0xB3000000,
  29 + opacityValue: 1,
  30 + msg: this.toastText,
  31 + }),
  32 + autoCancel: false,
  33 + alignment: DialogAlignment.Center,
  34 + customStyle: true,
  35 + maskColor: "#00000000"
  36 + })
  37 +
  38 + showToastTip(msg: ResourceStr) {
  39 + this.toastText = msg
  40 + this.dialogToast.open()
  41 + }
  42 +
25 aboutToAppear(): void { 43 aboutToAppear(): void {
26 //注册字体 44 //注册字体
27 font.registerFont({ 45 font.registerFont({
@@ -187,11 +205,13 @@ export struct LiveCountdownComponent { @@ -187,11 +205,13 @@ export struct LiveCountdownComponent {
187 if (data.success) { 205 if (data.success) {
188 this.isAppointmentLive = !this.isAppointmentLive 206 this.isAppointmentLive = !this.isAppointmentLive
189 if (this.isAppointmentLive) { 207 if (this.isAppointmentLive) {
190 - ToastUtils.showToast('预约成功', 1000) 208 + // ToastUtils.showToast('预约成功', 1000)
  209 + this.showToastTip('预约成功')
191 TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail, 210 TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail,
192 TrackConstants.PageName.Live_Detail, this.pageParam) 211 TrackConstants.PageName.Live_Detail, this.pageParam)
193 } else { 212 } else {
194 - ToastUtils.showToast('取消预约成功', 1000) 213 + // ToastUtils.showToast('取消预约成功', 1000)
  214 + this.showToastTip('取消预约成功')
195 TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail, 215 TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail,
196 TrackConstants.PageName.Live_Detail, this.pageParam) 216 TrackConstants.PageName.Live_Detail, this.pageParam)
197 } 217 }
@@ -47,7 +47,6 @@ struct ImageAndTextDetailPage { @@ -47,7 +47,6 @@ struct ImageAndTextDetailPage {
47 47
48 onPageShow() { 48 onPageShow() {
49 this.pageShow = Math.random() 49 this.pageShow = Math.random()
50 - EmitterUtils.sendEmptyEvent(EmitterEventId.APP_PAGE_SHOW)  
51 Logger.info(TAG, 'onPageShow'); 50 Logger.info(TAG, 'onPageShow');
52 } 51 }
53 52
@@ -109,13 +109,12 @@ struct Index { @@ -109,13 +109,12 @@ struct Index {
109 Stack({ alignContent: Alignment.End }) { 109 Stack({ alignContent: Alignment.End }) {
110 Column() { //标题 时间 进度条 110 Column() { //标题 时间 进度条
111 Marquee({ 111 Marquee({
112 - start: this.start, 112 + start: true,
113 step: 5, 113 step: 5,
114 loop: Number.POSITIVE_INFINITY, 114 loop: Number.POSITIVE_INFINITY,
115 fromStart: true, 115 fromStart: true,
116 src: this.audioTitle 116 src: this.audioTitle
117 }) 117 })
118 - .marqueeUpdateStrategy(MarqueeUpdateStrategy.DEFAULT)  
119 .width("60%") 118 .width("60%")
120 .height(20) 119 .height(20)
121 .fontColor('#222222') 120 .fontColor('#222222')
@@ -126,10 +125,9 @@ struct Index { @@ -126,10 +125,9 @@ struct Index {
126 // .onStart(() => { 125 // .onStart(() => {
127 // console.info('Marquee animation complete onStart') 126 // console.info('Marquee animation complete onStart')
128 // }) 127 // })
129 - .onBounce(() => {  
130 - console.info('Marquee animation complete onBounce')  
131 - this.start = false  
132 - }) 128 + // .onBounce(() => {
  129 + // console.info('Marquee animation complete onBounce')
  130 + // })
133 // .onFinish(() => { 131 // .onFinish(() => {
134 // console.info('Marquee animation complete onFinish') 132 // console.info('Marquee animation complete onFinish')
135 // }) 133 // })