Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
4 changed files
with
19 additions
and
1 deletions
| @@ -85,6 +85,9 @@ export struct WdWebLocalComponent { | @@ -85,6 +85,9 @@ export struct WdWebLocalComponent { | ||
| 85 | eventHandler.pageEndBlock = this.onPageEnd.bind(this) | 85 | eventHandler.pageEndBlock = this.onPageEnd.bind(this) |
| 86 | if (eventHandler.pageLoadEnd) { | 86 | if (eventHandler.pageLoadEnd) { |
| 87 | this.onPageEnd() | 87 | this.onPageEnd() |
| 88 | + | ||
| 89 | + // 开始复用 | ||
| 90 | + this.startResuse() | ||
| 88 | } | 91 | } |
| 89 | eventHandler.currentPageOperateBlock = this.currentPageOperate.bind(this) | 92 | eventHandler.currentPageOperateBlock = this.currentPageOperate.bind(this) |
| 90 | } | 93 | } |
| @@ -206,6 +209,14 @@ export struct WdWebLocalComponent { | @@ -206,6 +209,14 @@ export struct WdWebLocalComponent { | ||
| 206 | } | 209 | } |
| 207 | } | 210 | } |
| 208 | 211 | ||
| 212 | + startResuse() { | ||
| 213 | + let params = {'event':NativeCallH5Event.NativeCallH5EventStartLoadingOnReuse} as eventParams; | ||
| 214 | + let jsonString = JSON.stringify(params); | ||
| 215 | + this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => { | ||
| 216 | + Logger.debug(TAG, "开始复用,H5回调" + data); | ||
| 217 | + }) | ||
| 218 | + } | ||
| 219 | + | ||
| 209 | startPlay() { | 220 | startPlay() { |
| 210 | this.cancelProgressTimer() | 221 | this.cancelProgressTimer() |
| 211 | this.controller.start() | 222 | this.controller.start() |
| 1 | import { BottomNavi, CommonConstants, ViewType } from 'wdConstant'; | 1 | import { BottomNavi, CommonConstants, ViewType } from 'wdConstant'; |
| 2 | import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit'; | 2 | import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit'; |
| 3 | -import { EmptyComponent } from '../view/EmptyComponent'; | 3 | +import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent'; |
| 4 | import PageModel from '../../viewmodel/PageModel'; | 4 | import PageModel from '../../viewmodel/PageModel'; |
| 5 | import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh'; | 5 | import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh'; |
| 6 | import LoadMoreLayout from './LoadMoreLayout'; | 6 | import LoadMoreLayout from './LoadMoreLayout'; |
| @@ -317,6 +317,11 @@ export struct PageComponent { | @@ -317,6 +317,11 @@ export struct PageComponent { | ||
| 317 | // console.log(TAG, 'page onAutoRefresh111 ' + this.needload) | 317 | // console.log(TAG, 'page onAutoRefresh111 ' + this.needload) |
| 318 | if (this.needload) { | 318 | if (this.needload) { |
| 319 | this.getData(); | 319 | this.getData(); |
| 320 | + }else{ | ||
| 321 | + let netStatus = NetworkUtil.isNetConnected() | ||
| 322 | + if(this.pageModel.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork && netStatus ){ | ||
| 323 | + this.onAutoRefresh() | ||
| 324 | + } | ||
| 320 | } | 325 | } |
| 321 | this.needload = false; | 326 | this.needload = false; |
| 322 | } | 327 | } |
| @@ -120,6 +120,7 @@ export class PageHelper { | @@ -120,6 +120,7 @@ export class PageHelper { | ||
| 120 | pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; | 120 | pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; |
| 121 | return; | 121 | return; |
| 122 | } else { | 122 | } else { |
| 123 | + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_Default | ||
| 123 | //更新数据 | 124 | //更新数据 |
| 124 | pageModel.compList.addItems(liveReviewDTO.list); | 125 | pageModel.compList.addItems(liveReviewDTO.list); |
| 125 | this.refreshUIEnd(pageModel, true); | 126 | this.refreshUIEnd(pageModel, true); |
| @@ -138,6 +139,7 @@ export class PageHelper { | @@ -138,6 +139,7 @@ export class PageHelper { | ||
| 138 | this.refreshUIEnd(pageModel, false) | 139 | this.refreshUIEnd(pageModel, false) |
| 139 | return; | 140 | return; |
| 140 | } | 141 | } |
| 142 | + pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_Default | ||
| 141 | pageModel.pageInfo = pageInfo; | 143 | pageModel.pageInfo = pageInfo; |
| 142 | if (pageInfo.md5 == pageModel.displayPageInfoMd5) { | 144 | if (pageInfo.md5 == pageModel.displayPageInfoMd5) { |
| 143 | // 缓存一致,不解析 | 145 | // 缓存一致,不解析 |
No preview for this file type
-
Please register or login to post a comment