Showing
4 changed files
with
27 additions
and
4 deletions
| @@ -4,7 +4,8 @@ import { | @@ -4,7 +4,8 @@ import { | ||
| 4 | PageInfoBean, | 4 | PageInfoBean, |
| 5 | ContentDTO, | 5 | ContentDTO, |
| 6 | contentListParams, | 6 | contentListParams, |
| 7 | - InteractDataDTO, TopicInfo | 7 | + InteractDataDTO, TopicInfo, |
| 8 | + CompInfoBean | ||
| 8 | } from 'wdBean'; | 9 | } from 'wdBean'; |
| 9 | import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; | 10 | import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; |
| 10 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | 11 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; |
| @@ -137,8 +138,6 @@ export struct MorningEveningPaperComponent { | @@ -137,8 +138,6 @@ export struct MorningEveningPaperComponent { | ||
| 137 | let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) //"25091" | 138 | let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) //"25091" |
| 138 | this.pageInfoBean = pageInfoBean; | 139 | this.pageInfoBean = pageInfoBean; |
| 139 | 140 | ||
| 140 | - let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) | ||
| 141 | - | ||
| 142 | // this.title = this.pageInfoBean?.topicInfo?.title | 141 | // this.title = this.pageInfoBean?.topicInfo?.title |
| 143 | this.setComponentTitle() | 142 | this.setComponentTitle() |
| 144 | this.topicInfo = this.pageInfoBean?.topicInfo | 143 | this.topicInfo = this.pageInfoBean?.topicInfo |
| @@ -158,6 +157,17 @@ export struct MorningEveningPaperComponent { | @@ -158,6 +157,17 @@ export struct MorningEveningPaperComponent { | ||
| 158 | this.setComponentBgColor(coverUrl) | 157 | this.setComponentBgColor(coverUrl) |
| 159 | 158 | ||
| 160 | // this.compInfoBean = compInfoBean | 159 | // this.compInfoBean = compInfoBean |
| 160 | + //信息流缓存 | ||
| 161 | + let BeanString = SPHelper.default.getSync('MorningEveningComp'+this.dailyPaperTopicPageId,'') as string | ||
| 162 | + let compInfoBean = {} as CompInfoBean | ||
| 163 | + if (BeanString.length > 0) { | ||
| 164 | + compInfoBean = JSON.parse(BeanString) | ||
| 165 | + }else { | ||
| 166 | + SPHelper.default.delete('MorningEveningComp'+this.dailyPaperTopicPageId) | ||
| 167 | + compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) | ||
| 168 | + SPHelper.default.saveSync('MorningEveningComp'+this.dailyPaperTopicPageId,JSON.stringify(compInfoBean)) | ||
| 169 | + } | ||
| 170 | + | ||
| 161 | console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) | 171 | console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) |
| 162 | if (compInfoBean?.compList[0]) { | 172 | if (compInfoBean?.compList[0]) { |
| 163 | this.compListItem = compInfoBean?.compList[0] | 173 | this.compListItem = compInfoBean?.compList[0] |
| @@ -180,6 +190,11 @@ export struct MorningEveningPaperComponent { | @@ -180,6 +190,11 @@ export struct MorningEveningPaperComponent { | ||
| 180 | this.progressVal = Math.floor(position * 100 / duration); | 190 | this.progressVal = Math.floor(position * 100 / duration); |
| 181 | } | 191 | } |
| 182 | this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true | 192 | this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true |
| 193 | + | ||
| 194 | + if (BeanString.length > 0) { | ||
| 195 | + compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) | ||
| 196 | + SPHelper.default.saveSync('MorningEveningComp'+this.dailyPaperTopicPageId,JSON.stringify(compInfoBean)) | ||
| 197 | + } | ||
| 183 | } catch (exception) { | 198 | } catch (exception) { |
| 184 | this.isContentFailed = true | 199 | this.isContentFailed = true |
| 185 | 200 |
| @@ -20,6 +20,9 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel | @@ -20,6 +20,9 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel | ||
| 20 | @Entry | 20 | @Entry |
| 21 | @Component | 21 | @Component |
| 22 | struct MyCollectionListPage { | 22 | struct MyCollectionListPage { |
| 23 | + //RmhTitle组件刷新需要设置 该界面为用户主页,所以不需要刷新操作 | ||
| 24 | + @Provide pageShow: number = -1 | ||
| 25 | + | ||
| 23 | @State private browSingModel: PageModel = new PageModel() | 26 | @State private browSingModel: PageModel = new PageModel() |
| 24 | isloading : boolean = false | 27 | isloading : boolean = false |
| 25 | @Provide isEditState:boolean = false | 28 | @Provide isEditState:boolean = false |
| @@ -60,6 +63,7 @@ struct MyCollectionListPage { | @@ -60,6 +63,7 @@ struct MyCollectionListPage { | ||
| 60 | } | 63 | } |
| 61 | 64 | ||
| 62 | onPageShow(){ | 65 | onPageShow(){ |
| 66 | + this.pageShow = Math.random() | ||
| 63 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | 67 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() |
| 64 | } | 68 | } |
| 65 | 69 |
| @@ -173,7 +173,7 @@ export struct PlayUIComponent { | @@ -173,7 +173,7 @@ export struct PlayUIComponent { | ||
| 173 | .width('100%') | 173 | .width('100%') |
| 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') | 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') |
| 175 | .padding({ | 175 | .padding({ |
| 176 | - top: 15, | 176 | + top: 11, |
| 177 | bottom: 6, | 177 | bottom: 6, |
| 178 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', | 178 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', |
| 179 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp' | 179 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp' |
| @@ -76,6 +76,10 @@ export struct PlayerProgressView { | @@ -76,6 +76,10 @@ export struct PlayerProgressView { | ||
| 76 | // .markAnchor({ x: 0, y: '100%' }) | 76 | // .markAnchor({ x: 0, y: '100%' }) |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | + aboutToDisappear(): void { | ||
| 80 | + clearTimeout(this.timer) | ||
| 81 | + } | ||
| 82 | + | ||
| 79 | build() { | 83 | build() { |
| 80 | Stack() { | 84 | Stack() { |
| 81 | this.playerLoadingBuilder() | 85 | this.playerLoadingBuilder() |
-
Please register or login to post a comment