陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -9,6 +9,7 @@ import font from '@ohos.font';
import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
import { RMCalendarBean } from './calendar/RMCalendarBean';
import { newsSkeleton } from './skeleton/newsSkeleton';
import { Logger } from 'wdKit/Index';
@Component
export struct ENewspaperPageComponent {
... ... @@ -310,6 +311,8 @@ export struct ENewspaperPageComponent {
let newspaperTimes = await NewspaperViewModel.getNewspaperTime(this.calendarDate)
if (newspaperTimes && newspaperTimes.length > 0) {
this.calendarDate = newspaperTimes[0].date
this.selectDate = new Date(this.calendarDate)
Logger.debug('ENewspaperPageComponent', this.calendarDate)
this.currentPageNum = '01'
}
}
... ...
import { RMCalendarBean } from './RMCalendarBean'
import { RMCalenderCell } from './RMCalendarCell'
const TAG = "RMCalendar"
@Component
export struct RMCalendar {
@State selectItem: RMCalendarBean = new RMCalendarBean()
... ... @@ -12,6 +10,9 @@ export struct RMCalendar {
startDate: Date = new Date()
// 截止日期
endDate: Date = new Date()
// 当前时间
private nowDate: Date = new Date()
//当前日期-当前显示的月份的第一天
// private startDay: Date = new Date(
// this.selectDay.getFullYear(),
... ... @@ -50,6 +51,8 @@ export struct RMCalendar {
selectFontColor: ResourceColor = "#FFFFFF"
// 选中日期背景颜色, 默认与selectDayFontColor一致
selectItemBgColor: ResourceColor = "#ED2800"
// 当前日期未选中颜色
nowFontColor: ResourceColor = "#ED2800"
@State private title: string = ''
// 计算的总加载
@State dates: Array<RMCalendarBean> = new Array()
... ... @@ -96,6 +99,7 @@ export struct RMCalendar {
disabledFontColor: this.disabledFontColor,
hasPre: this.hasPre,
hasNext: this.hasNext,
nowFontColor: this.nowFontColor,
disableClick: (item: RMCalendarBean) => {
if (this.disableCellClick) {
this.disableCellClick(item)
... ... @@ -229,6 +233,8 @@ export struct RMCalendar {
// 补齐上一个月差的天数,需要在当月展示的部分,下面计算日期循环加1天
tempDate.setDate(this.selectDay.getDate() - preCount)
// 当前时间除去时分秒
this.nowDate.setHours(0,0,0,0)
// 添加当月需要展示的日期
for (let index = 0; index < totalCount; index++) {
let item = new RMCalendarBean(
... ... @@ -241,6 +247,7 @@ export struct RMCalendar {
// LunarCalendar.convertSolarToLunar(tempDate),
(index < preCount ? true : false) || this.startDate.getTime() > tempDate.getTime(),
(index >= preCount + count ? true : false) || this.endDate.getTime() < tempDate.getTime(),
tempDate.getTime() == this.nowDate.getTime()
)
if (this.reBuildDateItem) {
this.reBuildDateItem(item)
... ...
... ... @@ -7,12 +7,14 @@ export class RMCalendarBean {
time?: number
isPre?: boolean // 是否是上一个月的 / 在startDate 之前
isNext?: boolean // 是否是下一个月的 / 在endDate 之后
isNow?: boolean // 是否是当前时间
constructor(fullYear?: number, month?: number,
date?: number, day?: number,
time?: number,
isPre?: boolean,
isNext?: boolean) {
date?: number, day?: number,
time?: number,
isPre?: boolean,
isNext?: boolean,
isNow?: boolean) {
this.fullYear = fullYear
this.month = month
this.date = date
... ... @@ -20,5 +22,6 @@ export class RMCalendarBean {
this.time = time
this.isPre = isPre
this.isNext = isNext
this.isNow = isNow
}
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ export struct RMCalenderCell {
selectFontColor: ResourceColor = {} as ResourceColor
selectItemBgColor: ResourceColor = {} as ResourceColor
disabledFontColor: ResourceColor = {} as ResourceColor
nowFontColor: ResourceColor = {} as ResourceColor
// 今日时间戳
selectDay: number = 0
@Link selectItem: RMCalendarBean
... ... @@ -37,7 +38,9 @@ export struct RMCalenderCell {
}
getItemColor() {
if (this.item.isPre) {
if (!this.isShowSelectBg() && this.item.isNow) {
return this.nowFontColor
} else if (this.item.isPre) {
return this.disabledFontColor
} else if (this.item.isNext) {
return this.disabledFontColor
... ...
... ... @@ -17,7 +17,7 @@ export struct FollowSecondTabsComponent{
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.height('1lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
... ...
... ... @@ -76,7 +76,12 @@ struct MyCollectionListPage {
this.deleteDatas()
}
})
}.position({y:'92%'})
}
.backgroundColor(Color.White)
.alignContent(Alignment.Top)
.position({y:'92%'})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
}
}
.width(CommonConstants.FULL_WIDTH)
... ...
... ... @@ -187,7 +187,15 @@ export struct SearchResultContentComponent{
videoInfo: {
videoDuration: Number.parseInt(value.data.duration)
} as VideoInfoDTO,
interactData: {} as InteractDataDTO,
interactData: {
collectNum:value.data.collectNum ,
commentNum:value.data.commentNum,
contentId:value.data.id,
contentType :Number.parseInt(value.data.type),
likeNum: value.data.likeNum,
readNum:Number.parseInt(value.data.readNum),
shareNum:Number.parseInt(value.data.shareNum)
} as InteractDataDTO,
corner: '',
rmhPlatform: 0,
newTags: '',
... ...
... ... @@ -153,7 +153,7 @@ export struct AccountAndSecurityLayout {
this.getSwitchCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else {
Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
// Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
}
}
.onClick(() => {
... ... @@ -165,7 +165,7 @@ export struct AccountAndSecurityLayout {
let pageType = {'pageType': 1} as Record<string, number>;
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
}else if (index == 8) {
}else if (index == 3) {
this.isAccountPage=false
// WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
}
... ...
... ... @@ -70,11 +70,11 @@ class MineSettingDatasModel{
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
// this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
... ...
... ... @@ -62,6 +62,8 @@ export class PageHelper {
pageModel.compList.addItems(liveReviewDTO.list);
closeRefresh(pageModel, true);
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
})
}else{
PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => {
... ... @@ -308,7 +310,21 @@ export class PageHelper {
private compLoadMore(pageModel: PageModel) {
//聚合页
if(pageModel.pageType == 1){
PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize,pageModel.extra).then((liveReviewDTO) => {
if(liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0){
pageModel.hasMore = false;
return;
}else{
//更新数据
pageModel.compList.addItems(liveReviewDTO.list);
// 直接认为有分页,一直加载分页。直到没有数据,再停止
pageModel.currentPage++;
pageModel.hasMore = true;
pageModel.pageTotalCompSize = liveReviewDTO.list.length + pageModel.pageTotalCompSize
}
}).catch((err: string | Resource) => {
promptAction.showToast({ message: err });
})
}else{
PageViewModel.getPageData(pageModel.bizCopy())
.then((data: PageDTO) => {
... ...