chenjun3_wd

Merge remote-tracking branch 'origin/main'

Showing 41 changed files with 67 additions and 281 deletions
@@ -173,7 +173,6 @@ export class ProcessUtils { @@ -173,7 +173,6 @@ export class ProcessUtils {
173 detailPageType: 2, 173 detailPageType: 2,
174 contentID: content?.objectId, 174 contentID: content?.objectId,
175 // liveStyle: liveState === 'wait' ? 0 : liveStyle, 175 // liveStyle: liveState === 'wait' ? 0 : liveStyle,
176 - liveStyle: 0 ,  
177 extra: { 176 extra: {
178 relType: content?.relType, 177 relType: content?.relType,
179 relId: content?.relId, 178 relId: content?.relId,
@@ -3,8 +3,7 @@ import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; @@ -3,8 +3,7 @@ import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
3 import { Logger } from 'wdKit'; 3 import { Logger } from 'wdKit';
4 import { H5CallNativeType } from './H5CallNativeType'; 4 import { H5CallNativeType } from './H5CallNativeType';
5 import { ContentDTO } from 'wdBean'; 5 import { ContentDTO } from 'wdBean';
6 -//TODO 这里引用了 features模块,是否考虑将跳转抽到公共模块  
7 -import { ProcessUtils } from '../../../../../../features/wdComponent/src/main/ets/utils/ProcessUtils'; 6 +import { ProcessUtils } from 'wdRouter/src/main/ets/utils/ProcessUtils';
8 7
9 const TAG = 'JsBridgeBiz' 8 const TAG = 'JsBridgeBiz'
10 9
@@ -85,9 +85,10 @@ export struct WdWebComponent { @@ -85,9 +85,10 @@ export struct WdWebComponent {
85 onPageBegin: (url?: string) => void = () => { 85 onPageBegin: (url?: string) => void = () => {
86 Logger.debug(TAG, 'onPageBegin'); 86 Logger.debug(TAG, 'onPageBegin');
87 this.registerHandlers(); 87 this.registerHandlers();
88 - // setTimeout(() => { 88 + //有时序问题 必须延时执行
  89 + setTimeout(() => {
89 BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl) 90 BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
90 - // }, 100) 91 + }, 200)
91 } 92 }
92 onPageEnd: (url?: string) => void = () => { 93 onPageEnd: (url?: string) => void = () => {
93 Logger.debug(TAG, 'onPageEnd'); 94 Logger.debug(TAG, 'onPageEnd');
@@ -102,9 +102,10 @@ export struct WdWebLocalComponent { @@ -102,9 +102,10 @@ export struct WdWebLocalComponent {
102 onPageBegin: (url?: string) => void = () => { 102 onPageBegin: (url?: string) => void = () => {
103 Logger.debug(TAG, 'onPageBegin'); 103 Logger.debug(TAG, 'onPageBegin');
104 this.registerHandlers(); 104 this.registerHandlers();
105 - // setTimeout(() => { 105 + //有时序问题 必须延时执行
  106 + setTimeout(() => {
106 BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl) 107 BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
107 - // }, 100) 108 + }, 200)
108 } 109 }
109 onPageEnd: (url?: string) => void = () => { 110 onPageEnd: (url?: string) => void = () => {
110 Logger.debug(TAG, 'onPageEnd'); 111 Logger.debug(TAG, 'onPageEnd');
@@ -8,7 +8,7 @@ import media from '@ohos.multimedia.media'; @@ -8,7 +8,7 @@ import media from '@ohos.multimedia.media';
8 import { OperRowListView } from './view/OperRowListView'; 8 import { OperRowListView } from './view/OperRowListView';
9 import { WDPlayerController } from 'wdPlayer/Index'; 9 import { WDPlayerController } from 'wdPlayer/Index';
10 import { ContentConstants } from '../constants/ContentConstants'; 10 import { ContentConstants } from '../constants/ContentConstants';
11 -import { ProcessUtils } from '../utils/ProcessUtils'; 11 +import { ProcessUtils } from 'wdRouter';
12 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; 12 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
13 13
14 const TAG = 'DynamicDetailComponent' 14 const TAG = 'DynamicDetailComponent'
1 import { CompInfoBean, CompDTO, CompList } from 'wdBean' 1 import { CompInfoBean, CompDTO, CompList } from 'wdBean'
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 /** 4 /**
5 * 播报--今日推荐列表 5 * 播报--今日推荐列表
6 */ 6 */
1 import { CompInfoBean, CompDTO } from 'wdBean' 1 import { CompInfoBean, CompDTO } from 'wdBean'
2 import { DateTimeUtils } from 'wdKit/Index' 2 import { DateTimeUtils } from 'wdKit/Index'
3 import { CommonConstants } from 'wdConstant'; 3 import { CommonConstants } from 'wdConstant';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 /** 5 /**
6 * 精选栏目 6 * 精选栏目
7 */ 7 */
1 import { ContentDTO, slideShows } from 'wdBean'; 1 import { ContentDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 5 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
7 7
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { ContentDTO } from 'wdBean' 3 import { ContentDTO } from 'wdBean'
4 import { DateTimeUtils } from 'wdKit' 4 import { DateTimeUtils } from 'wdKit'
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
7 const TAG = 'Card11Component'; 7 const TAG = 'Card11Component';
8 8
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 6
7 const TAG = 'Card12Component'; 7 const TAG = 'Card12Component';
8 8
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 6
7 const TAG = 'Card14Component'; 7 const TAG = 'Card14Component';
8 8
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 -import { ProcessUtils } from '../../utils/ProcessUtils'; 2 +import { ProcessUtils } from 'wdRouter';
3 import { RmhTitle } from '../cardCommon/RmhTitle' 3 import { RmhTitle } from '../cardCommon/RmhTitle'
4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
5 import { CommonConstants } from 'wdConstant/Index'; 5 import { CommonConstants } from 'wdConstant/Index';
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 6
7 const TAG = 'Card16Component'; 7 const TAG = 'Card16Component';
8 8
@@ -29,7 +29,8 @@ export struct Card17Component { @@ -29,7 +29,8 @@ export struct Card17Component {
29 // 三个图, 29 // 三个图,
30 GridRow({ gutter: 2 }) { 30 GridRow({ gutter: 2 }) {
31 GridCol({ span: { xs: 8 } }) { 31 GridCol({ span: { xs: 8 } }) {
32 - Image(this.contentDTO.fullColumnImgUrls[0].url) 32 + Image(this.contentDTO.fullColumnImgUrls.length > 0 ?this.contentDTO.fullColumnImgUrls[0].url:'')
  33 + .backgroundColor('#f5f5f5')
33 .width(CommonConstants.FULL_WIDTH) 34 .width(CommonConstants.FULL_WIDTH)
34 .aspectRatio(16 / 9) 35 .aspectRatio(16 / 9)
35 .borderRadius({ 36 .borderRadius({
@@ -39,7 +40,8 @@ export struct Card17Component { @@ -39,7 +40,8 @@ export struct Card17Component {
39 } 40 }
40 41
41 GridCol({ span: { xs: 4 } }) { 42 GridCol({ span: { xs: 4 } }) {
42 - Image(this.contentDTO.fullColumnImgUrls[1].url) 43 + Image(this.contentDTO.fullColumnImgUrls.length > 1? this.contentDTO.fullColumnImgUrls[1].url:'')
  44 + .backgroundColor('#f5f5f5')
43 .width(CommonConstants.FULL_WIDTH) 45 .width(CommonConstants.FULL_WIDTH)
44 .aspectRatio(16 / 9) 46 .aspectRatio(16 / 9)
45 .margin({ bottom: 1 }) 47 .margin({ bottom: 1 })
@@ -54,7 +56,8 @@ export struct Card17Component { @@ -54,7 +56,8 @@ export struct Card17Component {
54 } 56 }
55 57
56 GridCol({ span: { xs: 4 } }) { 58 GridCol({ span: { xs: 4 } }) {
57 - Image(this.contentDTO.fullColumnImgUrls[2].url) 59 + Image(this.contentDTO.fullColumnImgUrls.length > 2? this.contentDTO.fullColumnImgUrls[2].url:'')
  60 + .backgroundColor('#f5f5f5')
58 .width(CommonConstants.FULL_WIDTH) 61 .width(CommonConstants.FULL_WIDTH)
59 .aspectRatio(16 / 9) 62 .aspectRatio(16 / 9)
60 .margin({ top: 1 }) 63 .margin({ top: 1 })
1 import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean'; 1 import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 5
6 const TAG = 'Card19Component'; 6 const TAG = 'Card19Component';
@@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean'; @@ -2,7 +2,7 @@ import { ContentDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 const TAG = 'Card20Component'; 6 const TAG = 'Card20Component';
7 7
8 /** 8 /**
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 import { RmhTitle } from '../cardCommon/RmhTitle' 4 import { RmhTitle } from '../cardCommon/RmhTitle'
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 6
1 //全标题 "appStyle":"2", 1 //全标题 "appStyle":"2",
2 import { ContentDTO } from 'wdBean'; 2 import { ContentDTO } from 'wdBean';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
7 const TAG: string = 'Card2Component'; 7 const TAG: string = 'Card2Component';
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
5 5
6 /** 6 /**
1 import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean'; 1 import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant/Index'; 2 import { CommonConstants } from 'wdConstant/Index';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
5 const TAG: string = 'Card4Component'; 5 const TAG: string = 'Card4Component';
6 6
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 4
5 const TAG: string = 'Card5Component'; 5 const TAG: string = 'Card5Component';
6 6
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 const TAG: string = 'Card6Component-Card13Component'; 6 const TAG: string = 'Card6Component-Card13Component';
1 import { ContentDTO, slideShows } from 'wdBean'; 1 import { ContentDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 5
6 /** 6 /**
7 * 时间链卡--CompStyle: 09 7 * 时间链卡--CompStyle: 09
@@ -2,7 +2,7 @@ import { CompDTO, ContentDTO, } from 'wdBean'; @@ -2,7 +2,7 @@ import { CompDTO, ContentDTO, } from 'wdBean';
2 import { BreakpointConstants, CommonConstants, DurationEnum } from 'wdConstant'; 2 import { BreakpointConstants, CommonConstants, DurationEnum } from 'wdConstant';
3 import { BreakPointType, Logger } from 'wdKit'; 3 import { BreakPointType, Logger } from 'wdKit';
4 import { CompUtils } from '../../utils/CompUtils'; 4 import { CompUtils } from '../../utils/CompUtils';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 import { EmptyComponent } from '../view/EmptyComponent'; 6 import { EmptyComponent } from '../view/EmptyComponent';
7 7
8 const TAG = 'Zh_Carousel_Layout-01'; 8 const TAG = 'Zh_Carousel_Layout-01';
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant/Index'; 2 import { CommonConstants } from 'wdConstant/Index';
3 import { Logger } from 'wdKit/Index'; 3 import { Logger } from 'wdKit/Index';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 import PageViewModel from '../../viewmodel/PageViewModel'; 5 import PageViewModel from '../../viewmodel/PageViewModel';
6 6
7 const TAG = 'Zh_Grid_Layout-02'; 7 const TAG = 'Zh_Grid_Layout-02';
@@ -2,7 +2,7 @@ import { Action, CompDTO, ContentDTO, Params } from 'wdBean'; @@ -2,7 +2,7 @@ import { Action, CompDTO, ContentDTO, Params } from 'wdBean';
2 import { CompStyle } from 'wdConstant'; 2 import { CompStyle } from 'wdConstant';
3 import { Logger } from 'wdKit'; 3 import { Logger } from 'wdKit';
4 import { WDRouterRule } from 'wdRouter'; 4 import { WDRouterRule } from 'wdRouter';
5 -import { ProcessUtils } from '../../utils/ProcessUtils'; 5 +import { ProcessUtils } from 'wdRouter';
6 6
7 const TAG = 'Zh_Grid_Layout-03'; 7 const TAG = 'Zh_Grid_Layout-03';
8 const FULL_PARENT: string = '100%'; 8 const FULL_PARENT: string = '100%';
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 4
5 const TAG = 'Zh_Single_Column-04'; 5 const TAG = 'Zh_Single_Column-04';
6 6
@@ -4,7 +4,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index'; @@ -4,7 +4,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
4 import { postInteractAccentionOperateParams } from 'wdBean'; 4 import { postInteractAccentionOperateParams } from 'wdBean';
5 import { PageRepository } from '../../repository/PageRepository'; 5 import { PageRepository } from '../../repository/PageRepository';
6 import { CommonConstants } from 'wdConstant/Index'; 6 import { CommonConstants } from 'wdConstant/Index';
7 -import { ProcessUtils } from '../../utils/ProcessUtils'; 7 +import { ProcessUtils } from 'wdRouter';
8 8
9 /** 9 /**
10 * 小视频横划卡 10 * 小视频横划卡
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 -import { ProcessUtils } from '../../utils/ProcessUtils'; 4 +import { ProcessUtils } from 'wdRouter';
5 5
6 /** 6 /**
7 * 本地精选卡 7 * 本地精选卡
@@ -5,7 +5,7 @@ import { postInteractAccentionOperateParams } from 'wdBean'; @@ -5,7 +5,7 @@ import { postInteractAccentionOperateParams } from 'wdBean';
5 import { PageRepository } from '../../repository/PageRepository'; 5 import { PageRepository } from '../../repository/PageRepository';
6 import { DateTimeUtils } from 'wdKit/Index'; 6 import { DateTimeUtils } from 'wdKit/Index';
7 import { CommonConstants } from 'wdConstant/Index'; 7 import { CommonConstants } from 'wdConstant/Index';
8 -import { ProcessUtils } from '../../utils/ProcessUtils'; 8 +import { ProcessUtils } from 'wdRouter';
9 9
10 /** 10 /**
11 * 精选评论卡 11 * 精选评论卡
1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel' 1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
2 import { WDRouterRule, WDRouterPage } from 'wdRouter' 2 import { WDRouterRule, WDRouterPage } from 'wdRouter'
3 -import { Action, Params } from 'wdBean';  
4 -import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; 3 +import { Params } from 'wdBean';
5 4
6 @Component 5 @Component
7 export default struct MinePageMoreFunctionUI { 6 export default struct MinePageMoreFunctionUI {
@@ -70,18 +69,12 @@ export default struct MinePageMoreFunctionUI { @@ -70,18 +69,12 @@ export default struct MinePageMoreFunctionUI {
70 } 69 }
71 .onClick(() => { 70 .onClick(() => {
72 console.log(index + "") 71 console.log(index + "")
73 - if (index == 0) {  
74 - // WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
75 - } else if (index == 1) {  
76 - // WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
77 - } else if (index == 2) {  
78 -  
79 - } else if (index == 3) { //设置 72 + if (item.msg == "设置") { //设置
80 let params: Params = { 73 let params: Params = {
81 pageID: 'mainSetting' 74 pageID: 'mainSetting'
82 } 75 }
83 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) 76 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
84 - }else if (index == 4) { // 关于 77 + }else if (item.msg == "关于") { // 关于
85 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage) 78 WDRouterRule.jumpWithPage(WDRouterPage.aboutPage)
86 } 79 }
87 }) 80 })
@@ -3,7 +3,7 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; @@ -3,7 +3,7 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
3 import { Logger } from 'wdKit'; 3 import { Logger } from 'wdKit';
4 import { CompUtils } from '../../utils/CompUtils'; 4 import { CompUtils } from '../../utils/CompUtils';
5 import { WDRouterRule } from 'wdRouter'; 5 import { WDRouterRule } from 'wdRouter';
6 -import { ProcessUtils } from '../../utils/ProcessUtils'; 6 +import { ProcessUtils } from 'wdRouter';
7 7
8 const TAG: string = 'CardView'; 8 const TAG: string = 'CardView';
9 9
@@ -51,11 +51,7 @@ struct EditUserIntroductionPage { @@ -51,11 +51,7 @@ struct EditUserIntroductionPage {
51 .borderRadius(5) 51 .borderRadius(5)
52 .margin(30) 52 .margin(30)
53 .onClick(()=>{ 53 .onClick(()=>{
54 - let currentUserInfo:editModel = new editModel()  
55 - currentUserInfo.userExtend.introduction = this.introduction  
56 - currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro  
57 - this.updateEditModel(currentUserInfo)  
58 - 54 + this.updateEditModel()
59 let params: editModelParams = { 55 let params: editModelParams = {
60 introduction: this.introduction 56 introduction: this.introduction
61 } 57 }
@@ -68,7 +64,10 @@ struct EditUserIntroductionPage { @@ -68,7 +64,10 @@ struct EditUserIntroductionPage {
68 } 64 }
69 65
70 66
71 - updateEditModel(Info:editModel){  
72 - EditInfoViewModel.updateUserInfo(Info) 67 + updateEditModel(){
  68 + let currentUserInfo:editModel = new editModel()
  69 + currentUserInfo.userExtend.introduction = this.introduction
  70 + currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
  71 + EditInfoViewModel.updateUserInfo(currentUserInfo)
73 } 72 }
74 } 73 }
@@ -2,6 +2,8 @@ import { CustomTitleUI } from '../reusable/CustomTitleUI' @@ -2,6 +2,8 @@ import { CustomTitleUI } from '../reusable/CustomTitleUI'
2 import router from '@ohos.router' 2 import router from '@ohos.router'
3 import { editModel, editModelParams, WDEditDataModelType } from '../../model/EditInfoModel' 3 import { editModel, editModelParams, WDEditDataModelType } from '../../model/EditInfoModel'
4 import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; 4 import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
  5 +// import { encryptMessage } from '../../../utils/cryptoUtil'
  6 +import { encryptMessage } from 'wdLogin/src/main/ets/utils/cryptoUtil'
5 @Entry 7 @Entry
6 @Component 8 @Component
7 struct EditUserNikeNamePage { 9 struct EditUserNikeNamePage {
@@ -51,13 +53,17 @@ struct EditUserNikeNamePage { @@ -51,13 +53,17 @@ struct EditUserNikeNamePage {
51 .borderRadius(5) 53 .borderRadius(5)
52 .margin(30) 54 .margin(30)
53 .onClick(()=>{ 55 .onClick(()=>{
54 -  
55 ///内部更新 56 ///内部更新
  57 + this.updateEditModel()
  58 + })
  59 + }
  60 + }
  61 +
  62 + async updateEditModel(){
56 let currentUserInfo:editModel = new editModel() 63 let currentUserInfo:editModel = new editModel()
57 - currentUserInfo.userExtend.introduction = this.nikeName 64 + currentUserInfo.userName = await encryptMessage(this.nikeName);
58 currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname 65 currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
59 - this.updateEditModel(currentUserInfo)  
60 - 66 + EditInfoViewModel.updateUserInfo(currentUserInfo).then(()=>{
61 let params: editModelParams = { 67 let params: editModelParams = {
62 userName: this.nikeName 68 userName: this.nikeName
63 } 69 }
@@ -67,9 +73,4 @@ struct EditUserNikeNamePage { @@ -67,9 +73,4 @@ struct EditUserNikeNamePage {
67 }) 73 })
68 }) 74 })
69 } 75 }
70 - }  
71 -  
72 - updateEditModel(Info:editModel){  
73 - EditInfoViewModel.updateUserInfo(Info)  
74 - }  
75 } 76 }
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 -import { ProcessUtils } from '../../utils/ProcessUtils'; 2 +import { ProcessUtils } from 'wdRouter';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 import PageViewModel from '../../viewmodel/PageViewModel'; 4 import PageViewModel from '../../viewmodel/PageViewModel';
5 import RefreshLayout from '../page/RefreshLayout'; 5 import RefreshLayout from '../page/RefreshLayout';
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 -import { ProcessUtils } from '../../utils/ProcessUtils'; 2 +import { ProcessUtils } from 'wdRouter';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 import PageViewModel from '../../viewmodel/PageViewModel'; 4 import PageViewModel from '../../viewmodel/PageViewModel';
5 import RefreshLayout from '../page/RefreshLayout'; 5 import RefreshLayout from '../page/RefreshLayout';
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 -import { ProcessUtils } from '../../utils/ProcessUtils'; 2 +import { ProcessUtils } from 'wdRouter';
3 import { CardParser } from '../CardParser'; 3 import { CardParser } from '../CardParser';
4 4
5 const TAG: string = 'BigPicCardComponent'; 5 const TAG: string = 'BigPicCardComponent';
1 import { CommonConstants } from 'wdConstant' 1 import { CommonConstants } from 'wdConstant'
2 import { ContentDTO, CompDTO } from 'wdBean' 2 import { ContentDTO, CompDTO } from 'wdBean'
3 -import { ProcessUtils } from '../../utils/ProcessUtils'; 3 +import { ProcessUtils } from 'wdRouter';
4 4
5 @Component 5 @Component
6 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { 6 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@@ -7,7 +7,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo' @@ -7,7 +7,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
7 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' 7 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
8 import { LiveModel } from '../../viewmodel/LiveModel' 8 import { LiveModel } from '../../viewmodel/LiveModel'
9 import { ContentConstants } from '../../constants/ContentConstants' 9 import { ContentConstants } from '../../constants/ContentConstants'
10 -import { ProcessUtils } from '../../utils/ProcessUtils' 10 +import { ProcessUtils } from 'wdRouter';
11 11
12 @Component 12 @Component
13 export struct LiveHorizontalCardComponent { 13 export struct LiveHorizontalCardComponent {
1 -import { Action, ContentDTO, Params } from 'wdBean';  
2 -import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';  
3 -import { Logger } from 'wdKit';  
4 -import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';  
5 -import { WDRouterRule } from 'wdRouter';  
6 -import { ContentConstants } from '../constants/ContentConstants';  
7 -import { LiveModel } from '../viewmodel/LiveModel';  
8 -  
9 -const TAG = 'ProcessUtils';  
10 -  
11 -/**  
12 - * 页面跳转业务封装  
13 - */  
14 -export class ProcessUtils {  
15 - /**  
16 - * 页面跳转  
17 - */  
18 - static processPage(content: ContentDTO) {  
19 - if (content == null) {  
20 - Logger.error(TAG, "processPage, content is null");  
21 - return;  
22 - }  
23 - if (StringUtils.isEmpty(content.objectType)) {  
24 - Logger.error(TAG, "processPage, objectType is empty");  
25 - return;  
26 - }  
27 - let type = content.objectType;  
28 - console.log(TAG,'objectType',`${JSON.stringify(content)}`);  
29 - switch (type) {  
30 - case ContentConstants.TYPE_NONE:  
31 - Logger.debug(TAG, "processPage, do nothing");  
32 - break;  
33 - case ContentConstants.TYPE_VOD:  
34 - Logger.debug(TAG, "processPage, nonsupport!!!");  
35 - ProcessUtils.gotoVod(content)  
36 - break;  
37 - case ContentConstants.TYPE_LIVE:  
38 - ProcessUtils.gotoLive(content)  
39 - break  
40 - case ContentConstants.TYPE_AUDIO:  
41 - ProcessUtils.gotoAudio(content)  
42 - break;  
43 - case ContentConstants.TYPE_TELETEXT:  
44 - // 图文详情,跳转h5  
45 - ProcessUtils.gotoWeb(content);  
46 - break;  
47 - case ContentConstants.TYPE_LINK:  
48 - ProcessUtils.gotoDefaultWeb(content);  
49 - break;  
50 - //图集详情页  
51 - case ContentConstants.TYPE_NINE:  
52 - ProcessUtils.gotoAtlasDetailPage(content);  
53 - break;  
54 - case ContentConstants.TYPE_SPECIAL_TOPIC:  
55 - // 专题详情,跳转h5  
56 - ProcessUtils.gotoSpecialTopic(content);  
57 - break;  
58 - //动态详情页(动态图文)  
59 - case ContentConstants.TYPE_FOURTEEN:  
60 - //动态详情页(动态视频)  
61 - case ContentConstants.TYPE_FIFTEEN:  
62 - ProcessUtils.gotoDynamicDetailPage(content);  
63 - break;  
64 - default:  
65 - break;  
66 - }  
67 - }  
68 -  
69 - /**  
70 - * 动态详情页(动态视频/动态图片)  
71 - * @param content  
72 - * */  
73 - private static gotoDynamicDetailPage(content: ContentDTO) {  
74 - let taskAction: Action = {  
75 - type: 'JUMP_DETAIL_PAGE',  
76 - params: {  
77 - detailPageType: Number.parseInt(content.objectType),  
78 - contentID: content?.objectId,  
79 - extra: {  
80 - relType: content?.relType,  
81 - relId: content?.relId,  
82 - } as ExtraDTO  
83 - } as Params,  
84 - };  
85 - WDRouterRule.jumpWithAction(taskAction)  
86 - Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`);  
87 - }  
88 -  
89 - /**  
90 - * 图集详情页  
91 - * @param content  
92 - * */  
93 - private static gotoAtlasDetailPage(content: ContentDTO) {  
94 - let taskAction: Action = {  
95 - type: 'JUMP_DETAIL_PAGE',  
96 - params: {  
97 - detailPageType: 17,  
98 - contentID: content?.objectId,  
99 - extra: {  
100 - relType: content?.relType,  
101 - relId: content?.relId,  
102 - } as ExtraDTO  
103 - } as Params,  
104 - };  
105 - WDRouterRule.jumpWithAction(taskAction)  
106 - Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);  
107 - }  
108 -  
109 - private static gotoSpecialTopic(content: ContentDTO) {  
110 - let taskAction: Action = {  
111 - type: 'JUMP_INNER_NEW_PAGE',  
112 - params: {  
113 - url: content.linkUrl,  
114 - pageID: 'SPACIAL_TOPIC_PAGE',  
115 - } as Params,  
116 - };  
117 - WDRouterRule.jumpWithAction(taskAction)  
118 - }  
119 -  
120 - private static gotoDefaultWeb(content: ContentDTO) {  
121 - let taskAction: Action = {  
122 - type: 'JUMP_H5_BY_WEB_VIEW',  
123 - params: {  
124 - url: content.linkUrl,  
125 - } as Params,  
126 - };  
127 - WDRouterRule.jumpWithAction(taskAction)  
128 - Logger.debug(TAG, `gotoWeb, ${content.objectId}`);  
129 - }  
130 -  
131 - private static gotoWeb(content: ContentDTO) {  
132 - // // topicId  
133 - // content.channelId;  
134 - // content.linkUrl;  
135 - // content.objectId;  
136 - // // CompId  
137 - // content.relId;  
138 - // content.relType;  
139 - // // ScrollToBottom  
140 - // // FromPage  
141 - let taskAction: Action = {  
142 - type: 'JUMP_INNER_NEW_PAGE',  
143 - params: {  
144 - contentID: content?.objectId,  
145 - pageID: 'IMAGE_TEXT_DETAIL',  
146 - extra: {  
147 - relType: content?.relType,  
148 - relId: content?.relId,  
149 - channelId: content?.channelId,  
150 - sourcePage: '5'  
151 - } as ExtraDTO  
152 - } as Params,  
153 - };  
154 - WDRouterRule.jumpWithAction(taskAction)  
155 - Logger.debug(TAG, `gotoWeb, ${content.objectId}`);  
156 - }  
157 -  
158 - private static gotoVod(content: ContentDTO) {  
159 - let taskAction: Action = {  
160 - type: 'JUMP_DETAIL_PAGE',  
161 - params: {  
162 - detailPageType: 7,  
163 - contentID: content?.objectId,  
164 - extra: {  
165 - relType: content?.relType,  
166 - relId: content?.relId,  
167 - } as ExtraDTO  
168 - } as Params,  
169 - };  
170 - WDRouterRule.jumpWithAction(taskAction)  
171 - Logger.debug(TAG, `gotoVod, ${content.objectId}`);  
172 - }  
173 -  
174 - private static async gotoLive(content: ContentDTO) {  
175 - const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')  
176 - const liveStyle = liveDetail[0].liveInfo.liveStyle  
177 - const liveState = liveDetail[0].liveInfo.liveState  
178 -  
179 -  
180 - console.error('liveDetail===', liveDetail)  
181 -  
182 -  
183 - let taskAction: Action = {  
184 - type: 'JUMP_DETAIL_PAGE',  
185 - params: {  
186 - detailPageType: 2,  
187 - contentID: content?.objectId,  
188 - liveStyle: liveState === 'wait' ? 0 : liveStyle,  
189 - extra: {  
190 - relType: content?.relType,  
191 - relId: content?.relId,  
192 - } as ExtraDTO  
193 - } as Params,  
194 - };  
195 - WDRouterRule.jumpWithAction(taskAction)  
196 - Logger.debug(TAG, `gotoLive, ${content.objectId}`);  
197 - }  
198 -  
199 - private static gotoAudio(content: ContentDTO) {  
200 - let taskAction: Action = {  
201 - type: 'JUMP_DETAIL_PAGE',  
202 - params: {  
203 - detailPageType: 13,  
204 - contentID: content?.objectId,  
205 - extra: {  
206 - relType: content?.relType,  
207 - relId: content?.relId,  
208 - } as ExtraDTO  
209 - } as Params,  
210 - };  
211 - WDRouterRule.jumpWithAction(taskAction)  
212 - Logger.debug(TAG, `gotoAudio, ${content.objectId}`);  
213 - }  
214 -}  
@@ -53,8 +53,12 @@ class MyCollectionViewModel { @@ -53,8 +53,12 @@ class MyCollectionViewModel {
53 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders() 53 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders()
54 WDHttp.post<ResponseDTO>(HttpUrlUtils.getExecuteCollcetUrl(),params,headers).then((navResDTO: ResponseDTO) => { 54 WDHttp.post<ResponseDTO>(HttpUrlUtils.getExecuteCollcetUrl(),params,headers).then((navResDTO: ResponseDTO) => {
55 if (navResDTO.code == 0) { 55 if (navResDTO.code == 0) {
  56 + if(params.status === 1){
  57 + promptAction.showToast({ message: '收藏成功' })
  58 + } else {
56 promptAction.showToast({ message: '删除成功' }) 59 promptAction.showToast({ message: '删除成功' })
57 } 60 }
  61 + }
58 }) 62 })
59 .catch((error: Error) => { 63 .catch((error: Error) => {
60 Logger.info(TAG,'executeCollcet','ResponseDTO') 64 Logger.info(TAG,'executeCollcet','ResponseDTO')