Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: -fix 多图跳转号主页bug修复 fix:bug[18576] 登录账户-忘记密码-进入找回密码界面跳转时有页面残留 fix: 18381 搜索结果页-无法加载出动态图片 fix: 1、18558 我的频道下默认选中的推荐和热点频道按钮未能使用圆角; 2、18559 更多频道”和“地方频道”下的频道按钮未能使用圆角 feat: 18047 搜索结果-号主动态视频-竖屏,号主信息展示不全 feat: 直播横划卡右滑展示更多逻辑 feat: 直播预告横划卡右滑展示更多逻辑 feat: 直播横划卡右滑展示更多逻辑 feat:横屏直播详情页面添加垫片逻辑 ref |> 解决未登录状态无法保存设置中的开关状态问题 ref |> 处理稿件分享功能暂时调用华为分享组件 feat:竖屏直播,进入竖屏直播,未设置垫片-竖屏流直播详情页,后台点击切换到垫片,主播暂时离开,马上回来 缺省图没有显示,看图 fix(规范):本地字段重命名
Showing
28 changed files
with
362 additions
and
202 deletions
| 1 | import data_preferences from '@ohos.data.preferences'; | 1 | import data_preferences from '@ohos.data.preferences'; |
| 2 | import { Logger } from './Logger'; | 2 | import { Logger } from './Logger'; |
| 3 | +import { JSON } from '@kit.ArkTS'; | ||
| 3 | 4 | ||
| 4 | const TAG = 'SPHelper' | 5 | const TAG = 'SPHelper' |
| 5 | 6 | ||
| 7 | +const logEnable = false | ||
| 8 | + | ||
| 6 | /** | 9 | /** |
| 7 | * sp存储,单条数据,value<1k;业务数据超过1k的,建议使用KVStoreHelper | 10 | * sp存储,单条数据,value<1k;业务数据超过1k的,建议使用KVStoreHelper |
| 8 | */ | 11 | */ |
| @@ -12,10 +15,14 @@ export class SPHelper { | @@ -12,10 +15,14 @@ export class SPHelper { | ||
| 12 | 15 | ||
| 13 | static init(context: Context) { | 16 | static init(context: Context) { |
| 14 | SPHelper.context = context; | 17 | SPHelper.context = context; |
| 18 | + if (context) { | ||
| 19 | + Logger.debug(TAG, '初始化context') | ||
| 20 | + } | ||
| 15 | } | 21 | } |
| 16 | 22 | ||
| 17 | static setSpFilename(spFilename: string) { | 23 | static setSpFilename(spFilename: string) { |
| 18 | SPHelper.spFilename = spFilename; | 24 | SPHelper.spFilename = spFilename; |
| 25 | + Logger.debug(TAG, '设置文件名: ' + spFilename) | ||
| 19 | } | 26 | } |
| 20 | 27 | ||
| 21 | // 静态属性 | 28 | // 静态属性 |
| @@ -37,47 +44,75 @@ export class SPHelper { | @@ -37,47 +44,75 @@ export class SPHelper { | ||
| 37 | } | 44 | } |
| 38 | 45 | ||
| 39 | async save(key: string, value: data_preferences.ValueType) { | 46 | async save(key: string, value: data_preferences.ValueType) { |
| 40 | - const preferences: data_preferences.Preferences = await this.getVideoPreferences(); | ||
| 41 | - await preferences.put(key, value) | ||
| 42 | - await preferences.flush() | 47 | + try { |
| 48 | + const preferences: data_preferences.Preferences = await this.getVideoPreferences(); | ||
| 49 | + await preferences.put(key, value) | ||
| 50 | + await preferences.flush() | ||
| 51 | + if (logEnable) { | ||
| 52 | + Logger.debug(TAG, '保存 key: ' + key + " value => " + value) | ||
| 53 | + } | ||
| 54 | + } catch (e) { | ||
| 55 | + Logger.error(TAG, '保存 key: ' + key + " value => " + value + " 报错:" + JSON.stringify(e)) | ||
| 56 | + } | ||
| 43 | } | 57 | } |
| 44 | 58 | ||
| 45 | saveSync(key: string, value: data_preferences.ValueType) { | 59 | saveSync(key: string, value: data_preferences.ValueType) { |
| 46 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); | 60 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); |
| 47 | preferences.putSync(key, value) | 61 | preferences.putSync(key, value) |
| 48 | preferences.flush().then(() => { | 62 | preferences.flush().then(() => { |
| 49 | - Logger.debug(TAG, 'saveSync flush success') | 63 | + if (logEnable) { |
| 64 | + Logger.debug(TAG, 'sync保存 key: ' + key + " value => " + value) | ||
| 65 | + } | ||
| 50 | }).catch((error: object) => { | 66 | }).catch((error: object) => { |
| 51 | - Logger.debug(TAG, 'saveSync flush failed: ' + JSON.stringify(error)) | 67 | + Logger.error(TAG, 'sync保存 key: ' + key + " value => " + value + " 报错:" + JSON.stringify(error)) |
| 52 | }); | 68 | }); |
| 53 | } | 69 | } |
| 54 | 70 | ||
| 55 | async get(key: string, defValue: data_preferences.ValueType): Promise<data_preferences.ValueType> { | 71 | async get(key: string, defValue: data_preferences.ValueType): Promise<data_preferences.ValueType> { |
| 56 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); | 72 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); |
| 57 | - return await preferences.get(key, defValue); | 73 | + const data = await preferences.get(key, defValue); |
| 74 | + if (logEnable) { | ||
| 75 | + Logger.debug(TAG, '获取 key: ' + key + " value => " + data + "| 默认值:" + defValue) | ||
| 76 | + } | ||
| 77 | + return data | ||
| 58 | } | 78 | } |
| 59 | 79 | ||
| 60 | getSync(key: string, defValue: data_preferences.ValueType): data_preferences.ValueType { | 80 | getSync(key: string, defValue: data_preferences.ValueType): data_preferences.ValueType { |
| 61 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); | 81 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); |
| 62 | - return preferences.getSync(key, defValue); | 82 | + const data = preferences.getSync(key, defValue); |
| 83 | + if (logEnable) { | ||
| 84 | + Logger.debug(TAG, 'sync获取 key: ' + key + " value => " + data + "| 默认值:" + defValue) | ||
| 85 | + } | ||
| 86 | + return data | ||
| 63 | } | 87 | } |
| 64 | 88 | ||
| 65 | async has(key: string): Promise<boolean> { | 89 | async has(key: string): Promise<boolean> { |
| 66 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); | 90 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); |
| 67 | - return await preferences.has(key); | 91 | + const data = await preferences.has(key); |
| 92 | + if (logEnable) { | ||
| 93 | + Logger.debug(TAG, 'has key: ' + key + ' => ' + data) | ||
| 94 | + } | ||
| 95 | + return data | ||
| 68 | } | 96 | } |
| 69 | 97 | ||
| 70 | hasSync(key: string): boolean { | 98 | hasSync(key: string): boolean { |
| 71 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); | 99 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); |
| 72 | - return preferences.hasSync(key); | 100 | + const data = preferences.hasSync(key); |
| 101 | + if (logEnable) { | ||
| 102 | + Logger.debug(TAG, 'synchas key: ' + key + ' => ' + data) | ||
| 103 | + } | ||
| 104 | + return data | ||
| 73 | } | 105 | } |
| 74 | 106 | ||
| 75 | async delete(key: string) { | 107 | async delete(key: string) { |
| 76 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); | 108 | const preferences: data_preferences.Preferences = await this.getVideoPreferences(); |
| 77 | preferences.delete(key).then(async () => { | 109 | preferences.delete(key).then(async () => { |
| 78 | await preferences.flush(); | 110 | await preferences.flush(); |
| 111 | + if (logEnable) { | ||
| 112 | + Logger.debug(TAG, '删除 key: ' + key) | ||
| 113 | + } | ||
| 79 | }).catch((err: Error) => { | 114 | }).catch((err: Error) => { |
| 80 | - // Logger.error(TAG, 'Failed to delete the key. Cause: ' + err); | 115 | + Logger.error(TAG, '删除 key失败:' + JSON.stringify(err)); |
| 81 | }); | 116 | }); |
| 82 | } | 117 | } |
| 83 | 118 | ||
| @@ -85,9 +120,11 @@ export class SPHelper { | @@ -85,9 +120,11 @@ export class SPHelper { | ||
| 85 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); | 120 | const preferences: data_preferences.Preferences = this.getVideoPreferencesSync(); |
| 86 | preferences.deleteSync(key) | 121 | preferences.deleteSync(key) |
| 87 | preferences.flush().then(() => { | 122 | preferences.flush().then(() => { |
| 88 | - Logger.debug(TAG, 'deleteSync flush success') | 123 | + if (logEnable) { |
| 124 | + Logger.debug(TAG, 'sync删除 key: ' + key) | ||
| 125 | + } | ||
| 89 | }).catch((error: object) => { | 126 | }).catch((error: object) => { |
| 90 | - Logger.debug(TAG, 'deleteSync flush failed: ' + JSON.stringify(error)) | 127 | + Logger.error(TAG, 'sync删除 key失败:' + JSON.stringify(error)); |
| 91 | }); | 128 | }); |
| 92 | } | 129 | } |
| 93 | 130 | ||
| @@ -95,8 +132,9 @@ export class SPHelper { | @@ -95,8 +132,9 @@ export class SPHelper { | ||
| 95 | this.getVideoPreferences().then(async (preferences: data_preferences.Preferences) => { | 132 | this.getVideoPreferences().then(async (preferences: data_preferences.Preferences) => { |
| 96 | preferences.clearSync() | 133 | preferences.clearSync() |
| 97 | await preferences.flush() | 134 | await preferences.flush() |
| 135 | + Logger.debug(TAG, 'sync清除所有数据'); | ||
| 98 | }).catch((err: Error) => { | 136 | }).catch((err: Error) => { |
| 99 | - // Logger.error(TAG, 'get the preferences failed, Cause: ' + err); | 137 | + Logger.error(TAG, 'sync清除所有数据,失败:' + JSON.stringify(err)); |
| 100 | }); | 138 | }); |
| 101 | } | 139 | } |
| 102 | 140 |
| @@ -9,6 +9,16 @@ import { commentInfo } from './commentInfo'; | @@ -9,6 +9,16 @@ import { commentInfo } from './commentInfo'; | ||
| 9 | import { BaseDTO } from '../component/BaseDTO'; | 9 | import { BaseDTO } from '../component/BaseDTO'; |
| 10 | import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; | 10 | import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; |
| 11 | 11 | ||
| 12 | +export class ContentShareInfoDTO { | ||
| 13 | + shareTitle: string = '' | ||
| 14 | + shareUrl: string = '' | ||
| 15 | + shareSummary: string = '' | ||
| 16 | + shareCoverUrl: string = '' | ||
| 17 | + sharePosterCoverUrl: string = '' | ||
| 18 | + shareOpen: number = 0 | ||
| 19 | + sharePosterOpen: number = 0 | ||
| 20 | +} | ||
| 21 | + | ||
| 12 | @Observed | 22 | @Observed |
| 13 | export class ContentDTO implements BaseDTO { | 23 | export class ContentDTO implements BaseDTO { |
| 14 | seoTags: string = ''; | 24 | seoTags: string = ''; |
| @@ -70,6 +80,7 @@ export class ContentDTO implements BaseDTO { | @@ -70,6 +80,7 @@ export class ContentDTO implements BaseDTO { | ||
| 70 | fullColumnImgUrls: FullColumnImgUrlDTO[] = []; | 80 | fullColumnImgUrls: FullColumnImgUrlDTO[] = []; |
| 71 | liveInfo: LiveInfoDTO = {} as LiveInfoDTO; // 直播新闻信息【BFF聚合】 | 81 | liveInfo: LiveInfoDTO = {} as LiveInfoDTO; // 直播新闻信息【BFF聚合】 |
| 72 | videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的 | 82 | videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的 |
| 83 | + shareInfo: ContentShareInfoDTO = {} as ContentShareInfoDTO | ||
| 73 | 84 | ||
| 74 | newsSummary: string = ''; //appstyle:2 ,新闻详情 | 85 | newsSummary: string = ''; //appstyle:2 ,新闻详情 |
| 75 | contentText?: string = ''; | 86 | contentText?: string = ''; |
| @@ -154,6 +165,7 @@ export class ContentDTO implements BaseDTO { | @@ -154,6 +165,7 @@ export class ContentDTO implements BaseDTO { | ||
| 154 | content.fullColumnImgUrls = old.fullColumnImgUrls; | 165 | content.fullColumnImgUrls = old.fullColumnImgUrls; |
| 155 | content.liveInfo = old.liveInfo; | 166 | content.liveInfo = old.liveInfo; |
| 156 | content.videoInfo = old.videoInfo; | 167 | content.videoInfo = old.videoInfo; |
| 168 | + content.shareInfo = old.shareInfo | ||
| 157 | content.newsSummary = old.newsSummary; | 169 | content.newsSummary = old.newsSummary; |
| 158 | content.interactData = old.interactData; | 170 | content.interactData = old.interactData; |
| 159 | content.hasMore = old.hasMore; | 171 | content.hasMore = old.hasMore; |
| @@ -14,37 +14,37 @@ export interface ShareInfoDTO { | @@ -14,37 +14,37 @@ export interface ShareInfoDTO { | ||
| 14 | //分享链接 | 14 | //分享链接 |
| 15 | shareUrl: string; | 15 | shareUrl: string; |
| 16 | //首发时间 | 16 | //首发时间 |
| 17 | - publishTime:string; | 17 | + appCustomPublishTime:string; |
| 18 | //图片 | 18 | //图片 |
| 19 | - imageUrl:string; | 19 | + appCustomImageUrl:string; |
| 20 | //直播和内容的举报,仅针对人民号发布的才能举报,cms创建的没有举报按钮 | 20 | //直播和内容的举报,仅针对人民号发布的才能举报,cms创建的没有举报按钮 |
| 21 | - showReport:boolean; | 21 | + appCustomShowReport:boolean; |
| 22 | //点赞按钮显示 -1:不展示 0:未点赞 1:已点赞 | 22 | //点赞按钮显示 -1:不展示 0:未点赞 1:已点赞 |
| 23 | - showLike:number; | 23 | + appCustomShowLike:number; |
| 24 | //0 分享海报关闭,1 分享海报开启 | 24 | //0 分享海报关闭,1 分享海报开启 |
| 25 | - posterShareControl:string; | 25 | + appCustomPosterShareControl:string; |
| 26 | //是否展示海报 -1-不展示图标 | 26 | //是否展示海报 -1-不展示图标 |
| 27 | - showPoster:number; | 27 | + appCustomShowPoster:number; |
| 28 | //海报展示类型 1:专题、文章、图文、视频、直播 2:人民号 3:评论 4:电子报海报 5:音频专题海报 6:早晚报专题海报 7:榜单H5 8:H5普通文章专题,包含时间链 | 28 | //海报展示类型 1:专题、文章、图文、视频、直播 2:人民号 3:评论 4:电子报海报 5:音频专题海报 6:早晚报专题海报 7:榜单H5 8:H5普通文章专题,包含时间链 |
| 29 | - showPosterType:number; | 29 | + appCustomShowPosterType:number; |
| 30 | //接口返回: 内容id、内容类型 | 30 | //接口返回: 内容id、内容类型 |
| 31 | - contentId:string; | 31 | + appCustomContentId:string; |
| 32 | //内容类型,分享的类型 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 | 32 | //内容类型,分享的类型 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 |
| 33 | - contentType:string; | 33 | + appCustomContentType:string; |
| 34 | //关系id | 34 | //关系id |
| 35 | - targetRelId:string; | 35 | + appCustomTargetRelId:string; |
| 36 | //关系类型,1.频道关系;2.专题关系 | 36 | //关系类型,1.频道关系;2.专题关系 |
| 37 | - targetRelType:string; | 37 | + appCustomTargetRelType:string; |
| 38 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题 | 38 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题 |
| 39 | - topicType:string; | 39 | + appCustomTopicType:string; |
| 40 | //早晚报;1-早报;2-午报;3-晚报 | 40 | //早晚报;1-早报;2-午报;3-晚报 |
| 41 | - topicPattern:number; | 41 | + appCustomTopicPattern:number; |
| 42 | //是否有头版 | 42 | //是否有头版 |
| 43 | - isFrontDaily:boolean; | 43 | + appCustomIsFrontDaily:boolean; |
| 44 | //分享海报简介 | 44 | //分享海报简介 |
| 45 | - posterSummary:string; | ||
| 46 | - sharePosterItemList: SharePosterItemBean[] | 45 | + appCustomPosterSummary:string; |
| 46 | + appCustomSharePosterItemList: SharePosterItemBean[] | ||
| 47 | //分享海报标题 | 47 | //分享海报标题 |
| 48 | - posterTitle:string; | 48 | + appCustomPosterTitle:string; |
| 49 | 49 | ||
| 50 | } | 50 | } |
| @@ -444,17 +444,17 @@ export struct ENewspaperPageComponent { | @@ -444,17 +444,17 @@ export struct ENewspaperPageComponent { | ||
| 444 | let contentDetailData: ContentDetailDTO = { | 444 | let contentDetailData: ContentDetailDTO = { |
| 445 | shareInfo:{ | 445 | shareInfo:{ |
| 446 | shareTitle:this.newspaperListBean?.list[this.swiperIndex].pageName, | 446 | shareTitle:this.newspaperListBean?.list[this.swiperIndex].pageName, |
| 447 | - publishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum, | ||
| 448 | - imageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic, | 447 | + appCustomPublishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum, |
| 448 | + appCustomImageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic, | ||
| 449 | shareUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.shareUrl, | 449 | shareUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.shareUrl, |
| 450 | sharePosterCoverUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.sharePosterCoverUrl, | 450 | sharePosterCoverUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.sharePosterCoverUrl, |
| 451 | - showReport:false, | ||
| 452 | - showLike:-1, | 451 | + appCustomShowReport:false, |
| 452 | + appCustomShowLike:-1, | ||
| 453 | shareOpen:1, | 453 | shareOpen:1, |
| 454 | sharePosterOpen:1, | 454 | sharePosterOpen:1, |
| 455 | - posterShareControl:'-1', | ||
| 456 | - showPoster:-1, | ||
| 457 | - showPosterType:4, | 455 | + appCustomPosterShareControl:'-1', |
| 456 | + appCustomShowPoster:-1, | ||
| 457 | + appCustomShowPosterType:4, | ||
| 458 | } | 458 | } |
| 459 | } as ContentDetailDTO | 459 | } as ContentDetailDTO |
| 460 | WDShare.shareContent(contentDetailData,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage) | 460 | WDShare.shareContent(contentDetailData,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage) |
| @@ -157,20 +157,20 @@ export struct PaperTitleComponent { | @@ -157,20 +157,20 @@ export struct PaperTitleComponent { | ||
| 157 | let contentDetailData: ContentDetailDTO = { | 157 | let contentDetailData: ContentDetailDTO = { |
| 158 | newsId:Number.parseInt(this.topicInfo.topicId), | 158 | newsId:Number.parseInt(this.topicInfo.topicId), |
| 159 | shareInfo:{ | 159 | shareInfo:{ |
| 160 | - contentId:this.topicInfo.topicId, | ||
| 161 | - contentType:this.topicInfo.topicType+'', | 160 | + appCustomContentId:this.topicInfo.topicId, |
| 161 | + appCustomContentType:this.topicInfo.topicType+'', | ||
| 162 | shareTitle:this.topicInfo.shareTitle, | 162 | shareTitle:this.topicInfo.shareTitle, |
| 163 | shareSummary:this.topicInfo.shareSummary, | 163 | shareSummary:this.topicInfo.shareSummary, |
| 164 | - imageUrl:this.topicInfo.shareCoverUrl, | 164 | + appCustomImageUrl:this.topicInfo.shareCoverUrl, |
| 165 | sharePosterCoverUrl:this.topicInfo.sharePosterCoverUrl, | 165 | sharePosterCoverUrl:this.topicInfo.sharePosterCoverUrl, |
| 166 | shareUrl:this.topicInfo.shareUrl, | 166 | shareUrl:this.topicInfo.shareUrl, |
| 167 | - targetRelId:this.topicInfo.relId, | ||
| 168 | - targetRelType:this.topicInfo.relType, | ||
| 169 | - showReport:false, | ||
| 170 | - showLike:-1, | 167 | + appCustomTargetRelId:this.topicInfo.relId, |
| 168 | + appCustomTargetRelType:this.topicInfo.relType, | ||
| 169 | + appCustomShowReport:false, | ||
| 170 | + appCustomShowLike:-1, | ||
| 171 | shareOpen:1, | 171 | shareOpen:1, |
| 172 | sharePosterOpen:this.topicInfo.posterFlag, | 172 | sharePosterOpen:this.topicInfo.posterFlag, |
| 173 | - showPoster:this.topicInfo.posterFlag>0?1:-1, | 173 | + appCustomShowPoster:this.topicInfo.posterFlag>0?1:-1, |
| 174 | } | 174 | } |
| 175 | } as ContentDetailDTO | 175 | } as ContentDetailDTO |
| 176 | WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo,this.topicInfo) | 176 | WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo,this.topicInfo) |
| @@ -146,7 +146,7 @@ export struct RmhTitle { | @@ -146,7 +146,7 @@ export struct RmhTitle { | ||
| 146 | .height(16) | 146 | .height(16) |
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | - Text(this.rmhInfo?.rmhDesc) | 149 | + Text(this.rmhInfo?.rmhDesc.replaceAll('\n', '')) |
| 150 | .fontSize($r("app.float.font_size_12")) | 150 | .fontSize($r("app.float.font_size_12")) |
| 151 | .fontColor($r("app.color.color_B0B0B0")) | 151 | .fontColor($r("app.color.color_B0B0B0")) |
| 152 | .maxLines(1) | 152 | .maxLines(1) |
| @@ -112,6 +112,8 @@ interface picProps { | @@ -112,6 +112,8 @@ interface picProps { | ||
| 112 | struct createImg { | 112 | struct createImg { |
| 113 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] | 113 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] |
| 114 | @State loadImg: boolean = false; | 114 | @State loadImg: boolean = false; |
| 115 | + @State onePicW: number = 0; // 只有一张图时候图片的宽度 | ||
| 116 | + @State onePicH: number = 0; // 只有一张图时候图片的高度 | ||
| 115 | 117 | ||
| 116 | async aboutToAppear(): Promise<void> { | 118 | async aboutToAppear(): Promise<void> { |
| 117 | if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 | 119 | if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 |
| @@ -177,7 +179,7 @@ struct createImg { | @@ -177,7 +179,7 @@ struct createImg { | ||
| 177 | Image(this.loadImg ? item.fullUrl || item.url : '') | 179 | Image(this.loadImg ? item.fullUrl || item.url : '') |
| 178 | .backgroundColor(0xf5f5f5) | 180 | .backgroundColor(0xf5f5f5) |
| 179 | .width('100%') | 181 | .width('100%') |
| 180 | - .height(172) | 182 | + .height(198) |
| 181 | .autoResize(true) | 183 | .autoResize(true) |
| 182 | .borderRadius(this.caclImageRadius(index)) | 184 | .borderRadius(this.caclImageRadius(index)) |
| 183 | } else if (this.getPicType(item.weight, item.height) === 2) { | 185 | } else if (this.getPicType(item.weight, item.height) === 2) { |
| @@ -215,14 +217,18 @@ struct createImg { | @@ -215,14 +217,18 @@ struct createImg { | ||
| 215 | } | 217 | } |
| 216 | } else { | 218 | } else { |
| 217 | GridCol({ | 219 | GridCol({ |
| 218 | - span: item.landscape === 1 ? 12 : 8 | 220 | + span: this.onePicW > this.onePicH ? 12 : 8 |
| 219 | }) { | 221 | }) { |
| 220 | Image(this.loadImg ? item.fullUrl : '') | 222 | Image(this.loadImg ? item.fullUrl : '') |
| 221 | .backgroundColor(0xf5f5f5) | 223 | .backgroundColor(0xf5f5f5) |
| 222 | - .aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305) | 224 | + .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305) |
| 223 | .autoResize(true) | 225 | .autoResize(true) |
| 224 | .borderRadius(this.caclImageRadius(index)) | 226 | .borderRadius(this.caclImageRadius(index)) |
| 225 | .opacity(!item.weight && !item.height ? 0 : 1) | 227 | .opacity(!item.weight && !item.height ? 0 : 1) |
| 228 | + .onComplete((event?) => { | ||
| 229 | + this.onePicW = event?.width || 0; | ||
| 230 | + this.onePicH = event?.height || 0; | ||
| 231 | + }) | ||
| 226 | } | 232 | } |
| 227 | } | 233 | } |
| 228 | } else if (this.fullColumnImgUrls.length === 4) { | 234 | } else if (this.fullColumnImgUrls.length === 4) { |
| @@ -401,7 +401,7 @@ export struct ZhSingleRow03 { | @@ -401,7 +401,7 @@ export struct ZhSingleRow03 { | ||
| 401 | .fontWeight(600) | 401 | .fontWeight(600) |
| 402 | } | 402 | } |
| 403 | 403 | ||
| 404 | - if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') { | 404 | + if (!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { |
| 405 | Row() { | 405 | Row() { |
| 406 | Text("更多") | 406 | Text("更多") |
| 407 | .fontSize($r("app.float.font_size_14")) | 407 | .fontSize($r("app.float.font_size_14")) |
| @@ -6,6 +6,7 @@ import { ProcessUtils, WDRouterRule } from 'wdRouter'; | @@ -6,6 +6,7 @@ import { ProcessUtils, WDRouterRule } from 'wdRouter'; | ||
| 6 | import { TrackConstants, | 6 | import { TrackConstants, |
| 7 | TrackingButton, | 7 | TrackingButton, |
| 8 | TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; | 8 | TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; |
| 9 | +import { WDShare } from 'wdShare/Index'; | ||
| 9 | 10 | ||
| 10 | const TAG: string = 'CardView'; | 11 | const TAG: string = 'CardView'; |
| 11 | 12 | ||
| @@ -588,7 +589,7 @@ export struct PaperSingleColumn999CardView { | @@ -588,7 +589,7 @@ export struct PaperSingleColumn999CardView { | ||
| 588 | right: { anchor: '__container__', align: HorizontalAlign.End } | 589 | right: { anchor: '__container__', align: HorizontalAlign.End } |
| 589 | }) | 590 | }) |
| 590 | .onClick(() => { | 591 | .onClick(() => { |
| 591 | - ToastUtils.showToast('分享为公共方法,待开发', 1000) | 592 | + WDShare.shareProgram(this.item) |
| 592 | }) | 593 | }) |
| 593 | }.width(CommonConstants.FULL_PARENT) | 594 | }.width(CommonConstants.FULL_PARENT) |
| 594 | .justifyContent(FlexAlign.SpaceBetween) | 595 | .justifyContent(FlexAlign.SpaceBetween) |
| @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout { | @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout { | ||
| 40 | 40 | ||
| 41 | aboutToAppear() { | 41 | aboutToAppear() { |
| 42 | this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] | 42 | this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] |
| 43 | - this.myChannelList.forEach(item=>{ | 43 | + this.myChannelList.forEach(item => { |
| 44 | this.channelIds.push(item.channelId) | 44 | this.channelIds.push(item.channelId) |
| 45 | }) | 45 | }) |
| 46 | } | 46 | } |
| @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout { | @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout { | ||
| 53 | this.channelIds.splice(index2, 0, channelIdTmp[0]) | 53 | this.channelIds.splice(index2, 0, channelIdTmp[0]) |
| 54 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) | 54 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) |
| 55 | } | 55 | } |
| 56 | + | ||
| 56 | //删除频道 | 57 | //删除频道 |
| 57 | - delChannelItem(index: number){ | 58 | + delChannelItem(index: number) { |
| 58 | let item = this.myChannelList.splice(index, 1)[0] | 59 | let item = this.myChannelList.splice(index, 1)[0] |
| 59 | this.channelIds.splice(index, 1) | 60 | this.channelIds.splice(index, 1) |
| 60 | AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds)) | 61 | AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds)) |
| @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout { | @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout { | ||
| 65 | this.localChannelList.unshift(item) | 66 | this.localChannelList.unshift(item) |
| 66 | } | 67 | } |
| 67 | } | 68 | } |
| 69 | + | ||
| 68 | // 添加频道 | 70 | // 添加频道 |
| 69 | - addChannelItem(item: TopNavDTO){ | 71 | + addChannelItem(item: TopNavDTO) { |
| 70 | this.channelIds.push(item.channelId) | 72 | this.channelIds.push(item.channelId) |
| 71 | this.myChannelList.push(item) | 73 | this.myChannelList.push(item) |
| 72 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) | 74 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) |
| @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout { | @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout { | ||
| 323 | } | 325 | } |
| 324 | .width('23%') | 326 | .width('23%') |
| 325 | .height(40) | 327 | .height(40) |
| 328 | + .borderRadius(3) | ||
| 326 | .border({ | 329 | .border({ |
| 327 | - width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1, | ||
| 328 | - color: '#EDEDED', | 330 | + width: 0.7, |
| 331 | + color: item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#EDEDED', | ||
| 329 | radius: 3 | 332 | radius: 3 |
| 330 | }) | 333 | }) |
| 331 | .zIndex(this.dragItem == item.num ? 1 : 0) | 334 | .zIndex(this.dragItem == item.num ? 1 : 0) |
| @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout { | @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout { | ||
| 427 | .width(80) | 430 | .width(80) |
| 428 | .height(40) | 431 | .height(40) |
| 429 | .border({ | 432 | .border({ |
| 430 | - width: 1, | ||
| 431 | - color: '#EDEDED' | 433 | + width: 0.7, |
| 434 | + color: '#EDEDED', | ||
| 435 | + radius: 3 | ||
| 432 | }) | 436 | }) |
| 433 | }, (item: TopNavDTO) => JSON.stringify(item)) | 437 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 434 | } | 438 | } |
| @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout { | @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout { | ||
| 471 | .width(80) | 475 | .width(80) |
| 472 | .height(40) | 476 | .height(40) |
| 473 | .border({ | 477 | .border({ |
| 474 | - width: 1, | ||
| 475 | - color: '#EDEDED' | 478 | + width: 0.7, |
| 479 | + color: '#EDEDED', | ||
| 480 | + radius: 3 | ||
| 476 | }) | 481 | }) |
| 477 | }, (item: TopNavDTO) => JSON.stringify(item)) | 482 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 478 | } | 483 | } |
| @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew { | @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew { | ||
| 203 | moreChannelList: $moreChannelList, | 203 | moreChannelList: $moreChannelList, |
| 204 | localChannelList: $localChannelList, | 204 | localChannelList: $localChannelList, |
| 205 | changeTab: (index) => { | 205 | changeTab: (index) => { |
| 206 | - | ||
| 207 | this.changePage(index) | 206 | this.changePage(index) |
| 208 | } | 207 | } |
| 209 | }) | 208 | }) |
| 1 | import { SpConstants } from 'wdConstant'; | 1 | import { SpConstants } from 'wdConstant'; |
| 2 | import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils, CustomToast } from 'wdKit'; | 2 | import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils, CustomToast } from 'wdKit'; |
| 3 | import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem'; | 3 | import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem'; |
| 4 | -import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | 4 | +import { MineSettingDatasModel } from '../../model/MineSettingDatasModel'; |
| 5 | import router from '@ohos.router'; | 5 | import router from '@ohos.router'; |
| 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 7 | import { Params } from 'wdBean'; | 7 | import { Params } from 'wdBean'; |
| @@ -9,13 +9,15 @@ import { Params } from 'wdBean'; | @@ -9,13 +9,15 @@ import { Params } from 'wdBean'; | ||
| 9 | // import { common } from '@kit.AbilityKit'; | 9 | // import { common } from '@kit.AbilityKit'; |
| 10 | import fs from '@ohos.file.fs'; | 10 | import fs from '@ohos.file.fs'; |
| 11 | import { CustomCacheDialog } from './CustomCacheDialog'; | 11 | import { CustomCacheDialog } from './CustomCacheDialog'; |
| 12 | -import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | 12 | +import { MineSettingDatasModel } from '../../model/MineSettingDatasModel'; |
| 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; | 13 | import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem'; |
| 14 | import common from '@ohos.app.ability.common'; | 14 | import common from '@ohos.app.ability.common'; |
| 15 | import dataPreferences from '@ohos.data.preferences'; | 15 | import dataPreferences from '@ohos.data.preferences'; |
| 16 | import { TitleBackComponent } from './TitleBackComponent'; | 16 | import { TitleBackComponent } from './TitleBackComponent'; |
| 17 | import { MyCustomDialog } from '../reusable/MyCustomDialog'; | 17 | import { MyCustomDialog } from '../reusable/MyCustomDialog'; |
| 18 | import { TrackingButton, TrackConstants } from 'wdTracking/Index'; | 18 | import { TrackingButton, TrackConstants } from 'wdTracking/Index'; |
| 19 | +import { JSON } from '@kit.ArkTS'; | ||
| 20 | +import { HttpUtils } from 'wdNetwork/Index'; | ||
| 19 | 21 | ||
| 20 | @Component | 22 | @Component |
| 21 | export struct MineSettingComponent { | 23 | export struct MineSettingComponent { |
| @@ -82,10 +84,9 @@ export struct MineSettingComponent { | @@ -82,10 +84,9 @@ export struct MineSettingComponent { | ||
| 82 | 84 | ||
| 83 | async getSettingPageData() { | 85 | async getSettingPageData() { |
| 84 | let oldList = MineSettingDatasModel.getMineMainSettingFunctionItemData(); | 86 | let oldList = MineSettingDatasModel.getMineMainSettingFunctionItemData(); |
| 85 | - let userId=await SPHelper.default.get(SpConstants.USER_ID,'') as string | ||
| 86 | - if(userId==''){ | ||
| 87 | - this.listData=oldList.slice(1,oldList.length) | ||
| 88 | - }else { | 87 | + if (!HttpUtils.isLogin()) { |
| 88 | + this.listData = oldList.slice(1,oldList.length) | ||
| 89 | + } else { | ||
| 89 | this.listData = oldList; | 90 | this.listData = oldList; |
| 90 | } | 91 | } |
| 91 | 92 | ||
| @@ -167,6 +168,7 @@ export struct MineSettingComponent { | @@ -167,6 +168,7 @@ export struct MineSettingComponent { | ||
| 167 | .margin({ left: `${this.calcHeight(81)}lpx`, right: `${this.calcHeight(29)}lpx` }) | 168 | .margin({ left: `${this.calcHeight(81)}lpx`, right: `${this.calcHeight(29)}lpx` }) |
| 168 | .selectedColor("#ED2800") | 169 | .selectedColor("#ED2800") |
| 169 | .onChange((isOn: boolean) => { | 170 | .onChange((isOn: boolean) => { |
| 171 | + Logger.debug("SPHelper", "数据 : " + JSON.stringify(item)) | ||
| 170 | if(item.itemType=='push_switch'){ | 172 | if(item.itemType=='push_switch'){ |
| 171 | trackButtonClick("settingPagePushSwitch") | 173 | trackButtonClick("settingPagePushSwitch") |
| 172 | //推送 | 174 | //推送 |
| @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 50 | 50 | ||
| 51 | toMore() { | 51 | toMore() { |
| 52 | if (this.moreWidth > this.initMoreWidth * 2) { | 52 | if (this.moreWidth > this.initMoreWidth * 2) { |
| 53 | + this.liveToMore(); | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + liveToMore() { | ||
| 58 | + if (!!this.compDTO.dataSourceType) { | ||
| 59 | + if (this.compDTO.dataSourceType === 'OBJECT_POS') { | ||
| 60 | + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 61 | + return; | ||
| 62 | + } | ||
| 53 | if (this.compDTO.linkUrl) { | 63 | if (this.compDTO.linkUrl) { |
| 54 | let taskAction: Action = { | 64 | let taskAction: Action = { |
| 55 | type: 'JUMP_H5_BY_WEB_VIEW', | 65 | type: 'JUMP_H5_BY_WEB_VIEW', |
| @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 61 | } else { | 71 | } else { |
| 62 | this.jumpToLiveMorePage() | 72 | this.jumpToLiveMorePage() |
| 63 | } | 73 | } |
| 74 | + } else { | ||
| 75 | + if (this.compDTO?.objectType === '11') { | ||
| 76 | + } else { | ||
| 77 | + const contentDTO: ContentDTO = { | ||
| 78 | + objectId: this.compDTO.objectId, | ||
| 79 | + objectType: this.compDTO.objectType, | ||
| 80 | + linkUrl: this.compDTO.linkUrl, | ||
| 81 | + pageId: this.compDTO.pageId | ||
| 82 | + } as ContentDTO | ||
| 83 | + ProcessUtils.processPage(contentDTO) | ||
| 84 | + } | ||
| 64 | } | 85 | } |
| 65 | } | 86 | } |
| 66 | 87 | ||
| 88 | + showMore() { | ||
| 89 | + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') | ||
| 90 | + } | ||
| 91 | + | ||
| 67 | build() { | 92 | build() { |
| 68 | Column() { | 93 | Column() { |
| 69 | Row() { | 94 | Row() { |
| @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 87 | .width(14) | 112 | .width(14) |
| 88 | .height(14) | 113 | .height(14) |
| 89 | } | 114 | } |
| 90 | - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) | 115 | + .visibility(this.showMore() ? Visibility.Visible : Visibility.None) |
| 91 | .onClick(() => { | 116 | .onClick(() => { |
| 92 | - if (this.compDTO.linkUrl) { | ||
| 93 | - let taskAction: Action = { | ||
| 94 | - type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 95 | - params: { | ||
| 96 | - url: this.compDTO.linkUrl | ||
| 97 | - } as Params, | ||
| 98 | - }; | ||
| 99 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 100 | - } else { | ||
| 101 | - this.jumpToLiveMorePage() | ||
| 102 | - } | 117 | + this.liveToMore(); |
| 103 | }) | 118 | }) |
| 104 | 119 | ||
| 105 | }.justifyContent(FlexAlign.SpaceBetween) | 120 | }.justifyContent(FlexAlign.SpaceBetween) |
| @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 141 | }) | 156 | }) |
| 142 | } | 157 | } |
| 143 | 158 | ||
| 144 | - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { | 159 | + if (this.compDTO.operDataList.length >= 2 && this.showMore()) { |
| 145 | Row() { | 160 | Row() { |
| 146 | Ellipse() | 161 | Ellipse() |
| 147 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) | 162 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) |
| @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent { | @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent { | ||
| 99 | this.loadImg = await onlyWifiLoadImg(); | 99 | this.loadImg = await onlyWifiLoadImg(); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | + showMore() { | ||
| 103 | + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') | ||
| 104 | + } | ||
| 105 | + | ||
| 102 | 106 | ||
| 103 | build() { | 107 | build() { |
| 104 | Column() { | 108 | Column() { |
| @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent { | @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent { | ||
| 114 | .fontWeight(600) | 118 | .fontWeight(600) |
| 115 | } | 119 | } |
| 116 | 120 | ||
| 117 | - if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') { | 121 | + if (this.showMore()) { |
| 118 | Row() { | 122 | Row() { |
| 119 | Text("更多") | 123 | Text("更多") |
| 120 | .fontSize($r("app.float.font_size_14")) | 124 | .fontSize($r("app.float.font_size_14")) |
| @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent { | @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent { | ||
| 175 | }) | 179 | }) |
| 176 | }) | 180 | }) |
| 177 | } | 181 | } |
| 178 | - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { | 182 | + if (this.compDTO.operDataList.length >= 2 && this.showMore()) { |
| 179 | Row() { | 183 | Row() { |
| 180 | Ellipse() | 184 | Ellipse() |
| 181 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) | 185 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) |
| @@ -296,7 +296,6 @@ export struct LiveOperRowListView { | @@ -296,7 +296,6 @@ export struct LiveOperRowListView { | ||
| 296 | .aspectRatio(1) | 296 | .aspectRatio(1) |
| 297 | .interpolation(ImageInterpolation.High) | 297 | .interpolation(ImageInterpolation.High) |
| 298 | .onClick((event: ClickEvent) => { | 298 | .onClick((event: ClickEvent) => { |
| 299 | - // ToastUtils.showToast('分享为公共方法,待开发', 1000); | ||
| 300 | this.share() | 299 | this.share() |
| 301 | }) | 300 | }) |
| 302 | } | 301 | } |
| @@ -391,7 +391,6 @@ export struct OperRowListView { | @@ -391,7 +391,6 @@ export struct OperRowListView { | ||
| 391 | .aspectRatio(1) | 391 | .aspectRatio(1) |
| 392 | .interpolation(ImageInterpolation.High) | 392 | .interpolation(ImageInterpolation.High) |
| 393 | .onClick((event: ClickEvent) => { | 393 | .onClick((event: ClickEvent) => { |
| 394 | - // ToastUtils.showToast('分享为公共方法,待开发', 1000); | ||
| 395 | this.share() | 394 | this.share() |
| 396 | }) | 395 | }) |
| 397 | } | 396 | } |
| @@ -12,74 +12,49 @@ const TAG = "MineSettingDatasModel" | @@ -12,74 +12,49 @@ const TAG = "MineSettingDatasModel" | ||
| 12 | /** | 12 | /** |
| 13 | * 我的设置页面 所有数据 获取封装类 | 13 | * 我的设置页面 所有数据 获取封装类 |
| 14 | */ | 14 | */ |
| 15 | -class MineSettingDatasModel{ | ||
| 16 | - private static instance: MineSettingDatasModel; | ||
| 17 | - mainSettingData:Array<MineMainSettingFunctionItem> = [] | ||
| 18 | - accountAndSecurityData:Array<MineMainSettingFunctionItem> = [] | ||
| 19 | - | ||
| 20 | - private constructor() { } | ||
| 21 | - | ||
| 22 | - /** | ||
| 23 | - * 单例模式 | ||
| 24 | - * @returns | ||
| 25 | - */ | ||
| 26 | - public static getInstance(): MineSettingDatasModel { | ||
| 27 | - if (!MineSettingDatasModel.instance) { | ||
| 28 | - MineSettingDatasModel.instance = new MineSettingDatasModel(); | ||
| 29 | - } | ||
| 30 | - return MineSettingDatasModel.instance; | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - | 15 | +export class MineSettingDatasModel { |
| 35 | 16 | ||
| 36 | /** | 17 | /** |
| 37 | * 评论 关注 收藏 等7个数据 | 18 | * 评论 关注 收藏 等7个数据 |
| 38 | * 包含名字和图标 | 19 | * 包含名字和图标 |
| 39 | */ | 20 | */ |
| 40 | - getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{ | ||
| 41 | - if(this.mainSettingData.length === 7){ | ||
| 42 | - return this.mainSettingData | ||
| 43 | - } | ||
| 44 | - this.mainSettingData = [] | ||
| 45 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account")) | 21 | + static getMineMainSettingFunctionItemData() { |
| 22 | + let mainSettingData: MineMainSettingFunctionItem[] = [] | ||
| 23 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account")) | ||
| 46 | let pushState=SPHelper.default.getSync(SpConstants.SETTING_PUSH_SWITCH,false) as boolean | 24 | let pushState=SPHelper.default.getSync(SpConstants.SETTING_PUSH_SWITCH,false) as boolean |
| 47 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch")) | ||
| 48 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting")) | 25 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch")) |
| 26 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting")) | ||
| 49 | let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean | 27 | let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean |
| 50 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅wifi网络加载图片', null, 1, wifiState,"wifi_switch")) | 28 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '仅wifi网络加载图片', null, 1, wifiState,"wifi_switch")) |
| 51 | let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean | 29 | let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean |
| 52 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'wifi网络情况下自动播放视频', null, 1, videoState,"video_switch")) | 30 | + mainSettingData.push(new MineMainSettingFunctionItem(null, 'wifi网络情况下自动播放视频', null, 1, videoState,"video_switch")) |
| 53 | let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean | 31 | let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean |
| 54 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch")) | 32 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch")) |
| 55 | // this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) | 33 | // this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) |
| 56 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清理缓存', '32MB', 0, false,"clear_cache")) | 34 | + mainSettingData.push(new MineMainSettingFunctionItem(null, '清理缓存', '32MB', 0, false,"clear_cache")) |
| 57 | // this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,"")) | 35 | // this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,"")) |
| 58 | 36 | ||
| 59 | - return this.mainSettingData | 37 | + return mainSettingData |
| 60 | } | 38 | } |
| 61 | 39 | ||
| 62 | /** | 40 | /** |
| 63 | * 评论 关注 收藏 等7个数据 | 41 | * 评论 关注 收藏 等7个数据 |
| 64 | * 包含名字和图标 | 42 | * 包含名字和图标 |
| 65 | */ | 43 | */ |
| 66 | - getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{ | ||
| 67 | - if(this.accountAndSecurityData.length === 7){ | ||
| 68 | - return this.accountAndSecurityData | ||
| 69 | - } | ||
| 70 | - this.accountAndSecurityData = [] | ||
| 71 | - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,"")) | ||
| 72 | - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,"")) | ||
| 73 | - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) | 44 | + static getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{ |
| 45 | + let accountAndSecurityData: MineMainSettingFunctionItem[] = [] | ||
| 46 | + accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,"")) | ||
| 47 | + accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,"")) | ||
| 48 | + accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) | ||
| 74 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,"")) | 49 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,"")) |
| 75 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,"")) | 50 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,"")) |
| 76 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,"")) | 51 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,"")) |
| 77 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,"")) | 52 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,"")) |
| 78 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) | 53 | // this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) |
| 79 | 54 | ||
| 80 | - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,"")) | 55 | + accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,"")) |
| 81 | 56 | ||
| 82 | - return this.accountAndSecurityData | 57 | + return accountAndSecurityData |
| 83 | } | 58 | } |
| 84 | 59 | ||
| 85 | 60 | ||
| @@ -113,10 +88,10 @@ class MineSettingDatasModel{ | @@ -113,10 +88,10 @@ class MineSettingDatasModel{ | ||
| 113 | /** | 88 | /** |
| 114 | * 判断是否设置过密码 | 89 | * 判断是否设置过密码 |
| 115 | */ | 90 | */ |
| 116 | - checkSetPassword(): Promise<CheckSetPasswordItem> { | 91 | + static checkSetPassword(): Promise<CheckSetPasswordItem> { |
| 117 | return new Promise<CheckSetPasswordItem>((success, error) => { | 92 | return new Promise<CheckSetPasswordItem>((success, error) => { |
| 118 | Logger.info(TAG, `checkSetPassword start`); | 93 | Logger.info(TAG, `checkSetPassword start`); |
| 119 | - this.fetchCheckSetPassword().then((navResDTO: ResponseDTO<CheckSetPasswordItem>) => { | 94 | + MineSettingDatasModel.fetchCheckSetPassword().then((navResDTO: ResponseDTO<CheckSetPasswordItem>) => { |
| 120 | if (!navResDTO || navResDTO.code != 0) { | 95 | if (!navResDTO || navResDTO.code != 0) { |
| 121 | error(null) | 96 | error(null) |
| 122 | return | 97 | return |
| @@ -131,13 +106,9 @@ class MineSettingDatasModel{ | @@ -131,13 +106,9 @@ class MineSettingDatasModel{ | ||
| 131 | }) | 106 | }) |
| 132 | } | 107 | } |
| 133 | 108 | ||
| 134 | - fetchCheckSetPassword() { | 109 | + static fetchCheckSetPassword() { |
| 135 | let url = HttpUrlUtils.checkSetPassword() | 110 | let url = HttpUrlUtils.checkSetPassword() |
| 136 | return WDHttp.get<ResponseDTO<CheckSetPasswordItem>>(url) | 111 | return WDHttp.get<ResponseDTO<CheckSetPasswordItem>>(url) |
| 137 | }; | 112 | }; |
| 138 | 113 | ||
| 139 | } | 114 | } |
| 140 | - | ||
| 141 | -const mineSettingDatasModel = MineSettingDatasModel.getInstance() | ||
| 142 | -export default mineSettingDatasModel as MineSettingDatasModel | ||
| 143 | -// export default MineMainSettingFunctionItem as MineMainSettingFunctionItem |
| @@ -7,7 +7,7 @@ import { DetailPlayVLivePage } from './DetailPlayVLivePage'; | @@ -7,7 +7,7 @@ import { DetailPlayVLivePage } from './DetailPlayVLivePage'; | ||
| 7 | import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index'; | 7 | import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index'; |
| 8 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; | 8 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; |
| 9 | import { PictureLoading } from '../widgets/vertical/PictureLoading'; | 9 | import { PictureLoading } from '../widgets/vertical/PictureLoading'; |
| 10 | -import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index'; | 10 | +import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 11 | import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic'; | 11 | import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic'; |
| 12 | 12 | ||
| 13 | const TAG = 'DetailPlayLiveCommon' | 13 | const TAG = 'DetailPlayLiveCommon' |
| @@ -36,8 +36,7 @@ export struct DetailPlayLiveCommon { | @@ -36,8 +36,7 @@ export struct DetailPlayLiveCommon { | ||
| 36 | @Provide liveStyle: number = -1 | 36 | @Provide liveStyle: number = -1 |
| 37 | // 直播地址 | 37 | // 直播地址 |
| 38 | @Provide playUrl: string = '' | 38 | @Provide playUrl: string = '' |
| 39 | - // // 直播间背景图 | ||
| 40 | - // @Provide imgUrl: string = '' | 39 | + |
| 41 | // 全屏展示 | 40 | // 全屏展示 |
| 42 | @Provide pageShow: number = -1 | 41 | @Provide pageShow: number = -1 |
| 43 | // 关闭全屏 | 42 | // 关闭全屏 |
| @@ -45,7 +44,6 @@ export struct DetailPlayLiveCommon { | @@ -45,7 +44,6 @@ export struct DetailPlayLiveCommon { | ||
| 45 | // 返回功能 | 44 | // 返回功能 |
| 46 | @Provide pageBackPress: number = -1 | 45 | @Provide pageBackPress: number = -1 |
| 47 | 46 | ||
| 48 | - | ||
| 49 | @Provide liveDetailPageLogic :LiveDetailPageLogic = new LiveDetailPageLogic | 47 | @Provide liveDetailPageLogic :LiveDetailPageLogic = new LiveDetailPageLogic |
| 50 | // 直播详情内容 | 48 | // 直播详情内容 |
| 51 | @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO | 49 | @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO |
| @@ -106,20 +104,22 @@ export struct DetailPlayLiveCommon { | @@ -106,20 +104,22 @@ export struct DetailPlayLiveCommon { | ||
| 106 | let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url | 104 | let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url |
| 107 | detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl | 105 | detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl |
| 108 | this.playUrl = m3u8uUrl | 106 | this.playUrl = m3u8uUrl |
| 109 | - // console.log(TAG, ' GetPullAddressBean:', m3u8uUrl) | ||
| 110 | } | 107 | } |
| 111 | } | 108 | } |
| 112 | 109 | ||
| 113 | - | ||
| 114 | - | ||
| 115 | this.liveState = detailData.liveInfo?.liveState | 110 | this.liveState = detailData.liveInfo?.liveState |
| 116 | 111 | ||
| 117 | this.contentDetailData = data[0] | 112 | this.contentDetailData = data[0] |
| 118 | 113 | ||
| 119 | this.liveDetailPageLogic.contentDetailData = this.contentDetailData | 114 | this.liveDetailPageLogic.contentDetailData = this.contentDetailData |
| 115 | + | ||
| 120 | this.liveDetailPageLogic.liveLandscape = detailData?.liveInfo?.liveLandScape | 116 | this.liveDetailPageLogic.liveLandscape = detailData?.liveInfo?.liveLandScape |
| 117 | + | ||
| 121 | this.liveDetailPageLogic.liveState = detailData.liveInfo?.liveState | 118 | this.liveDetailPageLogic.liveState = detailData.liveInfo?.liveState |
| 122 | - this.liveDetailPageLogic.resolvingRoomBackgroundImgUrl() | 119 | + |
| 120 | + this.liveDetailPageLogic.resolvingRoomImgSource() | ||
| 121 | + | ||
| 122 | + this.liveDetailPageLogic.resolvingRoomVliveData(0) | ||
| 123 | 123 | ||
| 124 | this.publishCommentModel.targetId = String(detailData?.newsId || '') | 124 | this.publishCommentModel.targetId = String(detailData?.newsId || '') |
| 125 | this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '') | 125 | this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '') |
| @@ -131,13 +131,6 @@ export struct DetailPlayLiveCommon { | @@ -131,13 +131,6 @@ export struct DetailPlayLiveCommon { | ||
| 131 | this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '') | 131 | this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '') |
| 132 | this.publishCommentModel.commentContent = '' | 132 | this.publishCommentModel.commentContent = '' |
| 133 | this.liveStyle = detailData.liveInfo?.liveStyle | 133 | this.liveStyle = detailData.liveInfo?.liveStyle |
| 134 | - // | ||
| 135 | - // if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && | ||
| 136 | - // this.contentDetailData.liveInfo.previewUrl.length > 0) { | ||
| 137 | - // this.imgUrl = this.contentDetailData.liveInfo.previewUrl | ||
| 138 | - // } else if (detailData.fullColumnImgUrls && detailData.fullColumnImgUrls.length > 0) { | ||
| 139 | - // this.imgUrl = detailData.fullColumnImgUrls[0].url | ||
| 140 | - // } | ||
| 141 | 134 | ||
| 142 | if (detailData.liveInfo.liveState == 'end') { | 135 | if (detailData.liveInfo.liveState == 'end') { |
| 143 | this.playUrl = detailData.liveInfo.vlive[0].replayUri | 136 | this.playUrl = detailData.liveInfo.vlive[0].replayUri |
| @@ -7,9 +7,10 @@ import mediaquery from '@ohos.mediaquery'; | @@ -7,9 +7,10 @@ import mediaquery from '@ohos.mediaquery'; | ||
| 7 | import { Logger, WindowModel } from 'wdKit/Index'; | 7 | import { Logger, WindowModel } from 'wdKit/Index'; |
| 8 | import { router, window } from '@kit.ArkUI'; | 8 | import { router, window } from '@kit.ArkUI'; |
| 9 | import { WDAliPlayerController } from 'wdPlayer/Index'; | 9 | import { WDAliPlayerController } from 'wdPlayer/Index'; |
| 10 | -import { LiveOperRowListView } from 'wdComponent'; | 10 | +import { LiveEmptyComponent, LiveOperRowListView } from 'wdComponent'; |
| 11 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; | 11 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; |
| 12 | import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; | 12 | import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; |
| 13 | +import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic'; | ||
| 13 | 14 | ||
| 14 | let TAG: string = 'DetailPlayLivePage'; | 15 | let TAG: string = 'DetailPlayLivePage'; |
| 15 | 16 | ||
| @@ -39,6 +40,8 @@ export struct DetailPlayLivePage { | @@ -39,6 +40,8 @@ export struct DetailPlayLivePage { | ||
| 39 | @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息 | 40 | @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息 |
| 40 | @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息 | 41 | @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息 |
| 41 | 42 | ||
| 43 | + | ||
| 44 | + | ||
| 42 | aboutToAppear(): void { | 45 | aboutToAppear(): void { |
| 43 | Logger.info(TAG, `wyj-aboutToAppear`) | 46 | Logger.info(TAG, `wyj-aboutToAppear`) |
| 44 | 47 | ||
| @@ -66,8 +69,9 @@ export struct DetailPlayLivePage { | @@ -66,8 +69,9 @@ export struct DetailPlayLivePage { | ||
| 66 | build() { | 69 | build() { |
| 67 | Column() { | 70 | Column() { |
| 68 | 71 | ||
| 69 | - TopPlayComponent({ playerController: this.playerController }) | ||
| 70 | - .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') | 72 | + TopPlayComponent({ playerController: this.playerController }) |
| 73 | + .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') | ||
| 74 | + | ||
| 71 | 75 | ||
| 72 | TabComponent({ | 76 | TabComponent({ |
| 73 | tabs: this.tabs, | 77 | tabs: this.tabs, |
| @@ -30,13 +30,12 @@ export struct DetailPlayVLivePage { | @@ -30,13 +30,12 @@ export struct DetailPlayVLivePage { | ||
| 30 | @Consume liveState: string | 30 | @Consume liveState: string |
| 31 | @Consume liveStyle: number | 31 | @Consume liveStyle: number |
| 32 | @Consume playUrl: string | 32 | @Consume playUrl: string |
| 33 | - // @Consume imgUrl: string | 33 | + // @Consume imgUrl: string |
| 34 | @Consume @Watch('openFullScreen') pageShow: number | 34 | @Consume @Watch('openFullScreen') pageShow: number |
| 35 | @Consume @Watch('closeFullScreen') pageHide: number | 35 | @Consume @Watch('closeFullScreen') pageHide: number |
| 36 | @Consume contentId: string | 36 | @Consume contentId: string |
| 37 | @State swiperIndex: number = 1 | 37 | @State swiperIndex: number = 1 |
| 38 | - | ||
| 39 | - @Consume liveDetailPageLogic :LiveDetailPageLogic | 38 | + @Consume liveDetailPageLogic: LiveDetailPageLogic |
| 40 | 39 | ||
| 41 | aboutToAppear(): void { | 40 | aboutToAppear(): void { |
| 42 | this.openFullScreen() | 41 | this.openFullScreen() |
| @@ -62,7 +61,7 @@ export struct DetailPlayVLivePage { | @@ -62,7 +61,7 @@ export struct DetailPlayVLivePage { | ||
| 62 | 61 | ||
| 63 | build() { | 62 | build() { |
| 64 | 63 | ||
| 65 | - Stack() { | 64 | + Stack({ alignContent: Alignment.Top }) { |
| 66 | // 直播背景图,模糊处理 | 65 | // 直播背景图,模糊处理 |
| 67 | Image(this.liveDetailPageLogic.imgUrl) | 66 | Image(this.liveDetailPageLogic.imgUrl) |
| 68 | .height('100%') | 67 | .height('100%') |
| @@ -79,13 +78,33 @@ export struct DetailPlayVLivePage { | @@ -79,13 +78,33 @@ export struct DetailPlayVLivePage { | ||
| 79 | LiveEmptyComponent({ | 78 | LiveEmptyComponent({ |
| 80 | emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend | 79 | emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend |
| 81 | }) | 80 | }) |
| 82 | - .height('60%') | 81 | + .height('30%').margin({top:this.topSafeHeight }) |
| 83 | } else { | 82 | } else { |
| 84 | - PlayerComponent({ | ||
| 85 | - playerController: this.playerController | ||
| 86 | - }) | 83 | + |
| 84 | + if (this.liveDetailPageLogic.showPad) { | ||
| 85 | + // 有垫片 | ||
| 86 | + if(this.liveDetailPageLogic.padImageUri.length > 0){ | ||
| 87 | + // 配置了垫片资源 | ||
| 88 | + Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%') | ||
| 89 | + | ||
| 90 | + }else { | ||
| 91 | + // 没有配置垫片资源 | ||
| 92 | + LiveEmptyComponent({ | ||
| 93 | + emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend | ||
| 94 | + }) | ||
| 95 | + .height('30%').margin({top:this.topSafeHeight }) | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + | ||
| 99 | + } else { | ||
| 100 | + // 播放器 | ||
| 101 | + PlayerComponent({ | ||
| 102 | + playerController: this.playerController | ||
| 103 | + }) | ||
| 104 | + } | ||
| 87 | } | 105 | } |
| 88 | 106 | ||
| 107 | + // 直播详情 左右滑动业务数据 | ||
| 89 | PlayerInfoComponent({ | 108 | PlayerInfoComponent({ |
| 90 | playerController: this.playerController, | 109 | playerController: this.playerController, |
| 91 | swiperController: this.swiperController, | 110 | swiperController: this.swiperController, |
| 1 | import { ContentDetailDTO } from 'wdBean/Index' | 1 | import { ContentDetailDTO } from 'wdBean/Index' |
| 2 | 2 | ||
| 3 | - | 3 | +const TAG = 'LiveDetailPageLogic' |
| 4 | /** | 4 | /** |
| 5 | * 直播信息对象逻辑加工处理的工具类 | 5 | * 直播信息对象逻辑加工处理的工具类 |
| 6 | */ | 6 | */ |
| @@ -14,6 +14,10 @@ export class LiveDetailPageLogic { | @@ -14,6 +14,10 @@ export class LiveDetailPageLogic { | ||
| 14 | // 预告片图片/视频url | 14 | // 预告片图片/视频url |
| 15 | imgUrl: string = '' | 15 | imgUrl: string = '' |
| 16 | 16 | ||
| 17 | + // 垫片资源 | ||
| 18 | + padImageUri:string = '' | ||
| 19 | + // 垫片是否开启 | ||
| 20 | + showPad:boolean = false | ||
| 17 | 21 | ||
| 18 | 22 | ||
| 19 | /** | 23 | /** |
| @@ -42,15 +46,42 @@ export class LiveDetailPageLogic { | @@ -42,15 +46,42 @@ export class LiveDetailPageLogic { | ||
| 42 | 46 | ||
| 43 | 47 | ||
| 44 | /** | 48 | /** |
| 45 | - * 解析背景图片资源 | 49 | + * 解析直播间的图片资源 |
| 46 | */ | 50 | */ |
| 47 | - resolvingRoomBackgroundImgUrl() { | 51 | + resolvingRoomImgSource() { |
| 48 | 52 | ||
| 53 | + // 背景图资源 | ||
| 49 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && | 54 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && |
| 50 | this.contentDetailData.liveInfo.previewUrl.length > 0) { | 55 | this.contentDetailData.liveInfo.previewUrl.length > 0) { |
| 51 | this.imgUrl = this.contentDetailData.liveInfo.previewUrl | 56 | this.imgUrl = this.contentDetailData.liveInfo.previewUrl |
| 52 | } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { | 57 | } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { |
| 53 | this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url | 58 | this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url |
| 54 | } | 59 | } |
| 60 | + | ||
| 61 | + // 垫图资源 | ||
| 62 | + if (this.contentDetailData.liveInfo){ | ||
| 63 | + | ||
| 64 | + if(this.contentDetailData.liveInfo.padImageUri.length > 0){ | ||
| 65 | + this.padImageUri =this.contentDetailData.liveInfo.padImageUri | ||
| 66 | + } | ||
| 67 | + //this.padImageUri = 'https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240515/image/display/cdb84fe86b1440d58f3fc585841b928d.jpg' | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + console.log(TAG, ' this.imgUrl===>', this.imgUrl) | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 解析直播详情里面的 vlive资源 | ||
| 76 | + * @param index | ||
| 77 | + */ | ||
| 78 | + resolvingRoomVliveData(index:number){ | ||
| 79 | + | ||
| 80 | + // 只有直播中的才会有垫片 | ||
| 81 | + if(this.liveState === 'running'){ | ||
| 82 | + | ||
| 83 | + this.showPad = this.contentDetailData.liveInfo.vlive[index].showPad | ||
| 84 | + } | ||
| 85 | + | ||
| 55 | } | 86 | } |
| 56 | } | 87 | } |
| @@ -4,6 +4,8 @@ import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from ' | @@ -4,6 +4,8 @@ import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from ' | ||
| 4 | import { PlayUIComponent } from './PlayUIComponent'; | 4 | import { PlayUIComponent } from './PlayUIComponent'; |
| 5 | import { PictureLoading } from '../../vertical/PictureLoading'; | 5 | import { PictureLoading } from '../../vertical/PictureLoading'; |
| 6 | import { TrackConstants } from 'wdTracking/Index'; | 6 | import { TrackConstants } from 'wdTracking/Index'; |
| 7 | +import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic'; | ||
| 8 | +import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; | ||
| 7 | 9 | ||
| 8 | const TAG: string = 'TopPlayComponent' | 10 | const TAG: string = 'TopPlayComponent' |
| 9 | 11 | ||
| @@ -32,6 +34,7 @@ export struct TopPlayComponent { | @@ -32,6 +34,7 @@ export struct TopPlayComponent { | ||
| 32 | @Provide playSourceState: number = 0 | 34 | @Provide playSourceState: number = 0 |
| 33 | private playUrl: string = "" | 35 | private playUrl: string = "" |
| 34 | private xComponentIsLoaded: boolean = false | 36 | private xComponentIsLoaded: boolean = false |
| 37 | + @Consume liveDetailPageLogic: LiveDetailPageLogic | ||
| 35 | 38 | ||
| 36 | aboutToAppear(): void { | 39 | aboutToAppear(): void { |
| 37 | if (this.playerController) { | 40 | if (this.playerController) { |
| @@ -66,6 +69,15 @@ export struct TopPlayComponent { | @@ -66,6 +69,15 @@ export struct TopPlayComponent { | ||
| 66 | * 更新直播播放数据 | 69 | * 更新直播播放数据 |
| 67 | */ | 70 | */ |
| 68 | updateData() { | 71 | updateData() { |
| 72 | + | ||
| 73 | + // 检测垫片 | ||
| 74 | + if (this.liveDetailPageLogic.showPad){ | ||
| 75 | + this.isHideLoading = true | ||
| 76 | + this.isWait = true | ||
| 77 | + this.previewUrl = this.liveDetailPageLogic.imgUrl | ||
| 78 | + return | ||
| 79 | + } | ||
| 80 | + | ||
| 69 | // 检测直播等待状态的直播预告是否视频资源 | 81 | // 检测直播等待状态的直播预告是否视频资源 |
| 70 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1 | 82 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1 |
| 71 | && this.contentDetailData?.liveInfo?.liveState == 'wait' | 83 | && this.contentDetailData?.liveInfo?.liveState == 'wait' |
| @@ -113,7 +125,6 @@ export struct TopPlayComponent { | @@ -113,7 +125,6 @@ export struct TopPlayComponent { | ||
| 113 | } else { | 125 | } else { |
| 114 | Logger.debug(TAG, `---0------>${playUrl}`) | 126 | Logger.debug(TAG, `---0------>${playUrl}`) |
| 115 | if (StringUtils.isNotEmpty(playUrl)) { | 127 | if (StringUtils.isNotEmpty(playUrl)) { |
| 116 | - Logger.debug(TAG, `---isNotEmpty------>`) | ||
| 117 | this.playUrl = playUrl | 128 | this.playUrl = playUrl |
| 118 | this.tryToPlay() | 129 | this.tryToPlay() |
| 119 | } | 130 | } |
| @@ -140,7 +151,8 @@ export struct TopPlayComponent { | @@ -140,7 +151,8 @@ export struct TopPlayComponent { | ||
| 140 | this.previewUrl = '' | 151 | this.previewUrl = '' |
| 141 | } | 152 | } |
| 142 | } | 153 | } |
| 143 | - // Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource) | 154 | + // Logger.debug(TAG, |
| 155 | + // `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource) | ||
| 144 | } | 156 | } |
| 145 | 157 | ||
| 146 | tryToPlay() { | 158 | tryToPlay() { |
| @@ -163,22 +175,29 @@ export struct TopPlayComponent { | @@ -163,22 +175,29 @@ export struct TopPlayComponent { | ||
| 163 | 175 | ||
| 164 | build() { | 176 | build() { |
| 165 | Stack() { | 177 | Stack() { |
| 166 | - // 视频资源播放 | ||
| 167 | - WDPlayerRenderLiveView({ | ||
| 168 | - playerController: this.playerController, | ||
| 169 | - onLoad: async () => { | ||
| 170 | - if (StringUtils.isNotEmpty(this.playUrl)) { | ||
| 171 | - this.isHideLoading = false | ||
| 172 | - this.isError = false | ||
| 173 | - this.xComponentIsLoaded = true | ||
| 174 | - Logger.debug(TAG, `---onLoad------>`) | ||
| 175 | - this.tryToPlay() | 178 | + |
| 179 | + if (this.liveDetailPageLogic.showPad) { | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + } else { | ||
| 183 | + // 视频资源播放 | ||
| 184 | + WDPlayerRenderLiveView({ | ||
| 185 | + playerController: this.playerController, | ||
| 186 | + onLoad: async () => { | ||
| 187 | + if (StringUtils.isNotEmpty(this.playUrl)) { | ||
| 188 | + this.isHideLoading = false | ||
| 189 | + this.isError = false | ||
| 190 | + this.xComponentIsLoaded = true | ||
| 191 | + Logger.debug(TAG, `---onLoad------>`) | ||
| 192 | + this.tryToPlay() | ||
| 193 | + } | ||
| 176 | } | 194 | } |
| 177 | - } | ||
| 178 | - }) | ||
| 179 | - .height('100%') | ||
| 180 | - .width('100%') | ||
| 181 | - .visibility(this.isWait ? Visibility.None : Visibility.Visible) | 195 | + }) |
| 196 | + .height('100%') | ||
| 197 | + .width('100%') | ||
| 198 | + .visibility(this.isWait ? Visibility.None : Visibility.Visible) | ||
| 199 | + } | ||
| 200 | + | ||
| 182 | 201 | ||
| 183 | if (this.isVideoSource) { | 202 | if (this.isVideoSource) { |
| 184 | 203 | ||
| @@ -187,10 +206,25 @@ export struct TopPlayComponent { | @@ -187,10 +206,25 @@ export struct TopPlayComponent { | ||
| 187 | Image(this.previewUrl) | 206 | Image(this.previewUrl) |
| 188 | .objectFit(ImageFit.Cover) | 207 | .objectFit(ImageFit.Cover) |
| 189 | .alt($r('app.media.live_room_image_fail')) | 208 | .alt($r('app.media.live_room_image_fail')) |
| 190 | - .visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None) | ||
| 191 | - // .contrast(this.isEnd ? 0.4 : 1) | 209 | + .visibility(this.isWait || this.isEnd ? Visibility.Visible : |
| 210 | + Visibility.None)// .contrast(this.isEnd ? 0.4 : 1) | ||
| 192 | .blur(this.isEnd ? 20 : 0) | 211 | .blur(this.isEnd ? 20 : 0) |
| 193 | .width('100%') | 212 | .width('100%') |
| 213 | + | ||
| 214 | + if (this.liveDetailPageLogic.showPad) { | ||
| 215 | + // 有垫片 | ||
| 216 | + if (this.liveDetailPageLogic.padImageUri.length > 0) { | ||
| 217 | + // 配置了垫片资源 | ||
| 218 | + Image(this.liveDetailPageLogic.padImageUri).objectFit(ImageFit.Fill).width('100%').height('100%') | ||
| 219 | + | ||
| 220 | + } else { | ||
| 221 | + // 没有配置垫片资源 | ||
| 222 | + LiveEmptyComponent({ | ||
| 223 | + emptyType: WDLiveViewDefaultType.WDViewDefaultType_NoLiveSuspend | ||
| 224 | + }).width('100%').height('100%') | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + } | ||
| 194 | } | 228 | } |
| 195 | 229 | ||
| 196 | // loading | 230 | // loading |
| @@ -13,6 +13,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index'; | @@ -13,6 +13,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index'; | ||
| 13 | import { WDPlayerController } from 'wdPlayer/Index'; | 13 | import { WDPlayerController } from 'wdPlayer/Index'; |
| 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 15 | import { SpConstants } from 'wdConstant/Index' | 15 | import { SpConstants } from 'wdConstant/Index' |
| 16 | +import { WDShare } from 'wdShare/Index'; | ||
| 16 | 17 | ||
| 17 | export interface OperationItem { | 18 | export interface OperationItem { |
| 18 | icon: Resource; | 19 | icon: Resource; |
| @@ -282,7 +283,7 @@ export struct OperationListView { | @@ -282,7 +283,7 @@ export struct OperationListView { | ||
| 282 | .width(32) | 283 | .width(32) |
| 283 | .aspectRatio(1) | 284 | .aspectRatio(1) |
| 284 | .onClick((event: ClickEvent) => { | 285 | .onClick((event: ClickEvent) => { |
| 285 | - ToastUtils.showToast('分享为公共方法,待开发', 1000); | 286 | + WDShare.shareContent(this.contentDetailData) |
| 286 | }) | 287 | }) |
| 287 | Text(item.text) | 288 | Text(item.text) |
| 288 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | 289 | .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) |
| @@ -74,7 +74,10 @@ struct ForgetPasswordPage { | @@ -74,7 +74,10 @@ struct ForgetPasswordPage { | ||
| 74 | }) | 74 | }) |
| 75 | }.padding({ left: 25, right: 25 }).width('100%') | 75 | }.padding({ left: 25, right: 25 }).width('100%') |
| 76 | 76 | ||
| 77 | - }.width('100%').height('100%').alignItems(HorizontalAlign.Start) | 77 | + }.width('100%') |
| 78 | + .height('100%') | ||
| 79 | + .alignItems(HorizontalAlign.Start) | ||
| 80 | + .backgroundColor(Color.White) | ||
| 78 | } | 81 | } |
| 79 | 82 | ||
| 80 | aboutToAppear() { | 83 | aboutToAppear() { |
| @@ -241,7 +241,8 @@ struct LoginPage { | @@ -241,7 +241,8 @@ struct LoginPage { | ||
| 241 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) | 241 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) |
| 242 | 242 | ||
| 243 | }.width('100%') | 243 | }.width('100%') |
| 244 | - .height('100%').backgroundColor(Color.White) | 244 | + .height('100%') |
| 245 | + .backgroundColor(Color.White) | ||
| 245 | } | 246 | } |
| 246 | 247 | ||
| 247 | @Builder | 248 | @Builder |
| @@ -280,6 +281,7 @@ struct LoginPage { | @@ -280,6 +281,7 @@ struct LoginPage { | ||
| 280 | .width('100%') | 281 | .width('100%') |
| 281 | }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) | 282 | }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) |
| 282 | .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible) | 283 | .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible) |
| 284 | + .backgroundColor(Color.White) | ||
| 283 | 285 | ||
| 284 | } | 286 | } |
| 285 | 287 |
| @@ -22,7 +22,18 @@ export class WDShare { | @@ -22,7 +22,18 @@ export class WDShare { | ||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") { | 24 | static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") { |
| 25 | + //TODO: 处理分享弹框交互和 海报逻辑 | ||
| 25 | 26 | ||
| 27 | + WDShareBase.getInstance().share({ | ||
| 28 | + to: ShareType.System, | ||
| 29 | + scene: ShareScene.System, | ||
| 30 | + type: ShareContentType.Link, | ||
| 31 | + obj: { | ||
| 32 | + title: program.shareInfo.shareTitle, | ||
| 33 | + desc: program.shareInfo.shareSummary, | ||
| 34 | + link: program.shareInfo.shareUrl, | ||
| 35 | + } | ||
| 36 | + }) | ||
| 26 | } | 37 | } |
| 27 | 38 | ||
| 28 | static shareSubject(subject: PageInfoDTO) { | 39 | static shareSubject(subject: PageInfoDTO) { |
| @@ -32,21 +43,21 @@ export class WDShare { | @@ -32,21 +43,21 @@ export class WDShare { | ||
| 32 | 43 | ||
| 33 | //专题分享数据转换 | 44 | //专题分享数据转换 |
| 34 | static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){ | 45 | static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){ |
| 35 | - shareBean.topicType = topicInfoBean.topicType+'' | 46 | + shareBean.appCustomTopicType = topicInfoBean.topicType+'' |
| 36 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链 | 47 | //21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链 |
| 37 | if(25 == topicInfoBean.topicType){ | 48 | if(25 == topicInfoBean.topicType){ |
| 38 | - shareBean.showPosterType = 6 | ||
| 39 | - shareBean.topicPattern = topicInfoBean.topicPattern | ||
| 40 | - shareBean.publishTime = topicInfoBean.topicDate | 49 | + shareBean.appCustomShowPosterType = 6 |
| 50 | + shareBean.appCustomTopicPattern = topicInfoBean.topicPattern | ||
| 51 | + shareBean.appCustomPublishTime = topicInfoBean.topicDate | ||
| 41 | if(topicInfoBean.frontLinkObject == null){ | 52 | if(topicInfoBean.frontLinkObject == null){ |
| 42 | - shareBean.isFrontDaily = false | 53 | + shareBean.appCustomIsFrontDaily = false |
| 43 | if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){ | 54 | if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){ |
| 44 | - shareBean.sharePosterItemList = [] as SharePosterItemBean[] | ||
| 45 | - shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length | 55 | + shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[] |
| 56 | + shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length | ||
| 46 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { | 57 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { |
| 47 | let element = topicInfoBean.shareContentList[index] | 58 | let element = topicInfoBean.shareContentList[index] |
| 48 | if(element != null){ | 59 | if(element != null){ |
| 49 | - shareBean.sharePosterItemList[index] = { | 60 | + shareBean.appCustomSharePosterItemList[index] = { |
| 50 | title:topicInfoBean.shareContentList[index].newsTitle, | 61 | title:topicInfoBean.shareContentList[index].newsTitle, |
| 51 | imageUrl:topicInfoBean.shareContentList[index].coverUrl, | 62 | imageUrl:topicInfoBean.shareContentList[index].coverUrl, |
| 52 | } as SharePosterItemBean | 63 | } as SharePosterItemBean |
| @@ -54,25 +65,25 @@ export class WDShare { | @@ -54,25 +65,25 @@ export class WDShare { | ||
| 54 | } | 65 | } |
| 55 | } | 66 | } |
| 56 | }else{ | 67 | }else{ |
| 57 | - shareBean.isFrontDaily = true | 68 | + shareBean.appCustomIsFrontDaily = true |
| 58 | shareBean.sharePosterCoverUrl = topicInfoBean.frontLinkObject.coverUrl | 69 | shareBean.sharePosterCoverUrl = topicInfoBean.frontLinkObject.coverUrl |
| 59 | - shareBean.posterSummary = topicInfoBean.frontLinkObject.summary | 70 | + shareBean.appCustomPosterSummary = topicInfoBean.frontLinkObject.summary |
| 60 | } | 71 | } |
| 61 | }else{ | 72 | }else{ |
| 62 | //文章/直播/话题专题(H5普通文章专题,包含时间链) | 73 | //文章/直播/话题专题(H5普通文章专题,包含时间链) |
| 63 | - shareBean.showPosterType = 8 | 74 | + shareBean.appCustomShowPosterType = 8 |
| 64 | //海报的头图 | 75 | //海报的头图 |
| 65 | shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl | 76 | shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl |
| 66 | - shareBean.isFrontDaily = false | ||
| 67 | - shareBean.posterTitle = topicInfoBean.title | ||
| 68 | - shareBean.posterSummary = topicInfoBean.summary | 77 | + shareBean.appCustomIsFrontDaily = false |
| 78 | + shareBean.appCustomPosterTitle = topicInfoBean.title | ||
| 79 | + shareBean.appCustomPosterSummary = topicInfoBean.summary | ||
| 69 | if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){ | 80 | if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){ |
| 70 | - shareBean.sharePosterItemList = [] as SharePosterItemBean[] | ||
| 71 | - shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length | 81 | + shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[] |
| 82 | + shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length | ||
| 72 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { | 83 | for (let index = 0; index < topicInfoBean.shareContentList.length; index++) { |
| 73 | let element = topicInfoBean.shareContentList[index] | 84 | let element = topicInfoBean.shareContentList[index] |
| 74 | if(element != null){ | 85 | if(element != null){ |
| 75 | - shareBean.sharePosterItemList[index] = { | 86 | + shareBean.appCustomSharePosterItemList[index] = { |
| 76 | title:topicInfoBean.shareContentList[index].newsTitle, | 87 | title:topicInfoBean.shareContentList[index].newsTitle, |
| 77 | imageUrl:topicInfoBean.shareContentList[index].coverUrl, | 88 | imageUrl:topicInfoBean.shareContentList[index].coverUrl, |
| 78 | timeNode:topicInfoBean.shareContentList[index].publishTime, | 89 | timeNode:topicInfoBean.shareContentList[index].publishTime, |
| @@ -214,6 +214,17 @@ export struct MultiPictureDetailPageComponent { | @@ -214,6 +214,17 @@ export struct MultiPictureDetailPageComponent { | ||
| 214 | left: 16, | 214 | left: 16, |
| 215 | right: 0 | 215 | right: 0 |
| 216 | }) | 216 | }) |
| 217 | + .onClick(() => { | ||
| 218 | + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | ||
| 219 | + // 号主页 | ||
| 220 | + const params: Params = { | ||
| 221 | + creatorId: this.contentDetailData.rmhInfo.rmhId, | ||
| 222 | + pageID: '' | ||
| 223 | + } | ||
| 224 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + }) | ||
| 217 | 228 | ||
| 218 | Row() { | 229 | Row() { |
| 219 | if (this.followStatus == '0') { | 230 | if (this.followStatus == '0') { |
-
Please register or login to post a comment