陈剑华

Merge remote-tracking branch 'origin/main'

@@ -9,6 +9,7 @@ import font from '@ohos.font'; @@ -9,6 +9,7 @@ import font from '@ohos.font';
9 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'; 9 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
10 import { RMCalendarBean } from './calendar/RMCalendarBean'; 10 import { RMCalendarBean } from './calendar/RMCalendarBean';
11 import { newsSkeleton } from './skeleton/newsSkeleton'; 11 import { newsSkeleton } from './skeleton/newsSkeleton';
  12 +import { Logger } from 'wdKit/Index';
12 13
13 @Component 14 @Component
14 export struct ENewspaperPageComponent { 15 export struct ENewspaperPageComponent {
@@ -310,6 +311,8 @@ export struct ENewspaperPageComponent { @@ -310,6 +311,8 @@ export struct ENewspaperPageComponent {
310 let newspaperTimes = await NewspaperViewModel.getNewspaperTime(this.calendarDate) 311 let newspaperTimes = await NewspaperViewModel.getNewspaperTime(this.calendarDate)
311 if (newspaperTimes && newspaperTimes.length > 0) { 312 if (newspaperTimes && newspaperTimes.length > 0) {
312 this.calendarDate = newspaperTimes[0].date 313 this.calendarDate = newspaperTimes[0].date
  314 + this.selectDate = new Date(this.calendarDate)
  315 + Logger.debug('ENewspaperPageComponent', this.calendarDate)
313 this.currentPageNum = '01' 316 this.currentPageNum = '01'
314 } 317 }
315 } 318 }
1 import { RMCalendarBean } from './RMCalendarBean' 1 import { RMCalendarBean } from './RMCalendarBean'
2 import { RMCalenderCell } from './RMCalendarCell' 2 import { RMCalenderCell } from './RMCalendarCell'
3 3
4 -const TAG = "RMCalendar"  
5 -  
6 @Component 4 @Component
7 export struct RMCalendar { 5 export struct RMCalendar {
8 @State selectItem: RMCalendarBean = new RMCalendarBean() 6 @State selectItem: RMCalendarBean = new RMCalendarBean()
@@ -12,6 +10,9 @@ export struct RMCalendar { @@ -12,6 +10,9 @@ export struct RMCalendar {
12 startDate: Date = new Date() 10 startDate: Date = new Date()
13 // 截止日期 11 // 截止日期
14 endDate: Date = new Date() 12 endDate: Date = new Date()
  13 + // 当前时间
  14 + private nowDate: Date = new Date()
  15 +
15 //当前日期-当前显示的月份的第一天 16 //当前日期-当前显示的月份的第一天
16 // private startDay: Date = new Date( 17 // private startDay: Date = new Date(
17 // this.selectDay.getFullYear(), 18 // this.selectDay.getFullYear(),
@@ -50,6 +51,8 @@ export struct RMCalendar { @@ -50,6 +51,8 @@ export struct RMCalendar {
50 selectFontColor: ResourceColor = "#FFFFFF" 51 selectFontColor: ResourceColor = "#FFFFFF"
51 // 选中日期背景颜色, 默认与selectDayFontColor一致 52 // 选中日期背景颜色, 默认与selectDayFontColor一致
52 selectItemBgColor: ResourceColor = "#ED2800" 53 selectItemBgColor: ResourceColor = "#ED2800"
  54 + // 当前日期未选中颜色
  55 + nowFontColor: ResourceColor = "#ED2800"
53 @State private title: string = '' 56 @State private title: string = ''
54 // 计算的总加载 57 // 计算的总加载
55 @State dates: Array<RMCalendarBean> = new Array() 58 @State dates: Array<RMCalendarBean> = new Array()
@@ -96,6 +99,7 @@ export struct RMCalendar { @@ -96,6 +99,7 @@ export struct RMCalendar {
96 disabledFontColor: this.disabledFontColor, 99 disabledFontColor: this.disabledFontColor,
97 hasPre: this.hasPre, 100 hasPre: this.hasPre,
98 hasNext: this.hasNext, 101 hasNext: this.hasNext,
  102 + nowFontColor: this.nowFontColor,
99 disableClick: (item: RMCalendarBean) => { 103 disableClick: (item: RMCalendarBean) => {
100 if (this.disableCellClick) { 104 if (this.disableCellClick) {
101 this.disableCellClick(item) 105 this.disableCellClick(item)
@@ -229,6 +233,8 @@ export struct RMCalendar { @@ -229,6 +233,8 @@ export struct RMCalendar {
229 // 补齐上一个月差的天数,需要在当月展示的部分,下面计算日期循环加1天 233 // 补齐上一个月差的天数,需要在当月展示的部分,下面计算日期循环加1天
230 tempDate.setDate(this.selectDay.getDate() - preCount) 234 tempDate.setDate(this.selectDay.getDate() - preCount)
231 235
  236 + // 当前时间除去时分秒
  237 + this.nowDate.setHours(0,0,0,0)
232 // 添加当月需要展示的日期 238 // 添加当月需要展示的日期
233 for (let index = 0; index < totalCount; index++) { 239 for (let index = 0; index < totalCount; index++) {
234 let item = new RMCalendarBean( 240 let item = new RMCalendarBean(
@@ -241,6 +247,7 @@ export struct RMCalendar { @@ -241,6 +247,7 @@ export struct RMCalendar {
241 // LunarCalendar.convertSolarToLunar(tempDate), 247 // LunarCalendar.convertSolarToLunar(tempDate),
242 (index < preCount ? true : false) || this.startDate.getTime() > tempDate.getTime(), 248 (index < preCount ? true : false) || this.startDate.getTime() > tempDate.getTime(),
243 (index >= preCount + count ? true : false) || this.endDate.getTime() < tempDate.getTime(), 249 (index >= preCount + count ? true : false) || this.endDate.getTime() < tempDate.getTime(),
  250 + tempDate.getTime() == this.nowDate.getTime()
244 ) 251 )
245 if (this.reBuildDateItem) { 252 if (this.reBuildDateItem) {
246 this.reBuildDateItem(item) 253 this.reBuildDateItem(item)
@@ -7,12 +7,14 @@ export class RMCalendarBean { @@ -7,12 +7,14 @@ export class RMCalendarBean {
7 time?: number 7 time?: number
8 isPre?: boolean // 是否是上一个月的 / 在startDate 之前 8 isPre?: boolean // 是否是上一个月的 / 在startDate 之前
9 isNext?: boolean // 是否是下一个月的 / 在endDate 之后 9 isNext?: boolean // 是否是下一个月的 / 在endDate 之后
  10 + isNow?: boolean // 是否是当前时间
10 11
11 constructor(fullYear?: number, month?: number, 12 constructor(fullYear?: number, month?: number,
12 - date?: number, day?: number,  
13 - time?: number,  
14 - isPre?: boolean,  
15 - isNext?: boolean) { 13 + date?: number, day?: number,
  14 + time?: number,
  15 + isPre?: boolean,
  16 + isNext?: boolean,
  17 + isNow?: boolean) {
16 this.fullYear = fullYear 18 this.fullYear = fullYear
17 this.month = month 19 this.month = month
18 this.date = date 20 this.date = date
@@ -20,5 +22,6 @@ export class RMCalendarBean { @@ -20,5 +22,6 @@ export class RMCalendarBean {
20 this.time = time 22 this.time = time
21 this.isPre = isPre 23 this.isPre = isPre
22 this.isNext = isNext 24 this.isNext = isNext
  25 + this.isNow = isNow
23 } 26 }
24 } 27 }
@@ -11,6 +11,7 @@ export struct RMCalenderCell { @@ -11,6 +11,7 @@ export struct RMCalenderCell {
11 selectFontColor: ResourceColor = {} as ResourceColor 11 selectFontColor: ResourceColor = {} as ResourceColor
12 selectItemBgColor: ResourceColor = {} as ResourceColor 12 selectItemBgColor: ResourceColor = {} as ResourceColor
13 disabledFontColor: ResourceColor = {} as ResourceColor 13 disabledFontColor: ResourceColor = {} as ResourceColor
  14 + nowFontColor: ResourceColor = {} as ResourceColor
14 // 今日时间戳 15 // 今日时间戳
15 selectDay: number = 0 16 selectDay: number = 0
16 @Link selectItem: RMCalendarBean 17 @Link selectItem: RMCalendarBean
@@ -37,7 +38,9 @@ export struct RMCalenderCell { @@ -37,7 +38,9 @@ export struct RMCalenderCell {
37 } 38 }
38 39
39 getItemColor() { 40 getItemColor() {
40 - if (this.item.isPre) { 41 + if (!this.isShowSelectBg() && this.item.isNow) {
  42 + return this.nowFontColor
  43 + } else if (this.item.isPre) {
41 return this.disabledFontColor 44 return this.disabledFontColor
42 } else if (this.item.isNext) { 45 } else if (this.item.isNext) {
43 return this.disabledFontColor 46 return this.disabledFontColor
@@ -17,7 +17,7 @@ export struct FollowSecondTabsComponent{ @@ -17,7 +17,7 @@ export struct FollowSecondTabsComponent{
17 build(){ 17 build(){
18 Column(){ 18 Column(){
19 Divider().width('100%') 19 Divider().width('100%')
20 - .height('2lpx') 20 + .height('1lpx')
21 .strokeWidth('1lpx') 21 .strokeWidth('1lpx')
22 .backgroundColor($r('app.color.color_EDEDED')) 22 .backgroundColor($r('app.color.color_EDEDED'))
23 23
@@ -76,7 +76,12 @@ struct MyCollectionListPage { @@ -76,7 +76,12 @@ struct MyCollectionListPage {
76 this.deleteDatas() 76 this.deleteDatas()
77 } 77 }
78 }) 78 })
79 - }.position({y:'92%'}) 79 + }
  80 + .backgroundColor(Color.White)
  81 + .alignContent(Alignment.Top)
  82 + .position({y:'92%'})
  83 + .width(CommonConstants.FULL_WIDTH)
  84 + .height(CommonConstants.FULL_HEIGHT)
80 } 85 }
81 } 86 }
82 .width(CommonConstants.FULL_WIDTH) 87 .width(CommonConstants.FULL_WIDTH)
@@ -187,7 +187,15 @@ export struct SearchResultContentComponent{ @@ -187,7 +187,15 @@ export struct SearchResultContentComponent{
187 videoInfo: { 187 videoInfo: {
188 videoDuration: Number.parseInt(value.data.duration) 188 videoDuration: Number.parseInt(value.data.duration)
189 } as VideoInfoDTO, 189 } as VideoInfoDTO,
190 - interactData: {} as InteractDataDTO, 190 + interactData: {
  191 + collectNum:value.data.collectNum ,
  192 + commentNum:value.data.commentNum,
  193 + contentId:value.data.id,
  194 + contentType :Number.parseInt(value.data.type),
  195 + likeNum: value.data.likeNum,
  196 + readNum:Number.parseInt(value.data.readNum),
  197 + shareNum:Number.parseInt(value.data.shareNum)
  198 + } as InteractDataDTO,
191 corner: '', 199 corner: '',
192 rmhPlatform: 0, 200 rmhPlatform: 0,
193 newTags: '', 201 newTags: '',
@@ -153,7 +153,7 @@ export struct AccountAndSecurityLayout { @@ -153,7 +153,7 @@ export struct AccountAndSecurityLayout {
153 this.getSwitchCell(item) 153 this.getSwitchCell(item)
154 }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center) 154 }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
155 } else { 155 } else {
156 - Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0) 156 + // Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
157 } 157 }
158 } 158 }
159 .onClick(() => { 159 .onClick(() => {
@@ -165,7 +165,7 @@ export struct AccountAndSecurityLayout { @@ -165,7 +165,7 @@ export struct AccountAndSecurityLayout {
165 165
166 let pageType = {'pageType': 1} as Record<string, number>; 166 let pageType = {'pageType': 1} as Record<string, number>;
167 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 167 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
168 - }else if (index == 8) { 168 + }else if (index == 3) {
169 this.isAccountPage=false 169 this.isAccountPage=false
170 // WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 170 // WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
171 } 171 }
@@ -70,11 +70,11 @@ class MineSettingDatasModel{ @@ -70,11 +70,11 @@ class MineSettingDatasModel{
70 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,"")) 70 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
71 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,"")) 71 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
72 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) 72 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
73 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))  
74 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))  
75 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))  
76 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))  
77 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) 73 + // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
  74 + // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
  75 + // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
  76 + // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
  77 + // this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
78 78
79 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,"")) 79 this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
80 80
@@ -62,6 +62,8 @@ export class PageHelper { @@ -62,6 +62,8 @@ export class PageHelper {
62 pageModel.compList.addItems(liveReviewDTO.list); 62 pageModel.compList.addItems(liveReviewDTO.list);
63 closeRefresh(pageModel, true); 63 closeRefresh(pageModel, true);
64 } 64 }
  65 + }).catch((err: string | Resource) => {
  66 + promptAction.showToast({ message: err });
65 }) 67 })
66 }else{ 68 }else{
67 PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => { 69 PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => {
@@ -308,7 +310,21 @@ export class PageHelper { @@ -308,7 +310,21 @@ export class PageHelper {
308 private compLoadMore(pageModel: PageModel) { 310 private compLoadMore(pageModel: PageModel) {
309 //聚合页 311 //聚合页
310 if(pageModel.pageType == 1){ 312 if(pageModel.pageType == 1){
311 - 313 + PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize,pageModel.extra).then((liveReviewDTO) => {
  314 + if(liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0){
  315 + pageModel.hasMore = false;
  316 + return;
  317 + }else{
  318 + //更新数据
  319 + pageModel.compList.addItems(liveReviewDTO.list);
  320 + // 直接认为有分页,一直加载分页。直到没有数据,再停止
  321 + pageModel.currentPage++;
  322 + pageModel.hasMore = true;
  323 + pageModel.pageTotalCompSize = liveReviewDTO.list.length + pageModel.pageTotalCompSize
  324 + }
  325 + }).catch((err: string | Resource) => {
  326 + promptAction.showToast({ message: err });
  327 + })
312 }else{ 328 }else{
313 PageViewModel.getPageData(pageModel.bizCopy()) 329 PageViewModel.getPageData(pageModel.bizCopy())
314 .then((data: PageDTO) => { 330 .then((data: PageDTO) => {