Showing
2 changed files
with
5 additions
and
35 deletions
| @@ -85,13 +85,14 @@ export struct Card6Component { | @@ -85,13 +85,14 @@ export struct Card6Component { | ||
| 85 | } | 85 | } |
| 86 | .justifyContent(FlexAlign.Start) | 86 | .justifyContent(FlexAlign.Start) |
| 87 | 87 | ||
| 88 | - | 88 | + Blank() |
| 89 | //bottom 评论等信息 | 89 | //bottom 评论等信息 |
| 90 | CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) | 90 | CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) |
| 91 | } | 91 | } |
| 92 | .alignItems(HorizontalAlign.Start) | 92 | .alignItems(HorizontalAlign.Start) |
| 93 | .justifyContent(FlexAlign.Start) | 93 | .justifyContent(FlexAlign.Start) |
| 94 | .width('64%') | 94 | .width('64%') |
| 95 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) | ||
| 95 | 96 | ||
| 96 | Stack() { | 97 | Stack() { |
| 97 | Image(this.loadImg ? this.contentDTO.coverUrl : '') | 98 | Image(this.loadImg ? this.contentDTO.coverUrl : '') |
| @@ -533,49 +533,18 @@ struct ReserveMorePage { | @@ -533,49 +533,18 @@ struct ReserveMorePage { | ||
| 533 | const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 | 533 | const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 |
| 534 | 534 | ||
| 535 | if (type === 1) { | 535 | if (type === 1) { |
| 536 | - // 如果是今天 | ||
| 537 | - if (eventDateTime.setHours(0, 0, 0, 0) === currentDateTime.setHours(0, 0, 0, 0)) { | 536 | + // 判断是否是今天 |
| 538 | const eventDate = eventDateTime.setHours(0, 0, 0, 0); | 537 | const eventDate = eventDateTime.setHours(0, 0, 0, 0); |
| 539 | const currentDate = currentDateTime.setHours(0, 0, 0, 0); | 538 | const currentDate = currentDateTime.setHours(0, 0, 0, 0); |
| 540 | if (eventDate === currentDate) { | 539 | if (eventDate === currentDate) { |
| 541 | return `今天`; | 540 | return `今天`; |
| 542 | - } else { | ||
| 543 | - // 如果事件不在今天 | ||
| 544 | - // 将来的日期 | 541 | + }else{ |
| 545 | const month = eventDateTime.getMonth() + 1; | 542 | const month = eventDateTime.getMonth() + 1; |
| 546 | const date = eventDateTime.getDate(); | 543 | const date = eventDateTime.getDate(); |
| 547 | return `${month}月${date}日`; | 544 | return `${month}月${date}日`; |
| 548 | } | 545 | } |
| 549 | - } else { | 546 | + }else { |
| 550 | return `${eventTimeStr}`; | 547 | return `${eventTimeStr}`; |
| 551 | } | 548 | } |
| 552 | } | 549 | } |
| 553 | - | ||
| 554 | - // getReserveDate(eventDateTimeString: string, type: number): string { | ||
| 555 | - // // 解析事件的日期和时间 | ||
| 556 | - // const eventDateTime = new Date(eventDateTimeString); | ||
| 557 | - // const currentDateTime = new Date(); | ||
| 558 | - // | ||
| 559 | - // // 截取事件时间的小时和分钟(假设事件时间是按照24小时制) | ||
| 560 | - // const eventHour = eventDateTime.getHours(); | ||
| 561 | - // const eventMinutes = eventDateTime.getMinutes(); | ||
| 562 | - // const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 | ||
| 563 | - // | ||
| 564 | - // if (type === 1) { | ||
| 565 | - // // 如果是今天 | ||
| 566 | - // if (eventDateTime.setHours(0,0,0,0) === currentDateTime.setHours(0,0,0,0)) { | ||
| 567 | - // return `今天`; | ||
| 568 | - // } else { | ||
| 569 | - // // 如果事件不在今天 | ||
| 570 | - // const month = eventDateTime.getMonth() + 1; // 月份从0开始 | ||
| 571 | - // const date = eventDateTime.getDate(); | ||
| 572 | - // return `${month}月${date}日`; | ||
| 573 | - // } | ||
| 574 | - // } else { | ||
| 575 | - // return `${eventTimeStr}`; | ||
| 576 | - // } | ||
| 577 | - // } | ||
| 578 | - } | ||
| 579 | - | ||
| 580 | - | ||
| 581 | } | 550 | } |
-
Please register or login to post a comment