Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
10 changed files
with
82 additions
and
66 deletions
| @@ -44,10 +44,14 @@ export struct ZhSingleRow04 { | @@ -44,10 +44,14 @@ export struct ZhSingleRow04 { | ||
| 44 | .onClick(() => { | 44 | .onClick(() => { |
| 45 | if (this.compDTO?.objectType === '11') { | 45 | if (this.compDTO?.objectType === '11') { |
| 46 | ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | 46 | ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) |
| 47 | - } else if (this.compDTO?.objectType === '5') { | ||
| 48 | - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl) | ||
| 49 | - } else if (this.compDTO?.objectType === '6') { | ||
| 50 | - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) | 47 | + } else { |
| 48 | + const contentDTO: ContentDTO = { | ||
| 49 | + objectId: this.compDTO.objectId, | ||
| 50 | + objectType: this.compDTO.objectType, | ||
| 51 | + linkUrl: this.compDTO.linkUrl, | ||
| 52 | + pageId: this.compDTO.pageId | ||
| 53 | + } as ContentDTO | ||
| 54 | + ProcessUtils.processPage(contentDTO) | ||
| 51 | } | 55 | } |
| 52 | }) | 56 | }) |
| 53 | } | 57 | } |
| @@ -84,6 +88,7 @@ export struct ZhSingleRow04 { | @@ -84,6 +88,7 @@ export struct ZhSingleRow04 { | ||
| 84 | .scrollBar(BarState.Off) | 88 | .scrollBar(BarState.Off) |
| 85 | .width(CommonConstants.FULL_PARENT) | 89 | .width(CommonConstants.FULL_PARENT) |
| 86 | .height(166) | 90 | .height(166) |
| 91 | + .edgeEffect(EdgeEffect.None) | ||
| 87 | } | 92 | } |
| 88 | .width(CommonConstants.FULL_WIDTH) | 93 | .width(CommonConstants.FULL_WIDTH) |
| 89 | .backgroundColor($r("app.color.white")) | 94 | .backgroundColor($r("app.color.white")) |
| @@ -86,6 +86,7 @@ export struct TopNavigationComponentNew { | @@ -86,6 +86,7 @@ export struct TopNavigationComponentNew { | ||
| 86 | navIndex: index, | 86 | navIndex: index, |
| 87 | pageId: navItem?.pageId + '', | 87 | pageId: navItem?.pageId + '', |
| 88 | channelId: navItem?.channelId + '', | 88 | channelId: navItem?.channelId + '', |
| 89 | + autoRefresh: this.autoRefresh2Page | ||
| 89 | }) | 90 | }) |
| 90 | } else | 91 | } else |
| 91 | if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) { | 92 | if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) { |
| @@ -14,7 +14,6 @@ import { | @@ -14,7 +14,6 @@ import { | ||
| 14 | import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; | 14 | import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; |
| 15 | import { channelSkeleton } from '../skeleton/channelSkeleton' | 15 | import { channelSkeleton } from '../skeleton/channelSkeleton' |
| 16 | import { EmptyComponent } from '../view/EmptyComponent'; | 16 | import { EmptyComponent } from '../view/EmptyComponent'; |
| 17 | -import { ErrorComponent } from '../view/ErrorComponent'; | ||
| 18 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 17 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 19 | import MinePageDatasModel from '../../model/MinePageDatasModel'; | 18 | import MinePageDatasModel from '../../model/MinePageDatasModel'; |
| 20 | import { FollowListDetailRequestItem } from '../../viewmodel/FollowListDetailRequestItem'; | 19 | import { FollowListDetailRequestItem } from '../../viewmodel/FollowListDetailRequestItem'; |
| @@ -26,13 +25,14 @@ import PageHelper from '../../viewmodel/PageHelper'; | @@ -26,13 +25,14 @@ import PageHelper from '../../viewmodel/PageHelper'; | ||
| 26 | import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentionContentListTopComponent' | 25 | import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentionContentListTopComponent' |
| 27 | import { CardParser } from '../CardParser' | 26 | import { CardParser } from '../CardParser' |
| 28 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; | 27 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 29 | - | 28 | +const TAG = 'PeopleShipMainComponent'; |
| 30 | @Preview | 29 | @Preview |
| 31 | @Component | 30 | @Component |
| 32 | export struct PeopleShipMainComponent { | 31 | export struct PeopleShipMainComponent { |
| 33 | @State private pageModel: PageModel = new PageModel(); | 32 | @State private pageModel: PageModel = new PageModel(); |
| 34 | @State private pageAdvModel: PageAdModel = new PageAdModel(); | 33 | @State private pageAdvModel: PageAdModel = new PageAdModel(); |
| 35 | - | 34 | + // 自动刷新通知 |
| 35 | + @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 | ||
| 36 | navIndex: number = 0; | 36 | navIndex: number = 0; |
| 37 | pageId: string = ""; | 37 | pageId: string = ""; |
| 38 | channelId: string = ""; | 38 | channelId: string = ""; |
| @@ -416,4 +416,13 @@ export struct PeopleShipMainComponent { | @@ -416,4 +416,13 @@ export struct PeopleShipMainComponent { | ||
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | + onAutoRefresh(changedPropertyName: string) { | ||
| 420 | + if (this.navIndex != this.currentTopNavSelectedIndex) { | ||
| 421 | + return | ||
| 422 | + } | ||
| 423 | + // 当前页面,自动刷新数据 | ||
| 424 | + Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh) | ||
| 425 | + this.currentPage = 1 | ||
| 426 | + this.getData() | ||
| 427 | + } | ||
| 419 | } | 428 | } |
| @@ -138,15 +138,16 @@ struct ChangeBindPhonePage { | @@ -138,15 +138,16 @@ struct ChangeBindPhonePage { | ||
| 138 | Row() { | 138 | Row() { |
| 139 | Text("确认") | 139 | Text("确认") |
| 140 | .layoutWeight(1) | 140 | .layoutWeight(1) |
| 141 | - .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF") | 141 | + .fontColor("#FFFFFF") |
| 142 | .borderRadius(4) | 142 | .borderRadius(4) |
| 143 | .fontSize(18) | 143 | .fontSize(18) |
| 144 | .textAlign(TextAlign.Center) | 144 | .textAlign(TextAlign.Center) |
| 145 | .fontWeight(FontWeight.Medium) | 145 | .fontWeight(FontWeight.Medium) |
| 146 | .margin({ top: 26 }) | 146 | .margin({ top: 26 }) |
| 147 | .height(44) | 147 | .height(44) |
| 148 | - .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800") | 148 | + .backgroundColor("#ED2800") |
| 149 | .enabled(this.isSubmit ? true : false) | 149 | .enabled(this.isSubmit ? true : false) |
| 150 | + .opacity(this.isSubmit ? 1: 0.6) | ||
| 150 | .onClick(() => { | 151 | .onClick(() => { |
| 151 | TrackingButton.click("changePhoneNumberPageConfirm",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum) | 152 | TrackingButton.click("changePhoneNumberPageConfirm",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum) |
| 152 | this.changeBindPhone() | 153 | this.changeBindPhone() |
| @@ -60,15 +60,16 @@ struct ForgetPasswordPage { | @@ -60,15 +60,16 @@ struct ForgetPasswordPage { | ||
| 60 | Row() { | 60 | Row() { |
| 61 | Text("确认") | 61 | Text("确认") |
| 62 | .layoutWeight(1) | 62 | .layoutWeight(1) |
| 63 | - .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF") | 63 | + .fontColor("#FFFFFF") |
| 64 | .borderRadius(4) | 64 | .borderRadius(4) |
| 65 | .fontSize(18) | 65 | .fontSize(18) |
| 66 | .textAlign(TextAlign.Center) | 66 | .textAlign(TextAlign.Center) |
| 67 | .fontWeight(FontWeight.Medium) | 67 | .fontWeight(FontWeight.Medium) |
| 68 | .margin({ top: 26 }) | 68 | .margin({ top: 26 }) |
| 69 | .height(44) | 69 | .height(44) |
| 70 | - .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800") | 70 | + .backgroundColor("#ED2800") |
| 71 | .enabled(this.isSubmit ? true : false) | 71 | .enabled(this.isSubmit ? true : false) |
| 72 | + .opacity(this.isSubmit ? 1: 0.6) | ||
| 72 | .onClick(() => { | 73 | .onClick(() => { |
| 73 | this.checkVerifyCode() | 74 | this.checkVerifyCode() |
| 74 | }) | 75 | }) |
| @@ -161,7 +161,7 @@ struct LoginPage { | @@ -161,7 +161,7 @@ struct LoginPage { | ||
| 161 | Row() { | 161 | Row() { |
| 162 | Text("登录") | 162 | Text("登录") |
| 163 | .borderRadius(4) | 163 | .borderRadius(4) |
| 164 | - .fontColor(this.isSubmit ? "#FFFFFFFF" : "#66FFFFFF") | 164 | + .fontColor("#FFFFFF") |
| 165 | .fontSize(`${this.calcHeight(31)}lpx`) | 165 | .fontSize(`${this.calcHeight(31)}lpx`) |
| 166 | .fontWeight(400) | 166 | .fontWeight(400) |
| 167 | .margin({ top: `${this.calcHeight(20)}` }) | 167 | .margin({ top: `${this.calcHeight(20)}` }) |
| @@ -169,7 +169,8 @@ struct LoginPage { | @@ -169,7 +169,8 @@ struct LoginPage { | ||
| 169 | .height(44) | 169 | .height(44) |
| 170 | .textAlign(TextAlign.Center) | 170 | .textAlign(TextAlign.Center) |
| 171 | .width("100%") | 171 | .width("100%") |
| 172 | - .backgroundColor(this.isSubmit ? "#FFED2800" : "#99ED2800") | 172 | + .backgroundColor("#ED2800") |
| 173 | + .opacity(this.isSubmit ? 1: 0.6) | ||
| 173 | .onClick(() => { | 174 | .onClick(() => { |
| 174 | if (!this.isSubmit) { | 175 | if (!this.isSubmit) { |
| 175 | return | 176 | return |
| @@ -189,30 +189,30 @@ struct ModifyPasswordPage { | @@ -189,30 +189,30 @@ struct ModifyPasswordPage { | ||
| 189 | .height(`${this.calcHeight(85)}lpx`) | 189 | .height(`${this.calcHeight(85)}lpx`) |
| 190 | .alignItems(HorizontalAlign.Start) | 190 | .alignItems(HorizontalAlign.Start) |
| 191 | 191 | ||
| 192 | + | ||
| 192 | Row() { | 193 | Row() { |
| 193 | - Button( { type: ButtonType.Normal, stateEffect: true }){ | ||
| 194 | Text("确认") | 194 | Text("确认") |
| 195 | - .fontColor("#fff") | ||
| 196 | - .fontSize(`${this.calcHeight(35)}lpx`) | ||
| 197 | - .lineHeight(`${this.calcHeight(50)}lpx`) | ||
| 198 | - .opacity(this.btnStatus ?1:0.5) | ||
| 199 | - } | ||
| 200 | - .width('100%') | ||
| 201 | - .height(`${this.calcHeight(80)}lpx`) | ||
| 202 | - .backgroundColor(this.btnStatus ? '#ED2800' : '#99ED2800') | ||
| 203 | - .enabled(this.btnStatus ?true:false) | ||
| 204 | - .borderRadius('4vp') | 195 | + .layoutWeight(1) |
| 196 | + .fontColor("#FFFFFF") | ||
| 197 | + .borderRadius(4) | ||
| 198 | + .fontSize(18) | ||
| 199 | + .textAlign(TextAlign.Center) | ||
| 200 | + .fontWeight(FontWeight.Medium) | ||
| 201 | + .margin({ top: 26 }) | ||
| 202 | + .height(44) | ||
| 203 | + .backgroundColor("#ED2800") | ||
| 204 | + .enabled(this.btnStatus ? true : false) | ||
| 205 | + .opacity(this.btnStatus ? 1: 0.6) | ||
| 205 | .onClick(() => { | 206 | .onClick(() => { |
| 206 | if(this.btnStatus){ | 207 | if(this.btnStatus){ |
| 207 | TrackingButton.click("changePasswordPageConfirm",TrackConstants.PageName.Change_Passwd,TrackConstants.PageName.Change_Passwd) | 208 | TrackingButton.click("changePasswordPageConfirm",TrackConstants.PageName.Change_Passwd,TrackConstants.PageName.Change_Passwd) |
| 208 | this.submit() | 209 | this.submit() |
| 209 | } | 210 | } |
| 210 | }) | 211 | }) |
| 211 | - } | 212 | + }.width('100%') |
| 212 | .padding({top:`${this.calcHeight(25)}lpx`}) | 213 | .padding({top:`${this.calcHeight(25)}lpx`}) |
| 213 | .alignItems(VerticalAlign.Center) | 214 | .alignItems(VerticalAlign.Center) |
| 214 | .width('100%') | 215 | .width('100%') |
| 215 | - .height(`${this.calcHeight(120)}lpx`) | ||
| 216 | 216 | ||
| 217 | Column() { | 217 | Column() { |
| 218 | Text("忘记密码").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`}) | 218 | Text("忘记密码").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`}) |
| @@ -290,21 +290,23 @@ export struct SettingPasswordPage { | @@ -290,21 +290,23 @@ export struct SettingPasswordPage { | ||
| 290 | // 按钮 | 290 | // 按钮 |
| 291 | @Builder getButtonCell(item: AccoutPageDataModel) { | 291 | @Builder getButtonCell(item: AccoutPageDataModel) { |
| 292 | Row() { | 292 | Row() { |
| 293 | - Button(item.compButtonTitle, { type: ButtonType.Normal, stateEffect: true }) | ||
| 294 | - .width('100%') | ||
| 295 | - .height('80lpx') | ||
| 296 | - .backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d') | ||
| 297 | - .enabled(this.btnStatus ?true:false) | ||
| 298 | - .fontColor('#fff') | ||
| 299 | - .borderRadius('4vp') | 293 | + Text(item.compButtonTitle) |
| 294 | + .layoutWeight(1) | ||
| 295 | + .fontColor("#FFFFFF") | ||
| 296 | + .borderRadius(4) | ||
| 297 | + .fontSize(18) | ||
| 298 | + .textAlign(TextAlign.Center) | ||
| 299 | + .fontWeight(FontWeight.Medium) | ||
| 300 | + .margin({ top: 26 }) | ||
| 301 | + .height(44) | ||
| 302 | + .backgroundColor("#ED2800") | ||
| 303 | + .enabled(this.btnStatus ? true : false) | ||
| 304 | + .opacity(this.btnStatus ? 1: 0.6) | ||
| 300 | .onClick(() => { | 305 | .onClick(() => { |
| 301 | this.buttonClick() | 306 | this.buttonClick() |
| 302 | }) | 307 | }) |
| 303 | - } | ||
| 304 | - .padding({top:'25lpx'}) | ||
| 305 | - .alignItems(VerticalAlign.Center) | 308 | + }.padding({top:'25lpx'}) |
| 306 | .width('100%') | 309 | .width('100%') |
| 307 | - .height('120lpx') | ||
| 308 | } | 310 | } |
| 309 | 311 | ||
| 310 | // 标题 | 312 | // 标题 |
| @@ -48,7 +48,6 @@ struct MultiPictureDetailPage { | @@ -48,7 +48,6 @@ struct MultiPictureDetailPage { | ||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | aboutToAppear() { | 50 | aboutToAppear() { |
| 51 | - this.openFullScreen() | ||
| 52 | 51 | ||
| 53 | Logger.info(TAG, 'aboutToDisappear'); | 52 | Logger.info(TAG, 'aboutToDisappear'); |
| 54 | 53 | ||
| @@ -68,13 +67,11 @@ struct MultiPictureDetailPage { | @@ -68,13 +67,11 @@ struct MultiPictureDetailPage { | ||
| 68 | 67 | ||
| 69 | aboutToDisappear(): void { | 68 | aboutToDisappear(): void { |
| 70 | console.log(TAG, 'aboutToDisappear') | 69 | console.log(TAG, 'aboutToDisappear') |
| 71 | - this.closeFullScreen() | ||
| 72 | } | 70 | } |
| 73 | 71 | ||
| 74 | onPageShow(): void { | 72 | onPageShow(): void { |
| 75 | console.log(TAG, 'onPageShow') | 73 | console.log(TAG, 'onPageShow') |
| 76 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 74 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| 77 | - this.openFullScreen() | ||
| 78 | 75 | ||
| 79 | } | 76 | } |
| 80 | 77 | ||
| @@ -84,25 +81,7 @@ struct MultiPictureDetailPage { | @@ -84,25 +81,7 @@ struct MultiPictureDetailPage { | ||
| 84 | let duration = 0 | 81 | let duration = 0 |
| 85 | duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | 82 | duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) |
| 86 | TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,duration) | 83 | TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,duration) |
| 87 | - this.closeFullScreen() | ||
| 88 | } | 84 | } |
| 89 | 85 | ||
| 90 | - /** | ||
| 91 | - * 开启沉浸式 | ||
| 92 | - * TODO:颜色待根据业务接口修改 | ||
| 93 | - */ | ||
| 94 | - openFullScreen() { | ||
| 95 | - WindowModel.shared.setWindowLayoutFullScreen(true) | ||
| 96 | - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | - /** | ||
| 100 | - * 关闭沉浸式 | ||
| 101 | - * TODO:颜色待根据业务接口修改 | ||
| 102 | - */ | ||
| 103 | - closeFullScreen() { | ||
| 104 | - WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 105 | - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | ||
| 106 | - } | ||
| 107 | 86 | ||
| 108 | } | 87 | } |
| 1 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; | 1 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; |
| 2 | import { window } from '@kit.ArkUI'; | 2 | import { window } from '@kit.ArkUI'; |
| 3 | import { BusinessError } from '@kit.BasicServicesKit'; | 3 | import { BusinessError } from '@kit.BasicServicesKit'; |
| 4 | +import { NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; | ||
| 4 | import { ProcessUtils } from 'wdRouter'; | 5 | import { ProcessUtils } from 'wdRouter'; |
| 6 | +import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel' | ||
| 7 | + | ||
| 5 | /** | 8 | /** |
| 6 | * 意图调用 | 9 | * 意图调用 |
| 7 | */ | 10 | */ |
| @@ -19,7 +22,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -19,7 +22,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 19 | */ | 22 | */ |
| 20 | onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage): | 23 | onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage): |
| 21 | Promise<insightIntent.ExecuteResult> { | 24 | Promise<insightIntent.ExecuteResult> { |
| 22 | - console.log('yzl onExecuteInUIAbilityForegroundMode',name,JSON.stringify(param)) | 25 | + console.log('yzl onExecuteInUIAbilityForegroundMode', name, JSON.stringify(param)) |
| 23 | // 根据意图名称分发处理逻辑 | 26 | // 根据意图名称分发处理逻辑 |
| 24 | switch (name) { | 27 | switch (name) { |
| 25 | case InsightIntentExecutorImpl.ViewBlog: | 28 | case InsightIntentExecutorImpl.ViewBlog: |
| @@ -36,19 +39,19 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -36,19 +39,19 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 36 | } | 39 | } |
| 37 | } as insightIntent.ExecuteResult) | 40 | } as insightIntent.ExecuteResult) |
| 38 | } | 41 | } |
| 42 | + | ||
| 39 | /** | 43 | /** |
| 40 | * 实现习惯推荐功能 | 44 | * 实现习惯推荐功能 |
| 41 | * @param param 意图参数 | 45 | * @param param 意图参数 |
| 42 | * @param pageLoader 窗口 | 46 | * @param pageLoader 窗口 |
| 43 | */ | 47 | */ |
| 44 | - private jumpToViewBlog(param: Record<string, Object>, pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | ||
| 45 | - console.log('yzl jumpToView',JSON.stringify(param)) | 48 | + private jumpToViewBlog(param: Record<string, Object>, |
| 49 | + pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | ||
| 50 | + console.log('yzl jumpToView', JSON.stringify(param)) | ||
| 46 | return new Promise((resolve, reject) => { | 51 | return new Promise((resolve, reject) => { |
| 47 | - // TODO 实现意图调用,loadContent的入参为歌曲落地页路径,例如:pages/SongPage | ||
| 48 | // TODO 热启动是否切到主页 | 52 | // TODO 热启动是否切到主页 |
| 49 | pageLoader.loadContent('pages/MainPage') | 53 | pageLoader.loadContent('pages/MainPage') |
| 50 | .then(() => { | 54 | .then(() => { |
| 51 | - | ||
| 52 | resolve({ | 55 | resolve({ |
| 53 | code: 0, | 56 | code: 0, |
| 54 | result: { | 57 | result: { |
| @@ -72,12 +75,26 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -72,12 +75,26 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 72 | * @param param 意图参数 | 75 | * @param param 意图参数 |
| 73 | * @param pageLoader 窗口 | 76 | * @param pageLoader 窗口 |
| 74 | */ | 77 | */ |
| 75 | - private jumpToViewColumnUpdate(param: Record<string, Object>, pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | ||
| 76 | - console.log('yzl jumpToViewColum',JSON.stringify(param)) | 78 | + private jumpToViewColumnUpdate(param: Record<string, Object>, |
| 79 | + pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | ||
| 77 | return new Promise((resolve, reject) => { | 80 | return new Promise((resolve, reject) => { |
| 78 | pageLoader.loadContent('pages/MainPage') | 81 | pageLoader.loadContent('pages/MainPage') |
| 79 | .then(() => { | 82 | .then(() => { |
| 80 | - ProcessUtils.gotoMorningEveningPaper() | 83 | + if (NetworkUtil.isNetConnected()) { |
| 84 | + DailyPaperTopicModel.getDailyPaperTopic().then(dailyPaperTopicBean => { | ||
| 85 | + if (dailyPaperTopicBean && dailyPaperTopicBean.id > 0) { | ||
| 86 | + SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id); | ||
| 87 | + ProcessUtils.gotoMorningEveningPaper() //跳转至早晚报页面 | ||
| 88 | + } else { | ||
| 89 | + ToastUtils.showToast('暂无早晚报信息', 1000) | ||
| 90 | + } | ||
| 91 | + }).catch((err: string) => { | ||
| 92 | + console.log('yzlerr',JSON.stringify(err)) | ||
| 93 | + ToastUtils.showToast('暂无早晚报信息', 1000) | ||
| 94 | + }) | ||
| 95 | + } else { | ||
| 96 | + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) | ||
| 97 | + } | ||
| 81 | resolve({ | 98 | resolve({ |
| 82 | code: 0, | 99 | code: 0, |
| 83 | result: { | 100 | result: { |
-
Please register or login to post a comment