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'; | @@ -21,6 +21,7 @@ import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | ||
| 21 | import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; | 21 | import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; |
| 22 | import { LiveBigImage01Component } from './cardview/LiveBigImage01Component'; | 22 | import { LiveBigImage01Component } from './cardview/LiveBigImage01Component'; |
| 23 | import { behindDivider } from './cardCommon/behindDivider' | 23 | import { behindDivider } from './cardCommon/behindDivider' |
| 24 | +import PageModel from '../viewmodel/PageModel'; | ||
| 24 | 25 | ||
| 25 | /** | 26 | /** |
| 26 | * card适配器,卡片样式汇总,依据ContentDTO#appStyle | 27 | * card适配器,卡片样式汇总,依据ContentDTO#appStyle |
| @@ -28,6 +29,7 @@ import { behindDivider } from './cardCommon/behindDivider' | @@ -28,6 +29,7 @@ import { behindDivider } from './cardCommon/behindDivider' | ||
| 28 | */ | 29 | */ |
| 29 | @Component | 30 | @Component |
| 30 | export struct CardParser { | 31 | export struct CardParser { |
| 32 | + @Prop private loadImg: boolean = true; | ||
| 31 | @State pageId: string = ''; | 33 | @State pageId: string = ''; |
| 32 | @State pageName: string = ''; | 34 | @State pageName: string = ''; |
| 33 | @State contentDTO: ContentDTO = new ContentDTO(); | 35 | @State contentDTO: ContentDTO = new ContentDTO(); |
| @@ -92,7 +94,8 @@ export struct CardParser { | @@ -92,7 +94,8 @@ export struct CardParser { | ||
| 92 | compDTO: this.compDTO, | 94 | compDTO: this.compDTO, |
| 93 | contentDTO, | 95 | contentDTO, |
| 94 | pageId: this.pageId, | 96 | pageId: this.pageId, |
| 95 | - pageName: this.pageName | 97 | + pageName: this.pageName, |
| 98 | + loadImg: this.loadImg | ||
| 96 | }) | 99 | }) |
| 97 | this.getBehindDivider() | 100 | this.getBehindDivider() |
| 98 | } else if (contentDTO.appStyle === CompStyle.Card_03) { | 101 | } else if (contentDTO.appStyle === CompStyle.Card_03) { |
| @@ -100,7 +103,7 @@ export struct CardParser { | @@ -100,7 +103,7 @@ export struct CardParser { | ||
| 100 | compDTO: this.compDTO, | 103 | compDTO: this.compDTO, |
| 101 | contentDTO, | 104 | contentDTO, |
| 102 | pageId: this.pageId, | 105 | pageId: this.pageId, |
| 103 | - pageName: this.pageName | 106 | + pageName: this.pageName, loadImg: this.loadImg |
| 104 | }) | 107 | }) |
| 105 | this.getBehindDivider() | 108 | this.getBehindDivider() |
| 106 | } else if (contentDTO.appStyle === CompStyle.Card_04) { | 109 | } else if (contentDTO.appStyle === CompStyle.Card_04) { |
| @@ -108,7 +111,7 @@ export struct CardParser { | @@ -108,7 +111,7 @@ export struct CardParser { | ||
| 108 | compDTO: this.compDTO, | 111 | compDTO: this.compDTO, |
| 109 | contentDTO, | 112 | contentDTO, |
| 110 | pageId: this.pageId, | 113 | pageId: this.pageId, |
| 111 | - pageName: this.pageName | 114 | + pageName: this.pageName, loadImg: this.loadImg |
| 112 | }) | 115 | }) |
| 113 | this.getBehindDivider() | 116 | this.getBehindDivider() |
| 114 | } else if (contentDTO.appStyle === CompStyle.Card_05) { | 117 | } else if (contentDTO.appStyle === CompStyle.Card_05) { |
| @@ -117,7 +120,7 @@ export struct CardParser { | @@ -117,7 +120,7 @@ export struct CardParser { | ||
| 117 | contentDTO, | 120 | contentDTO, |
| 118 | titleShowPolicy: this.compDTO.titleShowPolicy, | 121 | titleShowPolicy: this.compDTO.titleShowPolicy, |
| 119 | pageId: this.pageId, | 122 | pageId: this.pageId, |
| 120 | - pageName: this.pageName | 123 | + pageName: this.pageName, loadImg: this.loadImg |
| 121 | }) | 124 | }) |
| 122 | this.getBehindDivider() | 125 | this.getBehindDivider() |
| 123 | } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) { | 126 | } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) { |
| @@ -125,7 +128,7 @@ export struct CardParser { | @@ -125,7 +128,7 @@ export struct CardParser { | ||
| 125 | compDTO: this.compDTO, | 128 | compDTO: this.compDTO, |
| 126 | contentDTO: this.contentDTO, | 129 | contentDTO: this.contentDTO, |
| 127 | pageId: this.pageId, | 130 | pageId: this.pageId, |
| 128 | - pageName: this.pageName | 131 | + pageName: this.pageName, loadImg: this.loadImg |
| 129 | }) | 132 | }) |
| 130 | this.getBehindDivider() | 133 | this.getBehindDivider() |
| 131 | } else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) { | 134 | } else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) { |
| @@ -133,7 +136,7 @@ export struct CardParser { | @@ -133,7 +136,7 @@ export struct CardParser { | ||
| 133 | compDTO: this.compDTO, | 136 | compDTO: this.compDTO, |
| 134 | contentDTO, | 137 | contentDTO, |
| 135 | pageId: this.pageId, | 138 | pageId: this.pageId, |
| 136 | - pageName: this.pageName | 139 | + pageName: this.pageName, loadImg: this.loadImg |
| 137 | }) | 140 | }) |
| 138 | this.getBehindDivider() | 141 | this.getBehindDivider() |
| 139 | } else if (contentDTO.appStyle === CompStyle.Card_11) { | 142 | } else if (contentDTO.appStyle === CompStyle.Card_11) { |
| @@ -149,7 +152,8 @@ export struct CardParser { | @@ -149,7 +152,8 @@ export struct CardParser { | ||
| 149 | compDTO: this.compDTO, | 152 | compDTO: this.compDTO, |
| 150 | contentDTO, | 153 | contentDTO, |
| 151 | pageId: this.pageId, | 154 | pageId: this.pageId, |
| 152 | - pageName: this.pageName | 155 | + pageName: this.pageName, loadImg: this.loadImg |
| 156 | + | ||
| 153 | }) | 157 | }) |
| 154 | this.getBehindDivider() | 158 | this.getBehindDivider() |
| 155 | } else if (contentDTO.appStyle === CompStyle.Card_14) { | 159 | } else if (contentDTO.appStyle === CompStyle.Card_14) { |
| @@ -157,7 +161,7 @@ export struct CardParser { | @@ -157,7 +161,7 @@ export struct CardParser { | ||
| 157 | contentDTO, | 161 | contentDTO, |
| 158 | compDTO: this.compDTO, | 162 | compDTO: this.compDTO, |
| 159 | pageId: this.pageId, | 163 | pageId: this.pageId, |
| 160 | - pageName: this.pageName | 164 | + pageName: this.pageName, loadImg: this.loadImg |
| 161 | }) | 165 | }) |
| 162 | this.getBehindDivider() | 166 | this.getBehindDivider() |
| 163 | } else if (contentDTO.appStyle === CompStyle.Card_15) { | 167 | } else if (contentDTO.appStyle === CompStyle.Card_15) { |
| @@ -165,7 +169,7 @@ export struct CardParser { | @@ -165,7 +169,7 @@ export struct CardParser { | ||
| 165 | contentDTO, | 169 | contentDTO, |
| 166 | compDTO: this.compDTO, | 170 | compDTO: this.compDTO, |
| 167 | pageId: this.pageId, | 171 | pageId: this.pageId, |
| 168 | - pageName: this.pageName | 172 | + pageName: this.pageName, loadImg: this.loadImg |
| 169 | }) | 173 | }) |
| 170 | this.getBehindDivider() | 174 | this.getBehindDivider() |
| 171 | } else if (contentDTO.appStyle === CompStyle.Card_16) { | 175 | } else if (contentDTO.appStyle === CompStyle.Card_16) { |
| @@ -173,7 +177,7 @@ export struct CardParser { | @@ -173,7 +177,7 @@ export struct CardParser { | ||
| 173 | contentDTO, | 177 | contentDTO, |
| 174 | compDTO: this.compDTO, | 178 | compDTO: this.compDTO, |
| 175 | pageId: this.pageId, | 179 | pageId: this.pageId, |
| 176 | - pageName: this.pageName | 180 | + pageName: this.pageName, loadImg: this.loadImg |
| 177 | }) | 181 | }) |
| 178 | this.getBehindDivider() | 182 | this.getBehindDivider() |
| 179 | } else if (contentDTO.appStyle === CompStyle.Card_17) { | 183 | } else if (contentDTO.appStyle === CompStyle.Card_17) { |
| @@ -181,7 +185,7 @@ export struct CardParser { | @@ -181,7 +185,7 @@ export struct CardParser { | ||
| 181 | compDTO: this.compDTO, | 185 | compDTO: this.compDTO, |
| 182 | contentDTO, | 186 | contentDTO, |
| 183 | pageId: this.pageId, | 187 | pageId: this.pageId, |
| 184 | - pageName: this.pageName | 188 | + pageName: this.pageName, loadImg: this.loadImg |
| 185 | }) | 189 | }) |
| 186 | this.getBehindDivider() | 190 | this.getBehindDivider() |
| 187 | } else if (contentDTO.appStyle === CompStyle.Card_19) { | 191 | } else if (contentDTO.appStyle === CompStyle.Card_19) { |
| @@ -190,7 +194,7 @@ export struct CardParser { | @@ -190,7 +194,7 @@ export struct CardParser { | ||
| 190 | compDTO: this.compDTO, | 194 | compDTO: this.compDTO, |
| 191 | pageId: this.pageId, | 195 | pageId: this.pageId, |
| 192 | pageName: this.pageName, | 196 | pageName: this.pageName, |
| 193 | - isPeopleShipHome:this.isPeopleShipHome | 197 | + isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg |
| 194 | }) | 198 | }) |
| 195 | this.getBehindDivider() | 199 | this.getBehindDivider() |
| 196 | } else if (contentDTO.appStyle === CompStyle.Card_20) { | 200 | } else if (contentDTO.appStyle === CompStyle.Card_20) { |
| @@ -199,7 +203,7 @@ export struct CardParser { | @@ -199,7 +203,7 @@ export struct CardParser { | ||
| 199 | compDTO: this.compDTO, | 203 | compDTO: this.compDTO, |
| 200 | pageId: this.pageId, | 204 | pageId: this.pageId, |
| 201 | pageName: this.pageName, | 205 | pageName: this.pageName, |
| 202 | - isPeopleShipHome:this.isPeopleShipHome | 206 | + isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg |
| 203 | }) | 207 | }) |
| 204 | this.getBehindDivider() | 208 | this.getBehindDivider() |
| 205 | } else if (contentDTO.appStyle === CompStyle.Card_21) { | 209 | } else if (contentDTO.appStyle === CompStyle.Card_21) { |
| @@ -207,7 +211,7 @@ export struct CardParser { | @@ -207,7 +211,7 @@ export struct CardParser { | ||
| 207 | contentDTO, | 211 | contentDTO, |
| 208 | compDTO: this.compDTO, | 212 | compDTO: this.compDTO, |
| 209 | pageId: this.pageId, | 213 | pageId: this.pageId, |
| 210 | - pageName: this.pageName | 214 | + pageName: this.pageName, loadImg: this.loadImg |
| 211 | }) | 215 | }) |
| 212 | this.getBehindDivider() | 216 | this.getBehindDivider() |
| 213 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) { | 217 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) { |
| @@ -216,7 +220,7 @@ export struct CardParser { | @@ -216,7 +220,7 @@ export struct CardParser { | ||
| 216 | compDTO: this.compDTO, | 220 | compDTO: this.compDTO, |
| 217 | pageId: this.pageId, | 221 | pageId: this.pageId, |
| 218 | pageName: this.pageName, | 222 | pageName: this.pageName, |
| 219 | - index: this.compIndex | 223 | + index: this.compIndex, loadImg: this.loadImg |
| 220 | }) | 224 | }) |
| 221 | this.getBehindDivider() | 225 | this.getBehindDivider() |
| 222 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) { | 226 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) { |
| @@ -225,7 +229,7 @@ export struct CardParser { | @@ -225,7 +229,7 @@ export struct CardParser { | ||
| 225 | compDTO: this.compDTO, | 229 | compDTO: this.compDTO, |
| 226 | pageId: this.pageId, | 230 | pageId: this.pageId, |
| 227 | pageName: this.pageName, | 231 | pageName: this.pageName, |
| 228 | - index:this.compIndex | 232 | + index:this.compIndex, loadImg: this.loadImg |
| 229 | }) | 233 | }) |
| 230 | this.getBehindDivider() | 234 | this.getBehindDivider() |
| 231 | } else { | 235 | } else { |
| @@ -118,13 +118,13 @@ export struct CompParser { | @@ -118,13 +118,13 @@ export struct CompParser { | ||
| 118 | this.getBehindDivider() | 118 | this.getBehindDivider() |
| 119 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 119 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| 120 | if (this.compDTO.operDataList.length > this.audioItems.length) { | 120 | if (this.compDTO.operDataList.length > this.audioItems.length) { |
| 121 | - ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 121 | + ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 122 | } | 122 | } |
| 123 | this.getBehindDivider() | 123 | this.getBehindDivider() |
| 124 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && | 124 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && |
| 125 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" | 125 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" |
| 126 | // Text('LiveHorizontalCardComponent') | 126 | // Text('LiveHorizontalCardComponent') |
| 127 | - LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 127 | + LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 128 | this.getBehindDivider() | 128 | this.getBehindDivider() |
| 129 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { | 129 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { |
| 130 | if (this.compDTO.operDataList.length > 1) { | 130 | if (this.compDTO.operDataList.length > 1) { |
| @@ -132,22 +132,22 @@ export struct CompParser { | @@ -132,22 +132,22 @@ export struct CompParser { | ||
| 132 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ | 132 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ |
| 133 | compDTO: this.compDTO, | 133 | compDTO: this.compDTO, |
| 134 | pageId: this.pageId, | 134 | pageId: this.pageId, |
| 135 | - pageName: this.pageName | 135 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 136 | }) | 136 | }) |
| 137 | } else { | 137 | } else { |
| 138 | // Text('HorizontalStrokeCardThreeTwoRadioForOneComponent') | 138 | // Text('HorizontalStrokeCardThreeTwoRadioForOneComponent') |
| 139 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ | 139 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ |
| 140 | compDTO: this.compDTO, | 140 | compDTO: this.compDTO, |
| 141 | pageId: this.pageId, | 141 | pageId: this.pageId, |
| 142 | - pageName: this.pageName | 142 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 143 | }) | 143 | }) |
| 144 | } | 144 | } |
| 145 | this.getBehindDivider() | 145 | this.getBehindDivider() |
| 146 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 146 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| 147 | - ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 147 | + ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 148 | this.getBehindDivider() | 148 | this.getBehindDivider() |
| 149 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { | 149 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { |
| 150 | - ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 150 | + ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 151 | this.getBehindDivider() | 151 | this.getBehindDivider() |
| 152 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 | 152 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 |
| 153 | //ZhGridLayout02({ compDTO: this.compDTO }) | 153 | //ZhGridLayout02({ compDTO: this.compDTO }) |
| @@ -159,20 +159,20 @@ export struct CompParser { | @@ -159,20 +159,20 @@ export struct CompParser { | ||
| 159 | compDTO: this.compDTO, | 159 | compDTO: this.compDTO, |
| 160 | operDataList: this.compDTO.operDataList, | 160 | operDataList: this.compDTO.operDataList, |
| 161 | pageId: this.pageId, | 161 | pageId: this.pageId, |
| 162 | - pageName: this.pageName | 162 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 163 | }) | 163 | }) |
| 164 | // this.getBehindDivider() | 164 | // this.getBehindDivider() |
| 165 | 165 | ||
| 166 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 166 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 167 | - ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 167 | + ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 168 | this.getBehindDivider() | 168 | this.getBehindDivider() |
| 169 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { | 169 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 170 | - ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 170 | + ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 171 | this.getBehindDivider() | 171 | this.getBehindDivider() |
| 172 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 172 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 173 | // ZhSingleRow05({ compDTO }) | 173 | // ZhSingleRow05({ compDTO }) |
| 174 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { | 174 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { |
| 175 | - ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 175 | + ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 176 | this.getBehindDivider() | 176 | this.getBehindDivider() |
| 177 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 177 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 178 | //头图卡 和comStyle 2相同, | 178 | //头图卡 和comStyle 2相同, |
| @@ -181,7 +181,8 @@ export struct CompParser { | @@ -181,7 +181,8 @@ export struct CompParser { | ||
| 181 | contentDTO: this.compDTO.operDataList[0], | 181 | contentDTO: this.compDTO.operDataList[0], |
| 182 | titleShowPolicy: this.compDTO.titleShowPolicy, | 182 | titleShowPolicy: this.compDTO.titleShowPolicy, |
| 183 | pageId: this.pageId, | 183 | pageId: this.pageId, |
| 184 | - pageName: this.pageName | 184 | + pageName: this.pageName, |
| 185 | + loadImg: this.pageModel.loadImg | ||
| 185 | }) | 186 | }) |
| 186 | this.getBehindDivider() | 187 | this.getBehindDivider() |
| 187 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 188 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| @@ -190,7 +191,8 @@ export struct CompParser { | @@ -190,7 +191,8 @@ export struct CompParser { | ||
| 190 | compDTO: this.compDTO, | 191 | compDTO: this.compDTO, |
| 191 | contentDTO: this.compDTO.operDataList[0], | 192 | contentDTO: this.compDTO.operDataList[0], |
| 192 | pageId: this.pageId, | 193 | pageId: this.pageId, |
| 193 | - pageName: this.pageName | 194 | + pageName: this.pageName, |
| 195 | + loadImg: this.pageModel.loadImg | ||
| 194 | }) | 196 | }) |
| 195 | this.getBehindDivider() | 197 | this.getBehindDivider() |
| 196 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { | 198 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { |
| @@ -199,7 +201,7 @@ export struct CompParser { | @@ -199,7 +201,7 @@ export struct CompParser { | ||
| 199 | compDTO: this.compDTO, | 201 | compDTO: this.compDTO, |
| 200 | contentDTO: this.compDTO.operDataList[0], | 202 | contentDTO: this.compDTO.operDataList[0], |
| 201 | pageId: this.pageId, | 203 | pageId: this.pageId, |
| 202 | - pageName: this.pageName | 204 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 203 | }) | 205 | }) |
| 204 | this.getBehindDivider() | 206 | this.getBehindDivider() |
| 205 | } else if (this.compDTO.compStyle === CompStyle.Card_13) { | 207 | } else if (this.compDTO.compStyle === CompStyle.Card_13) { |
| @@ -207,7 +209,7 @@ export struct CompParser { | @@ -207,7 +209,7 @@ export struct CompParser { | ||
| 207 | compDTO: this.compDTO, | 209 | compDTO: this.compDTO, |
| 208 | contentDTO: this.compDTO.operDataList[0], | 210 | contentDTO: this.compDTO.operDataList[0], |
| 209 | pageId: this.pageId, | 211 | pageId: this.pageId, |
| 210 | - pageName: this.pageName | 212 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 211 | }) | 213 | }) |
| 212 | this.getBehindDivider() | 214 | this.getBehindDivider() |
| 213 | } else if (this.compDTO.compStyle === CompStyle.Card_03) { | 215 | } else if (this.compDTO.compStyle === CompStyle.Card_03) { |
| @@ -215,7 +217,7 @@ export struct CompParser { | @@ -215,7 +217,7 @@ export struct CompParser { | ||
| 215 | compDTO: this.compDTO, | 217 | compDTO: this.compDTO, |
| 216 | contentDTO: this.compDTO.operDataList[0], | 218 | contentDTO: this.compDTO.operDataList[0], |
| 217 | pageId: this.pageId, | 219 | pageId: this.pageId, |
| 218 | - pageName: this.pageName | 220 | + pageName: this.pageName, loadImg: this.pageModel.loadImg |
| 219 | }) | 221 | }) |
| 220 | this.getBehindDivider() | 222 | this.getBehindDivider() |
| 221 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 223 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { |
| @@ -224,7 +226,7 @@ export struct CompParser { | @@ -224,7 +226,7 @@ export struct CompParser { | ||
| 224 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 226 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| 225 | // ZhSingleColumn05({ compDTO: compDTO }) | 227 | // ZhSingleColumn05({ compDTO: compDTO }) |
| 226 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { | 228 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { |
| 227 | - ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex }) | 229 | + ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex, loadImg: this.pageModel.loadImg }) |
| 228 | this.getBehindDivider() | 230 | this.getBehindDivider() |
| 229 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 231 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 230 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) | 232 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| @@ -237,7 +239,8 @@ export struct CompParser { | @@ -237,7 +239,8 @@ export struct CompParser { | ||
| 237 | pageId: this.pageId, | 239 | pageId: this.pageId, |
| 238 | pageName: this.pageName, | 240 | pageName: this.pageName, |
| 239 | compIndex: this.compIndex, | 241 | compIndex: this.compIndex, |
| 240 | - nextCompDTO: this.nextCompDTO | 242 | + nextCompDTO: this.nextCompDTO, |
| 243 | + loadImg: this.pageModel.loadImg | ||
| 241 | }); | 244 | }); |
| 242 | } else { | 245 | } else { |
| 243 | // Text(this.compDTO.compStyle) | 246 | // Text(this.compDTO.compStyle) |
| @@ -1032,7 +1032,7 @@ export struct DynamicDetailComponent { | @@ -1032,7 +1032,7 @@ export struct DynamicDetailComponent { | ||
| 1032 | @Component | 1032 | @Component |
| 1033 | struct createImg { | 1033 | struct createImg { |
| 1034 | @State fullColumnImgUrls: PhotoListBean[] = [] | 1034 | @State fullColumnImgUrls: PhotoListBean[] = [] |
| 1035 | - @State loadImg: boolean = false; | 1035 | + @Prop loadImg: boolean = true; |
| 1036 | @State onePicW: number = 0; // 只有一张图时候图片的宽度 | 1036 | @State onePicW: number = 0; // 只有一张图时候图片的宽度 |
| 1037 | @State onePicH: number = 0; // 只有一张图时候图片的高度 | 1037 | @State onePicH: number = 0; // 只有一张图时候图片的高度 |
| 1038 | 1038 | ||
| @@ -1042,7 +1042,7 @@ struct createImg { | @@ -1042,7 +1042,7 @@ struct createImg { | ||
| 1042 | picPath: '' | 1042 | picPath: '' |
| 1043 | } as PhotoListBean) | 1043 | } as PhotoListBean) |
| 1044 | } | 1044 | } |
| 1045 | - this.loadImg = await onlyWifiLoadImg(); | 1045 | + // this.loadImg = await onlyWifiLoadImg(); |
| 1046 | console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls)) | 1046 | console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls)) |
| 1047 | } | 1047 | } |
| 1048 | 1048 |
| @@ -25,7 +25,7 @@ export struct RmhTitle { | @@ -25,7 +25,7 @@ export struct RmhTitle { | ||
| 25 | @State pageName: string = ''; | 25 | @State pageName: string = ''; |
| 26 | @Prop rmhInfo: RmhInfoDTO | 26 | @Prop rmhInfo: RmhInfoDTO |
| 27 | @Prop publishTime: string | undefined | 27 | @Prop publishTime: string | undefined |
| 28 | - @State loadImg: boolean = false; | 28 | + @Prop loadImg: boolean = true; |
| 29 | isPeopleShipHome: boolean = false; | 29 | isPeopleShipHome: boolean = false; |
| 30 | // 当前页面没有使用,并且会导致奔溃 | 30 | // 当前页面没有使用,并且会导致奔溃 |
| 31 | // @Consume @Watch('pageShowForUpdateData') pageShow:number | 31 | // @Consume @Watch('pageShowForUpdateData') pageShow:number |
| @@ -108,7 +108,7 @@ export struct RmhTitle { | @@ -108,7 +108,7 @@ export struct RmhTitle { | ||
| 108 | this.hideTime = true; | 108 | this.hideTime = true; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | - this.loadImg = await onlyWifiLoadImg(); | 111 | + // this.loadImg = await onlyWifiLoadImg(); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | pageShowForUpdateData(): void { | 114 | pageShowForUpdateData(): void { |
| @@ -31,20 +31,20 @@ export struct AdvCardParser { | @@ -31,20 +31,20 @@ export struct AdvCardParser { | ||
| 31 | @Builder | 31 | @Builder |
| 32 | contentBuilder(pageModel: PageModel, compDTO: CompDTO) { | 32 | contentBuilder(pageModel: PageModel, compDTO: CompDTO) { |
| 33 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 | 33 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 |
| 34 | - CardAdvThreeImageComponent({ pageModel, compDTO }) | 34 | + CardAdvThreeImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg }) |
| 35 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 | 35 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 |
| 36 | - CardAdvSmallImageComponent({ pageModel, compDTO }) | 36 | + CardAdvSmallImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg }) |
| 37 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || | 37 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || |
| 38 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 | 38 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 |
| 39 | - CardAdvLongImageComponent({ pageModel, compDTO }) | 39 | + CardAdvLongImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg }) |
| 40 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 | 40 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 |
| 41 | - CardAdvBigImageComponent({ pageModel, compDTO }) | 41 | + CardAdvBigImageComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg}) |
| 42 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 | 42 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 |
| 43 | - CardAdvVideoComponent({ pageModel, compDTO }) | 43 | + CardAdvVideoComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg }) |
| 44 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 | 44 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 |
| 45 | - CardAdvVideoExComponent({ pageModel, compDTO}) | 45 | + CardAdvVideoExComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg}) |
| 46 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 | 46 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 |
| 47 | - CardAdvGanMiComponent({ pageModel, compDTO }) | 47 | + CardAdvGanMiComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg}) |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| @@ -19,10 +19,10 @@ const TAG: string = 'Card2Component'; | @@ -19,10 +19,10 @@ const TAG: string = 'Card2Component'; | ||
| 19 | export struct CardAdvBigImageComponent { | 19 | export struct CardAdvBigImageComponent { |
| 20 | @State compDTO: CompDTO = {} as CompDTO | 20 | @State compDTO: CompDTO = {} as CompDTO |
| 21 | 21 | ||
| 22 | - @State loadImg: boolean = false; | 22 | + @Prop loadImg: boolean = true; |
| 23 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 24 | async aboutToAppear(): Promise<void> { | 24 | async aboutToAppear(): Promise<void> { |
| 25 | - this.loadImg = await onlyWifiLoadImg(); | 25 | + // this.loadImg = await onlyWifiLoadImg(); |
| 26 | 26 | ||
| 27 | } | 27 | } |
| 28 | 28 |
| @@ -25,10 +25,10 @@ export struct CardAdvGanMiComponent { | @@ -25,10 +25,10 @@ export struct CardAdvGanMiComponent { | ||
| 25 | @State advExtraData: AdvExtraData = {} as AdvExtraData | 25 | @State advExtraData: AdvExtraData = {} as AdvExtraData |
| 26 | @State advLength: number = 0; | 26 | @State advLength: number = 0; |
| 27 | pageModel: PageModel = new PageModel(); | 27 | pageModel: PageModel = new PageModel(); |
| 28 | - @State loadImg: boolean = false; | 28 | + @Prop loadImg: boolean = true; |
| 29 | 29 | ||
| 30 | async aboutToAppear(): Promise<void> { | 30 | async aboutToAppear(): Promise<void> { |
| 31 | - this.loadImg = await onlyWifiLoadImg(); | 31 | + // this.loadImg = await onlyWifiLoadImg(); |
| 32 | 32 | ||
| 33 | let extraData = this.compDTO.matInfo.extraData | 33 | let extraData = this.compDTO.matInfo.extraData |
| 34 | let labelDTO = JSON.parse(extraData) as AdvExtraData | 34 | let labelDTO = JSON.parse(extraData) as AdvExtraData |
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvLongImageComponent.ets
| @@ -21,10 +21,10 @@ export struct CardAdvLongImageComponent { | @@ -21,10 +21,10 @@ export struct CardAdvLongImageComponent { | ||
| 21 | @State compDTO: CompDTO = {} as CompDTO | 21 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | @State haveTitle: boolean = true | 22 | @State haveTitle: boolean = true |
| 23 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 24 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 25 | 25 | ||
| 26 | async aboutToAppear(): Promise<void> { | 26 | async aboutToAppear(): Promise<void> { |
| 27 | - this.loadImg = await onlyWifiLoadImg(); | 27 | + // this.loadImg = await onlyWifiLoadImg(); |
| 28 | this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7; | 28 | this.haveTitle = this.compDTO.matInfo.advSubType === CompStyle.Card_Adv_7; |
| 29 | } | 29 | } |
| 30 | 30 |
| @@ -23,10 +23,10 @@ export struct CardAdvSmallImageComponent { | @@ -23,10 +23,10 @@ export struct CardAdvSmallImageComponent { | ||
| 23 | @State compDTO: CompDTO = {} as CompDTO | 23 | @State compDTO: CompDTO = {} as CompDTO |
| 24 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true | 24 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true |
| 25 | pageModel: PageModel = new PageModel(); | 25 | pageModel: PageModel = new PageModel(); |
| 26 | - @State loadImg: boolean = false; | 26 | + @Prop loadImg: boolean = true; |
| 27 | 27 | ||
| 28 | async aboutToAppear(): Promise<void> { | 28 | async aboutToAppear(): Promise<void> { |
| 29 | - this.loadImg = await onlyWifiLoadImg(); | 29 | + // this.loadImg = await onlyWifiLoadImg(); |
| 30 | 30 | ||
| 31 | // 计算标题文本行数 | 31 | // 计算标题文本行数 |
| 32 | let screenWith = DisplayUtils.getDeviceWidth(); | 32 | let screenWith = DisplayUtils.getDeviceWidth(); |
| @@ -19,11 +19,11 @@ const TAG: string = 'Card2Component'; | @@ -19,11 +19,11 @@ const TAG: string = 'Card2Component'; | ||
| 19 | @Component | 19 | @Component |
| 20 | export struct CardAdvThreeImageComponent { | 20 | export struct CardAdvThreeImageComponent { |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 21 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | - @State loadImg: boolean = false; | 22 | + @Prop loadImg: boolean = true; |
| 23 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 24 | 24 | ||
| 25 | async aboutToAppear(): Promise<void> { | 25 | async aboutToAppear(): Promise<void> { |
| 26 | - this.loadImg = await onlyWifiLoadImg(); | 26 | + // this.loadImg = await onlyWifiLoadImg(); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | aboutToDisappear(): void { | 29 | aboutToDisappear(): void { |
| @@ -21,11 +21,11 @@ const TAG: string = 'Card2Component'; | @@ -21,11 +21,11 @@ const TAG: string = 'Card2Component'; | ||
| 21 | export struct CardAdvVideoComponent { | 21 | export struct CardAdvVideoComponent { |
| 22 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 23 | @State contentDTO: ContentDTO = new ContentDTO() | 23 | @State contentDTO: ContentDTO = new ContentDTO() |
| 24 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 25 | pageModel: PageModel = new PageModel(); | 25 | pageModel: PageModel = new PageModel(); |
| 26 | 26 | ||
| 27 | async aboutToAppear(): Promise<void> { | 27 | async aboutToAppear(): Promise<void> { |
| 28 | - this.loadImg = await onlyWifiLoadImg(); | 28 | + // this.loadImg = await onlyWifiLoadImg(); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | aboutToDisappear(): void { | 31 | aboutToDisappear(): void { |
| @@ -22,10 +22,10 @@ export struct CardAdvVideoExComponent { | @@ -22,10 +22,10 @@ export struct CardAdvVideoExComponent { | ||
| 22 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 23 | @State advExtraData: AdvExtraData = {} as AdvExtraData | 23 | @State advExtraData: AdvExtraData = {} as AdvExtraData |
| 24 | pageModel: PageModel = new PageModel(); | 24 | pageModel: PageModel = new PageModel(); |
| 25 | - @State loadImg: boolean = false; | 25 | + @Prop loadImg: boolean = true; |
| 26 | 26 | ||
| 27 | async aboutToAppear(): Promise<void> { | 27 | async aboutToAppear(): Promise<void> { |
| 28 | - this.loadImg = await onlyWifiLoadImg(); | 28 | + // this.loadImg = await onlyWifiLoadImg(); |
| 29 | 29 | ||
| 30 | let extraData = this.compDTO.matInfo.extraData | 30 | let extraData = this.compDTO.matInfo.extraData |
| 31 | let labelDTO = JSON.parse(extraData) as AdvExtraData | 31 | let labelDTO = JSON.parse(extraData) as AdvExtraData |
| @@ -23,7 +23,7 @@ export struct Card10Component { | @@ -23,7 +23,7 @@ export struct Card10Component { | ||
| 23 | @State pageId: string = ''; | 23 | @State pageId: string = ''; |
| 24 | @State pageName: string = ''; | 24 | @State pageName: string = ''; |
| 25 | @State contentDTO: ContentDTO = new ContentDTO(); | 25 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 26 | - @State loadImg: boolean = false; | 26 | + @Prop loadImg: boolean = true; |
| 27 | @ObjectLink compDTO: CompDTO | 27 | @ObjectLink compDTO: CompDTO |
| 28 | @State titleMarked: boolean = false; | 28 | @State titleMarked: boolean = false; |
| 29 | @State textArr: textItem[] = [] | 29 | @State textArr: textItem[] = [] |
| @@ -37,7 +37,7 @@ export struct Card10Component { | @@ -37,7 +37,7 @@ export struct Card10Component { | ||
| 37 | console.log('Card10Component-contentDTO', JSON.stringify(this.contentDTO)) | 37 | console.log('Card10Component-contentDTO', JSON.stringify(this.contentDTO)) |
| 38 | 38 | ||
| 39 | this.titleInit(); | 39 | this.titleInit(); |
| 40 | - this.loadImg = await onlyWifiLoadImg(); | 40 | + // this.loadImg = await onlyWifiLoadImg(); |
| 41 | this.initHideDetail(); | 41 | this.initHideDetail(); |
| 42 | 42 | ||
| 43 | if (!this.hideDetail) { | 43 | if (!this.hideDetail) { |
| @@ -207,7 +207,7 @@ export struct Card10ComponentTimelineItem { | @@ -207,7 +207,7 @@ export struct Card10ComponentTimelineItem { | ||
| 207 | slideItem: slideShows = new slideShows; | 207 | slideItem: slideShows = new slideShows; |
| 208 | @State contentDTO: ContentDTO = new ContentDTO(); | 208 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 209 | @ObjectLink compDTO: CompDTO | 209 | @ObjectLink compDTO: CompDTO |
| 210 | - @State loadImg: boolean = false; | 210 | + @Prop loadImg: boolean = true; |
| 211 | @State isRead: boolean = false; //已读状态 | 211 | @State isRead: boolean = false; //已读状态 |
| 212 | 212 | ||
| 213 | build() { | 213 | build() { |
| @@ -23,6 +23,7 @@ export struct Card12Component { | @@ -23,6 +23,7 @@ export struct Card12Component { | ||
| 23 | @State clicked: boolean = false; | 23 | @State clicked: boolean = false; |
| 24 | @State titleMarked: boolean = false; | 24 | @State titleMarked: boolean = false; |
| 25 | @State textArr: textItem[] = [] | 25 | @State textArr: textItem[] = [] |
| 26 | + @Prop loadImg: boolean = true; | ||
| 26 | 27 | ||
| 27 | aboutToAppear(): void { | 28 | aboutToAppear(): void { |
| 28 | this.titleInit(); | 29 | this.titleInit(); |
| @@ -48,7 +49,7 @@ export struct Card12Component { | @@ -48,7 +49,7 @@ export struct Card12Component { | ||
| 48 | contentDTO: this.contentDTO, | 49 | contentDTO: this.contentDTO, |
| 49 | compDTO: this.compDTO, | 50 | compDTO: this.compDTO, |
| 50 | pageId: this.pageId, | 51 | pageId: this.pageId, |
| 51 | - pageName: this.pageName | 52 | + pageName: this.pageName, loadImg: this.loadImg |
| 52 | } | 53 | } |
| 53 | ) | 54 | ) |
| 54 | } | 55 | } |
| @@ -21,7 +21,7 @@ export struct Card14Component { | @@ -21,7 +21,7 @@ export struct Card14Component { | ||
| 21 | @State pageId: string = ''; | 21 | @State pageId: string = ''; |
| 22 | @State pageName: string = ''; | 22 | @State pageName: string = ''; |
| 23 | @State contentDTO: ContentDTO = new ContentDTO(); | 23 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 24 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 25 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 26 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 27 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| @@ -30,7 +30,7 @@ export struct Card14Component { | @@ -30,7 +30,7 @@ export struct Card14Component { | ||
| 30 | this.titleInit(); | 30 | this.titleInit(); |
| 31 | const curRouter = router.getState().name; | 31 | const curRouter = router.getState().name; |
| 32 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 32 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 33 | - this.loadImg = await onlyWifiLoadImg(); | 33 | + // this.loadImg = await onlyWifiLoadImg(); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | titleInit() { | 36 | titleInit() { |
| @@ -50,7 +50,7 @@ export struct Card14Component { | @@ -50,7 +50,7 @@ export struct Card14Component { | ||
| 50 | contentDTO: this.contentDTO, | 50 | contentDTO: this.contentDTO, |
| 51 | compDTO: this.compDTO, | 51 | compDTO: this.compDTO, |
| 52 | pageId: this.pageId, | 52 | pageId: this.pageId, |
| 53 | - pageName: this.pageName | 53 | + pageName: this.pageName, loadImg: this.loadImg |
| 54 | } | 54 | } |
| 55 | ) | 55 | ) |
| 56 | } | 56 | } |
| @@ -25,7 +25,7 @@ export struct Card15Component { | @@ -25,7 +25,7 @@ export struct Card15Component { | ||
| 25 | @State pageId: string = ''; | 25 | @State pageId: string = ''; |
| 26 | @State pageName: string = ''; | 26 | @State pageName: string = ''; |
| 27 | @State contentDTO: ContentDTO = new ContentDTO(); | 27 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 28 | - @State loadImg: boolean = false; | 28 | + @Prop loadImg: boolean = true; |
| 29 | @State clicked: boolean = false; | 29 | @State clicked: boolean = false; |
| 30 | @State titleMarked: boolean = false; | 30 | @State titleMarked: boolean = false; |
| 31 | @State textArr: textItem[] = [] | 31 | @State textArr: textItem[] = [] |
| @@ -34,7 +34,7 @@ export struct Card15Component { | @@ -34,7 +34,7 @@ export struct Card15Component { | ||
| 34 | this.titleInit(); | 34 | this.titleInit(); |
| 35 | const curRouter = router.getState().name; | 35 | const curRouter = router.getState().name; |
| 36 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 36 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 37 | - this.loadImg = await onlyWifiLoadImg(); | 37 | + // this.loadImg = await onlyWifiLoadImg(); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | titleInit() { | 40 | titleInit() { |
| @@ -53,7 +53,7 @@ export struct Card15Component { | @@ -53,7 +53,7 @@ export struct Card15Component { | ||
| 53 | contentDTO: this.contentDTO, | 53 | contentDTO: this.contentDTO, |
| 54 | compDTO: this.compDTO, | 54 | compDTO: this.compDTO, |
| 55 | pageId: this.pageId, | 55 | pageId: this.pageId, |
| 56 | - pageName: this.pageName | 56 | + pageName: this.pageName, loadImg: this.loadImg |
| 57 | } | 57 | } |
| 58 | ) //新闻标题 | 58 | ) //新闻标题 |
| 59 | if (this.contentDTO.newsTitle) { | 59 | if (this.contentDTO.newsTitle) { |
| @@ -27,7 +27,7 @@ export struct Card16Component { | @@ -27,7 +27,7 @@ export struct Card16Component { | ||
| 27 | @State pageId: string = ''; | 27 | @State pageId: string = ''; |
| 28 | @State pageName: string = ''; | 28 | @State pageName: string = ''; |
| 29 | @State contentDTO: ContentDTO = new ContentDTO(); | 29 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 30 | - @State loadImg: boolean = false; | 30 | + @Prop loadImg: boolean = true; |
| 31 | @State clicked: boolean = false; | 31 | @State clicked: boolean = false; |
| 32 | @State titleMarked: boolean = false; | 32 | @State titleMarked: boolean = false; |
| 33 | @State textArr: textItem[] = [] | 33 | @State textArr: textItem[] = [] |
| @@ -36,7 +36,7 @@ export struct Card16Component { | @@ -36,7 +36,7 @@ export struct Card16Component { | ||
| 36 | this.titleInit(); | 36 | this.titleInit(); |
| 37 | const curRouter = router.getState().name; | 37 | const curRouter = router.getState().name; |
| 38 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 38 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 39 | - this.loadImg = await onlyWifiLoadImg(); | 39 | + // this.loadImg = await onlyWifiLoadImg(); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | titleInit() { | 42 | titleInit() { |
| @@ -56,7 +56,7 @@ export struct Card16Component { | @@ -56,7 +56,7 @@ export struct Card16Component { | ||
| 56 | contentDTO: this.contentDTO, | 56 | contentDTO: this.contentDTO, |
| 57 | compDTO: this.compDTO, | 57 | compDTO: this.compDTO, |
| 58 | pageId: this.pageId, | 58 | pageId: this.pageId, |
| 59 | - pageName: this.pageName | 59 | + pageName: this.pageName, loadImg: this.loadImg |
| 60 | } | 60 | } |
| 61 | ) | 61 | ) |
| 62 | } | 62 | } |
| @@ -159,10 +159,10 @@ interface radiusType { | @@ -159,10 +159,10 @@ interface radiusType { | ||
| 159 | @Component | 159 | @Component |
| 160 | struct createImg { | 160 | struct createImg { |
| 161 | @Prop contentDTO: ContentDTO | 161 | @Prop contentDTO: ContentDTO |
| 162 | - @State loadImg: boolean = false; | 162 | + @Prop loadImg: boolean = true; |
| 163 | 163 | ||
| 164 | async aboutToAppear(): Promise<void> { | 164 | async aboutToAppear(): Promise<void> { |
| 165 | - this.loadImg = await onlyWifiLoadImg(); | 165 | + // this.loadImg = await onlyWifiLoadImg(); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | build() { | 168 | build() { |
| @@ -21,7 +21,7 @@ export struct Card17Component { | @@ -21,7 +21,7 @@ export struct Card17Component { | ||
| 21 | @State pageId: string = ''; | 21 | @State pageId: string = ''; |
| 22 | @State pageName: string = ''; | 22 | @State pageName: string = ''; |
| 23 | @State contentDTO: ContentDTO = new ContentDTO(); | 23 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 24 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 25 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 26 | @ObjectLink compDTO: CompDTO | 26 | @ObjectLink compDTO: CompDTO |
| 27 | @State titleMarked: boolean = false; | 27 | @State titleMarked: boolean = false; |
| @@ -32,7 +32,7 @@ export struct Card17Component { | @@ -32,7 +32,7 @@ export struct Card17Component { | ||
| 32 | this.titleInit(); | 32 | this.titleInit(); |
| 33 | const curRouter = router.getState().name; | 33 | const curRouter = router.getState().name; |
| 34 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 34 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 35 | - this.loadImg = await onlyWifiLoadImg(); | 35 | + // this.loadImg = await onlyWifiLoadImg(); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | titleInit() { | 38 | titleInit() { |
| @@ -23,6 +23,7 @@ export struct Card19Component { | @@ -23,6 +23,7 @@ export struct Card19Component { | ||
| 23 | @State clicked: boolean = false; | 23 | @State clicked: boolean = false; |
| 24 | @State titleMarked: boolean = false; | 24 | @State titleMarked: boolean = false; |
| 25 | @State textArr: textItem[] = [] | 25 | @State textArr: textItem[] = [] |
| 26 | + @Prop loadImg: boolean = true; | ||
| 26 | isPeopleShipHome: boolean = false; | 27 | isPeopleShipHome: boolean = false; |
| 27 | 28 | ||
| 28 | async aboutToAppear(): Promise<void> { | 29 | async aboutToAppear(): Promise<void> { |
| @@ -49,7 +50,7 @@ export struct Card19Component { | @@ -49,7 +50,7 @@ export struct Card19Component { | ||
| 49 | compDTO: this.compDTO, | 50 | compDTO: this.compDTO, |
| 50 | pageId: this.pageId, | 51 | pageId: this.pageId, |
| 51 | pageName: this.pageName, | 52 | pageName: this.pageName, |
| 52 | - isPeopleShipHome:this.isPeopleShipHome | 53 | + isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg |
| 53 | } | 54 | } |
| 54 | ) // 标题 | 55 | ) // 标题 |
| 55 | if (this.contentDTO.newsTitle) { | 56 | if (this.contentDTO.newsTitle) { |
| @@ -82,7 +83,7 @@ export struct Card19Component { | @@ -82,7 +83,7 @@ export struct Card19Component { | ||
| 82 | }) | 83 | }) |
| 83 | } | 84 | } |
| 84 | // 图片-从无图到9图展示 | 85 | // 图片-从无图到9图展示 |
| 85 | - createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls }) | 86 | + createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls, loadImg: this.loadImg }) |
| 86 | 87 | ||
| 87 | CarderInteraction({ contentDTO: this.contentDTO }) | 88 | CarderInteraction({ contentDTO: this.contentDTO }) |
| 88 | //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 | 89 | //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 |
| @@ -121,7 +122,7 @@ interface picProps { | @@ -121,7 +122,7 @@ interface picProps { | ||
| 121 | @Component | 122 | @Component |
| 122 | struct createImg { | 123 | struct createImg { |
| 123 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] | 124 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] |
| 124 | - @State loadImg: boolean = false; | 125 | + @Prop loadImg: boolean = true; |
| 125 | @State onePicW: number = 0; // 只有一张图时候图片的宽度 | 126 | @State onePicW: number = 0; // 只有一张图时候图片的宽度 |
| 126 | @State onePicH: number = 0; // 只有一张图时候图片的高度 | 127 | @State onePicH: number = 0; // 只有一张图时候图片的高度 |
| 127 | 128 | ||
| @@ -131,7 +132,7 @@ struct createImg { | @@ -131,7 +132,7 @@ struct createImg { | ||
| 131 | fullUrl: '' | 132 | fullUrl: '' |
| 132 | } as FullColumnImgUrlDTO) | 133 | } as FullColumnImgUrlDTO) |
| 133 | } | 134 | } |
| 134 | - this.loadImg = await onlyWifiLoadImg(); | 135 | + // this.loadImg = await onlyWifiLoadImg(); |
| 135 | console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls)) | 136 | console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls)) |
| 136 | } | 137 | } |
| 137 | 138 |
| @@ -26,6 +26,7 @@ export struct Card20Component { | @@ -26,6 +26,7 @@ export struct Card20Component { | ||
| 26 | @State clicked: boolean = false; | 26 | @State clicked: boolean = false; |
| 27 | @State titleMarked: boolean = false; | 27 | @State titleMarked: boolean = false; |
| 28 | @State textArr: textItem[] = [] | 28 | @State textArr: textItem[] = [] |
| 29 | + @Prop loadImg: boolean = true; | ||
| 29 | isPeopleShipHome: boolean = false; | 30 | isPeopleShipHome: boolean = false; |
| 30 | 31 | ||
| 31 | aboutToAppear(): void { | 32 | aboutToAppear(): void { |
| @@ -51,7 +52,7 @@ export struct Card20Component { | @@ -51,7 +52,7 @@ export struct Card20Component { | ||
| 51 | compDTO: this.compDTO, | 52 | compDTO: this.compDTO, |
| 52 | pageId: this.pageId, | 53 | pageId: this.pageId, |
| 53 | pageName: this.pageName, | 54 | pageName: this.pageName, |
| 54 | - isPeopleShipHome:this.isPeopleShipHome | 55 | + isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg |
| 55 | } | 56 | } |
| 56 | ) // 标题 | 57 | ) // 标题 |
| 57 | if (this.contentDTO.newsTitle) { | 58 | if (this.contentDTO.newsTitle) { |
| @@ -103,7 +104,7 @@ export struct Card20Component { | @@ -103,7 +104,7 @@ export struct Card20Component { | ||
| 103 | }.alignContent(Alignment.TopStart) | 104 | }.alignContent(Alignment.TopStart) |
| 104 | } | 105 | } |
| 105 | if (this.contentDTO.fullColumnImgUrls[0]) { | 106 | if (this.contentDTO.fullColumnImgUrls[0]) { |
| 106 | - createImg({ contentDTO: this.contentDTO }) | 107 | + createImg({ contentDTO: this.contentDTO, loadImg: this.loadImg }) |
| 107 | } | 108 | } |
| 108 | CarderInteraction({contentDTO: this.contentDTO}) | 109 | CarderInteraction({contentDTO: this.contentDTO}) |
| 109 | //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 | 110 | //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 |
| @@ -137,11 +138,11 @@ interface radiusType { | @@ -137,11 +138,11 @@ interface radiusType { | ||
| 137 | @Component | 138 | @Component |
| 138 | struct createImg { | 139 | struct createImg { |
| 139 | @Prop contentDTO: ContentDTO | 140 | @Prop contentDTO: ContentDTO |
| 140 | - @State loadImg: boolean = false; | 141 | + @Prop loadImg: boolean = true; |
| 141 | 142 | ||
| 142 | async aboutToAppear(): Promise<void> { | 143 | async aboutToAppear(): Promise<void> { |
| 143 | console.log("createImg", JSON.stringify(this.contentDTO.fullColumnImgUrls)) | 144 | console.log("createImg", JSON.stringify(this.contentDTO.fullColumnImgUrls)) |
| 144 | - this.loadImg = await onlyWifiLoadImg(); | 145 | + // this.loadImg = await onlyWifiLoadImg(); |
| 145 | } | 146 | } |
| 146 | 147 | ||
| 147 | 148 |
| @@ -21,7 +21,7 @@ export struct Card21Component { | @@ -21,7 +21,7 @@ export struct Card21Component { | ||
| 21 | @State pageId: string = ''; | 21 | @State pageId: string = ''; |
| 22 | @State pageName: string = ''; | 22 | @State pageName: string = ''; |
| 23 | @State contentDTO: ContentDTO = new ContentDTO(); | 23 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 24 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 25 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 26 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 27 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| @@ -30,7 +30,7 @@ export struct Card21Component { | @@ -30,7 +30,7 @@ export struct Card21Component { | ||
| 30 | this.titleInit(); | 30 | this.titleInit(); |
| 31 | const curRouter = router.getState().name; | 31 | const curRouter = router.getState().name; |
| 32 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 32 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 33 | - this.loadImg = await onlyWifiLoadImg(); | 33 | + // this.loadImg = await onlyWifiLoadImg(); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | titleInit() { | 36 | titleInit() { |
| @@ -49,7 +49,7 @@ export struct Card21Component { | @@ -49,7 +49,7 @@ export struct Card21Component { | ||
| 49 | contentDTO: this.contentDTO, | 49 | contentDTO: this.contentDTO, |
| 50 | compDTO: this.compDTO, | 50 | compDTO: this.compDTO, |
| 51 | pageId: this.pageId, | 51 | pageId: this.pageId, |
| 52 | - pageName: this.pageName | 52 | + pageName: this.pageName, loadImg: this.loadImg |
| 53 | } | 53 | } |
| 54 | ) // 中间内容 | 54 | ) // 中间内容 |
| 55 | Grid() { | 55 | Grid() { |
| @@ -6,7 +6,6 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; | @@ -6,7 +6,6 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; | ||
| 6 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; | 6 | import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; |
| 7 | import { Notes } from './notes'; | 7 | import { Notes } from './notes'; |
| 8 | import { getNotesContentWidth } from '../../utils/FuncUtils' | 8 | import { getNotesContentWidth } from '../../utils/FuncUtils' |
| 9 | -import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 10 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | 9 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; |
| 11 | import { InfomationCardClick } from '../../utils/infomationCardClick'; | 10 | import { InfomationCardClick } from '../../utils/infomationCardClick'; |
| 12 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; | 11 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; |
| @@ -27,7 +26,7 @@ export struct Card2Component { | @@ -27,7 +26,7 @@ export struct Card2Component { | ||
| 27 | @State pageId: string = ''; | 26 | @State pageId: string = ''; |
| 28 | @State pageName: string = ''; | 27 | @State pageName: string = ''; |
| 29 | @State contentDTO: ContentDTO = new ContentDTO(); | 28 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 30 | - @State loadImg: boolean = false; | 29 | + @Prop loadImg: boolean = true; |
| 31 | @State clicked: boolean = false; | 30 | @State clicked: boolean = false; |
| 32 | @ObjectLink compDTO: CompDTO | 31 | @ObjectLink compDTO: CompDTO |
| 33 | @State titleMarked: boolean = false; | 32 | @State titleMarked: boolean = false; |
| @@ -37,7 +36,6 @@ export struct Card2Component { | @@ -37,7 +36,6 @@ export struct Card2Component { | ||
| 37 | this.titleInit(); | 36 | this.titleInit(); |
| 38 | const curRouter = router.getState().name; | 37 | const curRouter = router.getState().name; |
| 39 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 38 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 40 | - this.loadImg = await onlyWifiLoadImg(); | ||
| 41 | } | 39 | } |
| 42 | 40 | ||
| 43 | titleInit() { | 41 | titleInit() { |
| @@ -16,6 +16,7 @@ import router from '@ohos.router' | @@ -16,6 +16,7 @@ import router from '@ohos.router' | ||
| 16 | */ | 16 | */ |
| 17 | @Component | 17 | @Component |
| 18 | export struct Card3Component { | 18 | export struct Card3Component { |
| 19 | + @Prop loadImg: boolean = true; | ||
| 19 | @State pageId: string = ''; | 20 | @State pageId: string = ''; |
| 20 | @State pageName: string = ''; | 21 | @State pageName: string = ''; |
| 21 | @State contentDTO: ContentDTO = new ContentDTO(); | 22 | @State contentDTO: ContentDTO = new ContentDTO(); |
| @@ -25,7 +25,7 @@ export struct Card4Component { | @@ -25,7 +25,7 @@ export struct Card4Component { | ||
| 25 | @State pageId: string = ''; | 25 | @State pageId: string = ''; |
| 26 | @State pageName: string = ''; | 26 | @State pageName: string = ''; |
| 27 | @State contentDTO: ContentDTO = new ContentDTO(); | 27 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 28 | - @State loadImg: boolean = false; | 28 | + @Prop loadImg: boolean = true; |
| 29 | @State clicked: boolean = false; | 29 | @State clicked: boolean = false; |
| 30 | @State titleMarked: boolean = false; | 30 | @State titleMarked: boolean = false; |
| 31 | @State textArr: textItem[] = [] | 31 | @State textArr: textItem[] = [] |
| @@ -35,7 +35,7 @@ export struct Card4Component { | @@ -35,7 +35,7 @@ export struct Card4Component { | ||
| 35 | const curRouter = router.getState().name; | 35 | const curRouter = router.getState().name; |
| 36 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 36 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 37 | this.titleInit(); | 37 | this.titleInit(); |
| 38 | - this.loadImg = await onlyWifiLoadImg(); | 38 | + // this.loadImg = await onlyWifiLoadImg(); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | titleInit() { | 41 | titleInit() { |
| 1 | import { ContentDTO, CompDTO } from 'wdBean'; | 1 | import { ContentDTO, CompDTO } from 'wdBean'; |
| 2 | import { ProcessUtils } from 'wdRouter'; | 2 | import { ProcessUtils } from 'wdRouter'; |
| 3 | -import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 4 | import { Notes } from './notes'; | 3 | import { Notes } from './notes'; |
| 5 | import { getNotesContentWidth } from '../../utils/FuncUtils' | 4 | import { getNotesContentWidth } from '../../utils/FuncUtils' |
| 6 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | 5 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; |
| @@ -22,7 +21,7 @@ export struct Card5Component { | @@ -22,7 +21,7 @@ export struct Card5Component { | ||
| 22 | @State contentDTO: ContentDTO = new ContentDTO(); | 21 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 23 | @ObjectLink compDTO: CompDTO | 22 | @ObjectLink compDTO: CompDTO |
| 24 | @Prop titleShowPolicy: number | string | 23 | @Prop titleShowPolicy: number | string |
| 25 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 26 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 27 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 28 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| @@ -33,7 +32,6 @@ export struct Card5Component { | @@ -33,7 +32,6 @@ export struct Card5Component { | ||
| 33 | // console.log(TAG, 'this.contentDTO.newsTitle', this.contentDTO.newsTitle) | 32 | // console.log(TAG, 'this.contentDTO.newsTitle', this.contentDTO.newsTitle) |
| 34 | const curRouter = router.getState().name; | 33 | const curRouter = router.getState().name; |
| 35 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 34 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 36 | - this.loadImg = await onlyWifiLoadImg(); | ||
| 37 | 35 | ||
| 38 | this.titleInit(); | 36 | this.titleInit(); |
| 39 | } | 37 | } |
| @@ -5,7 +5,6 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; | @@ -5,7 +5,6 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; | ||
| 5 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; | 5 | import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; |
| 6 | import { Notes } from './notes'; | 6 | import { Notes } from './notes'; |
| 7 | import { getNotesContentWidth } from '../../utils/FuncUtils'; | 7 | import { getNotesContentWidth } from '../../utils/FuncUtils'; |
| 8 | -import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 9 | import { Logger } from 'wdKit/Index'; | 8 | import { Logger } from 'wdKit/Index'; |
| 10 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | 9 | import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; |
| 11 | import { InfomationCardClick } from '../../utils/infomationCardClick' | 10 | import { InfomationCardClick } from '../../utils/infomationCardClick' |
| @@ -22,7 +21,7 @@ export struct Card6Component { | @@ -22,7 +21,7 @@ export struct Card6Component { | ||
| 22 | @State pageId: string = ''; | 21 | @State pageId: string = ''; |
| 23 | @State textHeight: number = 0 ; //获取文本的高度 | 22 | @State textHeight: number = 0 ; //获取文本的高度 |
| 24 | @State pageName: string = ''; | 23 | @State pageName: string = ''; |
| 25 | - @State loadImg: boolean = false; | 24 | + @Prop loadImg: boolean = true; |
| 26 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 27 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 28 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| @@ -32,7 +31,6 @@ export struct Card6Component { | @@ -32,7 +31,6 @@ export struct Card6Component { | ||
| 32 | async aboutToAppear(): Promise<void> { | 31 | async aboutToAppear(): Promise<void> { |
| 33 | console.log('Card6Component', JSON.stringify(this.contentDTO)) | 32 | console.log('Card6Component', JSON.stringify(this.contentDTO)) |
| 34 | this.titleInit(); | 33 | this.titleInit(); |
| 35 | - this.loadImg = await onlyWifiLoadImg(); | ||
| 36 | const curRouter = router.getState().name; | 34 | const curRouter = router.getState().name; |
| 37 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 35 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 38 | } | 36 | } |
| @@ -17,11 +17,11 @@ const TAG: string = 'Card9Component'; | @@ -17,11 +17,11 @@ const TAG: string = 'Card9Component'; | ||
| 17 | 17 | ||
| 18 | @Component | 18 | @Component |
| 19 | export struct Card9Component { | 19 | export struct Card9Component { |
| 20 | + @Prop loadImg: boolean = true; | ||
| 20 | @ObjectLink compDTO: CompDTO | 21 | @ObjectLink compDTO: CompDTO |
| 21 | @State pageId: string = ''; | 22 | @State pageId: string = ''; |
| 22 | @State pageName: string = ''; | 23 | @State pageName: string = ''; |
| 23 | @State contentDTO: ContentDTO = new ContentDTO(); | 24 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 24 | - // @State loadImg: boolean = true; | ||
| 25 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 26 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 27 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| @@ -99,7 +99,7 @@ export struct Card9Component { | @@ -99,7 +99,7 @@ export struct Card9Component { | ||
| 99 | } | 99 | } |
| 100 | // 大图 | 100 | // 大图 |
| 101 | Stack() { | 101 | Stack() { |
| 102 | - Image(this.contentDTO.coverUrl) | 102 | + Image(this.loadImg ? this.contentDTO.coverUrl : '') |
| 103 | .backgroundColor(0xf5f5f5) | 103 | .backgroundColor(0xf5f5f5) |
| 104 | .width('100%') | 104 | .width('100%') |
| 105 | .height(133) | 105 | .height(133) |
| @@ -19,7 +19,7 @@ export struct LiveBigImage01Component { | @@ -19,7 +19,7 @@ export struct LiveBigImage01Component { | ||
| 19 | @State pageId: string = ''; | 19 | @State pageId: string = ''; |
| 20 | @State pageName: string = ''; | 20 | @State pageName: string = ''; |
| 21 | @State contentDTO: ContentDTO = new ContentDTO(); | 21 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 22 | - @State loadImg: boolean = false; | 22 | + @Prop loadImg: boolean = true; |
| 23 | @State clicked: boolean = false; | 23 | @State clicked: boolean = false; |
| 24 | index: number = 0 | 24 | index: number = 0 |
| 25 | @State isLoadingAttention: boolean = false | 25 | @State isLoadingAttention: boolean = false |
| @@ -29,7 +29,7 @@ export struct LiveBigImage01Component { | @@ -29,7 +29,7 @@ export struct LiveBigImage01Component { | ||
| 29 | const curRouter = router.getState().name; | 29 | const curRouter = router.getState().name; |
| 30 | this.curRouter = curRouter; | 30 | this.curRouter = curRouter; |
| 31 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 31 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 32 | - this.loadImg = await onlyWifiLoadImg(); | 32 | + // this.loadImg = await onlyWifiLoadImg(); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | build() { | 35 | build() { |
| @@ -17,17 +17,17 @@ export struct LiveBigImage02Component { | @@ -17,17 +17,17 @@ export struct LiveBigImage02Component { | ||
| 17 | @State pageId: string = ''; | 17 | @State pageId: string = ''; |
| 18 | @State pageName: string = ''; | 18 | @State pageName: string = ''; |
| 19 | @State contentDTO: ContentDTO = new ContentDTO(); | 19 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 20 | - @State loadImg: boolean = false; | 20 | + @Prop loadImg: boolean = true; |
| 21 | @State clicked: boolean = false; | 21 | @State clicked: boolean = false; |
| 22 | index: number = 0 | 22 | index: number = 0 |
| 23 | async aboutToAppear() { | 23 | async aboutToAppear() { |
| 24 | const curRouter = router.getState().name; | 24 | const curRouter = router.getState().name; |
| 25 | this.clicked = hasClicked(this.contentDTO.objectId,curRouter) | 25 | this.clicked = hasClicked(this.contentDTO.objectId,curRouter) |
| 26 | - this.loadImg = await onlyWifiLoadImg(); | 26 | + // this.loadImg = await onlyWifiLoadImg(); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | async aboutToReuse() { | 29 | async aboutToReuse() { |
| 30 | - this.loadImg = await onlyWifiLoadImg(); | 30 | + // this.loadImg = await onlyWifiLoadImg(); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | 33 |
| @@ -20,13 +20,13 @@ export struct SearchContentComponent { | @@ -20,13 +20,13 @@ export struct SearchContentComponent { | ||
| 20 | @State pageId: string = ''; | 20 | @State pageId: string = ''; |
| 21 | @State pageName: string = ''; | 21 | @State pageName: string = ''; |
| 22 | @State contentDTO: ContentDTO = new ContentDTO(); | 22 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 23 | - @State loadImg: boolean = false; | 23 | + @Prop loadImg: boolean = true; |
| 24 | @State clicked: boolean = false; | 24 | @State clicked: boolean = false; |
| 25 | @State textArr: textItem[] = [] | 25 | @State textArr: textItem[] = [] |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | async aboutToAppear(): Promise<void> { | 28 | async aboutToAppear(): Promise<void> { |
| 29 | - this.loadImg = await onlyWifiLoadImg(); | 29 | + // this.loadImg = await onlyWifiLoadImg(); |
| 30 | this.titleInit(); | 30 | this.titleInit(); |
| 31 | 31 | ||
| 32 | const curRouter = router.getState().name; | 32 | const curRouter = router.getState().name; |
| @@ -54,6 +54,7 @@ export struct ZhCarouselLayout01 { | @@ -54,6 +54,7 @@ export struct ZhCarouselLayout01 { | ||
| 54 | @State firstWd: number = 0 | 54 | @State firstWd: number = 0 |
| 55 | @State SecondWd: number = 0 | 55 | @State SecondWd: number = 0 |
| 56 | @State swiperIndex: number = 0 | 56 | @State swiperIndex: number = 0 |
| 57 | + @Prop loadImg: boolean = true; | ||
| 57 | 58 | ||
| 58 | private data: MyDataSource = new MyDataSource([]) | 59 | private data: MyDataSource = new MyDataSource([]) |
| 59 | 60 | ||
| @@ -100,7 +101,7 @@ export struct ZhCarouselLayout01 { | @@ -100,7 +101,7 @@ export struct ZhCarouselLayout01 { | ||
| 100 | CarouselLayout01CardView({ | 101 | CarouselLayout01CardView({ |
| 101 | item: item, | 102 | item: item, |
| 102 | length: this.filterAtv().length, | 103 | length: this.filterAtv().length, |
| 103 | - showPicBorderRadius: this.filterAtv().length == 1 | 104 | + showPicBorderRadius: this.filterAtv().length == 1, loadImg: this.loadImg |
| 104 | }) | 105 | }) |
| 105 | .onClick((event: ClickEvent) => { | 106 | .onClick((event: ClickEvent) => { |
| 106 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 107 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| @@ -180,7 +181,7 @@ export struct ZhCarouselLayout01 { | @@ -180,7 +181,7 @@ export struct ZhCarouselLayout01 { | ||
| 180 | CarouselLayout01CardView({ | 181 | CarouselLayout01CardView({ |
| 181 | item: this.filterAtv()[0], | 182 | item: this.filterAtv()[0], |
| 182 | length: 1, | 183 | length: 1, |
| 183 | - showPicBorderRadius: this.filterAtv().length == 1 | 184 | + showPicBorderRadius: this.filterAtv().length == 1, loadImg: this.loadImg |
| 184 | }) | 185 | }) |
| 185 | .onClick((event: ClickEvent) => { | 186 | .onClick((event: ClickEvent) => { |
| 186 | InfomationCardClick.track(this.compDTO, this.filterAtv()[0], this.pageId, this.pageName) | 187 | InfomationCardClick.track(this.compDTO, this.filterAtv()[0], this.pageId, this.pageName) |
| @@ -214,13 +215,13 @@ export struct ZhCarouselLayout01 { | @@ -214,13 +215,13 @@ export struct ZhCarouselLayout01 { | ||
| 214 | 215 | ||
| 215 | @Component | 216 | @Component |
| 216 | struct CarouselLayout01CardView { | 217 | struct CarouselLayout01CardView { |
| 217 | - @State loadImg: boolean = false; | 218 | + @Prop loadImg: boolean = true; |
| 218 | private item: ContentDTO = new ContentDTO(); | 219 | private item: ContentDTO = new ContentDTO(); |
| 219 | private length: number = 1; // 轮播图数量 | 220 | private length: number = 1; // 轮播图数量 |
| 220 | private showPicBorderRadius: boolean = false; | 221 | private showPicBorderRadius: boolean = false; |
| 221 | 222 | ||
| 222 | async aboutToAppear(): Promise<void> { | 223 | async aboutToAppear(): Promise<void> { |
| 223 | - this.loadImg = await onlyWifiLoadImg(); | 224 | + // this.loadImg = await onlyWifiLoadImg(); |
| 224 | } | 225 | } |
| 225 | 226 | ||
| 226 | build() { | 227 | build() { |
| @@ -18,11 +18,11 @@ export struct ZhGridLayout02NewsContent { | @@ -18,11 +18,11 @@ export struct ZhGridLayout02NewsContent { | ||
| 18 | @State pageName: string = ''; | 18 | @State pageName: string = ''; |
| 19 | @ObjectLink compDTO: CompDTO | 19 | @ObjectLink compDTO: CompDTO |
| 20 | @State operDataList: ContentDTO[] = [] | 20 | @State operDataList: ContentDTO[] = [] |
| 21 | - @State loadImg: boolean = false; | 21 | + @Prop loadImg: boolean = true; |
| 22 | 22 | ||
| 23 | async aboutToAppear(): Promise<void> { | 23 | async aboutToAppear(): Promise<void> { |
| 24 | 24 | ||
| 25 | - this.loadImg = await onlyWifiLoadImg(); | 25 | + // this.loadImg = await onlyWifiLoadImg(); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | build() { | 28 | build() { |
| @@ -19,13 +19,13 @@ export struct ZhGridLayout03 { | @@ -19,13 +19,13 @@ export struct ZhGridLayout03 { | ||
| 19 | @State pageId: string = ''; | 19 | @State pageId: string = ''; |
| 20 | @State pageName: string = ''; | 20 | @State pageName: string = ''; |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 21 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | - @State loadImg: boolean = false; | 22 | + @Prop loadImg: boolean = true; |
| 23 | 23 | ||
| 24 | async aboutToAppear(): Promise<void> { | 24 | async aboutToAppear(): Promise<void> { |
| 25 | if (this.compDTO.operDataList) { | 25 | if (this.compDTO.operDataList) { |
| 26 | listSize = this.compDTO.operDataList.length > 5 ? 4 : this.compDTO.operDataList.length; | 26 | listSize = this.compDTO.operDataList.length > 5 ? 4 : this.compDTO.operDataList.length; |
| 27 | } | 27 | } |
| 28 | - this.loadImg = await onlyWifiLoadImg(); | 28 | + // this.loadImg = await onlyWifiLoadImg(); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | build() { | 31 | build() { |
| @@ -22,7 +22,7 @@ export struct ZhSingleColumn09 { | @@ -22,7 +22,7 @@ export struct ZhSingleColumn09 { | ||
| 22 | @State activeIndexs: Array<number> = [] | 22 | @State activeIndexs: Array<number> = [] |
| 23 | @State operDataList: ContentDTO[] = this.compDTO?.operDataList || [] | 23 | @State operDataList: ContentDTO[] = this.compDTO?.operDataList || [] |
| 24 | @StorageLink('selfClosed') selfClosed: boolean = false | 24 | @StorageLink('selfClosed') selfClosed: boolean = false |
| 25 | - @State loadImg: boolean = false; | 25 | + @Prop loadImg: boolean = true; |
| 26 | @State compIndex: number = 0; | 26 | @State compIndex: number = 0; |
| 27 | @State currentOperDataListIndex: number = 0; //记录换一换点击次数 | 27 | @State currentOperDataListIndex: number = 0; //记录换一换点击次数 |
| 28 | @State visitedIndices: Set<number> = new Set<number>(); | 28 | @State visitedIndices: Set<number> = new Set<number>(); |
| @@ -30,7 +30,7 @@ export struct ZhSingleColumn09 { | @@ -30,7 +30,7 @@ export struct ZhSingleColumn09 { | ||
| 30 | @State currentDataList: ContentDTO[] = [] | 30 | @State currentDataList: ContentDTO[] = [] |
| 31 | 31 | ||
| 32 | async aboutToAppear(): Promise<void> { | 32 | async aboutToAppear(): Promise<void> { |
| 33 | - this.loadImg = await onlyWifiLoadImg(); | 33 | + // this.loadImg = await onlyWifiLoadImg(); |
| 34 | // this.operDataList = this.shuffleArray(this.compDTO?.operDataList) | 34 | // this.operDataList = this.shuffleArray(this.compDTO?.operDataList) |
| 35 | this.operDataList = this.padData(this.compDTO?.operDataList) | 35 | this.operDataList = this.padData(this.compDTO?.operDataList) |
| 36 | this.currentOperDataListIndex = this.compDTO?.operDataList.length | 36 | this.currentOperDataListIndex = this.compDTO?.operDataList.length |
| @@ -16,6 +16,7 @@ const TAG = 'Zh_Single_Row-02' | @@ -16,6 +16,7 @@ const TAG = 'Zh_Single_Row-02' | ||
| 16 | 16 | ||
| 17 | @Component | 17 | @Component |
| 18 | export struct ZhSingleRow02 { | 18 | export struct ZhSingleRow02 { |
| 19 | + @Prop loadImg: boolean = true; | ||
| 19 | @State pageId: string = ''; | 20 | @State pageId: string = ''; |
| 20 | @State pageName: string = ''; | 21 | @State pageName: string = ''; |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| @@ -94,7 +95,7 @@ export struct ZhSingleRow02 { | @@ -94,7 +95,7 @@ export struct ZhSingleRow02 { | ||
| 94 | index, | 95 | index, |
| 95 | compDTO: this.compDTO, | 96 | compDTO: this.compDTO, |
| 96 | pageId: this.pageId, | 97 | pageId: this.pageId, |
| 97 | - pageName: this.pageName | 98 | + pageName: this.pageName, loadImg: this.loadImg |
| 98 | }) | 99 | }) |
| 99 | .margin({ right: 8, left: index === 0 ? 16 : 0 }) | 100 | .margin({ right: 8, left: index === 0 ? 16 : 0 }) |
| 100 | }) | 101 | }) |
| @@ -226,10 +227,10 @@ struct CreatorItem { | @@ -226,10 +227,10 @@ struct CreatorItem { | ||
| 226 | @Prop item: ContentDTO | 227 | @Prop item: ContentDTO |
| 227 | @Prop index: number | 228 | @Prop index: number |
| 228 | @State rmhIsAttention: number = 0 | 229 | @State rmhIsAttention: number = 0 |
| 229 | - @State loadImg: boolean = false; | 230 | + @Prop loadImg: boolean = true; |
| 230 | 231 | ||
| 231 | async aboutToAppear(): Promise<void> { | 232 | async aboutToAppear(): Promise<void> { |
| 232 | - this.loadImg = await onlyWifiLoadImg(); | 233 | + // this.loadImg = await onlyWifiLoadImg(); |
| 233 | } | 234 | } |
| 234 | 235 | ||
| 235 | build() { | 236 | build() { |
| @@ -41,7 +41,7 @@ export struct ZhSingleRow03 { | @@ -41,7 +41,7 @@ export struct ZhSingleRow03 { | ||
| 41 | @State compDTO: CompDTO = {} as CompDTO | 41 | @State compDTO: CompDTO = {} as CompDTO |
| 42 | // @State reserveStatus: reserveItem[] = [] | 42 | // @State reserveStatus: reserveItem[] = [] |
| 43 | @State reservedIds: string[] = []; | 43 | @State reservedIds: string[] = []; |
| 44 | - @State loadImg: boolean = false; | 44 | + @Prop loadImg: boolean = true; |
| 45 | @State initMoreWidth: number = 22; | 45 | @State initMoreWidth: number = 22; |
| 46 | @State moreWidth:number = 22 | 46 | @State moreWidth:number = 22 |
| 47 | @State moreTips: string = '' | 47 | @State moreTips: string = '' |
| @@ -93,7 +93,7 @@ export struct ZhSingleRow03 { | @@ -93,7 +93,7 @@ export struct ZhSingleRow03 { | ||
| 93 | if (HttpUtils.isLogin()) { | 93 | if (HttpUtils.isLogin()) { |
| 94 | this.getReserveState(); | 94 | this.getReserveState(); |
| 95 | } | 95 | } |
| 96 | - this.loadImg = await onlyWifiLoadImg(); | 96 | + // this.loadImg = await onlyWifiLoadImg(); |
| 97 | 97 | ||
| 98 | // 获取预约 | 98 | // 获取预约 |
| 99 | EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => { | 99 | EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => { |
| @@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'; | @@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'; | ||
| 11 | 11 | ||
| 12 | @Component | 12 | @Component |
| 13 | export struct ZhSingleRow04 { | 13 | export struct ZhSingleRow04 { |
| 14 | + @Prop loadImg: boolean = true; | ||
| 14 | @State pageId: string = ''; | 15 | @State pageId: string = ''; |
| 15 | @State pageName: string = ''; | 16 | @State pageName: string = ''; |
| 16 | @State compDTO: CompDTO = {} as CompDTO | 17 | @State compDTO: CompDTO = {} as CompDTO |
| @@ -26,12 +26,12 @@ export struct ZhSingleRow06 { | @@ -26,12 +26,12 @@ export struct ZhSingleRow06 { | ||
| 26 | @State newsStatusOfUser: batchLikeAndCollectResult = { | 26 | @State newsStatusOfUser: batchLikeAndCollectResult = { |
| 27 | likeStatus: '0' | 27 | likeStatus: '0' |
| 28 | } as batchLikeAndCollectResult // 点赞、收藏状态 | 28 | } as batchLikeAndCollectResult // 点赞、收藏状态 |
| 29 | - @State loadImg: boolean = false; | 29 | + @Prop loadImg: boolean = true; |
| 30 | 30 | ||
| 31 | async aboutToAppear(): Promise<void> { | 31 | async aboutToAppear(): Promise<void> { |
| 32 | console.log('Zh_Single_Row-06', JSON.stringify(this.compDTO.operDataList[0]?.commentInfo)) | 32 | console.log('Zh_Single_Row-06', JSON.stringify(this.compDTO.operDataList[0]?.commentInfo)) |
| 33 | this.getInteractDataStatus() | 33 | this.getInteractDataStatus() |
| 34 | - this.loadImg = await onlyWifiLoadImg(); | 34 | + // this.loadImg = await onlyWifiLoadImg(); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | 37 |
| @@ -8,12 +8,12 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog' | @@ -8,12 +8,12 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog' | ||
| 8 | @Component | 8 | @Component |
| 9 | export struct AppointmentListChildComponent { | 9 | export struct AppointmentListChildComponent { |
| 10 | @ObjectLink item: MineAppointmentItem | 10 | @ObjectLink item: MineAppointmentItem |
| 11 | - @State loadImg: boolean = false; | 11 | + @Prop loadImg: boolean = true; |
| 12 | confirmCallback: (item: MineAppointmentItem) => void = () => { | 12 | confirmCallback: (item: MineAppointmentItem) => void = () => { |
| 13 | 13 | ||
| 14 | } | 14 | } |
| 15 | async aboutToAppear(): Promise<void> { | 15 | async aboutToAppear(): Promise<void> { |
| 16 | - this.loadImg = await onlyWifiLoadImg(); | 16 | + // this.loadImg = await onlyWifiLoadImg(); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | dialogController: CustomDialogController = new CustomDialogController({ | 19 | dialogController: CustomDialogController = new CustomDialogController({ |
| @@ -399,7 +399,7 @@ export struct PaperSingleColumn999CardView { | @@ -399,7 +399,7 @@ export struct PaperSingleColumn999CardView { | ||
| 399 | @State isRead: boolean = false;//已读状态 | 399 | @State isRead: boolean = false;//已读状态 |
| 400 | @State interactData: InteractDataDTO = new InteractDataDTO | 400 | @State interactData: InteractDataDTO = new InteractDataDTO |
| 401 | @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[] | 401 | @Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[] |
| 402 | - @State loadImg: boolean = false; | 402 | + @Prop loadImg: boolean = true; |
| 403 | 403 | ||
| 404 | getPublishTime(): string { | 404 | getPublishTime(): string { |
| 405 | const publishTimestamp = parseInt(this.item?.publishTime) | 405 | const publishTimestamp = parseInt(this.item?.publishTime) |
| @@ -627,7 +627,7 @@ export struct PaperSingleColumn999CardView { | @@ -627,7 +627,7 @@ export struct PaperSingleColumn999CardView { | ||
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | async aboutToAppear(): Promise<void> { | 629 | async aboutToAppear(): Promise<void> { |
| 630 | - this.loadImg = await onlyWifiLoadImg(); | 630 | + // this.loadImg = await onlyWifiLoadImg(); |
| 631 | this.onChangeCommentList() | 631 | this.onChangeCommentList() |
| 632 | this.isRead = hasClicked(this.item.objectId, '') | 632 | this.isRead = hasClicked(this.item.objectId, '') |
| 633 | } | 633 | } |
| @@ -15,6 +15,7 @@ import { NoMoreBean } from './NoMoreBean'; | @@ -15,6 +15,7 @@ import { NoMoreBean } from './NoMoreBean'; | ||
| 15 | import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; | 15 | import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; |
| 16 | import RefreshLayout from '../refresh/RefreshLayout'; | 16 | import RefreshLayout from '../refresh/RefreshLayout'; |
| 17 | import { GrayManageModel } from '../../viewmodel/GrayManageModel'; | 17 | import { GrayManageModel } from '../../viewmodel/GrayManageModel'; |
| 18 | +import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 18 | 19 | ||
| 19 | const TAG = 'PageComponent'; | 20 | const TAG = 'PageComponent'; |
| 20 | 21 | ||
| @@ -301,7 +302,7 @@ export struct PageComponent { | @@ -301,7 +302,7 @@ export struct PageComponent { | ||
| 301 | } | 302 | } |
| 302 | } | 303 | } |
| 303 | 304 | ||
| 304 | - onAutoRefresh() { | 305 | + async onAutoRefresh() { |
| 305 | if (this.navIndex != this.currentTopNavSelectedIndex) { | 306 | if (this.navIndex != this.currentTopNavSelectedIndex) { |
| 306 | return | 307 | return |
| 307 | } | 308 | } |
| @@ -315,13 +316,14 @@ export struct PageComponent { | @@ -315,13 +316,14 @@ export struct PageComponent { | ||
| 315 | if (this.timer) { | 316 | if (this.timer) { |
| 316 | clearTimeout(this.timer) | 317 | clearTimeout(this.timer) |
| 317 | } | 318 | } |
| 318 | - this.timer = setTimeout(() => { | 319 | + this.timer = setTimeout(async () => { |
| 319 | Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`); | 320 | Logger.info(TAG, `getData id: ${this.pageId} , ${this.channelId} , navIndex: ${this.currentTopNavSelectedIndex}`); |
| 320 | this.pageModel.pageId = this.pageId; | 321 | this.pageModel.pageId = this.pageId; |
| 321 | this.pageModel.groupId = this.pageId; | 322 | this.pageModel.groupId = this.pageId; |
| 322 | this.pageModel.channelId = this.channelId; | 323 | this.pageModel.channelId = this.channelId; |
| 323 | this.pageModel.currentPage = 1; | 324 | this.pageModel.currentPage = 1; |
| 324 | this.pageModel.pageTotalCompSize = 0; | 325 | this.pageModel.pageTotalCompSize = 0; |
| 326 | + this.pageModel.loadImg = await onlyWifiLoadImg() | ||
| 325 | PageHelper.getInitCacheData(this.pageModel, this.pageAdvModel).then(() => { | 327 | PageHelper.getInitCacheData(this.pageModel, this.pageAdvModel).then(() => { |
| 326 | this.pageTrackBean.pageId = this.pageId | 328 | this.pageTrackBean.pageId = this.pageId |
| 327 | this.pageTrackBean.pageName = this.pageModel.pageInfo.name | 329 | this.pageTrackBean.pageName = this.pageModel.pageInfo.name |
| @@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | @@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo' | ||
| 6 | 6 | ||
| 7 | @Component | 7 | @Component |
| 8 | export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | 8 | export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { |
| 9 | + @Prop loadImg: boolean = true; | ||
| 9 | @State compDTO: CompDTO = {} as CompDTO | 10 | @State compDTO: CompDTO = {} as CompDTO |
| 10 | @State pageId: string = ''; | 11 | @State pageId: string = ''; |
| 11 | @State pageName: string = ''; | 12 | @State pageName: string = ''; |
| @@ -102,7 +103,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -102,7 +103,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 102 | ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => { | 103 | ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => { |
| 103 | Column() { | 104 | Column() { |
| 104 | Stack() { | 105 | Stack() { |
| 105 | - Image(item.coverUrl) | 106 | + Image(this.loadImg ? item.coverUrl : '') |
| 106 | .aspectRatio(1.5) | 107 | .aspectRatio(1.5) |
| 107 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) | 108 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) |
| 108 | .objectFit(ImageFit.Contain) | 109 | .objectFit(ImageFit.Contain) |
| @@ -7,6 +7,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'; | @@ -7,6 +7,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'; | ||
| 7 | 7 | ||
| 8 | @Component | 8 | @Component |
| 9 | export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { | 9 | export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { |
| 10 | + @Prop loadImg: boolean = true; | ||
| 10 | @State pageId: string = ''; | 11 | @State pageId: string = ''; |
| 11 | @State pageName: string = ''; | 12 | @State pageName: string = ''; |
| 12 | @State compDTO: CompDTO = {} as CompDTO | 13 | @State compDTO: CompDTO = {} as CompDTO |
| @@ -45,7 +46,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { | @@ -45,7 +46,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { | ||
| 45 | .width('100%') | 46 | .width('100%') |
| 46 | 47 | ||
| 47 | 48 | ||
| 48 | - Image(this.compDTO.operDataList[0].coverUrl) | 49 | + Image(this.loadImg ? this.compDTO.operDataList[0].coverUrl : '') |
| 49 | .aspectRatio(1.5) | 50 | .aspectRatio(1.5) |
| 50 | .width('100%') | 51 | .width('100%') |
| 51 | .borderRadius(4) | 52 | .borderRadius(4) |
| @@ -17,7 +17,7 @@ export struct LiveHorizontalCardComponent { | @@ -17,7 +17,7 @@ export struct LiveHorizontalCardComponent { | ||
| 17 | @State pageId: string = ''; | 17 | @State pageId: string = ''; |
| 18 | @State pageName: string = ''; | 18 | @State pageName: string = ''; |
| 19 | @State compDTO: CompDTO = {} as CompDTO | 19 | @State compDTO: CompDTO = {} as CompDTO |
| 20 | - @State loadImg: boolean = false; | 20 | + @Prop loadImg: boolean = true; |
| 21 | @State initMoreWidth: number = 22; | 21 | @State initMoreWidth: number = 22; |
| 22 | @State moreWidth:number = 22 | 22 | @State moreWidth:number = 22 |
| 23 | @State moreTips: string = '' | 23 | @State moreTips: string = '' |
| @@ -101,7 +101,7 @@ export struct LiveHorizontalCardComponent { | @@ -101,7 +101,7 @@ export struct LiveHorizontalCardComponent { | ||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | async aboutToAppear(): Promise<void> { | 103 | async aboutToAppear(): Promise<void> { |
| 104 | - this.loadImg = await onlyWifiLoadImg(); | 104 | + // this.loadImg = await onlyWifiLoadImg(); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | showMore() { | 107 | showMore() { |
| @@ -16,6 +16,7 @@ import { common } from '@kit.AbilityKit'; | @@ -16,6 +16,7 @@ import { common } from '@kit.AbilityKit'; | ||
| 16 | import { CacheData } from 'wdNetwork/Index'; | 16 | import { CacheData } from 'wdNetwork/Index'; |
| 17 | import { closeLoadMore } from '../utils/PullUpLoadMore'; | 17 | import { closeLoadMore } from '../utils/PullUpLoadMore'; |
| 18 | import { webview } from '@kit.ArkWeb'; | 18 | import { webview } from '@kit.ArkWeb'; |
| 19 | +import { onlyWifiLoadImg } from '../utils/lazyloadImg'; | ||
| 19 | 20 | ||
| 20 | const TAG = 'PageHelper'; | 21 | const TAG = 'PageHelper'; |
| 21 | 22 | ||
| @@ -108,9 +109,10 @@ export class PageHelper { | @@ -108,9 +109,10 @@ export class PageHelper { | ||
| 108 | } | 109 | } |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | - getPageInfo(pageModel: PageModel, pageAdvModel: PageAdModel) { | 112 | + async getPageInfo(pageModel: PageModel, pageAdvModel: PageAdModel) { |
| 112 | let cacheIsSame = false; | 113 | let cacheIsSame = false; |
| 113 | pageModel.currentPage = 1; | 114 | pageModel.currentPage = 1; |
| 115 | + pageModel.loadImg = await onlyWifiLoadImg(); | ||
| 114 | if (pageModel.pageType == 1) { | 116 | if (pageModel.pageType == 1) { |
| 115 | PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize, pageModel.extra).then((liveReviewDTO) => { | 117 | PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize, pageModel.extra).then((liveReviewDTO) => { |
| 116 | if (liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0) { | 118 | if (liveReviewDTO == null || liveReviewDTO.list == null || liveReviewDTO.list.length == 0) { |
| @@ -84,6 +84,8 @@ export default class PageModel { | @@ -84,6 +84,8 @@ export default class PageModel { | ||
| 84 | // 第一页,最后一个comp下标,用于区分分页加载(下拉刷新,清除分页数据) | 84 | // 第一页,最后一个comp下标,用于区分分页加载(下拉刷新,清除分页数据) |
| 85 | firstPageEndIndex = -1 | 85 | firstPageEndIndex = -1 |
| 86 | 86 | ||
| 87 | + loadImg: boolean = true; | ||
| 88 | + | ||
| 87 | /** | 89 | /** |
| 88 | * 简单复制业务数据 | 90 | * 简单复制业务数据 |
| 89 | */ | 91 | */ |
-
Please register or login to post a comment