Showing
16 changed files
with
210 additions
and
66 deletions
| @@ -38,6 +38,7 @@ export class SpConstants{ | @@ -38,6 +38,7 @@ export class SpConstants{ | ||
| 38 | static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称 | 38 | static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称 |
| 39 | static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114 | 39 | static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114 |
| 40 | static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位 | 40 | static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位 |
| 41 | + static LOCATION_FIRST_POSITION = 'location_first_position'// 定位后顶导首次使用地理信息 | ||
| 41 | 42 | ||
| 42 | //启动页数据存储key | 43 | //启动页数据存储key |
| 43 | static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model' | 44 | static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model' |
| 1 | -import { Action, ContentDTO, Params, PhotoListBean, commentInfo } from 'wdBean'; | 1 | +import { Action, ContentDTO, Params, PhotoListBean, commentInfo, CompDTO } from 'wdBean'; |
| 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; | 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; |
| 3 | import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; | 3 | import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; |
| 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; |
| @@ -72,6 +72,76 @@ export class ProcessUtils { | @@ -72,6 +72,76 @@ export class ProcessUtils { | ||
| 72 | ProcessUtils.processPage(content); | 72 | ProcessUtils.processPage(content); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | + //更多 | ||
| 76 | + static compJumpPage(bean:CompDTO){ | ||
| 77 | + let contentBean = ProcessUtils.compBeanToContentBean(bean) | ||
| 78 | + if(contentBean == null){ | ||
| 79 | + return | ||
| 80 | + } | ||
| 81 | + if(ProcessUtils.checkMoreJumpPage(bean)){ | ||
| 82 | + ProcessUtils.processPage(contentBean) | ||
| 83 | + }else{ | ||
| 84 | + ProcessUtils.moreTojumpLivePage(contentBean); | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + static moreTojumpLivePage(contentBean:ContentDTO){ | ||
| 89 | + if(!StringUtils.isEmpty(contentBean.dataSourceType)){ | ||
| 90 | + if(contentBean.dataSourceType == 'LIVE_HORIZONTAL_CARD') { | ||
| 91 | + //直播中 | ||
| 92 | + WDRouterRule.jumpWithPage(WDRouterPage.liveMorePage) | ||
| 93 | + }else if(contentBean.dataSourceType == 'LIVE_RESERVATION'){ | ||
| 94 | + //预约列表 | ||
| 95 | + WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage) | ||
| 96 | + }else if(contentBean.dataSourceType == 'LIVE_MONTHLY_RANKING'){ | ||
| 97 | + contentBean.objectType = '6' | ||
| 98 | + ProcessUtils.processPage(contentBean) | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + static checkMoreJumpPage(content:CompDTO){ | ||
| 104 | + let loacalJump = true | ||
| 105 | + if(content.dataSourceType == 'LIVE_HORIZONTAL_CARD'){ | ||
| 106 | + loacalJump = false | ||
| 107 | + }else if(content.dataSourceType == 'LIVE_RESERVATION'){ | ||
| 108 | + loacalJump = false | ||
| 109 | + }else if(content.dataSourceType == 'LIVE_MONTHLY_RANKING'){ | ||
| 110 | + loacalJump = false | ||
| 111 | + } | ||
| 112 | + return loacalJump | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + static compBeanToContentBean(compDTO:CompDTO){ | ||
| 116 | + if(compDTO == null){ | ||
| 117 | + return | ||
| 118 | + } | ||
| 119 | + let content = new ContentDTO() | ||
| 120 | + content.objectType = compDTO.objectType||'0' | ||
| 121 | + content.objectLevel = compDTO.objectLevel | ||
| 122 | + content.objectId = compDTO.objectId | ||
| 123 | + content.pageId = compDTO.pageId||'' | ||
| 124 | + content.newsTitle = compDTO.objectTitle | ||
| 125 | + content.newsSummary = compDTO.objectSummary | ||
| 126 | + // compContentBean.setTopicInfoBean(getTopicInfoBean()); | ||
| 127 | + // compContentBean.setChannelInfoBean(getChannelInfoBean()); | ||
| 128 | + content.bottomNavId = compDTO.bottomNavId | ||
| 129 | + content.sourceInterfaceVal = compDTO.sourceInterfaceVal | ||
| 130 | + content.dataSourceType = compDTO.dataSourceType | ||
| 131 | + content.compId = compDTO.id+'' | ||
| 132 | + content.linkUrl = compDTO.linkUrl | ||
| 133 | + content.appStyle = compDTO.appStyle | ||
| 134 | + content.recommend = compDTO.recommend | ||
| 135 | + content.expIds = compDTO.expIds | ||
| 136 | + content.relId = compDTO.relId | ||
| 137 | + content.relType = compDTO.relType | ||
| 138 | + content.itemId = compDTO.itemId | ||
| 139 | + content.itemType = compDTO.itemType | ||
| 140 | + content.sceneId = compDTO.sceneId | ||
| 141 | + content.traceId = compDTO.traceId | ||
| 142 | + content.traceInfo = compDTO.traceInfo | ||
| 143 | + return content | ||
| 144 | + } | ||
| 75 | /** | 145 | /** |
| 76 | * 页面跳转 | 146 | * 页面跳转 |
| 77 | */ | 147 | */ |
| @@ -25,7 +25,12 @@ export class CompDTO implements BaseDTO { | @@ -25,7 +25,12 @@ export class CompDTO implements BaseDTO { | ||
| 25 | // meddleDataList: any[]; | 25 | // meddleDataList: any[]; |
| 26 | name: string = ''; | 26 | name: string = ''; |
| 27 | objectId: string = ''; // 跳转页面id? | 27 | objectId: string = ''; // 跳转页面id? |
| 28 | + /** | ||
| 29 | + * 频道(1:一级频道,2:二级频道),专题(21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间轴专题) | ||
| 30 | + */ | ||
| 31 | + objectLevel:string = '' | ||
| 28 | objectTitle: string = ''; // comp标题 | 32 | objectTitle: string = ''; // comp标题 |
| 33 | + objectSummary: string = ''; // 跳转频道、专题摘要【BFF聚合】 | ||
| 29 | // objectType?: string; // 跳转类型,枚举: | 34 | // objectType?: string; // 跳转类型,枚举: |
| 30 | operDataList: ContentDTO[] = []; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】 | 35 | operDataList: ContentDTO[] = []; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】 |
| 31 | // pageId?: any; | 36 | // pageId?: any; |
| @@ -51,6 +56,22 @@ export class CompDTO implements BaseDTO { | @@ -51,6 +56,22 @@ export class CompDTO implements BaseDTO { | ||
| 51 | 56 | ||
| 52 | // keyGenerator相关字符串,用于刷新list布局 | 57 | // keyGenerator相关字符串,用于刷新list布局 |
| 53 | timestamp: String = '1' | 58 | timestamp: String = '1' |
| 59 | + | ||
| 60 | + bottomNavId:string = '' | ||
| 61 | + //数据来源接口 0:非推荐楼层接口;1:推荐楼层接口 | ||
| 62 | + sourceInterfaceVal: number = 0 | ||
| 63 | + | ||
| 64 | + appStyle: string = ''; | ||
| 65 | + /** | ||
| 66 | + * 是否推荐数据;默认0:否,1:是 | ||
| 67 | + */ | ||
| 68 | + recommend:number = 0 | ||
| 69 | + relId: string = ''; | ||
| 70 | + relType: string = ''; | ||
| 71 | + itemType: string = ''; | ||
| 72 | + sceneId: string = ''; | ||
| 73 | + traceId: string = ''; | ||
| 74 | + traceInfo: string = ''; | ||
| 54 | /** | 75 | /** |
| 55 | * 创建新的compbean对象 | 76 | * 创建新的compbean对象 |
| 56 | * @param old | 77 | * @param old |
| @@ -27,6 +27,7 @@ export class ContentDTO implements BaseDTO { | @@ -27,6 +27,7 @@ export class ContentDTO implements BaseDTO { | ||
| 27 | liveType?: string; // 直播新闻-直播状态 | 27 | liveType?: string; // 直播新闻-直播状态 |
| 28 | expIds: string = ''; | 28 | expIds: string = ''; |
| 29 | itemId: string = ''; | 29 | itemId: string = ''; |
| 30 | + itemType: string = ''; | ||
| 30 | shareFlag?: string = '1'; | 31 | shareFlag?: string = '1'; |
| 31 | appStyle: string = ''; | 32 | appStyle: string = ''; |
| 32 | cityCode: string = ''; | 33 | cityCode: string = ''; |
| @@ -123,6 +124,20 @@ export class ContentDTO implements BaseDTO { | @@ -123,6 +124,20 @@ export class ContentDTO implements BaseDTO { | ||
| 123 | timestamp: String = '1' | 124 | timestamp: String = '1' |
| 124 | // 自定义参数,用于跳转对应页面时 传递targetLayout参数用 | 125 | // 自定义参数,用于跳转对应页面时 传递targetLayout参数用 |
| 125 | customParamTargetLayout?: string | 126 | customParamTargetLayout?: string |
| 127 | + //数据来源接口 0:非推荐楼层接口;1:推荐楼层接口 | ||
| 128 | + sourceInterfaceVal: number = 0 | ||
| 129 | + /** | ||
| 130 | + * 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING ) | ||
| 131 | + */ | ||
| 132 | + dataSourceType: string = ''; | ||
| 133 | + //组件ID | ||
| 134 | + compId: string = ''; | ||
| 135 | + /** | ||
| 136 | + * 是否推荐数据;默认0:否,1:是 | ||
| 137 | + */ | ||
| 138 | + recommend:number = 0 | ||
| 139 | + traceId: string = ''; | ||
| 140 | + traceInfo: string = ''; | ||
| 126 | 141 | ||
| 127 | static clone(old: ContentDTO): ContentDTO { | 142 | static clone(old: ContentDTO): ContentDTO { |
| 128 | let content = new ContentDTO(); | 143 | let content = new ContentDTO(); |
| @@ -72,7 +72,7 @@ export struct CompParser { | @@ -72,7 +72,7 @@ export struct CompParser { | ||
| 72 | 72 | ||
| 73 | build() { | 73 | build() { |
| 74 | Column() { | 74 | Column() { |
| 75 | - //Text(JSON.stringify(this.compDTO.compStyle)) | 75 | + // Text(JSON.stringify(this.compDTO.compStyle)) |
| 76 | this.componentBuilder(); | 76 | this.componentBuilder(); |
| 77 | } | 77 | } |
| 78 | } | 78 | } |
| @@ -90,16 +90,18 @@ export struct CompParser { | @@ -90,16 +90,18 @@ export struct CompParser { | ||
| 90 | } | 90 | } |
| 91 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && | 91 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && |
| 92 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" | 92 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" |
| 93 | - | 93 | + // Text('LiveHorizontalCardComponent') |
| 94 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 94 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 95 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { | 95 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { |
| 96 | if (this.compDTO.operDataList.length > 1) { | 96 | if (this.compDTO.operDataList.length > 1) { |
| 97 | + // Text('HorizontalStrokeCardThreeTwoRadioForMoreComponent') | ||
| 97 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ | 98 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ |
| 98 | compDTO: this.compDTO, | 99 | compDTO: this.compDTO, |
| 99 | pageId: this.pageId, | 100 | pageId: this.pageId, |
| 100 | pageName: this.pageName | 101 | pageName: this.pageName |
| 101 | }) | 102 | }) |
| 102 | } else { | 103 | } else { |
| 104 | + // Text('HorizontalStrokeCardThreeTwoRadioForOneComponent') | ||
| 103 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ | 105 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ |
| 104 | compDTO: this.compDTO, | 106 | compDTO: this.compDTO, |
| 105 | pageId: this.pageId, | 107 | pageId: this.pageId, |
| 1 | -import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO } from 'wdBean'; | 1 | +import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO, TopicInfo } from 'wdBean'; |
| 2 | import { WdWebComponent } from 'wdWebComponent'; | 2 | import { WdWebComponent } from 'wdWebComponent'; |
| 3 | import { CommonConstants } from 'wdConstant' | 3 | import { CommonConstants } from 'wdConstant' |
| 4 | import { BridgeWebViewControl } from 'wdJsBridge/Index'; | 4 | import { BridgeWebViewControl } from 'wdJsBridge/Index'; |
| @@ -41,6 +41,8 @@ export struct SpacialTopicPageComponent { | @@ -41,6 +41,8 @@ export struct SpacialTopicPageComponent { | ||
| 41 | @State isNetConnected: boolean = true | 41 | @State isNetConnected: boolean = true |
| 42 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 42 | @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 43 | @State showComment: boolean = false | 43 | @State showComment: boolean = false |
| 44 | + @State topicInfo: TopicInfo = {} as TopicInfo | ||
| 45 | + | ||
| 44 | private trySendData2H5() { | 46 | private trySendData2H5() { |
| 45 | if (!this.webPrepared || !this.dataPrepared) { | 47 | if (!this.webPrepared || !this.dataPrepared) { |
| 46 | return | 48 | return |
| @@ -140,16 +142,22 @@ export struct SpacialTopicPageComponent { | @@ -140,16 +142,22 @@ export struct SpacialTopicPageComponent { | ||
| 140 | if(pageInfoMsg && pageInfoMsg.data){ | 142 | if(pageInfoMsg && pageInfoMsg.data){ |
| 141 | this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo?.commentFlag) | 143 | this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo?.commentFlag) |
| 142 | this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo?.commentShowFlag) | 144 | this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo?.commentShowFlag) |
| 143 | - if(pageInfoMsg.data.topicInfo?.shareOpen === 1){ | 145 | + console.log('contentDetailData pageInfoMsg.data', JSON.stringify(pageInfoMsg.data)) |
| 146 | + this.topicInfo = pageInfoMsg.data.topicInfo | ||
| 147 | + this.contentDetailData.newsId = Number(this.topicInfo.topicId) | ||
| 148 | + this.contentDetailData.newsType = this.topicInfo.topicType | ||
| 149 | + if(this.topicInfo?.shareOpen === 1){ | ||
| 150 | + this.contentDetailData.shareInfo.shareOpen = this.topicInfo?.shareOpen | ||
| 151 | + console.log('contentDetailData this.topicInfo', JSON.stringify(this.topicInfo)) | ||
| 144 | if (!this.operationButtonList.includes('share')) { | 152 | if (!this.operationButtonList.includes('share')) { |
| 145 | this.operationButtonList.push('share'); | 153 | this.operationButtonList.push('share'); |
| 146 | } | 154 | } |
| 147 | - }else{ | 155 | + } else { |
| 148 | this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share') | 156 | this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share') |
| 149 | } | 157 | } |
| 150 | } | 158 | } |
| 151 | 159 | ||
| 152 | - console.log('contentDetailData',this.contentDetailData) | 160 | + console.log('contentDetailData', JSON.stringify(this.contentDetailData)) |
| 153 | } | 161 | } |
| 154 | } | 162 | } |
| 155 | } | 163 | } |
| @@ -199,6 +207,7 @@ export struct SpacialTopicPageComponent { | @@ -199,6 +207,7 @@ export struct SpacialTopicPageComponent { | ||
| 199 | contentDetailData: this.contentDetailData, | 207 | contentDetailData: this.contentDetailData, |
| 200 | publishCommentModel: this.publishCommentModel, | 208 | publishCommentModel: this.publishCommentModel, |
| 201 | operationButtonList: this.operationButtonList, | 209 | operationButtonList: this.operationButtonList, |
| 210 | + topicInfo: this.topicInfo, | ||
| 202 | styleType: 1, | 211 | styleType: 1, |
| 203 | onCommentIconClick:()=>{ | 212 | onCommentIconClick:()=>{ |
| 204 | this.showCommentList = true | 213 | this.showCommentList = true |
| @@ -298,7 +298,7 @@ struct ChannelSubscriptionLayout { | @@ -298,7 +298,7 @@ struct ChannelSubscriptionLayout { | ||
| 298 | Text(INDEX_SETTING_SUBTITLE) | 298 | Text(INDEX_SETTING_SUBTITLE) |
| 299 | .fontSize(12) | 299 | .fontSize(12) |
| 300 | .fontWeight(400) | 300 | .fontWeight(400) |
| 301 | - .fontColor('#222222') | 301 | + .fontColor('#80222222') |
| 302 | } | 302 | } |
| 303 | .width('100%') | 303 | .width('100%') |
| 304 | .margin({ top: 22, bottom: 16 }) | 304 | .margin({ top: 22, bottom: 16 }) |
| @@ -106,7 +106,10 @@ export struct CustomPullToRefresh { | @@ -106,7 +106,10 @@ export struct CustomPullToRefresh { | ||
| 106 | lottie.destroy(this.refreshingAnimName); | 106 | lottie.destroy(this.refreshingAnimName); |
| 107 | this.refreshAnimation?.removeEventListener('DOMLoaded') | 107 | this.refreshAnimation?.removeEventListener('DOMLoaded') |
| 108 | this.refreshAnimation?.removeEventListener('destroy') | 108 | this.refreshAnimation?.removeEventListener('destroy') |
| 109 | + this.refreshingAnimation?.removeEventListener('DOMLoaded') | ||
| 110 | + this.refreshingAnimation?.removeEventListener('destroy') | ||
| 109 | this.refreshAnimation = null | 111 | this.refreshAnimation = null |
| 112 | + this.refreshingAnimation = null | ||
| 110 | } | 113 | } |
| 111 | 114 | ||
| 112 | @Builder | 115 | @Builder |
| @@ -29,7 +29,8 @@ import { JSON } from '@kit.ArkTS' | @@ -29,7 +29,8 @@ import { JSON } from '@kit.ArkTS' | ||
| 29 | import { MoreComponent } from '../cardview/MoreComponent' | 29 | import { MoreComponent } from '../cardview/MoreComponent' |
| 30 | import { Card9Component } from '../cardview/Card9Component' | 30 | import { Card9Component } from '../cardview/Card9Component' |
| 31 | import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' | 31 | import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' |
| 32 | -import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' | 32 | +import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent' |
| 33 | + | ||
| 33 | const TAG = "SearchResultContentComponent" | 34 | const TAG = "SearchResultContentComponent" |
| 34 | 35 | ||
| 35 | @Component | 36 | @Component |
| @@ -148,7 +149,7 @@ export struct SearchResultContentComponent { | @@ -148,7 +149,7 @@ export struct SearchResultContentComponent { | ||
| 148 | this.data_rmh.push(data) | 149 | this.data_rmh.push(data) |
| 149 | }) | 150 | }) |
| 150 | 151 | ||
| 151 | - if(this.data_rmh.length > 0){ | 152 | + if (this.data_rmh.length > 0) { |
| 152 | this.count = 1 | 153 | this.count = 1 |
| 153 | } | 154 | } |
| 154 | //只有一条创作者,获取 创作者信息 | 155 | //只有一条创作者,获取 创作者信息 |
| @@ -262,7 +263,7 @@ export struct SearchResultContentComponent { | @@ -262,7 +263,7 @@ export struct SearchResultContentComponent { | ||
| 262 | this.isLoading = false | 263 | this.isLoading = false |
| 263 | this.count = this.count === -1 ? 0 : this.count | 264 | this.count = this.count === -1 ? 0 : this.count |
| 264 | }) | 265 | }) |
| 265 | - }else { | 266 | + } else { |
| 266 | this.hasMore = false | 267 | this.hasMore = false |
| 267 | } | 268 | } |
| 268 | } | 269 | } |
| @@ -270,12 +271,12 @@ export struct SearchResultContentComponent { | @@ -270,12 +271,12 @@ export struct SearchResultContentComponent { | ||
| 270 | build() { | 271 | build() { |
| 271 | Column() { | 272 | Column() { |
| 272 | if (this.count == 0) { | 273 | if (this.count == 0) { |
| 273 | - // ListHasNoMoreDataUI({ style: 2 }) | 274 | + |
| 274 | EmptyComponent({ | 275 | EmptyComponent({ |
| 275 | emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult, | 276 | emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult, |
| 276 | emptyButton: false, | 277 | emptyButton: false, |
| 278 | + }).height('70%') | ||
| 277 | 279 | ||
| 278 | - }) | ||
| 279 | } else { | 280 | } else { |
| 280 | List({ scroller: this.scroller2 }) { | 281 | List({ scroller: this.scroller2 }) { |
| 281 | if (this.data_rmh != null && this.data_rmh.length > 0) { | 282 | if (this.data_rmh != null && this.data_rmh.length > 0) { |
| @@ -326,12 +327,13 @@ export struct SearchResultContentComponent { | @@ -326,12 +327,13 @@ export struct SearchResultContentComponent { | ||
| 326 | }, (item: ContentDTO, index: number) => index.toString()) | 327 | }, (item: ContentDTO, index: number) => index.toString()) |
| 327 | 328 | ||
| 328 | //没有更多数据 显示提示 | 329 | //没有更多数据 显示提示 |
| 329 | - if (!this.hasMore && (this.data.totalCount() > 0|| (this.data_rmh != null && this.data_rmh.length > 0))) { | 330 | + if (!this.hasMore && (this.data.totalCount() > 0 || (this.data_rmh != null && this.data_rmh.length > 0))) { |
| 330 | ListItem() { | 331 | ListItem() { |
| 331 | ListHasNoMoreDataUI() | 332 | ListHasNoMoreDataUI() |
| 332 | } | 333 | } |
| 333 | } | 334 | } |
| 334 | - }.cachedCount(5) | 335 | + } |
| 336 | + .cachedCount(5) | ||
| 335 | .edgeEffect(EdgeEffect.None) | 337 | .edgeEffect(EdgeEffect.None) |
| 336 | .scrollBar(BarState.Off) | 338 | .scrollBar(BarState.Off) |
| 337 | .height('100%') | 339 | .height('100%') |
| @@ -344,6 +346,7 @@ export struct SearchResultContentComponent { | @@ -344,6 +346,7 @@ export struct SearchResultContentComponent { | ||
| 344 | } | 346 | } |
| 345 | } | 347 | } |
| 346 | .backgroundColor($r('app.color.white')) | 348 | .backgroundColor($r('app.color.white')) |
| 349 | + .height('100%') | ||
| 347 | .width('100%') | 350 | .width('100%') |
| 348 | } | 351 | } |
| 349 | 352 |
| @@ -60,6 +60,7 @@ export struct EmptyComponent { | @@ -60,6 +60,7 @@ export struct EmptyComponent { | ||
| 60 | @State emptyButton: boolean = false | 60 | @State emptyButton: boolean = false |
| 61 | @State isBlack: boolean = false // 背景是否为黑色 默认白色 | 61 | @State isBlack: boolean = false // 背景是否为黑色 默认白色 |
| 62 | @State timeNum: number = 10 | 62 | @State timeNum: number = 10 |
| 63 | + | ||
| 63 | /** | 64 | /** |
| 64 | * The empty image width percentage setting. | 65 | * The empty image width percentage setting. |
| 65 | */ | 66 | */ |
| @@ -51,38 +51,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -51,38 +51,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 51 | 51 | ||
| 52 | toMore() { | 52 | toMore() { |
| 53 | if (this.moreWidth > this.initMoreWidth * 2) { | 53 | if (this.moreWidth > this.initMoreWidth * 2) { |
| 54 | - this.liveToMore(); | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - liveToMore() { | ||
| 59 | - if (!!this.compDTO.dataSourceType) { | ||
| 60 | - // if (this.compDTO.dataSourceType === 'OBJECT_POS') { | ||
| 61 | - // ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 62 | - // return; | ||
| 63 | - // } | ||
| 64 | - if (this.compDTO.linkUrl) { | ||
| 65 | - let taskAction: Action = { | ||
| 66 | - type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 67 | - params: { | ||
| 68 | - url: this.compDTO.linkUrl | ||
| 69 | - } as Params, | ||
| 70 | - }; | ||
| 71 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 72 | - } else { | ||
| 73 | - this.jumpToLiveMorePage() | ||
| 74 | - } | ||
| 75 | - } else { | ||
| 76 | - if (this.compDTO?.objectType === '11') { | ||
| 77 | - } else { | ||
| 78 | - const contentDTO: ContentDTO = { | ||
| 79 | - objectId: this.compDTO.objectId, | ||
| 80 | - objectType: this.compDTO.objectType, | ||
| 81 | - linkUrl: this.compDTO.linkUrl, | ||
| 82 | - pageId: this.compDTO.pageId | ||
| 83 | - } as ContentDTO | ||
| 84 | - ProcessUtils.processPage(contentDTO) | ||
| 85 | - } | 54 | + ProcessUtils.compJumpPage(this.compDTO) |
| 86 | } | 55 | } |
| 87 | } | 56 | } |
| 88 | 57 | ||
| @@ -115,7 +84,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -115,7 +84,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 115 | } | 84 | } |
| 116 | .visibility(this.showMore() ? Visibility.Visible : Visibility.None) | 85 | .visibility(this.showMore() ? Visibility.Visible : Visibility.None) |
| 117 | .onClick(() => { | 86 | .onClick(() => { |
| 118 | - this.liveToMore(); | 87 | + ProcessUtils.compJumpPage(this.compDTO) |
| 119 | }) | 88 | }) |
| 120 | 89 | ||
| 121 | }.justifyContent(FlexAlign.SpaceBetween) | 90 | }.justifyContent(FlexAlign.SpaceBetween) |
| @@ -72,13 +72,26 @@ export struct LiveHorizontalCardComponent { | @@ -72,13 +72,26 @@ export struct LiveHorizontalCardComponent { | ||
| 72 | // } | 72 | // } |
| 73 | if (this.compDTO.linkUrl) { | 73 | if (this.compDTO.linkUrl) { |
| 74 | let taskAction: Action = { | 74 | let taskAction: Action = { |
| 75 | - type: 'JUMP_H5_BY_WEB_VIEW', | 75 | + type: 'JUMP_INNER_NEW_PAGE', |
| 76 | params: { | 76 | params: { |
| 77 | - url: this.compDTO.linkUrl | 77 | + url: this.compDTO.linkUrl, |
| 78 | + pageID: 'SPACIAL_TOPIC_PAGE', | ||
| 79 | + contentID: this.compDTO.objectId, | ||
| 80 | + extra: { | ||
| 81 | + relId: this.compDTO.relId, | ||
| 82 | + relType: this.compDTO.relType, | ||
| 83 | + pageId: this.compDTO.pageId | ||
| 84 | + } | ||
| 78 | } as Params, | 85 | } as Params, |
| 79 | }; | 86 | }; |
| 87 | + this.compDTO.operDataList = [] | ||
| 88 | + console.log('LiveHorizontalCardComponent', JSON.stringify(this.compDTO)) | ||
| 89 | + console.log('LiveHorizontalCardComponent', this.compDTO.relId) | ||
| 90 | + console.log('LiveHorizontalCardComponent', this.compDTO.relType) | ||
| 91 | + console.log('LiveHorizontalCardComponent', JSON.stringify(taskAction)) | ||
| 80 | WDRouterRule.jumpWithAction(taskAction) | 92 | WDRouterRule.jumpWithAction(taskAction) |
| 81 | } else { | 93 | } else { |
| 94 | + // console.log('LiveHorizontalCardComponent', 'jumpToLiveMorePage') | ||
| 82 | this.jumpToLiveMorePage() | 95 | this.jumpToLiveMorePage() |
| 83 | } | 96 | } |
| 84 | } else { | 97 | } else { |
| @@ -90,6 +103,7 @@ export struct LiveHorizontalCardComponent { | @@ -90,6 +103,7 @@ export struct LiveHorizontalCardComponent { | ||
| 90 | linkUrl: this.compDTO.linkUrl, | 103 | linkUrl: this.compDTO.linkUrl, |
| 91 | pageId: this.compDTO.pageId | 104 | pageId: this.compDTO.pageId |
| 92 | } as ContentDTO | 105 | } as ContentDTO |
| 106 | + // console.log('LiveHorizontalCardComponent', 'ProcessUtils.processPage') | ||
| 93 | ProcessUtils.processPage(contentDTO) | 107 | ProcessUtils.processPage(contentDTO) |
| 94 | } | 108 | } |
| 95 | } | 109 | } |
| @@ -6,7 +6,8 @@ import { | @@ -6,7 +6,8 @@ import { | ||
| 6 | ContentDetailDTO, | 6 | ContentDetailDTO, |
| 7 | contentListParams, | 7 | contentListParams, |
| 8 | InteractDataDTO, | 8 | InteractDataDTO, |
| 9 | - postExecuteCollectRecordParams | 9 | + postExecuteCollectRecordParams, |
| 10 | + TopicInfo | ||
| 10 | } from 'wdBean'; | 11 | } from 'wdBean'; |
| 11 | import router from '@ohos.router'; | 12 | import router from '@ohos.router'; |
| 12 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; | 13 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; |
| @@ -94,6 +95,7 @@ export struct OperRowListView { | @@ -94,6 +95,7 @@ export struct OperRowListView { | ||
| 94 | @Consume pageId: string | 95 | @Consume pageId: string |
| 95 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 96 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 96 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 97 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 98 | + @Prop topicInfo?: TopicInfo = {} as TopicInfo | ||
| 97 | 99 | ||
| 98 | async aboutToAppear() { | 100 | async aboutToAppear() { |
| 99 | console.info(TAG, 'this.needLike', this.needLike) | 101 | console.info(TAG, 'this.needLike', this.needLike) |
| @@ -416,7 +418,33 @@ export struct OperRowListView { | @@ -416,7 +418,33 @@ export struct OperRowListView { | ||
| 416 | } | 418 | } |
| 417 | 419 | ||
| 418 | share() { | 420 | share() { |
| 419 | - WDShare.shareContent(this.contentDetailData) | 421 | + if (this.topicInfo && Object.keys(this.topicInfo).length > 0) { |
| 422 | + console.info(TAG, 'contentDetailData this.topicInfo', JSON.stringify(this.topicInfo)) | ||
| 423 | + let contentDetailData: ContentDetailDTO = { | ||
| 424 | + newsId: this.topicInfo?.topicId && Number.parseInt(this.topicInfo.topicId), | ||
| 425 | + shareInfo:{ | ||
| 426 | + appCustomContentId: this.topicInfo?.topicId, | ||
| 427 | + appCustomContentType: this.topicInfo?.topicType + '', | ||
| 428 | + shareTitle: this.topicInfo?.shareTitle, | ||
| 429 | + shareSummary: this.topicInfo?.shareSummary, | ||
| 430 | + appCustomImageUrl: this.topicInfo?.shareCoverUrl, | ||
| 431 | + sharePosterCoverUrl: this.topicInfo?.sharePosterCoverUrl, | ||
| 432 | + shareUrl: this.topicInfo?.shareUrl, | ||
| 433 | + appCustomTargetRelId: this.topicInfo?.relId, | ||
| 434 | + appCustomTargetRelType: this.topicInfo?.relType, | ||
| 435 | + appCustomShowReport: false, | ||
| 436 | + appCustomShowLike: -1, | ||
| 437 | + shareOpen: 1, | ||
| 438 | + sharePosterOpen: this.topicInfo?.posterFlag, | ||
| 439 | + appCustomShowPoster: this.topicInfo?.posterFlag && this.topicInfo?.posterFlag > 0 ? 1 : -1, | ||
| 440 | + } | ||
| 441 | + } as ContentDetailDTO | ||
| 442 | + WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo , this.topicInfo) | ||
| 443 | + WDShare.shareContent(contentDetailData,TrackConstants.PageName.Eletronic_Paper,TrackConstants.PageName.Eletronic_Paper) | ||
| 444 | + } else { | ||
| 445 | + console.info(TAG, 'this.contentDetailData') | ||
| 446 | + WDShare.shareContent(this.contentDetailData) | ||
| 447 | + } | ||
| 420 | } | 448 | } |
| 421 | 449 | ||
| 422 | // 已登录->查询用户对作品收藏状态 | 450 | // 已登录->查询用户对作品收藏状态 |
| 1 | import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 1 | import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 2 | -import { DateTimeUtils, Logger, StringUtils, EmitterUtils, EmitterEventId } from 'wdKit'; | 2 | +import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, SPHelper, StringUtils } from 'wdKit'; |
| 3 | 3 | ||
| 4 | import { | 4 | import { |
| 5 | batchLikeAndCollectResult, | 5 | batchLikeAndCollectResult, |
| @@ -7,8 +7,11 @@ import { | @@ -7,8 +7,11 @@ import { | ||
| 7 | ContentDetailDTO, | 7 | ContentDetailDTO, |
| 8 | ContentDTO, | 8 | ContentDTO, |
| 9 | contentListParams, | 9 | contentListParams, |
| 10 | + FeedbackTypeBean, | ||
| 11 | + GoldenPositionExtraBean, | ||
| 10 | InteractDataDTO, | 12 | InteractDataDTO, |
| 11 | LiveReviewDTO, | 13 | LiveReviewDTO, |
| 14 | + LiveRoomDataBean, | ||
| 12 | MorningEveningPaperDTO, | 15 | MorningEveningPaperDTO, |
| 13 | NavigationBodyDTO, | 16 | NavigationBodyDTO, |
| 14 | NavigationDetailDTO, | 17 | NavigationDetailDTO, |
| @@ -22,13 +25,10 @@ import { | @@ -22,13 +25,10 @@ import { | ||
| 22 | postExecuteCollectRecordParams, | 25 | postExecuteCollectRecordParams, |
| 23 | postExecuteLikeParams, | 26 | postExecuteLikeParams, |
| 24 | postInteractAccentionOperateParams, | 27 | postInteractAccentionOperateParams, |
| 25 | - postRecommendListParams, | ||
| 26 | - GoldenPositionExtraBean, | ||
| 27 | - FeedbackTypeBean, | ||
| 28 | - LiveRoomDataBean | 28 | + postRecommendListParams |
| 29 | } from 'wdBean'; | 29 | } from 'wdBean'; |
| 30 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 30 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 31 | -import { ArrayList } from '@kit.ArkTS'; | 31 | +import { SpConstants } from 'wdConstant/Index'; |
| 32 | 32 | ||
| 33 | const TAG = 'HttpRequest'; | 33 | const TAG = 'HttpRequest'; |
| 34 | 34 | ||
| @@ -243,6 +243,14 @@ export class PageRepository { | @@ -243,6 +243,14 @@ export class PageRepository { | ||
| 243 | url = url + "&districtCode=" + HttpUtils.getDistrictCode() | 243 | url = url + "&districtCode=" + HttpUtils.getDistrictCode() |
| 244 | + "&provinceCode=" + provinceCode | 244 | + "&provinceCode=" + provinceCode |
| 245 | + "&cityCode=" + HttpUtils.getCityCode() | 245 | + "&cityCode=" + HttpUtils.getCityCode() |
| 246 | + | ||
| 247 | + let per=SPHelper.default.getSync(SpConstants.LOCATION_FIRST_POSITION,true) | ||
| 248 | + if(per){ | ||
| 249 | + //检测首次获取地理信息 | ||
| 250 | + url = url+'&firstLocation=1' | ||
| 251 | + SPHelper.default.save(SpConstants.LOCATION_FIRST_POSITION,false) | ||
| 252 | + } | ||
| 253 | + | ||
| 246 | } | 254 | } |
| 247 | if (myChannelIds) { | 255 | if (myChannelIds) { |
| 248 | url = url + `&channelIds=${myChannelIds}` | 256 | url = url + `&channelIds=${myChannelIds}` |
| @@ -45,10 +45,10 @@ export class WDShare { | @@ -45,10 +45,10 @@ export class WDShare { | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | //专题分享数据转换 | 47 | //专题分享数据转换 |
| 48 | - static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){ | ||
| 49 | - shareBean.appCustomTopicType = topicInfoBean.topicType+'' | 48 | + static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean?: TopicInfo){ |
| 49 | + shareBean.appCustomTopicType = topicInfoBean?.topicType+'' | ||
| 50 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链 | 50 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链 |
| 51 | - if(25 == topicInfoBean.topicType){ | 51 | + if(25 == topicInfoBean?.topicType){ |
| 52 | shareBean.appCustomShowPosterType = 6 | 52 | shareBean.appCustomShowPosterType = 6 |
| 53 | shareBean.appCustomTopicPattern = topicInfoBean.topicPattern | 53 | shareBean.appCustomTopicPattern = topicInfoBean.topicPattern |
| 54 | shareBean.appCustomPublishTime = topicInfoBean.topicDate | 54 | shareBean.appCustomPublishTime = topicInfoBean.topicDate |
| @@ -76,11 +76,11 @@ export class WDShare { | @@ -76,11 +76,11 @@ export class WDShare { | ||
| 76 | //文章/直播/话题专题(H5普通文章专题,包含时间链) | 76 | //文章/直播/话题专题(H5普通文章专题,包含时间链) |
| 77 | shareBean.appCustomShowPosterType = 8 | 77 | shareBean.appCustomShowPosterType = 8 |
| 78 | //海报的头图 | 78 | //海报的头图 |
| 79 | - shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl | 79 | + shareBean.sharePosterCoverUrl = topicInfoBean?.backgroundImgUrl || '' |
| 80 | shareBean.appCustomIsFrontDaily = false | 80 | shareBean.appCustomIsFrontDaily = false |
| 81 | - shareBean.appCustomPosterTitle = topicInfoBean.title | ||
| 82 | - shareBean.appCustomPosterSummary = topicInfoBean.summary | ||
| 83 | - if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){ | 81 | + shareBean.appCustomPosterTitle = topicInfoBean?.title || '' |
| 82 | + shareBean.appCustomPosterSummary = topicInfoBean?.summary || '' | ||
| 83 | + if(topicInfoBean?.shareContentList != null && topicInfoBean?.shareContentList && topicInfoBean.shareContentList.length > 0){ | ||
| 84 | shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[] | 84 | shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[] |
| 85 | shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length | 85 | shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length |
| 86 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { | 86 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { |
| @@ -7,7 +7,7 @@ import dataPreferences from '@ohos.data.preferences'; | @@ -7,7 +7,7 @@ import dataPreferences from '@ohos.data.preferences'; | ||
| 7 | import { TrackConstants } from 'wdTracking/Index'; | 7 | import { TrackConstants } from 'wdTracking/Index'; |
| 8 | 8 | ||
| 9 | const TAG = 'SpacialTopicPage'; | 9 | const TAG = 'SpacialTopicPage'; |
| 10 | - | 10 | +//H5专题 |
| 11 | @Entry | 11 | @Entry |
| 12 | @Component | 12 | @Component |
| 13 | struct SpacialTopicPage { | 13 | struct SpacialTopicPage { |
-
Please register or login to post a comment