陈剑华

fix: 20507 设置仅wifi网络加载图片后关闭wifi,新闻频道信息流tab不加载图片,打开wifi后刷新频道列表未加载封面图,预期:加载封面图

Showing 46 changed files with 150 additions and 134 deletions
... ... @@ -21,6 +21,7 @@ import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LiveBigImage02Component } from './cardview/LiveBigImage02Component';
import { LiveBigImage01Component } from './cardview/LiveBigImage01Component';
import { behindDivider } from './cardCommon/behindDivider'
import PageModel from '../viewmodel/PageModel';
/**
* card适配器,卡片样式汇总,依据ContentDTO#appStyle
... ... @@ -28,6 +29,7 @@ import { behindDivider } from './cardCommon/behindDivider'
*/
@Component
export struct CardParser {
@Prop private loadImg: boolean = true;
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
... ... @@ -92,7 +94,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_03) {
... ... @@ -100,7 +103,7 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_04) {
... ... @@ -108,7 +111,7 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_05) {
... ... @@ -117,7 +120,7 @@ export struct CardParser {
contentDTO,
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) {
... ... @@ -125,7 +128,7 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO: this.contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) {
... ... @@ -133,7 +136,7 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_11) {
... ... @@ -149,7 +152,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_14) {
... ... @@ -157,7 +161,7 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_15) {
... ... @@ -165,7 +169,7 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_16) {
... ... @@ -173,7 +177,7 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_17) {
... ... @@ -181,7 +185,7 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_19) {
... ... @@ -190,7 +194,7 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_20) {
... ... @@ -199,7 +203,7 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_21) {
... ... @@ -207,7 +211,7 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) {
... ... @@ -216,7 +220,7 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
index: this.compIndex
index: this.compIndex, loadImg: this.loadImg
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) {
... ... @@ -225,7 +229,7 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
index:this.compIndex
index:this.compIndex, loadImg: this.loadImg
})
this.getBehindDivider()
} else {
... ...
... ... @@ -118,13 +118,13 @@ export struct CompParser {
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
if (this.compDTO.operDataList.length > this.audioItems.length) {
ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
}
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
// Text('LiveHorizontalCardComponent')
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
... ... @@ -132,22 +132,22 @@ export struct CompParser {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
} else {
// Text('HorizontalStrokeCardThreeTwoRadioForOneComponent')
HorizontalStrokeCardThreeTwoRadioForOneComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
}
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
//ZhGridLayout02({ compDTO: this.compDTO })
... ... @@ -159,20 +159,20 @@ export struct CompParser {
compDTO: this.compDTO,
operDataList: this.compDTO.operDataList,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
// this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
// ZhSingleRow05({ compDTO })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
... ... @@ -181,7 +181,8 @@ export struct CompParser {
contentDTO: this.compDTO.operDataList[0],
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
loadImg: this.pageModel.loadImg
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
... ... @@ -190,7 +191,8 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
loadImg: this.pageModel.loadImg
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_09) {
... ... @@ -199,7 +201,7 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_13) {
... ... @@ -207,7 +209,7 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_03) {
... ... @@ -215,7 +217,7 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.pageModel.loadImg
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
... ... @@ -224,7 +226,7 @@ export struct CompParser {
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
// ZhSingleColumn05({ compDTO: compDTO })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex })
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
... ... @@ -237,7 +239,8 @@ export struct CompParser {
pageId: this.pageId,
pageName: this.pageName,
compIndex: this.compIndex,
nextCompDTO: this.nextCompDTO
nextCompDTO: this.nextCompDTO,
loadImg: this.pageModel.loadImg
});
} else {
// Text(this.compDTO.compStyle)
... ...
... ... @@ -1032,7 +1032,7 @@ export struct DynamicDetailComponent {
@Component
struct createImg {
@State fullColumnImgUrls: PhotoListBean[] = []
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State onePicW: number = 0; // 只有一张图时候图片的宽度
@State onePicH: number = 0; // 只有一张图时候图片的高度
... ... @@ -1042,7 +1042,7 @@ struct createImg {
picPath: ''
} as PhotoListBean)
}
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls))
}
... ...
... ... @@ -25,7 +25,7 @@ export struct RmhTitle {
@State pageName: string = '';
@Prop rmhInfo: RmhInfoDTO
@Prop publishTime: string | undefined
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
isPeopleShipHome: boolean = false;
// 当前页面没有使用,并且会导致奔溃
// @Consume @Watch('pageShowForUpdateData') pageShow:number
... ... @@ -108,7 +108,7 @@ export struct RmhTitle {
this.hideTime = true;
}
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
pageShowForUpdateData(): void {
... ...
... ... @@ -31,20 +31,20 @@ export struct AdvCardParser {
@Builder
contentBuilder(pageModel: PageModel, compDTO: CompDTO) {
if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告
CardAdvThreeImageComponent({ pageModel, compDTO })
CardAdvThreeImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告
CardAdvSmallImageComponent({ pageModel, compDTO })
CardAdvSmallImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 ||
compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告
CardAdvLongImageComponent({ pageModel, compDTO })
CardAdvLongImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告
CardAdvBigImageComponent({ pageModel, compDTO })
CardAdvBigImageComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告
CardAdvVideoComponent({ pageModel, compDTO })
CardAdvVideoComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告
CardAdvVideoExComponent({ pageModel, compDTO})
CardAdvVideoExComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告
CardAdvGanMiComponent({ pageModel, compDTO })
CardAdvGanMiComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg})
}
}
}
\ No newline at end of file
... ...
... ... @@ -19,10 +19,10 @@ const TAG: string = 'Card2Component';
export struct CardAdvBigImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
... ...
... ... @@ -25,10 +25,10 @@ export struct CardAdvGanMiComponent {
@State advExtraData: AdvExtraData = {} as AdvExtraData
@State advLength: number = 0;
pageModel: PageModel = new PageModel();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
let extraData = this.compDTO.matInfo.extraData
let labelDTO = JSON.parse(extraData) as AdvExtraData
... ...
... ... @@ -21,10 +21,10 @@ export struct CardAdvLongImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@State haveTitle: boolean = true
pageModel: PageModel = new PageModel();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7;
}
... ...
... ... @@ -23,10 +23,10 @@ export struct CardAdvSmallImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true
pageModel: PageModel = new PageModel();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
// 计算标题文本行数
let screenWith = DisplayUtils.getDeviceWidth();
... ...
... ... @@ -19,11 +19,11 @@ const TAG: string = 'Card2Component';
@Component
export struct CardAdvThreeImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
aboutToDisappear(): void {
... ...
... ... @@ -21,11 +21,11 @@ const TAG: string = 'Card2Component';
export struct CardAdvVideoComponent {
@State compDTO: CompDTO = {} as CompDTO
@State contentDTO: ContentDTO = new ContentDTO()
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
aboutToDisappear(): void {
... ...
... ... @@ -22,10 +22,10 @@ export struct CardAdvVideoExComponent {
@State compDTO: CompDTO = {} as CompDTO
@State advExtraData: AdvExtraData = {} as AdvExtraData
pageModel: PageModel = new PageModel();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
let extraData = this.compDTO.matInfo.extraData
let labelDTO = JSON.parse(extraData) as AdvExtraData
... ...
... ... @@ -23,7 +23,7 @@ export struct Card10Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -37,7 +37,7 @@ export struct Card10Component {
console.log('Card10Component-contentDTO', JSON.stringify(this.contentDTO))
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
this.initHideDetail();
if (!this.hideDetail) {
... ... @@ -207,7 +207,7 @@ export struct Card10ComponentTimelineItem {
slideItem: slideShows = new slideShows;
@State contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State isRead: boolean = false; //已读状态
build() {
... ...
... ... @@ -23,6 +23,7 @@ export struct Card12Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
aboutToAppear(): void {
this.titleInit();
... ... @@ -48,7 +49,7 @@ export struct Card12Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
}
)
}
... ...
... ... @@ -21,7 +21,7 @@ export struct Card14Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -30,7 +30,7 @@ export struct Card14Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ... @@ -50,7 +50,7 @@ export struct Card14Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
}
)
}
... ...
... ... @@ -25,7 +25,7 @@ export struct Card15Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -34,7 +34,7 @@ export struct Card15Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ... @@ -53,7 +53,7 @@ export struct Card15Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
}
) //新闻标题
if (this.contentDTO.newsTitle) {
... ...
... ... @@ -27,7 +27,7 @@ export struct Card16Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -36,7 +36,7 @@ export struct Card16Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ... @@ -56,7 +56,7 @@ export struct Card16Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
}
)
}
... ... @@ -159,10 +159,10 @@ interface radiusType {
@Component
struct createImg {
@Prop contentDTO: ContentDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -21,7 +21,7 @@ export struct Card17Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
... ... @@ -32,7 +32,7 @@ export struct Card17Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ...
... ... @@ -23,6 +23,7 @@ export struct Card19Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
isPeopleShipHome: boolean = false;
async aboutToAppear(): Promise<void> {
... ... @@ -49,7 +50,7 @@ export struct Card19Component {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
}
) // 标题
if (this.contentDTO.newsTitle) {
... ... @@ -82,7 +83,7 @@ export struct Card19Component {
})
}
// 图片-从无图到9图展示
createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls })
createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls, loadImg: this.loadImg })
CarderInteraction({ contentDTO: this.contentDTO })
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
... ... @@ -121,7 +122,7 @@ interface picProps {
@Component
struct createImg {
@Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State onePicW: number = 0; // 只有一张图时候图片的宽度
@State onePicH: number = 0; // 只有一张图时候图片的高度
... ... @@ -131,7 +132,7 @@ struct createImg {
fullUrl: ''
} as FullColumnImgUrlDTO)
}
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls))
}
... ...
... ... @@ -26,6 +26,7 @@ export struct Card20Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
isPeopleShipHome: boolean = false;
aboutToAppear(): void {
... ... @@ -51,7 +52,7 @@ export struct Card20Component {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
}
) // 标题
if (this.contentDTO.newsTitle) {
... ... @@ -103,7 +104,7 @@ export struct Card20Component {
}.alignContent(Alignment.TopStart)
}
if (this.contentDTO.fullColumnImgUrls[0]) {
createImg({ contentDTO: this.contentDTO })
createImg({ contentDTO: this.contentDTO, loadImg: this.loadImg })
}
CarderInteraction({contentDTO: this.contentDTO})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
... ... @@ -137,11 +138,11 @@ interface radiusType {
@Component
struct createImg {
@Prop contentDTO: ContentDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
console.log("createImg", JSON.stringify(this.contentDTO.fullColumnImgUrls))
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
... ...
... ... @@ -21,7 +21,7 @@ export struct Card21Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -30,7 +30,7 @@ export struct Card21Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ... @@ -49,7 +49,7 @@ export struct Card21Component {
contentDTO: this.contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
}
) // 中间内容
Grid() {
... ...
... ... @@ -6,7 +6,6 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { Notes } from './notes';
import { getNotesContentWidth } from '../../utils/FuncUtils'
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick';
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
... ... @@ -27,7 +26,7 @@ export struct Card2Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
... ... @@ -37,7 +36,6 @@ export struct Card2Component {
this.titleInit();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ...
... ... @@ -16,6 +16,7 @@ import router from '@ohos.router'
*/
@Component
export struct Card3Component {
@Prop loadImg: boolean = true;
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
... ...
... ... @@ -25,7 +25,7 @@ export struct Card4Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -35,7 +35,7 @@ export struct Card4Component {
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
titleInit() {
... ...
import { ContentDTO, CompDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { Notes } from './notes';
import { getNotesContentWidth } from '../../utils/FuncUtils'
import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
... ... @@ -22,7 +21,7 @@ export struct Card5Component {
@State contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
@Prop titleShowPolicy: number | string
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -33,7 +32,6 @@ export struct Card5Component {
// console.log(TAG, 'this.contentDTO.newsTitle', this.contentDTO.newsTitle)
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
this.titleInit();
}
... ...
... ... @@ -5,7 +5,6 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
import { Notes } from './notes';
import { getNotesContentWidth } from '../../utils/FuncUtils';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { Logger } from 'wdKit/Index';
import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick'
... ... @@ -22,7 +21,7 @@ export struct Card6Component {
@State pageId: string = '';
@State textHeight: number = 0 ; //获取文本的高度
@State pageName: string = '';
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -32,7 +31,6 @@ export struct Card6Component {
async aboutToAppear(): Promise<void> {
console.log('Card6Component', JSON.stringify(this.contentDTO))
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
}
... ...
... ... @@ -17,11 +17,11 @@ const TAG: string = 'Card9Component';
@Component
export struct Card9Component {
@Prop loadImg: boolean = true;
@ObjectLink compDTO: CompDTO
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
// @State loadImg: boolean = true;
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
... ... @@ -99,7 +99,7 @@ export struct Card9Component {
}
// 大图
Stack() {
Image(this.contentDTO.coverUrl)
Image(this.loadImg ? this.contentDTO.coverUrl : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(133)
... ...
... ... @@ -19,7 +19,7 @@ export struct LiveBigImage01Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
index: number = 0
@State isLoadingAttention: boolean = false
... ... @@ -29,7 +29,7 @@ export struct LiveBigImage01Component {
const curRouter = router.getState().name;
this.curRouter = curRouter;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -17,17 +17,17 @@ export struct LiveBigImage02Component {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
index: number = 0
async aboutToAppear() {
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId,curRouter)
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
async aboutToReuse() {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
... ...
... ... @@ -20,13 +20,13 @@ export struct SearchContentComponent {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State textArr: textItem[] = []
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
this.titleInit();
const curRouter = router.getState().name;
... ...
... ... @@ -54,6 +54,7 @@ export struct ZhCarouselLayout01 {
@State firstWd: number = 0
@State SecondWd: number = 0
@State swiperIndex: number = 0
@Prop loadImg: boolean = true;
private data: MyDataSource = new MyDataSource([])
... ... @@ -100,7 +101,7 @@ export struct ZhCarouselLayout01 {
CarouselLayout01CardView({
item: item,
length: this.filterAtv().length,
showPicBorderRadius: this.filterAtv().length == 1
showPicBorderRadius: this.filterAtv().length == 1, loadImg: this.loadImg
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
... ... @@ -180,7 +181,7 @@ export struct ZhCarouselLayout01 {
CarouselLayout01CardView({
item: this.filterAtv()[0],
length: 1,
showPicBorderRadius: this.filterAtv().length == 1
showPicBorderRadius: this.filterAtv().length == 1, loadImg: this.loadImg
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.filterAtv()[0], this.pageId, this.pageName)
... ... @@ -214,13 +215,13 @@ export struct ZhCarouselLayout01 {
@Component
struct CarouselLayout01CardView {
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
private item: ContentDTO = new ContentDTO();
private length: number = 1; // 轮播图数量
private showPicBorderRadius: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -18,11 +18,11 @@ export struct ZhGridLayout02NewsContent {
@State pageName: string = '';
@ObjectLink compDTO: CompDTO
@State operDataList: ContentDTO[] = []
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -19,13 +19,13 @@ export struct ZhGridLayout03 {
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
if (this.compDTO.operDataList) {
listSize = this.compDTO.operDataList.length > 5 ? 4 : this.compDTO.operDataList.length;
}
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -22,7 +22,7 @@ export struct ZhSingleColumn09 {
@State activeIndexs: Array<number> = []
@State operDataList: ContentDTO[] = this.compDTO?.operDataList || []
@StorageLink('selfClosed') selfClosed: boolean = false
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
@State currentOperDataListIndex: number = 0; //记录换一换点击次数
@State visitedIndices: Set<number> = new Set<number>();
... ... @@ -30,7 +30,7 @@ export struct ZhSingleColumn09 {
@State currentDataList: ContentDTO[] = []
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
// this.operDataList = this.shuffleArray(this.compDTO?.operDataList)
this.operDataList = this.padData(this.compDTO?.operDataList)
this.currentOperDataListIndex = this.compDTO?.operDataList.length
... ...
... ... @@ -16,6 +16,7 @@ const TAG = 'Zh_Single_Row-02'
@Component
export struct ZhSingleRow02 {
@Prop loadImg: boolean = true;
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
... ... @@ -94,7 +95,7 @@ export struct ZhSingleRow02 {
index,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName, loadImg: this.loadImg
})
.margin({ right: 8, left: index === 0 ? 16 : 0 })
})
... ... @@ -226,10 +227,10 @@ struct CreatorItem {
@Prop item: ContentDTO
@Prop index: number
@State rmhIsAttention: number = 0
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
build() {
... ...
... ... @@ -41,7 +41,7 @@ export struct ZhSingleRow03 {
@State compDTO: CompDTO = {} as CompDTO
// @State reserveStatus: reserveItem[] = []
@State reservedIds: string[] = [];
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
... ... @@ -93,7 +93,7 @@ export struct ZhSingleRow03 {
if (HttpUtils.isLogin()) {
this.getReserveState();
}
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
// 获取预约
EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => {
... ...
... ... @@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick';
@Component
export struct ZhSingleRow04 {
@Prop loadImg: boolean = true;
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
... ...
... ... @@ -26,12 +26,12 @@ export struct ZhSingleRow06 {
@State newsStatusOfUser: batchLikeAndCollectResult = {
likeStatus: '0'
} as batchLikeAndCollectResult // 点赞、收藏状态
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
async aboutToAppear(): Promise<void> {
console.log('Zh_Single_Row-06', JSON.stringify(this.compDTO.operDataList[0]?.commentInfo))
this.getInteractDataStatus()
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
... ...
... ... @@ -8,12 +8,12 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog'
@Component
export struct AppointmentListChildComponent {
@ObjectLink item: MineAppointmentItem
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
confirmCallback: (item: MineAppointmentItem) => void = () => {
}
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
dialogController: CustomDialogController = new CustomDialogController({
... ...
... ... @@ -399,7 +399,7 @@ export struct PaperSingleColumn999CardView {
@State isRead: boolean = false;//已读状态
@State interactData: InteractDataDTO = new InteractDataDTO
@Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
getPublishTime(): string {
const publishTimestamp = parseInt(this.item?.publishTime)
... ... @@ -627,7 +627,7 @@ export struct PaperSingleColumn999CardView {
}
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
this.onChangeCommentList()
this.isRead = hasClicked(this.item.objectId, '')
}
... ...
... ... @@ -15,6 +15,7 @@ import { NoMoreBean } from './NoMoreBean';
import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';
import RefreshLayout from '../refresh/RefreshLayout';
import { GrayManageModel } from '../../viewmodel/GrayManageModel';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
const TAG = 'PageComponent';
... ... @@ -301,7 +302,7 @@ export struct PageComponent {
}
}
onAutoRefresh() {
async onAutoRefresh() {
if (this.navIndex != this.currentTopNavSelectedIndex) {
return
}
... ... @@ -315,13 +316,14 @@ export struct PageComponent {
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => {
this.timer = setTimeout(async () => {
Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`);
this.pageModel.pageId = this.pageId;
this.pageModel.groupId = this.pageId;
this.pageModel.channelId = this.channelId;
this.pageModel.currentPage = 1;
this.pageModel.pageTotalCompSize = 0;
this.pageModel.loadImg = await onlyWifiLoadImg()
PageHelper.getInitCacheData(this.pageModel, this.pageAdvModel).then(() => {
this.pageTrackBean.pageId = this.pageId
this.pageTrackBean.pageName = this.pageModel.pageInfo.name
... ...
... ... @@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@Prop loadImg: boolean = true;
@State compDTO: CompDTO = {} as CompDTO
@State pageId: string = '';
@State pageName: string = '';
... ... @@ -102,7 +103,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
Column() {
Stack() {
Image(item.coverUrl)
Image(this.loadImg ? item.coverUrl : '')
.aspectRatio(1.5)
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.objectFit(ImageFit.Contain)
... ...
... ... @@ -7,6 +7,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick';
@Component
export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
@Prop loadImg: boolean = true;
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
... ... @@ -45,7 +46,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.width('100%')
Image(this.compDTO.operDataList[0].coverUrl)
Image(this.loadImg ? this.compDTO.operDataList[0].coverUrl : '')
.aspectRatio(1.5)
.width('100%')
.borderRadius(4)
... ...
... ... @@ -17,7 +17,7 @@ export struct LiveHorizontalCardComponent {
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State loadImg: boolean = false;
@Prop loadImg: boolean = true;
@State initMoreWidth: number = 22;
@State moreWidth:number = 22
@State moreTips: string = ''
... ... @@ -101,7 +101,7 @@ export struct LiveHorizontalCardComponent {
}
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// this.loadImg = await onlyWifiLoadImg();
}
showMore() {
... ...
... ... @@ -16,6 +16,7 @@ import { common } from '@kit.AbilityKit';
import { CacheData } from 'wdNetwork/Index';
import { closeLoadMore } from '../utils/PullUpLoadMore';
import { webview } from '@kit.ArkWeb';
import { onlyWifiLoadImg } from '../utils/lazyloadImg';
const TAG = 'PageHelper';
... ... @@ -108,9 +109,10 @@ export class PageHelper {
}
}
getPageInfo(pageModel: PageModel, pageAdvModel: PageAdModel) {
async getPageInfo(pageModel: PageModel, pageAdvModel: PageAdModel) {
let cacheIsSame = false;
pageModel.currentPage = 1;
pageModel.loadImg = await onlyWifiLoadImg();
if (pageModel.pageType == 1) {
PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize, pageModel.extra).then((liveReviewDTO) => {
if (liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0) {
... ...
... ... @@ -84,6 +84,8 @@ export default class PageModel {
// 第一页,最后一个comp下标,用于区分分页加载(下拉刷新,清除分页数据)
firstPageEndIndex = -1
loadImg: boolean = true;
/**
* 简单复制业务数据
*/
... ...