陈剑华

Merge remote-tracking branch 'origin/main'

@@ -5,6 +5,8 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; @@ -5,6 +5,8 @@ import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
5 import { LazyDataSource, StringUtils } from 'wdKit'; 5 import { LazyDataSource, StringUtils } from 'wdKit';
6 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 6 import MinePageDatasModel from '../../../model/MinePageDatasModel';
7 import { EmptyComponent } from '../../view/EmptyComponent'; 7 import { EmptyComponent } from '../../view/EmptyComponent';
  8 +import { Action } from 'wdBean/Index';
  9 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
8 10
9 const TAG = "AppointmentListUI" 11 const TAG = "AppointmentListUI"
10 12
@@ -42,6 +44,17 @@ export struct AppointmentListUI { @@ -42,6 +44,17 @@ export struct AppointmentListUI {
42 } 44 }
43 .onClick(() => { 45 .onClick(() => {
44 //TODO 跳转 46 //TODO 跳转
  47 + let action = {
  48 + type:"2",
  49 + params:{
  50 + extra:{
  51 + relId:item.relId,
  52 + relType:item.relType.toString()
  53 + },
  54 + contentID:item.liveId.toString()
  55 + }
  56 + } as Action
  57 + WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
45 }) 58 })
46 }, (item: MineAppointmentItem, index: number) => index.toString()) 59 }, (item: MineAppointmentItem, index: number) => index.toString())
47 60
1 import { ContentDTO, LiveRoomDataBean } from 'wdBean'; 1 import { ContentDTO, LiveRoomDataBean } from 'wdBean';
2 import { ProcessUtils } from 'wdRouter'; 2 import { ProcessUtils } from 'wdRouter';
3 -import { CommonConstants } from 'wdConstant/Index';  
4 import PageViewModel from '../../viewmodel/PageViewModel'; 3 import PageViewModel from '../../viewmodel/PageViewModel';
5 import { DateTimeUtils, LazyDataSource, Logger } from 'wdKit/Index'; 4 import { DateTimeUtils, LazyDataSource, Logger } from 'wdKit/Index';
6 import { router } from '@kit.ArkUI'; 5 import { router } from '@kit.ArkUI';
@@ -115,6 +115,7 @@ export struct PeopleShipHomeAttentionComponent { @@ -115,6 +115,7 @@ export struct PeopleShipHomeAttentionComponent {
115 .onClick(() => { 115 .onClick(() => {
116 ToastUtils.showToast('分享为公共方法,待开发', 1000); 116 ToastUtils.showToast('分享为公共方法,待开发', 1000);
117 }) 117 })
  118 + .visibility(Visibility.Hidden)
118 119
119 } 120 }
120 121
@@ -504,15 +504,12 @@ struct ReserveMorePage { @@ -504,15 +504,12 @@ struct ReserveMorePage {
504 const eventMinutes = eventDateTime.getMinutes(); 504 const eventMinutes = eventDateTime.getMinutes();
505 const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 505 const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数
506 506
507 - // 计算时间差  
508 - const timeDifference = eventDateTime.getTime() - currentDateTime.getTime();  
509 -  
510 - // 如果事件在24小时内  
511 if (type === 1) { 507 if (type === 1) {
512 - if (timeDifference > 0 && timeDifference <= 24 * 60 * 60 * 1000) { 508 + // 如果是今天
  509 + if (eventDateTime.setHours(0,0,0,0) === currentDateTime.setHours(0,0,0,0)) {
513 return `今天`; 510 return `今天`;
514 } else { 511 } else {
515 - // 如果事件不在24小时内 512 + // 如果事件不在今天
516 const month = eventDateTime.getMonth() + 1; // 月份从0开始 513 const month = eventDateTime.getMonth() + 1; // 月份从0开始
517 const date = eventDateTime.getDate(); 514 const date = eventDateTime.getDate();
518 return `${month}月${date}日`; 515 return `${month}月${date}日`;
@@ -39,6 +39,11 @@ export struct SearchComponent { @@ -39,6 +39,11 @@ export struct SearchComponent {
39 SearcherAboutDataModel.searchHistoryData = [] 39 SearcherAboutDataModel.searchHistoryData = []
40 //获取搜索历史 40 //获取搜索历史
41 this.getSearchHistoryData() 41 this.getSearchHistoryData()
  42 +
  43 + let intervalID = setInterval(() => {
  44 + sendEventByKey("searchId", 10, "")
  45 + clearInterval(intervalID);
  46 + }, 1000);
42 } 47 }
43 48
44 getRelatedSearchContent() { 49 getRelatedSearchContent() {
@@ -56,12 +61,18 @@ export struct SearchComponent { @@ -56,12 +61,18 @@ export struct SearchComponent {
56 while (tempValue.indexOf(this.searchText) != -1){ 61 while (tempValue.indexOf(this.searchText) != -1){
57 let index = tempValue.indexOf(this.searchText) 62 let index = tempValue.indexOf(this.searchText)
58 if(index === 0){ 63 if(index === 0){
59 - tempArr.push(this.searchText)  
60 - tempValue = tempValue.substring(this.searchText.length,tempValue.length) 64 + try {
  65 + tempArr.push(this.searchText)
  66 + tempValue = tempValue.substring(this.searchText.length,tempValue.length)
  67 + } catch (e) {
  68 + }
61 }else { 69 }else {
62 - tempArr.push(tempValue.substring(0,index))  
63 - tempArr.push(this.searchText)  
64 - tempValue = tempValue.substring(index+this.searchText.length,tempValue.length) 70 + try {
  71 + tempArr.push(tempValue.substring(0,index))
  72 + tempArr.push(this.searchText)
  73 + tempValue = tempValue.substring(index+this.searchText.length,tempValue.length)
  74 + } catch (e) {
  75 + }
65 } 76 }
66 } 77 }
67 if(StringUtils.isNotEmpty(tempValue)){ 78 if(StringUtils.isNotEmpty(tempValue)){
@@ -218,7 +229,7 @@ export struct SearchComponent { @@ -218,7 +229,7 @@ export struct SearchComponent {
218 .textAlign(TextAlign.Start) 229 .textAlign(TextAlign.Start)
219 .maxLines(1) 230 .maxLines(1)
220 .textOverflow({ overflow: TextOverflow.Clip }) 231 .textOverflow({ overflow: TextOverflow.Clip })
221 - .margin({ left: '70lpx' }) 232 + .margin({ left: '40lpx' })
222 }) 233 })
223 } 234 }
224 .loop(true) 235 .loop(true)
@@ -238,7 +249,15 @@ export struct SearchComponent { @@ -238,7 +249,15 @@ export struct SearchComponent {
238 .height('69lpx') 249 .height('69lpx')
239 .backgroundColor($r('app.color.color_transparent')) 250 .backgroundColor($r('app.color.color_transparent'))
240 .textFont({ size: "27lpx", weight: "400lpx" }) 251 .textFont({ size: "27lpx", weight: "400lpx" })
241 - .defaultFocus(true) 252 + // .defaultFocus(true)
  253 + .id("searchId")
  254 + .focusable(true)
  255 + .searchIcon({
  256 + size:0
  257 + })
  258 + .cancelButton({
  259 + style:CancelButtonStyle.INVISIBLE
  260 + })
242 .caretStyle({color:Color.Pink}) 261 .caretStyle({color:Color.Pink})
243 .onSubmit((value: string) => { 262 .onSubmit((value: string) => {
244 if(StringUtils.isNotEmpty(this.searchText)){ 263 if(StringUtils.isNotEmpty(this.searchText)){
@@ -278,9 +297,20 @@ export struct SearchComponent { @@ -278,9 +297,20 @@ export struct SearchComponent {
278 } 297 }
279 } 298 }
280 }) 299 })
281 -  
282 - }.padding({right:'30lpx'}) 300 + }.padding({right:'70lpx'})
283 .layoutWeight(1) 301 .layoutWeight(1)
  302 +
  303 + Image($r('app.media.search_input_del_icon'))
  304 + .width("31lpx")
  305 + .height("31lpx")
  306 + .objectFit(ImageFit.Auto)
  307 + .interpolation(ImageInterpolation.Medium)
  308 + .margin({left:"495lpx"})
  309 + .onClick(()=>{
  310 + this.searchText = ""
  311 + })
  312 + .visibility(StringUtils.isEmpty(this.searchText) ? Visibility.Hidden : Visibility.Visible)
  313 +
284 } 314 }
285 .backgroundImage($r('app.media.search_page_input_bg')) 315 .backgroundImage($r('app.media.search_page_input_bg'))
286 .backgroundImageSize(ImageSize.Cover) 316 .backgroundImageSize(ImageSize.Cover)
@@ -23,8 +23,8 @@ export struct LiveCountdownComponent { @@ -23,8 +23,8 @@ export struct LiveCountdownComponent {
23 aboutToAppear(): void { 23 aboutToAppear(): void {
24 //注册字体 24 //注册字体
25 font.registerFont({ 25 font.registerFont({
26 - familyName: 'BebasNeue_Regular',  
27 - familySrc: $rawfile('font/BebasNeue_Regular.otf') 26 + familyName: 'BebasNeueBold',
  27 + familySrc: $rawfile('font/BebasNeueBold.otf')
28 }) 28 })
29 setTimeout(() => { 29 setTimeout(() => {
30 this.textTimerController.start() 30 this.textTimerController.start()
@@ -69,13 +69,16 @@ export struct LiveCountdownComponent { @@ -69,13 +69,16 @@ export struct LiveCountdownComponent {
69 .showTimeStyleBold() 69 .showTimeStyleBold()
70 Text('月') 70 Text('月')
71 .showTimeStyleNormal() 71 .showTimeStyleNormal()
72 - .margin({ left: 3 }) 72 + .margin({ left: 1 })
  73 + .baselineOffset('-6vp')
73 Text(this.day) 74 Text(this.day)
74 .showTimeStyleBold() 75 .showTimeStyleBold()
75 .margin({ left: 3 }) 76 .margin({ left: 3 })
76 Text('日') 77 Text('日')
77 .showTimeStyleNormal() 78 .showTimeStyleNormal()
78 - .margin({ left: 3 }) 79 + .margin({ left: 1 })
  80 + .baselineOffset('-6vp')
  81 +
79 Text(this.hour) 82 Text(this.hour)
80 .showTimeStyleBold() 83 .showTimeStyleBold()
81 .margin({ left: 10 }) 84 .margin({ left: 10 })
@@ -85,15 +88,15 @@ export struct LiveCountdownComponent { @@ -85,15 +88,15 @@ export struct LiveCountdownComponent {
85 .showTimeStyleBold() 88 .showTimeStyleBold()
86 } 89 }
87 .margin({ top: 10 }) 90 .margin({ top: 10 })
88 - .visibility(this.isCountDownStart ? Visibility.None : Visibility.Visible  
89 - ) 91 + .visibility(this.isCountDownStart ? Visibility.None : Visibility.Visible)
90 92
  93 + // 倒计时
91 TextTimer({ isCountDown: true, count: this.differenceTimeStamp, controller: this.textTimerController }) 94 TextTimer({ isCountDown: true, count: this.differenceTimeStamp, controller: this.textTimerController })
92 .format(this.format) 95 .format(this.format)
93 - .fontSize('40fp') 96 + .fontSize('40vp')
94 .fontWeight(FontWeight.Bold) 97 .fontWeight(FontWeight.Bold)
95 .fontColor('#222222') 98 .fontColor('#222222')
96 - .fontFamily('BebasNeue_Regular') 99 + .fontFamily('BebasNeueBold')
97 .onTimer((utc: number, elapsedTime: number) => { 100 .onTimer((utc: number, elapsedTime: number) => {
98 console.info('textTimer notCountDown utc is:' + utc + ', elapsedTime: ' + elapsedTime) 101 console.info('textTimer notCountDown utc is:' + utc + ', elapsedTime: ' + elapsedTime)
99 }) 102 })
@@ -139,7 +142,7 @@ export struct LiveCountdownComponent { @@ -139,7 +142,7 @@ export struct LiveCountdownComponent {
139 //2024-04-01 19:44:00-trim->2024-04-0119:44:00 142 //2024-04-01 19:44:00-trim->2024-04-0119:44:00
140 if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) { 143 if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) {
141 let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime?.trim() 144 let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime?.trim()
142 - this.month = playStartTimeTmp.substring(5, 7) 145 + this.month = Number(playStartTimeTmp.substring(5, 7)).toString()
143 this.day = playStartTimeTmp.substring(8, 10) 146 this.day = playStartTimeTmp.substring(8, 10)
144 this.hour = playStartTimeTmp.substring(11, 13) 147 this.hour = playStartTimeTmp.substring(11, 13)
145 this.minute = playStartTimeTmp.substring(14, 16) 148 this.minute = playStartTimeTmp.substring(14, 16)
@@ -182,7 +185,7 @@ export struct LiveCountdownComponent { @@ -182,7 +185,7 @@ export struct LiveCountdownComponent {
182 185
183 @Extend(Text) 186 @Extend(Text)
184 function showTimeStyleNormal() { 187 function showTimeStyleNormal() {
185 - .fontSize('16fp') 188 + .fontSize('16vp')
186 .fontWeight(500) 189 .fontWeight(500)
187 .fontColor('#222222') 190 .fontColor('#222222')
188 } 191 }
@@ -190,7 +193,7 @@ function showTimeStyleNormal() { @@ -190,7 +193,7 @@ function showTimeStyleNormal() {
190 @Extend(Text) 193 @Extend(Text)
191 function showTimeStyleBold() { 194 function showTimeStyleBold() {
192 .fontSize('40fp') 195 .fontSize('40fp')
193 - .fontFamily('BebasNeue_Regular') 196 + .fontFamily('BebasNeueBold')
194 .fontWeight(FontWeight.Bold) 197 .fontWeight(FontWeight.Bold)
195 .fontColor('#222222') 198 .fontColor('#222222')
196 } 199 }
@@ -30,7 +30,8 @@ export struct TabInfoComponent { @@ -30,7 +30,8 @@ export struct TabInfoComponent {
30 Text(this.liveDetailsBean.newsTitle) 30 Text(this.liveDetailsBean.newsTitle)
31 .maxLines(2) 31 .maxLines(2)
32 .textOverflow({ overflow: TextOverflow.Ellipsis }) 32 .textOverflow({ overflow: TextOverflow.Ellipsis })
33 - .fontSize('18fp') 33 + .fontSize('18vp')
  34 + .lineHeight('26vp')
34 .fontWeight(500) 35 .fontWeight(500)
35 .fontColor('#222222') 36 .fontColor('#222222')
36 } 37 }
@@ -40,9 +41,10 @@ export struct TabInfoComponent { @@ -40,9 +41,10 @@ export struct TabInfoComponent {
40 Text(this.liveDetailsBean.newIntroduction) 41 Text(this.liveDetailsBean.newIntroduction)
41 .maxLines(5) 42 .maxLines(5)
42 .textOverflow({ overflow: TextOverflow.Ellipsis }) 43 .textOverflow({ overflow: TextOverflow.Ellipsis })
43 - .fontSize('14fp') 44 + .fontSize('14vp')
44 .fontWeight(400) 45 .fontWeight(400)
45 .fontColor('#666666') 46 .fontColor('#666666')
  47 + .lineHeight('22vp')
46 .margin({ top: 8 }) 48 .margin({ top: 8 })
47 } 49 }
48 } 50 }
@@ -25,13 +25,13 @@ export struct TabLiveItemComponent { @@ -25,13 +25,13 @@ export struct TabLiveItemComponent {
25 Text(this.item.senderUserName) 25 Text(this.item.senderUserName)
26 .maxLines(1) 26 .maxLines(1)
27 .textOverflow({ overflow: TextOverflow.Ellipsis }) 27 .textOverflow({ overflow: TextOverflow.Ellipsis })
28 - .fontSize('14fp') 28 + .fontSize('14vp')
29 .fontWeight(400) 29 .fontWeight(400)
30 .fontColor('#222222') 30 .fontColor('#222222')
31 Text(this.item.role === 'host' ? '主持人' : '嘉宾') 31 Text(this.item.role === 'host' ? '主持人' : '嘉宾')
32 .maxLines(1) 32 .maxLines(1)
33 .textOverflow({ overflow: TextOverflow.Ellipsis }) 33 .textOverflow({ overflow: TextOverflow.Ellipsis })
34 - .fontSize('11fp') 34 + .fontSize('11vp')
35 .fontWeight(400) 35 .fontWeight(400)
36 .fontColor('#968562') 36 .fontColor('#968562')
37 .backgroundColor('#F1EFEB') 37 .backgroundColor('#F1EFEB')
@@ -44,17 +44,18 @@ export struct TabLiveItemComponent { @@ -44,17 +44,18 @@ export struct TabLiveItemComponent {
44 .borderRadius(2) 44 .borderRadius(2)
45 .margin({ left: 8 }) 45 .margin({ left: 8 })
46 .visibility(StringUtils.isNotEmpty(this.item.role) ? Visibility.Visible : Visibility.None) 46 .visibility(StringUtils.isNotEmpty(this.item.role) ? Visibility.Visible : Visibility.None)
  47 +
47 Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) 48 Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime()))
48 .maxLines(1) 49 .maxLines(1)
49 .textOverflow({ overflow: TextOverflow.Ellipsis }) 50 .textOverflow({ overflow: TextOverflow.Ellipsis })
50 - .fontSize('12fp') 51 + .fontSize('12vp')
51 .fontWeight(400) 52 .fontWeight(400)
52 .fontColor('#999999') 53 .fontColor('#999999')
53 .margin({ left: 8 }) 54 .margin({ left: 8 })
54 .visibility(StringUtils.isNotEmpty(this.item.time) ? Visibility.Visible : Visibility.None) 55 .visibility(StringUtils.isNotEmpty(this.item.time) ? Visibility.Visible : Visibility.None)
55 56
56 Text('置顶') 57 Text('置顶')
57 - .fontSize('11fp') 58 + .fontSize('11vp')
58 .fontWeight(400) 59 .fontWeight(400)
59 .fontColor('#ED2800') 60 .fontColor('#ED2800')
60 .backgroundColor('#F1EFEB') 61 .backgroundColor('#F1EFEB')
@@ -71,9 +72,10 @@ export struct TabLiveItemComponent { @@ -71,9 +72,10 @@ export struct TabLiveItemComponent {
71 } 72 }
72 73
73 Text(this.item.text) 74 Text(this.item.text)
74 - .fontSize('14fp') 75 + .fontSize('14vp')
75 .fontWeight(400) 76 .fontWeight(400)
76 .fontColor('#222222') 77 .fontColor('#222222')
  78 + .lineHeight('20vp')
77 .margin({ 79 .margin({
78 top: 6 80 top: 6
79 }) 81 })
@@ -89,8 +89,8 @@ export struct PlayUIComponent { @@ -89,8 +89,8 @@ export struct PlayUIComponent {
89 Text(this.liveDetailsBean.newsTitle) 89 Text(this.liveDetailsBean.newsTitle)
90 .maxLines(1) 90 .maxLines(1)
91 .textOverflow({ overflow: TextOverflow.MARQUEE }) 91 .textOverflow({ overflow: TextOverflow.MARQUEE })
92 - .fontSize('16fp')  
93 - .fontWeight(500) 92 + .fontSize(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '18vp' : '16vp')
  93 + .fontWeight(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 600 : 500)
94 .fontColor(Color.White) 94 .fontColor(Color.White)
95 .textAlign(TextAlign.Start) 95 .textAlign(TextAlign.Start)
96 .layoutWeight(1) 96 .layoutWeight(1)
@@ -200,7 +200,7 @@ export struct PlayUIComponent { @@ -200,7 +200,7 @@ export struct PlayUIComponent {
200 else if (this.liveDetailsBean.liveInfo?.liveState == 'end') { 200 else if (this.liveDetailsBean.liveInfo?.liveState == 'end') {
201 Row() { 201 Row() {
202 Text('回看') 202 Text('回看')
203 - .fontSize('11fp') 203 + .fontSize('11vp')
204 .fontWeight(400) 204 .fontWeight(400)
205 .fontColor(Color.White) 205 .fontColor(Color.White)
206 206
@@ -209,7 +209,7 @@ export struct PlayUIComponent { @@ -209,7 +209,7 @@ export struct PlayUIComponent {
209 .width(12) 209 .width(12)
210 .height(12) 210 .height(12)
211 Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) 211 Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`)
212 - .fontSize('11fp') 212 + .fontSize('11vp')
213 .fontWeight(400) 213 .fontWeight(400)
214 .fontColor(Color.White) 214 .fontColor(Color.White)
215 } 215 }
@@ -221,6 +221,8 @@ export struct PlayUIComponent { @@ -221,6 +221,8 @@ export struct PlayUIComponent {
221 top: 1, 221 top: 1,
222 right: 4, 222 right: 4,
223 bottom: 1 223 bottom: 1
  224 + }).margin({
  225 + left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '34vp' : 0
224 }) 226 })
225 } 227 }
226 } 228 }