Showing
80 changed files
with
2292 additions
and
600 deletions
| 1 | { | 1 | { |
| 2 | "app": { | 2 | "app": { |
| 3 | + // "signingConfigs": [ | ||
| 4 | + // { | ||
| 5 | + // "name": "default", | ||
| 6 | + // "type": "HarmonyOS", | ||
| 7 | + // "material": { | ||
| 8 | + // "certpath": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.cer", | ||
| 9 | + // "storePassword": "0000001AB256FAF47AA4D68E4841C95D357490DE9FBB26A3A9161AD3069E31B3623E25CB49409CCA9CF7", | ||
| 10 | + // "keyAlias": "debugKey", | ||
| 11 | + // "keyPassword": "0000001AFB06818C2BC8DC275326668AAC62B91EBF7D3F84E8BE0F156D02623AA0F4F8C6B73F362CB371", | ||
| 12 | + // "profile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p7b", | ||
| 13 | + // "signAlg": "SHA256withECDSA", | ||
| 14 | + // "storeFile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p12" | ||
| 15 | + // } | ||
| 16 | + // } | ||
| 17 | + // ], | ||
| 3 | "signingConfigs": [ | 18 | "signingConfigs": [ |
| 4 | { | 19 | { |
| 5 | "name": "default", | 20 | "name": "default", |
| 6 | "type": "HarmonyOS", | 21 | "type": "HarmonyOS", |
| 7 | "material": { | 22 | "material": { |
| 8 | - "certpath": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.cer", | ||
| 9 | - "storePassword": "0000001AB256FAF47AA4D68E4841C95D357490DE9FBB26A3A9161AD3069E31B3623E25CB49409CCA9CF7", | ||
| 10 | - "keyAlias": "debugKey", | ||
| 11 | - "keyPassword": "0000001AFB06818C2BC8DC275326668AAC62B91EBF7D3F84E8BE0F156D02623AA0F4F8C6B73F362CB371", | ||
| 12 | - "profile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p7b", | 23 | + "storePassword": "0000001EF28F8A628911F4F52B75E452C814EE4370854DD8DFCE186496B6AD88F8DE5AD3E10F24C1079F2EDD1FFF", |
| 24 | + "certpath": "./singing_config/manual_com.peopledailychina.hosactivity_sign/鸿蒙中文版客户端证书.cer", | ||
| 25 | + "keyAlias": "peopledailyhosalias", | ||
| 26 | + "keyPassword": "0000001E2E8A50EFF2E6D2023242B432388B2748F8299D8BB319C0B06CFF7DCEA7482C5E3CDF1398CCE095BDC68B", | ||
| 27 | + "profile": "./singing_config/manual_com.peopledailychina.hosactivity_sign/peopledaiychina-hos-profile-debugDebug.p7b", | ||
| 13 | "signAlg": "SHA256withECDSA", | 28 | "signAlg": "SHA256withECDSA", |
| 14 | - "storeFile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p12" | 29 | + "storeFile": "./singing_config/manual_com.peopledailychina.hosactivity_sign/keystorefile.p12" |
| 15 | } | 30 | } |
| 16 | } | 31 | } |
| 17 | ], | 32 | ], |
| @@ -45,5 +45,9 @@ export class ContentConstants { | @@ -45,5 +45,9 @@ export class ContentConstants { | ||
| 45 | */ | 45 | */ |
| 46 | static readonly TYPE_FIFTEEN: string = "15"; | 46 | static readonly TYPE_FIFTEEN: string = "15"; |
| 47 | 47 | ||
| 48 | + /** | ||
| 49 | + * 30:金刚位聚合页 | ||
| 50 | + */ | ||
| 51 | + static readonly TYPE_THIRTY: string = "30"; | ||
| 48 | 52 | ||
| 49 | } | 53 | } |
| @@ -36,4 +36,16 @@ export class NetworkUtil { | @@ -36,4 +36,16 @@ export class NetworkUtil { | ||
| 36 | return NetworkUtil.TYPE_NONE; | 36 | return NetworkUtil.TYPE_NONE; |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 判断网络是否已连接 | ||
| 42 | + * @returns | ||
| 43 | + */ | ||
| 44 | + static isNetConnected(): boolean { | ||
| 45 | + let type = NetworkManager.getInstance().getNetType() | ||
| 46 | + if (type == NetworkType.TYPE_NONE) { | ||
| 47 | + return false | ||
| 48 | + } | ||
| 49 | + return true | ||
| 50 | + } | ||
| 39 | } | 51 | } |
| @@ -26,7 +26,7 @@ export class ResourcesUtils { | @@ -26,7 +26,7 @@ export class ResourcesUtils { | ||
| 26 | try { | 26 | try { |
| 27 | let text = buffer.from(content).toString("utf8"); | 27 | let text = buffer.from(content).toString("utf8"); |
| 28 | if (text) { | 28 | if (text) { |
| 29 | - Logger.info(TAG, "getResourcesText then text:" + text); | 29 | + // Logger.info(TAG, "getResourcesText then text:" + text); |
| 30 | success(text); | 30 | success(text); |
| 31 | } else { | 31 | } else { |
| 32 | Logger.warn(TAG, "getResourcesText then text is empty"); | 32 | Logger.warn(TAG, "getResourcesText then text is empty"); |
| @@ -225,6 +225,10 @@ export class HttpUrlUtils { | @@ -225,6 +225,10 @@ export class HttpUrlUtils { | ||
| 225 | */ | 225 | */ |
| 226 | static readonly LIVE_APPOINTMENT_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | 226 | static readonly LIVE_APPOINTMENT_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; |
| 227 | /** | 227 | /** |
| 228 | + * 预约状态 | ||
| 229 | + */ | ||
| 230 | + static readonly LIVE_APPOINTMENT_BATCH_PATH: string = "api/live-center-message/zh/c/live/subscribe/user/batch"; | ||
| 231 | + /** | ||
| 228 | 232 | ||
| 229 | * 搜索结果 显示tab 数 | 233 | * 搜索结果 显示tab 数 |
| 230 | */ | 234 | */ |
| @@ -285,7 +289,6 @@ export class HttpUrlUtils { | @@ -285,7 +289,6 @@ export class HttpUrlUtils { | ||
| 285 | * 获取启动页相关数据 | 289 | * 获取启动页相关数据 |
| 286 | */ | 290 | */ |
| 287 | static readonly LAUNCH_PAGE_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/launchPage"; | 291 | static readonly LAUNCH_PAGE_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/launchPage"; |
| 288 | - | ||
| 289 | private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT; | 292 | private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT; |
| 290 | /** | 293 | /** |
| 291 | * 推荐列表 | 294 | * 推荐列表 |
| @@ -772,6 +775,11 @@ export class HttpUrlUtils { | @@ -772,6 +775,11 @@ export class HttpUrlUtils { | ||
| 772 | return url | 775 | return url |
| 773 | } | 776 | } |
| 774 | 777 | ||
| 778 | + static getAppointmentStatusUrl() { | ||
| 779 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.LIVE_APPOINTMENT_BATCH_PATH | ||
| 780 | + return url | ||
| 781 | + } | ||
| 782 | + | ||
| 775 | static getSearchResultCountDataUrl() { | 783 | static getSearchResultCountDataUrl() { |
| 776 | let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_COUNT_DATA_PATH | 784 | let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_COUNT_DATA_PATH |
| 777 | return url | 785 | return url |
| @@ -818,6 +826,12 @@ export class HttpUrlUtils { | @@ -818,6 +826,12 @@ export class HttpUrlUtils { | ||
| 818 | return url | 826 | return url |
| 819 | } | 827 | } |
| 820 | 828 | ||
| 829 | + //金刚位聚合页 | ||
| 830 | + static getThemeListUrl() { | ||
| 831 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-bff-display-zh/display/zh/c/themeList"; | ||
| 832 | + return url; | ||
| 833 | + } | ||
| 834 | + | ||
| 821 | // static getYcgCommonHeaders(): HashMap<string, string> { | 835 | // static getYcgCommonHeaders(): HashMap<string, string> { |
| 822 | // let headers: HashMap<string, string> = new HashMap<string, string>() | 836 | // let headers: HashMap<string, string> = new HashMap<string, string>() |
| 823 | // | 837 | // |
| @@ -65,6 +65,10 @@ export function registerRouter() { | @@ -65,6 +65,10 @@ export function registerRouter() { | ||
| 65 | return WDRouterPage.audioDetail | 65 | return WDRouterPage.audioDetail |
| 66 | } else if (action.params?.detailPageType == 18) { | 66 | } else if (action.params?.detailPageType == 18) { |
| 67 | return WDRouterPage.multiPictureListPage | 67 | return WDRouterPage.multiPictureListPage |
| 68 | + } else if (action.params?.detailPageType == 19) { | ||
| 69 | + return WDRouterPage.videoPlayPage | ||
| 70 | + }else if (action.params?.detailPageType == 30) { | ||
| 71 | + return WDRouterPage.themeListPage | ||
| 68 | } | 72 | } |
| 69 | return WDRouterPage.detailPlayVodPage | 73 | return WDRouterPage.detailPlayVodPage |
| 70 | }) | 74 | }) |
| @@ -59,6 +59,8 @@ export class WDRouterPage { | @@ -59,6 +59,8 @@ export class WDRouterPage { | ||
| 59 | static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage"); | 59 | static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage"); |
| 60 | //大图列表页 | 60 | //大图列表页 |
| 61 | static multiPictureListPage = new WDRouterPage("wdComponent", "ets/pages/MultiPictureListPage"); | 61 | static multiPictureListPage = new WDRouterPage("wdComponent", "ets/pages/MultiPictureListPage"); |
| 62 | + //单个视频播放页 | ||
| 63 | + static videoPlayPage = new WDRouterPage("wdComponent", "ets/pages/VideoPlayPage"); | ||
| 62 | // 音乐详情页 | 64 | // 音乐详情页 |
| 63 | static audioDetail = new WDRouterPage("phone", "ets/pages/detail/AudioDetail"); | 65 | static audioDetail = new WDRouterPage("phone", "ets/pages/detail/AudioDetail"); |
| 64 | // 动态详情页 | 66 | // 动态详情页 |
| @@ -118,4 +120,6 @@ export class WDRouterPage { | @@ -118,4 +120,6 @@ export class WDRouterPage { | ||
| 118 | static liveMorePage = new WDRouterPage("wdComponent", "ets/components/page/LiveMorePage"); | 120 | static liveMorePage = new WDRouterPage("wdComponent", "ets/components/page/LiveMorePage"); |
| 119 | //预约更多页 | 121 | //预约更多页 |
| 120 | static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage"); | 122 | static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage"); |
| 123 | + //金刚位聚合页 | ||
| 124 | + static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage"); | ||
| 121 | } | 125 | } |
| @@ -4,6 +4,8 @@ import { Logger } from 'wdKit'; | @@ -4,6 +4,8 @@ import { Logger } from 'wdKit'; | ||
| 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | 4 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; |
| 5 | import { WDRouterRule } from '../router/WDRouterRule'; | 5 | import { WDRouterRule } from '../router/WDRouterRule'; |
| 6 | import { ContentConstants } from 'wdConstant'; | 6 | import { ContentConstants } from 'wdConstant'; |
| 7 | +import { common, Want } from '@kit.AbilityKit'; | ||
| 8 | +import { BusinessError } from '@kit.BasicServicesKit'; | ||
| 7 | 9 | ||
| 8 | // import { LiveModel } from '../viewmodel/LiveModel'; | 10 | // import { LiveModel } from '../viewmodel/LiveModel'; |
| 9 | 11 | ||
| @@ -58,10 +60,14 @@ export class ProcessUtils { | @@ -58,10 +60,14 @@ export class ProcessUtils { | ||
| 58 | break; | 60 | break; |
| 59 | //动态详情页(动态图文) | 61 | //动态详情页(动态图文) |
| 60 | case ContentConstants.TYPE_FOURTEEN: | 62 | case ContentConstants.TYPE_FOURTEEN: |
| 63 | + ProcessUtils.gotoDynamicDetailPage(content); | ||
| 61 | //动态详情页(动态视频) | 64 | //动态详情页(动态视频) |
| 62 | case ContentConstants.TYPE_FIFTEEN: | 65 | case ContentConstants.TYPE_FIFTEEN: |
| 63 | ProcessUtils.gotoDynamicDetailPage(content); | 66 | ProcessUtils.gotoDynamicDetailPage(content); |
| 64 | break; | 67 | break; |
| 68 | + case ContentConstants.TYPE_THIRTY: | ||
| 69 | + ProcessUtils.gotoThemeListPage(content) | ||
| 70 | + break; | ||
| 65 | default: | 71 | default: |
| 66 | break; | 72 | break; |
| 67 | } | 73 | } |
| @@ -194,6 +200,26 @@ export class ProcessUtils { | @@ -194,6 +200,26 @@ export class ProcessUtils { | ||
| 194 | } | 200 | } |
| 195 | 201 | ||
| 196 | /** | 202 | /** |
| 203 | + * 金刚位聚合页 | ||
| 204 | + * @param content | ||
| 205 | + * */ | ||
| 206 | + private static gotoThemeListPage(content: ContentDTO) { | ||
| 207 | + let taskAction: Action = { | ||
| 208 | + type: 'JUMP_DETAIL_PAGE', | ||
| 209 | + params: { | ||
| 210 | + detailPageType: 30, | ||
| 211 | + contentID: content?.objectId, | ||
| 212 | + extra: { | ||
| 213 | + relType: content?.relType, | ||
| 214 | + relId: content?.relId, | ||
| 215 | + } as ExtraDTO | ||
| 216 | + } as Params, | ||
| 217 | + }; | ||
| 218 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 219 | + Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`); | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + /** | ||
| 197 | * 图片预览页 | 223 | * 图片预览页 |
| 198 | * @param content | 224 | * @param content |
| 199 | * */ | 225 | * */ |
| @@ -212,4 +238,38 @@ export class ProcessUtils { | @@ -212,4 +238,38 @@ export class ProcessUtils { | ||
| 212 | WDRouterRule.jumpWithAction(taskAction) | 238 | WDRouterRule.jumpWithAction(taskAction) |
| 213 | Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`); | 239 | Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`); |
| 214 | } | 240 | } |
| 215 | -} | ||
| 241 | + | ||
| 242 | + /** | ||
| 243 | + * 打开外链 | ||
| 244 | + * @param url 外链地址 | ||
| 245 | + */ | ||
| 246 | + public static jumpExternalWebPage(url: string) { | ||
| 247 | + let context = getContext() as common.UIAbilityContext; | ||
| 248 | + let wantInfo: Want = { | ||
| 249 | + action: 'ohos.want.action.viewData', | ||
| 250 | + entities: ['entity.system.browsable'], | ||
| 251 | + uri: url | ||
| 252 | + } | ||
| 253 | + context.startAbility(wantInfo).then(() => { | ||
| 254 | + Logger.debug(TAG, 'jumpExternalWebPage success') | ||
| 255 | + }).catch((err: BusinessError) => { | ||
| 256 | + Logger.error(TAG, 'jumpExternalWebPage success, error: ' + JSON.stringify(err)) | ||
| 257 | + }) | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + /** | ||
| 261 | + * 打开端内web页面 | ||
| 262 | + * @param url web地址 | ||
| 263 | + */ | ||
| 264 | + public static gotoDefaultWebPage(url: string) { | ||
| 265 | + let taskAction: Action = { | ||
| 266 | + type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 267 | + params: { | ||
| 268 | + url: url, | ||
| 269 | + } as Params, | ||
| 270 | + }; | ||
| 271 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 272 | + } | ||
| 273 | + | ||
| 274 | + | ||
| 275 | +} |
| @@ -37,7 +37,6 @@ export { | @@ -37,7 +37,6 @@ export { | ||
| 37 | postExecuteCollectRecordParams, | 37 | postExecuteCollectRecordParams, |
| 38 | contentListParams, | 38 | contentListParams, |
| 39 | postInteractAccentionOperateParams, | 39 | postInteractAccentionOperateParams, |
| 40 | - postRecommendListParams, | ||
| 41 | contentListItem | 40 | contentListItem |
| 42 | } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; | 41 | } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; |
| 43 | 42 | ||
| @@ -119,12 +118,18 @@ export { ArticleListDTO } from './src/main/ets/bean/component/ArticleListDTO'; | @@ -119,12 +118,18 @@ export { ArticleListDTO } from './src/main/ets/bean/component/ArticleListDTO'; | ||
| 119 | 118 | ||
| 120 | export { appStyleImagesDTO } from './src/main/ets/bean/content/appStyleImagesDTO'; | 119 | export { appStyleImagesDTO } from './src/main/ets/bean/content/appStyleImagesDTO'; |
| 121 | 120 | ||
| 122 | -export { LiveRoomBean,LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean'; | 121 | +export { LiveRoomBean, LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean'; |
| 123 | 122 | ||
| 124 | export { LiveRoomDataBean } from './src/main/ets/bean/live/LiveRoomDataBean'; | 123 | export { LiveRoomDataBean } from './src/main/ets/bean/live/LiveRoomDataBean'; |
| 125 | 124 | ||
| 125 | +export { ReserveBean } from './src/main/ets/bean/live/ReserveBean'; | ||
| 126 | + | ||
| 126 | export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; | 127 | export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; |
| 127 | 128 | ||
| 129 | +export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams'; | ||
| 130 | + | ||
| 131 | +export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams'; | ||
| 132 | + | ||
| 128 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; | 133 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; |
| 129 | 134 | ||
| 130 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; | 135 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; |
| @@ -19,49 +19,80 @@ export interface AdvRuleBean { | @@ -19,49 +19,80 @@ export interface AdvRuleBean { | ||
| 19 | /** | 19 | /** |
| 20 | * 广告展示顺序,0:随机展示;1列表循环 | 20 | * 广告展示顺序,0:随机展示;1列表循环 |
| 21 | */ | 21 | */ |
| 22 | - displayMode:number | ||
| 23 | - | 22 | + displayMode: number |
| 24 | /** | 23 | /** |
| 25 | * 每间隔刷新n次展示广告 | 24 | * 每间隔刷新n次展示广告 |
| 26 | */ | 25 | */ |
| 27 | - refreshFrequency:number | ||
| 28 | - | 26 | + refreshFrequency: number |
| 29 | /** | 27 | /** |
| 30 | * 广告信息集合 | 28 | * 广告信息集合 |
| 31 | */ | 29 | */ |
| 32 | - advert:AdvertsBean; | 30 | + advert: AdvertsBean; |
| 33 | 31 | ||
| 34 | } | 32 | } |
| 35 | 33 | ||
| 36 | /** | 34 | /** |
| 37 | * 广告组件数据 | 35 | * 广告组件数据 |
| 38 | */ | 36 | */ |
| 39 | -export interface CompAdvBean{ | 37 | +export interface CompAdvBean { |
| 40 | 38 | ||
| 41 | /** | 39 | /** |
| 42 | * 广告订单id | 40 | * 广告订单id |
| 43 | */ | 41 | */ |
| 44 | - id:string; | 42 | + id: string; |
| 45 | 43 | ||
| 46 | /** | 44 | /** |
| 47 | * 投放开始时间 | 45 | * 投放开始时间 |
| 48 | */ | 46 | */ |
| 49 | - startTime:number; | 47 | + startTime: number; |
| 50 | 48 | ||
| 51 | /** | 49 | /** |
| 52 | * 投放结束时间 | 50 | * 投放结束时间 |
| 53 | */ | 51 | */ |
| 54 | - endTime:number; | 52 | + endTime: number; |
| 55 | 53 | ||
| 56 | /** | 54 | /** |
| 57 | * 信息流广告素材 | 55 | * 信息流广告素材 |
| 58 | */ | 56 | */ |
| 59 | - matInfo:CompAdvMatInfoBean | ||
| 60 | - | 57 | + matInfo: CompAdvMatInfoBean |
| 61 | /** | 58 | /** |
| 62 | * 信息流广告位 | 59 | * 信息流广告位 |
| 63 | */ | 60 | */ |
| 64 | - slotInfo:CompAdvSlotInfoBean | 61 | + slotInfo: CompAdvSlotInfoBean |
| 62 | + /** | ||
| 63 | + * 展示优先级 | ||
| 64 | + * 广告A,displayPriority=1 | ||
| 65 | + * 广告B,displayPriority=2 | ||
| 66 | + * 则打开页面时,挂角展示顺序 A->B (优先级升序排列) | ||
| 67 | + */ | ||
| 68 | + displayPriority: number; | ||
| 65 | 69 | ||
| 70 | + /** | ||
| 71 | + * 展示的次数 | ||
| 72 | + */ | ||
| 73 | + showCount: number; | ||
| 66 | 74 | ||
| 75 | + /** | ||
| 76 | + * 页面id | ||
| 77 | + */ | ||
| 78 | + pageId: String ; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 开屏广告-显示时长 | ||
| 82 | + */ | ||
| 83 | + displayDuration: String; | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 开屏广告-展示轮数 | ||
| 87 | + * 2.launchAdInfo有多个时: | ||
| 88 | + * 广告A,displayRound=10 | ||
| 89 | + * 广告B,displayRound=5, | ||
| 90 | + * 每次开机屏展示广告概率 | ||
| 91 | + * 广告A=10/(10+5) | ||
| 92 | + * 广告B=5/(10+5) | ||
| 93 | + * 广告A展示10次后,不再展示, | ||
| 94 | + * 广告B展示5此后,不再展示。 | ||
| 95 | + * 下一轮展示继续上面逻辑。 | ||
| 96 | + */ | ||
| 97 | + displayRound: number; | ||
| 67 | } | 98 | } |
| @@ -19,7 +19,10 @@ export interface Params { | @@ -19,7 +19,10 @@ export interface Params { | ||
| 19 | // 13.音频详情页 | 19 | // 13.音频详情页 |
| 20 | // 17.多图(图集)详情页 | 20 | // 17.多图(图集)详情页 |
| 21 | // 18.大图列表页 | 21 | // 18.大图列表页 |
| 22 | + // 19.单个视频播放页 | ||
| 22 | detailPageType?: number; // 详情页类型 | 23 | detailPageType?: number; // 详情页类型 |
| 23 | liveStyle?: number; // 直播类型:0横屏,1竖屏 | 24 | liveStyle?: number; // 直播类型:0横屏,1竖屏 |
| 24 | creatorId?: string; //号主id | 25 | creatorId?: string; //号主id |
| 26 | + videoUrl?: string; | ||
| 27 | + videoCoverUrl?: string; | ||
| 25 | } | 28 | } |
| @@ -177,14 +177,4 @@ export interface postInteractAccentionOperateParams { | @@ -177,14 +177,4 @@ export interface postInteractAccentionOperateParams { | ||
| 177 | // userType: number; | 177 | // userType: number; |
| 178 | // userId: string; | 178 | // userId: string; |
| 179 | status: number; | 179 | status: number; |
| 180 | -} | ||
| 181 | - | ||
| 182 | -export interface postRecommendListParams { | ||
| 183 | - imei: string; | ||
| 184 | - userId ?: string; | ||
| 185 | - contentId ?: string; | ||
| 186 | - relId ?: string; | ||
| 187 | - contentType ?: number; | ||
| 188 | - recType: number; | ||
| 189 | - channelId ? : string | ||
| 190 | } | 180 | } |
| @@ -3,11 +3,14 @@ export interface RmhInfoDTO { | @@ -3,11 +3,14 @@ export interface RmhInfoDTO { | ||
| 3 | authTitle: string; | 3 | authTitle: string; |
| 4 | authTitle2: string; | 4 | authTitle2: string; |
| 5 | banControl: number; | 5 | banControl: number; |
| 6 | - cnIsAttention: number; | 6 | + cnIsAttention?: number; |
| 7 | + cnAttention?: number; | ||
| 8 | + cnlsComment?: number; | ||
| 9 | + cnlsLike?: number; | ||
| 7 | cnMainControl: number; | 10 | cnMainControl: number; |
| 8 | cnShareControl: number; | 11 | cnShareControl: number; |
| 9 | - cnIsComment: number; | ||
| 10 | - cnIsLike: number; | 12 | + cnIsComment?: number; |
| 13 | + cnIsLike?: number; | ||
| 11 | posterShareControl: number; | 14 | posterShareControl: number; |
| 12 | rmhDesc: string; | 15 | rmhDesc: string; |
| 13 | rmhHeadUrl: string; | 16 | rmhHeadUrl: string; |
| @@ -16,4 +16,11 @@ export interface LiveRoomItemBean { | @@ -16,4 +16,11 @@ export interface LiveRoomItemBean { | ||
| 16 | //是否置顶 1置顶0不置顶 | 16 | //是否置顶 1置顶0不置顶 |
| 17 | isTop: number | 17 | isTop: number |
| 18 | role: string | 18 | role: string |
| 19 | + //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频 | ||
| 20 | + dataType: string | ||
| 21 | + transcodeImageUrl: string | ||
| 22 | + videoUrl: string | ||
| 23 | + pictureResolutions: string[] | ||
| 24 | + //音视频长度 | ||
| 25 | + duration: number | ||
| 19 | } | 26 | } |
| @@ -91,6 +91,7 @@ export struct BottomNavigationComponent { | @@ -91,6 +91,7 @@ export struct BottomNavigationComponent { | ||
| 91 | // this.onBottomNavigationIndexChange() | 91 | // this.onBottomNavigationIndexChange() |
| 92 | }) | 92 | }) |
| 93 | .backgroundColor(this.barBackgroundColor) | 93 | .backgroundColor(this.barBackgroundColor) |
| 94 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 94 | 95 | ||
| 95 | // .padding({ bottom: this.bottomRectHeight + 'px', top: this.topRectHeight + 'px' }) // 此处margin具体数值在实际中应与导航条区域高度保持一致 | 96 | // .padding({ bottom: this.bottomRectHeight + 'px', top: this.topRectHeight + 'px' }) // 此处margin具体数值在实际中应与导航条区域高度保持一致 |
| 96 | 97 |
| @@ -298,47 +298,55 @@ struct ChannelDialog { | @@ -298,47 +298,55 @@ struct ChannelDialog { | ||
| 298 | .zIndex(this.dragItem == item.num ? 1 : 0) | 298 | .zIndex(this.dragItem == item.num ? 1 : 0) |
| 299 | .translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 }) | 299 | .translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 }) |
| 300 | .gesture( | 300 | .gesture( |
| 301 | - GestureGroup(GestureMode.Parallel, | ||
| 302 | - TapGesture() | ||
| 303 | - .onAction((event?: GestureEvent) => { | ||
| 304 | - if (this.isEditIng) { | ||
| 305 | - if (item.delPermitted === 1) { | ||
| 306 | - this.delChannelItem(index) | ||
| 307 | - } | ||
| 308 | - } else { | ||
| 309 | - this.confirm(index) | ||
| 310 | - this.controller?.close() | 301 | + GestureGroup(GestureMode.Parallel, |
| 302 | + TapGesture() | ||
| 303 | + .onAction((event?: GestureEvent) => { | ||
| 304 | + if (this.isEditIng) { | ||
| 305 | + if (item.delPermitted === 1) { | ||
| 306 | + this.delChannelItem(index) | ||
| 311 | } | 307 | } |
| 312 | - }), | ||
| 313 | - PanGesture({ fingers: 1, direction: null, distance: 0 }) | ||
| 314 | - .onActionStart((event: GestureEvent) => { | ||
| 315 | - this.dragItem = item.num | 308 | + } else { |
| 309 | + this.confirm(index) | ||
| 310 | + this.controller?.close() | ||
| 311 | + } | ||
| 312 | + }), | ||
| 313 | + LongPressGesture({ repeat: true }) | ||
| 314 | + .onAction((event: GestureEvent | undefined) => { | ||
| 315 | + if (event) { | ||
| 316 | + if (event.repeat && this.isEditIng === false) { | ||
| 317 | + this.isEditIng = true; | ||
| 318 | + } | ||
| 319 | + } | ||
| 320 | + }), | ||
| 321 | + PanGesture({ fingers: 1, direction: null, distance: 0 }) | ||
| 322 | + .onActionStart((event: GestureEvent) => { | ||
| 323 | + this.dragItem = item.num | ||
| 324 | + this.dragRefOffsetX = 0 | ||
| 325 | + this.dragRefOffsetY = 0 | ||
| 326 | + }) | ||
| 327 | + .onActionUpdate((event: GestureEvent) => { | ||
| 328 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 329 | + this.handleAnimationTo(item, event) | ||
| 330 | + }) | ||
| 331 | + }) | ||
| 332 | + .onActionEnd((event: GestureEvent) => { | ||
| 333 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 334 | + this.dragItem = -1 | ||
| 335 | + this.offsetX = 0 | ||
| 336 | + this.offsetY = 0 | ||
| 316 | this.dragRefOffsetX = 0 | 337 | this.dragRefOffsetX = 0 |
| 317 | this.dragRefOffsetY = 0 | 338 | this.dragRefOffsetY = 0 |
| 318 | }) | 339 | }) |
| 319 | - .onActionUpdate((event: GestureEvent) => { | ||
| 320 | - animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 321 | - this.handleAnimationTo(item, event) | ||
| 322 | - }) | ||
| 323 | - }) | ||
| 324 | - .onActionEnd((event: GestureEvent) => { | ||
| 325 | - animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 326 | - this.dragItem = -1 | ||
| 327 | - this.offsetX = 0 | ||
| 328 | - this.offsetY = 0 | ||
| 329 | - this.dragRefOffsetX = 0 | ||
| 330 | - this.dragRefOffsetY = 0 | ||
| 331 | - }) | ||
| 332 | - }) | ||
| 333 | - ).onCancel(() => { | ||
| 334 | - animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 335 | - this.dragItem = -1 | ||
| 336 | - this.offsetX = 0 | ||
| 337 | - this.offsetY = 0 | ||
| 338 | - this.dragRefOffsetX = 0 | ||
| 339 | - this.dragRefOffsetY = 0 | ||
| 340 | }) | 340 | }) |
| 341 | + ).onCancel(() => { | ||
| 342 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 343 | + this.dragItem = -1 | ||
| 344 | + this.offsetX = 0 | ||
| 345 | + this.offsetY = 0 | ||
| 346 | + this.dragRefOffsetX = 0 | ||
| 347 | + this.dragRefOffsetY = 0 | ||
| 341 | }) | 348 | }) |
| 349 | + }) | ||
| 342 | ) | 350 | ) |
| 343 | }, (item: TopNavDTO) => JSON.stringify(item)) | 351 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 344 | } | 352 | } |
| @@ -52,48 +52,56 @@ export struct PageComponent { | @@ -52,48 +52,56 @@ export struct PageComponent { | ||
| 52 | 52 | ||
| 53 | @Builder | 53 | @Builder |
| 54 | ListLayout() { | 54 | ListLayout() { |
| 55 | - List() { | ||
| 56 | - // 下拉刷新 | ||
| 57 | - ListItem() { | ||
| 58 | - RefreshLayout({ | ||
| 59 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 60 | - this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 61 | - }) | ||
| 62 | - } | ||
| 63 | 55 | ||
| 64 | - LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | 56 | + RelativeContainer() { |
| 57 | + List() { | ||
| 58 | + // 下拉刷新 | ||
| 65 | ListItem() { | 59 | ListItem() { |
| 66 | - Column() { | ||
| 67 | - CompParser({ compDTO: compDTO, compIndex: compIndex }); | ||
| 68 | - } | ||
| 69 | - } | ||
| 70 | - }, | ||
| 71 | - (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp | ||
| 72 | - ) | ||
| 73 | - | ||
| 74 | - // 加载更多 | ||
| 75 | - ListItem() { | ||
| 76 | - if (this.pageModel.hasMore) { | ||
| 77 | - LoadMoreLayout({ | ||
| 78 | - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 79 | - this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | 60 | + RefreshLayout({ |
| 61 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 62 | + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 80 | }) | 63 | }) |
| 81 | - } else if (!this.pageModel.contentNeedScroll) { | ||
| 82 | - NoMoreLayout() | 64 | + } |
| 65 | + | ||
| 66 | + LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | ||
| 67 | + ListItem() { | ||
| 68 | + Column() { | ||
| 69 | + CompParser({ compDTO: compDTO, compIndex: compIndex }); | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | + }, | ||
| 73 | + (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp | ||
| 74 | + ) | ||
| 75 | + | ||
| 76 | + // 加载更多 | ||
| 77 | + ListItem() { | ||
| 78 | + if (this.pageModel.hasMore) { | ||
| 79 | + LoadMoreLayout({ | ||
| 80 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage, | ||
| 81 | + this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) | ||
| 82 | + }) | ||
| 83 | + } else if (!this.pageModel.contentNeedScroll) { | ||
| 84 | + NoMoreLayout() | ||
| 85 | + } | ||
| 83 | } | 86 | } |
| 84 | } | 87 | } |
| 88 | + // comp自己处理分页,这里设置EdgeEffect.None | ||
| 89 | + .edgeEffect(this.pageModel.contentNeedScroll ? EdgeEffect.None : EdgeEffect.Spring) | ||
| 90 | + .scrollBar(BarState.Off) | ||
| 91 | + .cachedCount(8) | ||
| 92 | + .height(CommonConstants.FULL_PARENT) | ||
| 93 | + .onScrollIndex((start: number, end: number) => { | ||
| 94 | + // Listen to the first index of the current list. | ||
| 95 | + this.pageModel.startIndex = start; | ||
| 96 | + // 包含了 头尾item,判断时需要考虑+2 | ||
| 97 | + this.pageModel.endIndex = end; | ||
| 98 | + }) | ||
| 99 | + .id('page_list') | ||
| 100 | + | ||
| 101 | + // 挂角广告 | ||
| 102 | + this.pageHornAd() | ||
| 103 | + | ||
| 85 | } | 104 | } |
| 86 | - // comp自己处理分页,这里设置EdgeEffect.None | ||
| 87 | - .edgeEffect(this.pageModel.contentNeedScroll ? EdgeEffect.None : EdgeEffect.Spring) | ||
| 88 | - .scrollBar(BarState.Off) | ||
| 89 | - .cachedCount(8) | ||
| 90 | - .height(CommonConstants.FULL_PARENT) | ||
| 91 | - .onScrollIndex((start: number, end: number) => { | ||
| 92 | - // Listen to the first index of the current list. | ||
| 93 | - this.pageModel.startIndex = start; | ||
| 94 | - // 包含了 头尾item,判断时需要考虑+2 | ||
| 95 | - this.pageModel.endIndex = end; | ||
| 96 | - }) | ||
| 97 | } | 105 | } |
| 98 | 106 | ||
| 99 | @Builder | 107 | @Builder |
| @@ -105,6 +113,111 @@ export struct PageComponent { | @@ -105,6 +113,111 @@ export struct PageComponent { | ||
| 105 | // }) | 113 | // }) |
| 106 | } | 114 | } |
| 107 | 115 | ||
| 116 | + /** | ||
| 117 | + * 页面挂角广告 | ||
| 118 | + */ | ||
| 119 | + @Builder | ||
| 120 | + pageHornAd() { | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + if (this.pageModel.pageLeftCornerAdv.matInfo != null) { | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + // 页面左挂角 | ||
| 127 | + Image(this.pageModel.pageLeftCornerAdv.matInfo.matImageUrl[0]) | ||
| 128 | + .width($r('app.float.vp_80')) | ||
| 129 | + .height($r('app.float.vp_80')) | ||
| 130 | + .id("left_iv") | ||
| 131 | + .alignRules({ | ||
| 132 | + bottom: { anchor: '__container__', align: VerticalAlign.Bottom }, | ||
| 133 | + left: { anchor: '__container__', align: HorizontalAlign.Start }, | ||
| 134 | + }) | ||
| 135 | + .margin({ bottom: "65vp", left: $r('app.float.card_comp_pagePadding_lf') }) | ||
| 136 | + | ||
| 137 | + Image($r('app.media.icon_adv_horn_close')).id('left_close').width($r('app.float.vp_16')).alignRules({ | ||
| 138 | + top: { anchor: 'left_iv', align: VerticalAlign.Top }, | ||
| 139 | + left: { anchor: 'left_iv', align: HorizontalAlign.Start }, | ||
| 140 | + }).offset({ | ||
| 141 | + x: -10, | ||
| 142 | + y: -10 | ||
| 143 | + }) | ||
| 144 | + | ||
| 145 | + Text($r('app.string.comp_advertisement')) | ||
| 146 | + .width($r('app.float.vp_28')) | ||
| 147 | + .height($r('app.float.vp_16')) | ||
| 148 | + .fontSize($r('app.float.font_size_10')) | ||
| 149 | + .fontColor(Color.White) | ||
| 150 | + .id('left_tag') | ||
| 151 | + .alignRules({ | ||
| 152 | + bottom: { anchor: 'left_iv', align: VerticalAlign.Bottom }, | ||
| 153 | + left: { anchor: 'left_iv', align: HorizontalAlign.Start }, | ||
| 154 | + }) | ||
| 155 | + .textAlign(TextAlign.Center) | ||
| 156 | + .backgroundColor($r('app.color.res_color_general_000000_30')) | ||
| 157 | + .borderRadius({ | ||
| 158 | + topLeft: $r('app.float.vp_2'), | ||
| 159 | + topRight: $r('app.float.vp_2'), | ||
| 160 | + bottomLeft: $r('app.float.vp_2'), | ||
| 161 | + bottomRight: $r('app.float.vp_2') | ||
| 162 | + }) | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + if (this.pageModel.pageRightCornerAdv.matInfo != null && this.pageModel.isShowRightAds) { | ||
| 166 | + // 页面右边挂角 | ||
| 167 | + Image(this.pageModel.pageRightCornerAdv.matInfo.matImageUrl[0]) | ||
| 168 | + .width($r('app.float.vp_80')) | ||
| 169 | + .height($r('app.float.vp_80')) | ||
| 170 | + .id("right_iv") | ||
| 171 | + .alignRules({ | ||
| 172 | + bottom: { anchor: '__container__', align: VerticalAlign.Bottom }, | ||
| 173 | + right: { anchor: '__container__', align: HorizontalAlign.End }, | ||
| 174 | + }) | ||
| 175 | + .margin({ bottom: "65vp", right: $r('app.float.card_comp_pagePadding_lf') }) | ||
| 176 | + .onClick(()=>{ | ||
| 177 | + | ||
| 178 | + // 关闭挂角广告 | ||
| 179 | + this.pageModel.isShowLeftAds = false; | ||
| 180 | + | ||
| 181 | + }) | ||
| 182 | + | ||
| 183 | + Image($r('app.media.icon_adv_horn_close')) | ||
| 184 | + .id('right_close') | ||
| 185 | + .width($r('app.float.vp_16')) | ||
| 186 | + .alignRules({ | ||
| 187 | + top: { anchor: 'right_iv', align: VerticalAlign.Top }, | ||
| 188 | + right: { anchor: 'right_iv', align: HorizontalAlign.End }, | ||
| 189 | + }) | ||
| 190 | + .offset({ | ||
| 191 | + x: 10, | ||
| 192 | + y: -10 | ||
| 193 | + }) | ||
| 194 | + .onClick(() => { | ||
| 195 | + // 关闭挂角广告 | ||
| 196 | + this.pageModel.isShowRightAds = false; | ||
| 197 | + | ||
| 198 | + }) | ||
| 199 | + | ||
| 200 | + Text($r('app.string.comp_advertisement')) | ||
| 201 | + .width($r('app.float.vp_28')) | ||
| 202 | + .height($r('app.float.vp_16')) | ||
| 203 | + .fontSize($r('app.float.font_size_10')) | ||
| 204 | + .fontColor(Color.White) | ||
| 205 | + .id('right_tag') | ||
| 206 | + .alignRules({ | ||
| 207 | + bottom: { anchor: 'right_iv', align: VerticalAlign.Bottom }, | ||
| 208 | + right: { anchor: 'right_iv', align: HorizontalAlign.End }, | ||
| 209 | + }) | ||
| 210 | + .textAlign(TextAlign.Center) | ||
| 211 | + .backgroundColor($r('app.color.res_color_general_000000_30')) | ||
| 212 | + .borderRadius({ | ||
| 213 | + topLeft: $r('app.float.vp_2'), | ||
| 214 | + topRight: $r('app.float.vp_2'), | ||
| 215 | + bottomLeft: $r('app.float.vp_2'), | ||
| 216 | + bottomRight: $r('app.float.vp_2') | ||
| 217 | + }) | ||
| 218 | + } | ||
| 219 | + } | ||
| 220 | + | ||
| 108 | async aboutToAppear() { | 221 | async aboutToAppear() { |
| 109 | // 选中tab,才请求数据。拦截大量接口请求 | 222 | // 选中tab,才请求数据。拦截大量接口请求 |
| 110 | if (this.navIndex === this.currentTopNavSelectedIndex) { | 223 | if (this.navIndex === this.currentTopNavSelectedIndex) { |
| 1 | -import { ContentDTO } from 'wdBean'; | 1 | +import { ContentDTO, ReserveBean } from 'wdBean'; |
| 2 | import { ProcessUtils } from 'wdRouter'; | 2 | import { ProcessUtils } from 'wdRouter'; |
| 3 | import { CommonConstants } from 'wdConstant/Index'; | 3 | import { CommonConstants } from 'wdConstant/Index'; |
| 4 | import PageViewModel from '../../viewmodel/PageViewModel'; | 4 | import PageViewModel from '../../viewmodel/PageViewModel'; |
| @@ -24,6 +24,7 @@ const TAG: string = 'ReserveMorePage'; | @@ -24,6 +24,7 @@ const TAG: string = 'ReserveMorePage'; | ||
| 24 | struct ReserveMorePage { | 24 | struct ReserveMorePage { |
| 25 | @State private pageModel: PageModel = new PageModel(); | 25 | @State private pageModel: PageModel = new PageModel(); |
| 26 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | 26 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); |
| 27 | + reserveBean: ReserveBean[] = [] | ||
| 27 | topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | 28 | topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; |
| 28 | type: number = 2; | 29 | type: number = 2; |
| 29 | currentPage: number = 1; | 30 | currentPage: number = 1; |
| @@ -72,12 +73,32 @@ struct ReserveMorePage { | @@ -72,12 +73,32 @@ struct ReserveMorePage { | ||
| 72 | // } | 73 | // } |
| 73 | } as ContentDTO; | 74 | } as ContentDTO; |
| 74 | 75 | ||
| 75 | - aboutToAppear(): void { | ||
| 76 | - PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then((liveReviewDTO) => { | 76 | + async aboutToAppear(): Promise<void> { |
| 77 | + // PageViewModel.get | ||
| 78 | + | ||
| 79 | + PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => { | ||
| 77 | // this.operDataList = [] | 80 | // this.operDataList = [] |
| 78 | // this.operDataList.push(...liveReviewDTO.list) | 81 | // this.operDataList.push(...liveReviewDTO.list) |
| 79 | this.data.push(...liveReviewDTO.list) | 82 | this.data.push(...liveReviewDTO.list) |
| 83 | + this.reserveBean = this.transformToLiveDetailsBeans(liveReviewDTO.list) | ||
| 84 | + | ||
| 85 | + const apointMentStatus = await LiveModel.getAppointmentStatus(this.reserveBean) | ||
| 86 | + console.info(`cj2024 ${apointMentStatus.code}`) | ||
| 80 | }) | 87 | }) |
| 88 | + | ||
| 89 | + | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + // 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组 | ||
| 93 | + transformToLiveDetailsBeans(list: ContentDTO[]): ReserveBean[] { | ||
| 94 | + const liveDetailsBeans: ReserveBean[] = []; | ||
| 95 | + list.forEach(item => { | ||
| 96 | + liveDetailsBeans.push({ | ||
| 97 | + relationId: item.relId, | ||
| 98 | + liveId: item.objectId, | ||
| 99 | + }); | ||
| 100 | + }); | ||
| 101 | + return liveDetailsBeans | ||
| 81 | } | 102 | } |
| 82 | 103 | ||
| 83 | build() { | 104 | build() { |
| @@ -274,6 +295,7 @@ struct ReserveMorePage { | @@ -274,6 +295,7 @@ struct ReserveMorePage { | ||
| 274 | // | 295 | // |
| 275 | // }) | 296 | // }) |
| 276 | const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false) | 297 | const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false) |
| 298 | + // const liveDetail = await LiveModel.getAppointmentStatus(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false) | ||
| 277 | } | 299 | } |
| 278 | 300 | ||
| 279 | /*导航栏*/ | 301 | /*导航栏*/ |
| 1 | +import { ContentDTO } from 'wdBean'; | ||
| 2 | +import { CommonConstants ,ViewType} from 'wdConstant'; | ||
| 3 | +import PageViewModel from '../../viewmodel/PageViewModel'; | ||
| 4 | +import RefreshLayout from '../page/RefreshLayout'; | ||
| 5 | +import { RefreshLayoutBean } from '../page/RefreshLayoutBean'; | ||
| 6 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 7 | +import { DateTimeUtils, LazyDataSource } from 'wdKit/Index'; | ||
| 8 | +import router from '@ohos.router'; | ||
| 9 | +import { CardParser } from '../CardParser'; | ||
| 10 | +import { channelSkeleton } from '../skeleton/channelSkeleton' | ||
| 11 | +import { ErrorComponent } from '../view/ErrorComponent'; | ||
| 12 | +import { EmptyComponent } from '../view/EmptyComponent'; | ||
| 13 | + | ||
| 14 | +const TAG: string = 'ThemeListPage'; | ||
| 15 | + | ||
| 16 | +@Entry | ||
| 17 | +@Component | ||
| 18 | +struct ThemeListPage { | ||
| 19 | + @State private pageModel: PageModel = new PageModel(); | ||
| 20 | + @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | ||
| 21 | + sort: number = 1; | ||
| 22 | + currentPage: number = 1; | ||
| 23 | + pageSize: number = 20; | ||
| 24 | + title: string = '金刚位聚合页' | ||
| 25 | + | ||
| 26 | + aboutToAppear(): void { | ||
| 27 | + PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => { | ||
| 28 | + console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`) | ||
| 29 | + this.data.push(...liveReviewDTO.list) | ||
| 30 | + if(this.data.getDataArray().length > 0){ | ||
| 31 | + this.pageModel.viewType = ViewType.LOADED; | ||
| 32 | + }else{ | ||
| 33 | + this.pageModel.viewType = ViewType.EMPTY | ||
| 34 | + } | ||
| 35 | + }) | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + build() { | ||
| 39 | + Column() { | ||
| 40 | + this.TabbarNormal() | ||
| 41 | + if (this.pageModel.viewType == ViewType.LOADING) { | ||
| 42 | + this.LoadingLayout() | ||
| 43 | + } else if (this.pageModel.viewType == ViewType.ERROR) { | ||
| 44 | + ErrorComponent() | ||
| 45 | + } else if (this.pageModel.viewType == ViewType.EMPTY) { | ||
| 46 | + EmptyComponent() | ||
| 47 | + } else { | ||
| 48 | + this.ListLayout() | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + .padding({ | ||
| 52 | + bottom: $r('app.float.card_comp_pagePadding_tb') | ||
| 53 | + }) | ||
| 54 | + } | ||
| 55 | + @Builder | ||
| 56 | + LoadingLayout() { | ||
| 57 | + channelSkeleton() | ||
| 58 | + } | ||
| 59 | + /*导航栏*/ | ||
| 60 | + @Builder | ||
| 61 | + TabbarNormal() { | ||
| 62 | + RelativeContainer() { | ||
| 63 | + //标题栏目 | ||
| 64 | + Image($r('app.media.icon_arrow_left')) | ||
| 65 | + .width(24) | ||
| 66 | + .height(24) | ||
| 67 | + .objectFit(ImageFit.Auto) | ||
| 68 | + .id("back_icon") | ||
| 69 | + .alignRules({ | ||
| 70 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 71 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 72 | + }) | ||
| 73 | + .onClick(() => { | ||
| 74 | + router.back() | ||
| 75 | + }) | ||
| 76 | + | ||
| 77 | + Text(this.title)// .height('42lpx') | ||
| 78 | + .maxLines(1) | ||
| 79 | + .id("title") | ||
| 80 | + .fontSize('35lpx') | ||
| 81 | + .fontWeight(400) | ||
| 82 | + .fontColor($r('app.color.color_222222')) | ||
| 83 | + .lineHeight('42lpx') | ||
| 84 | + .alignRules({ | ||
| 85 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 86 | + middle: { anchor: "__container__", align: HorizontalAlign.Center } | ||
| 87 | + }) | ||
| 88 | + } | ||
| 89 | + .height(44) | ||
| 90 | + .width('100%') | ||
| 91 | + .padding({ | ||
| 92 | + left: $r('app.float.card_comp_pagePadding_lf'), | ||
| 93 | + right: $r('app.float.card_comp_pagePadding_lf'), | ||
| 94 | + }) | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + @Builder | ||
| 98 | + ListLayout() { | ||
| 99 | + List() { | ||
| 100 | + // 下拉刷新 | ||
| 101 | + ListItem() { | ||
| 102 | + RefreshLayout({ | ||
| 103 | + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage, | ||
| 104 | + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight) | ||
| 105 | + }) | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + LazyForEach(this.data, (contentDTO: ContentDTO, contentIndex: number) => { | ||
| 109 | + ListItem() { | ||
| 110 | + Column() { | ||
| 111 | + CardParser({ contentDTO }); | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + }, | ||
| 115 | + (contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString() | ||
| 116 | + ) | ||
| 117 | + } | ||
| 118 | + .scrollBar(BarState.Off) | ||
| 119 | + .cachedCount(8) | ||
| 120 | + .height(CommonConstants.FULL_PARENT) | ||
| 121 | + .onScrollIndex((start: number, end: number) => { | ||
| 122 | + this.pageModel.startIndex = start; | ||
| 123 | + this.pageModel.endIndex = end; | ||
| 124 | + }) | ||
| 125 | + } | ||
| 126 | +} |
| @@ -11,7 +11,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; | @@ -11,7 +11,7 @@ import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; | ||
| 11 | const TAG = 'TopNavigationComponent'; | 11 | const TAG = 'TopNavigationComponent'; |
| 12 | 12 | ||
| 13 | PersistentStorage.persistProp('channelIds', ''); | 13 | PersistentStorage.persistProp('channelIds', ''); |
| 14 | -PersistentStorage.persistProp('indexSettingChannelId', 0); | 14 | +PersistentStorage.persistProp('indexSettingChannelId', 2002); |
| 15 | 15 | ||
| 16 | const storage = LocalStorage.getShared(); | 16 | const storage = LocalStorage.getShared(); |
| 17 | 17 | ||
| @@ -36,7 +36,7 @@ export struct TopNavigationComponent { | @@ -36,7 +36,7 @@ export struct TopNavigationComponent { | ||
| 36 | // 顶导数据 | 36 | // 顶导数据 |
| 37 | @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] | 37 | @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] |
| 38 | @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); | 38 | @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); |
| 39 | - @StorageProp('indexSettingChannelId') indexSettingChannelId: number = 0 | 39 | + @StorageProp('indexSettingChannelId') indexSettingChannelId: number = 2002 |
| 40 | //我的频道id列表 | 40 | //我的频道id列表 |
| 41 | @State channelIds: number[] = [] | 41 | @State channelIds: number[] = [] |
| 42 | //本地缓存频道id列表 | 42 | //本地缓存频道id列表 |
| @@ -106,7 +106,7 @@ export struct TopNavigationComponent { | @@ -106,7 +106,7 @@ export struct TopNavigationComponent { | ||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | //频道分类 | 108 | //频道分类 |
| 109 | - if (item.myChannel === '1') { | 109 | + if (item.myChannel === '1' && item.name !== '播报') { |
| 110 | _myChannelList.push(item) | 110 | _myChannelList.push(item) |
| 111 | _channelIds.push(item.channelId) | 111 | _channelIds.push(item.channelId) |
| 112 | } else if (item.moreChannel === '1') { | 112 | } else if (item.moreChannel === '1') { |
| @@ -121,13 +121,9 @@ export struct TopNavigationComponent { | @@ -121,13 +121,9 @@ export struct TopNavigationComponent { | ||
| 121 | this.myChannelList = _myChannelList | 121 | this.myChannelList = _myChannelList |
| 122 | 122 | ||
| 123 | //缓存首页频道 | 123 | //缓存首页频道 |
| 124 | - if (!this.indexSettingChannelId) { | ||
| 125 | - AppStorage.set('indexSettingChannelId', this.homeChannelList[0].channelId) | ||
| 126 | - } else { | ||
| 127 | - let index = this.myChannelList.findIndex(_item => _item.channelId === this.indexSettingChannelId) | ||
| 128 | - if (index > -1) { | ||
| 129 | - this.currentTopNavSelectedIndex = index | ||
| 130 | - } | 124 | + let index = this.myChannelList.findIndex(_item => _item.channelId === this.indexSettingChannelId) |
| 125 | + if (index > -1) { | ||
| 126 | + this.currentTopNavSelectedIndex = index | ||
| 131 | } | 127 | } |
| 132 | } | 128 | } |
| 133 | 129 | ||
| @@ -299,12 +295,13 @@ export struct TopNavigationComponent { | @@ -299,12 +295,13 @@ export struct TopNavigationComponent { | ||
| 299 | .fontColor(this.getFontColor(item, index)) | 295 | .fontColor(this.getFontColor(item, index)) |
| 300 | .padding({ top: $r('app.float.top_tab_item_padding_top') }) | 296 | .padding({ top: $r('app.float.top_tab_item_padding_top') }) |
| 301 | .maxLines(this.MAX_LINE) | 297 | .maxLines(this.MAX_LINE) |
| 302 | - Divider() | ||
| 303 | - .width(16) | ||
| 304 | - .strokeWidth(2)// 分割线粗细度。 | ||
| 305 | - .padding({ top: 2 }) | ||
| 306 | - .color(Color.Red) | ||
| 307 | - .opacity(this.currentTopNavSelectedIndex === index ? 1 : 0) | 298 | + if (this.currentTopNavSelectedIndex === index) { |
| 299 | + Row() | ||
| 300 | + .width(20) | ||
| 301 | + .height(3) | ||
| 302 | + .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat) | ||
| 303 | + } | ||
| 304 | + | ||
| 308 | } | 305 | } |
| 309 | .hoverEffect(HoverEffect.Highlight) | 306 | .hoverEffect(HoverEffect.Highlight) |
| 310 | .constraintSize({ | 307 | .constraintSize({ |
| @@ -151,7 +151,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -151,7 +151,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 151 | try { | 151 | try { |
| 152 | this.isLoading = true | 152 | this.isLoading = true |
| 153 | let listData: ArticleListData = await PeopleShipHomePageDataModel.getPeopleShipHomePageArticleListData(this.creatorId, this.currentPage, 20, this.typeModel.type) | 153 | let listData: ArticleListData = await PeopleShipHomePageDataModel.getPeopleShipHomePageArticleListData(this.creatorId, this.currentPage, 20, this.typeModel.type) |
| 154 | - Logger.debug(TAG, `获取页面信息, ${listData.list.length}`); | 154 | + Logger.debug(TAG, `获取页面信息, ${JSON.stringify(listData.list)}`); |
| 155 | Logger.debug(TAG, `已更新值最新, ${this.currentPage}`); | 155 | Logger.debug(TAG, `已更新值最新, ${this.currentPage}`); |
| 156 | 156 | ||
| 157 | if (resolve ) { | 157 | if (resolve ) { |
| @@ -173,7 +173,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -173,7 +173,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 173 | } | 173 | } |
| 174 | this.isLoading = false | 174 | this.isLoading = false |
| 175 | this.queryArticleContentInteractCount(listData) | 175 | this.queryArticleContentInteractCount(listData) |
| 176 | - Logger.debug(TAG, '展示的总数', `${this.arr.length}`) | 176 | + Logger.debug(TAG, '展示的总数'+`${this.arr.length}`) |
| 177 | }catch (exception) { | 177 | }catch (exception) { |
| 178 | if (resolve) { | 178 | if (resolve) { |
| 179 | resolve('') | 179 | resolve('') |
| @@ -236,7 +236,8 @@ export struct PeopleShipHomeArticleListComponent { | @@ -236,7 +236,8 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 236 | // 19.动态图文卡-人民号,20.动态视频卡-人民号, | 236 | // 19.动态图文卡-人民号,20.动态视频卡-人民号, |
| 237 | // 21 小视频卡-人民号 | 237 | // 21 小视频卡-人民号 |
| 238 | contentDTO.objectType = `${element.type}`; | 238 | contentDTO.objectType = `${element.type}`; |
| 239 | - | 239 | + // 时间显示 |
| 240 | + contentDTO.isSearch = true | ||
| 240 | // contentDTO.productNum = element.productCount; | 241 | // contentDTO.productNum = element.productCount; |
| 241 | // if (master) { | 242 | // if (master) { |
| 242 | // contentDTO.customWorkStatus = element.workStatus; | 243 | // contentDTO.customWorkStatus = element.workStatus; |
| @@ -277,8 +278,10 @@ export struct PeopleShipHomeArticleListComponent { | @@ -277,8 +278,10 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 277 | 278 | ||
| 278 | 279 | ||
| 279 | //图集数量 | 280 | //图集数量 |
| 280 | - contentDTO.photoNum = element.mainPicCount; | ||
| 281 | - | 281 | + if (element.mainPicCount) { |
| 282 | + contentDTO.photoNum = element.mainPicCount; | ||
| 283 | + } | ||
| 284 | + Logger.debug(TAG, '图集数量:' + `${element.mainPicCount}`) | ||
| 282 | if (element.contentExt && element.contentExt.length > 0) { | 285 | if (element.contentExt && element.contentExt.length > 0) { |
| 283 | let extModel = element.contentExt[0]; | 286 | let extModel = element.contentExt[0]; |
| 284 | contentDTO.openLikes = extModel.openLikes; | 287 | contentDTO.openLikes = extModel.openLikes; |
| 1 | -import { DisplayUtils, Logger } from 'wdKit' | 1 | +import { DisplayUtils, Logger } from 'wdKit' |
| 2 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' | 2 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' |
| 3 | import { PeopleShipHomeArticleListComponent } from './PeopleShipHomeArticleListComponent' | 3 | import { PeopleShipHomeArticleListComponent } from './PeopleShipHomeArticleListComponent' |
| 4 | import { ArticleCountData, ArticleTypeData } from 'wdBean' | 4 | import { ArticleCountData, ArticleTypeData } from 'wdBean' |
| @@ -8,9 +8,7 @@ import { RefreshLayoutBean } from '../page/RefreshLayoutBean' | @@ -8,9 +8,7 @@ import { RefreshLayoutBean } from '../page/RefreshLayoutBean' | ||
| 8 | 8 | ||
| 9 | @Component | 9 | @Component |
| 10 | export struct PeopleShipHomeListComponent { | 10 | export struct PeopleShipHomeListComponent { |
| 11 | - | ||
| 12 | private controller: TabsController = new TabsController() | 11 | private controller: TabsController = new TabsController() |
| 13 | - | ||
| 14 | @State tabArr: ArticleTypeData[] = [] | 12 | @State tabArr: ArticleTypeData[] = [] |
| 15 | @State creatorId: string = '' | 13 | @State creatorId: string = '' |
| 16 | // 发布数量 | 14 | // 发布数量 |
| @@ -19,47 +17,69 @@ export struct PeopleShipHomeListComponent { | @@ -19,47 +17,69 @@ export struct PeopleShipHomeListComponent { | ||
| 19 | @State private isLoading: boolean = false | 17 | @State private isLoading: boolean = false |
| 20 | @Consume topHeight: number | 18 | @Consume topHeight: number |
| 21 | 19 | ||
| 22 | - | ||
| 23 | build() { | 20 | build() { |
| 24 | if (this.isLoading) { | 21 | if (this.isLoading) { |
| 25 | this.LoadingLayout() | 22 | this.LoadingLayout() |
| 26 | } | 23 | } |
| 27 | // 列表 | 24 | // 列表 |
| 28 | - else if(this.publishCount == 0) { | 25 | + else if (this.publishCount == 0) { |
| 29 | // 无数据展示 | 26 | // 无数据展示 |
| 30 | EmptyComponent().height(DisplayUtils.getDeviceHeight() - this.topHeight) | 27 | EmptyComponent().height(DisplayUtils.getDeviceHeight() - this.topHeight) |
| 31 | - } else { | ||
| 32 | - Tabs({ barPosition: BarPosition.Start, controller: this.controller}) { | ||
| 33 | - ForEach(this.tabArr, (item: ArticleTypeData, index: number) => { | ||
| 34 | - TabContent() { | ||
| 35 | - PeopleShipHomeArticleListComponent({ | ||
| 36 | - typeModel: item, | ||
| 37 | - creatorId: this.creatorId, | ||
| 38 | - currentTopSelectedIndex: this.currentIndex, | ||
| 39 | - currentIndex: index | ||
| 40 | - }) | ||
| 41 | - }.tabBar(this.tabBuilder(index, item.name ?? '')) | 28 | + } else { |
| 29 | + Column() { | ||
| 30 | + Column() { | ||
| 31 | + // 页签 | ||
| 32 | + Row() { | ||
| 33 | + Scroll() { | ||
| 34 | + Row() { | ||
| 35 | + ForEach(this.tabArr, (item: ArticleTypeData, index: number) => { | ||
| 36 | + this.Tab(index, item.name ?? '') | ||
| 37 | + }) | ||
| 38 | + } | ||
| 39 | + .justifyContent(FlexAlign.Start) | ||
| 40 | + } | ||
| 41 | + .align(Alignment.Start) | ||
| 42 | + .scrollable(ScrollDirection.Horizontal) | ||
| 43 | + .scrollBar(BarState.Off) | ||
| 44 | + .width('100%') | ||
| 45 | + } | ||
| 46 | + .alignItems(VerticalAlign.Bottom) | ||
| 47 | + .width('100%') | ||
| 48 | + } | ||
| 49 | + .alignItems(HorizontalAlign.Start) | ||
| 50 | + .width('100%') | ||
| 42 | 51 | ||
| 43 | - }) | 52 | + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { |
| 53 | + ForEach(this.tabArr, (item: ArticleTypeData, index: number) => { | ||
| 54 | + TabContent() { | ||
| 55 | + PeopleShipHomeArticleListComponent({ | ||
| 56 | + typeModel: item, | ||
| 57 | + creatorId: this.creatorId, | ||
| 58 | + currentTopSelectedIndex: this.currentIndex, | ||
| 59 | + currentIndex: index | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | + // }.tabBar(this.tabBuilder(index, item.name ?? '')) | ||
| 63 | + }) | ||
| 44 | 64 | ||
| 65 | + } | ||
| 66 | + .backgroundColor(Color.White) | ||
| 67 | + .barWidth('100%') | ||
| 68 | + .barHeight(0) | ||
| 69 | + .vertical(false) | ||
| 70 | + .height(DisplayUtils.getDeviceHeight() - 144) | ||
| 71 | + .animationDuration(0) | ||
| 72 | + .divider({ | ||
| 73 | + strokeWidth: '0.5vp', | ||
| 74 | + color: $r('app.color.color_F5F5F5'), | ||
| 75 | + startMargin: 0, | ||
| 76 | + endMargin: 0 | ||
| 77 | + }) | ||
| 78 | + .onChange((index: number) => { | ||
| 79 | + this.currentIndex = index | ||
| 80 | + }) | ||
| 45 | } | 81 | } |
| 46 | - .backgroundColor(Color.White) | ||
| 47 | - .barWidth('100%') | ||
| 48 | - .barHeight('44vp') | ||
| 49 | - .vertical(false) | ||
| 50 | - .height(DisplayUtils.getDeviceHeight() - 100) | ||
| 51 | - .animationDuration(0) | ||
| 52 | - .divider({ | ||
| 53 | - strokeWidth: '0.5vp', | ||
| 54 | - color: $r('app.color.color_F5F5F5'), | ||
| 55 | - startMargin: 0, | ||
| 56 | - endMargin: 0 | ||
| 57 | - }) | ||
| 58 | - .onChange((index: number) => { | ||
| 59 | - this.currentIndex = index | ||
| 60 | - }) | ||
| 61 | } | 82 | } |
| 62 | - | ||
| 63 | } | 83 | } |
| 64 | 84 | ||
| 65 | @Builder | 85 | @Builder |
| @@ -70,21 +90,33 @@ export struct PeopleShipHomeListComponent { | @@ -70,21 +90,33 @@ export struct PeopleShipHomeListComponent { | ||
| 70 | }).height(DisplayUtils.getDeviceHeight() - this.topHeight) | 90 | }).height(DisplayUtils.getDeviceHeight() - this.topHeight) |
| 71 | } | 91 | } |
| 72 | 92 | ||
| 73 | - @Builder tabBuilder(index: number, name: string) { | 93 | + // 单独的页签 |
| 94 | + @Builder | ||
| 95 | + Tab(index: number, name: string) { | ||
| 74 | Column() { | 96 | Column() { |
| 75 | Text(name) | 97 | Text(name) |
| 76 | - .fontColor(this.currentIndex === index ? $r('app.color.color_222222') : $r('app.color.color_666666') ) | 98 | + .fontColor(this.currentIndex === index ? $r('app.color.color_222222') : $r('app.color.color_666666')) |
| 77 | .fontSize(18) | 99 | .fontSize(18) |
| 78 | .fontWeight(this.currentIndex === index ? 500 : 400) | 100 | .fontWeight(this.currentIndex === index ? 500 : 400) |
| 79 | .lineHeight(22) | 101 | .lineHeight(22) |
| 80 | .height(22) | 102 | .height(22) |
| 81 | - .margin({ top: 11, bottom: 1 }) | ||
| 82 | Divider() | 103 | Divider() |
| 83 | .width('15vp') | 104 | .width('15vp') |
| 84 | .strokeWidth(2) | 105 | .strokeWidth(2) |
| 85 | .color('#CB0000') | 106 | .color('#CB0000') |
| 86 | .opacity(this.currentIndex === index ? 1 : 0) | 107 | .opacity(this.currentIndex === index ? 1 : 0) |
| 87 | - }.width('100%') | 108 | + } |
| 109 | + .justifyContent(FlexAlign.Center) | ||
| 110 | + .constraintSize({ minWidth: 35 }) | ||
| 111 | + .margin({ | ||
| 112 | + left: '16vp', | ||
| 113 | + right: '16vp' | ||
| 114 | + }) | ||
| 115 | + .height('44vp') | ||
| 116 | + .onClick(() => { | ||
| 117 | + this.controller.changeIndex(index) | ||
| 118 | + this.currentIndex = index | ||
| 119 | + }) | ||
| 88 | } | 120 | } |
| 89 | 121 | ||
| 90 | async aboutToAppear() { | 122 | async aboutToAppear() { |
| @@ -13,6 +13,7 @@ import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | @@ -13,6 +13,7 @@ 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 | 17 | ||
| 17 | @Component | 18 | @Component |
| 18 | export struct MineSettingComponent { | 19 | export struct MineSettingComponent { |
| @@ -67,11 +68,15 @@ export struct MineSettingComponent { | @@ -67,11 +68,15 @@ export struct MineSettingComponent { | ||
| 67 | } | 68 | } |
| 68 | 69 | ||
| 69 | build() { | 70 | build() { |
| 70 | - Navigation() { | ||
| 71 | - //滑动区域 | 71 | + // Navigation() { |
| 72 | + // //滑动区域 | ||
| 73 | + // this.settingList() | ||
| 74 | + // }.titleMode(NavigationTitleMode.Mini) | ||
| 75 | + // .title('设置') | ||
| 76 | + Column(){ | ||
| 77 | + TitleBackComponent({title:"设置"}) | ||
| 72 | this.settingList() | 78 | this.settingList() |
| 73 | - }.titleMode(NavigationTitleMode.Mini) | ||
| 74 | - .title('设置') | 79 | + } |
| 75 | } | 80 | } |
| 76 | 81 | ||
| 77 | // // 页面布局 | 82 | // // 页面布局 |
| @@ -159,7 +164,7 @@ export struct MineSettingComponent { | @@ -159,7 +164,7 @@ export struct MineSettingComponent { | ||
| 159 | }) | 164 | }) |
| 160 | }.onScrollFrameBegin((offset, state) => { | 165 | }.onScrollFrameBegin((offset, state) => { |
| 161 | return { offsetRemain: 0 } | 166 | return { offsetRemain: 0 } |
| 162 | - }) | 167 | + }).divider({strokeWidth:1,color:"#f0f0f0",startMargin: 15,endMargin: 10}) |
| 163 | } | 168 | } |
| 164 | .backgroundColor(Color.White) | 169 | .backgroundColor(Color.White) |
| 165 | .borderRadius(8) | 170 | .borderRadius(8) |
| @@ -203,7 +208,7 @@ export struct MineSettingComponent { | @@ -203,7 +208,7 @@ export struct MineSettingComponent { | ||
| 203 | Toggle({ type: ToggleType.Switch, isOn: item.switchState }) | 208 | Toggle({ type: ToggleType.Switch, isOn: item.switchState }) |
| 204 | .height('50lpx') | 209 | .height('50lpx') |
| 205 | .margin({ left: '81lpx', right: '29lpx' }) | 210 | .margin({ left: '81lpx', right: '29lpx' }) |
| 206 | - .selectedColor(Color.Pink) | 211 | + .selectedColor("#ED2800") |
| 207 | .onChange((isOn: boolean) => { | 212 | .onChange((isOn: boolean) => { |
| 208 | if(item.itemType=='push_switch'){ | 213 | if(item.itemType=='push_switch'){ |
| 209 | //推送 | 214 | //推送 |
| @@ -251,7 +256,7 @@ export struct MineSettingComponent { | @@ -251,7 +256,7 @@ export struct MineSettingComponent { | ||
| 251 | 256 | ||
| 252 | // 右侧文案和右箭头 | 257 | // 右侧文案和右箭头 |
| 253 | Row() { | 258 | Row() { |
| 254 | - Text((item.title=='清除缓存') ? this.cacheSize.toFixed(2) + 'MB' : '') | 259 | + Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'MB' : '') |
| 255 | .fontColor('#999999') | 260 | .fontColor('#999999') |
| 256 | .maxLines(1) | 261 | .maxLines(1) |
| 257 | Image($r('app.media.mine_user_arrow')) | 262 | Image($r('app.media.mine_user_arrow')) |
| @@ -270,14 +275,14 @@ export struct MineSettingComponent { | @@ -270,14 +275,14 @@ export struct MineSettingComponent { | ||
| 270 | } | 275 | } |
| 271 | .height('54lpx') | 276 | .height('54lpx') |
| 272 | .onClick(() => { | 277 | .onClick(() => { |
| 273 | - if (item.title == '账户与安全') { | 278 | + if (item.itemType == 'account') { |
| 274 | let params: Params = { | 279 | let params: Params = { |
| 275 | pageID: 'AccountAndSecurityLayout' | 280 | pageID: 'AccountAndSecurityLayout' |
| 276 | } | 281 | } |
| 277 | WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) | 282 | WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) |
| 278 | - } else if (item.title == '隐私设罝') { | 283 | + } else if (item.itemType == 'private_setting') { |
| 279 | WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage) | 284 | WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage) |
| 280 | - } else if (item.title == '清除缓存') { | 285 | + } else if (item.itemType == 'clear_cache') { |
| 281 | this.dialogController.open() | 286 | this.dialogController.open() |
| 282 | } | 287 | } |
| 283 | }) | 288 | }) |
sight_harmony/features/wdComponent/src/main/ets/components/setting/TitleBackComponent.ets
0 → 100644
| 1 | +import { router } from '@kit.ArkUI' | ||
| 2 | + | ||
| 3 | +@Component | ||
| 4 | +export struct TitleBackComponent { | ||
| 5 | + @State title: string = '' | ||
| 6 | + | ||
| 7 | + build() { | ||
| 8 | + RelativeContainer() { | ||
| 9 | + Text(this.title) | ||
| 10 | + .fontColor('#FF333333') | ||
| 11 | + .fontSize(18) | ||
| 12 | + .textAlign(TextAlign.Center) | ||
| 13 | + .height(44) | ||
| 14 | + .alignRules({ | ||
| 15 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 16 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 17 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 18 | + | ||
| 19 | + }) | ||
| 20 | + .id('titleContent') | ||
| 21 | + Image($r('app.media.back_icon')) | ||
| 22 | + .objectFit(ImageFit.Auto) | ||
| 23 | + .height(24) | ||
| 24 | + .width(24) | ||
| 25 | + .margin({ | ||
| 26 | + left: 16, top: 8 | ||
| 27 | + }) | ||
| 28 | + .alignRules({ | ||
| 29 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 30 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 31 | + }) | ||
| 32 | + .onClick(() => { | ||
| 33 | + router.back() | ||
| 34 | + }) | ||
| 35 | + .id('backImage') | ||
| 36 | + | ||
| 37 | + }.height(44) | ||
| 38 | + } | ||
| 39 | +} |
| @@ -119,10 +119,12 @@ export struct EmptyComponent { | @@ -119,10 +119,12 @@ export struct EmptyComponent { | ||
| 119 | noProgrammeData() { | 119 | noProgrammeData() { |
| 120 | Column() { | 120 | Column() { |
| 121 | Image(this.buildNoDataTipImage()) | 121 | Image(this.buildNoDataTipImage()) |
| 122 | - .width('this.EMPTY_IMAGE_WIDTH') | ||
| 123 | - .height(this.EMPTY_IMAGE_HEIGHT) | 122 | + .width(160) |
| 123 | + .height(112) | ||
| 124 | .objectFit(ImageFit.Contain) | 124 | .objectFit(ImageFit.Contain) |
| 125 | // .border({ width: 1, color: Color.Red, radius: 6 }) | 125 | // .border({ width: 1, color: Color.Red, radius: 6 }) |
| 126 | + // .width('this.EMPTY_IMAGE_WIDTH') | ||
| 127 | + // .height(this.EMPTY_IMAGE_HEIGHT) | ||
| 126 | 128 | ||
| 127 | Text(this.emptyType !== 8 ? this.buildNoDataTip() : `${this.buildNoDataTip()}(${this.timeNum}s)`) | 129 | Text(this.emptyType !== 8 ? this.buildNoDataTip() : `${this.buildNoDataTip()}(${this.timeNum}s)`) |
| 128 | .fontSize($r('app.float.normal_text_size')) | 130 | .fontSize($r('app.float.normal_text_size')) |
| @@ -185,6 +187,8 @@ export struct EmptyComponent { | @@ -185,6 +187,8 @@ export struct EmptyComponent { | ||
| 185 | contentString = '获取内容失败请重试' // 前方拥堵,请耐心等待 | 187 | contentString = '获取内容失败请重试' // 前方拥堵,请耐心等待 |
| 186 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent1) { | 188 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent1) { |
| 187 | contentString = '暂无内容' | 189 | contentString = '暂无内容' |
| 190 | + } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow) { | ||
| 191 | + contentString = '暂无关注' | ||
| 188 | } | 192 | } |
| 189 | 193 | ||
| 190 | return contentString | 194 | return contentString |
| @@ -215,7 +219,7 @@ export struct EmptyComponent { | @@ -215,7 +219,7 @@ export struct EmptyComponent { | ||
| 215 | imageString = $r('app.media.icon_no_master1') | 219 | imageString = $r('app.media.icon_no_master1') |
| 216 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoVideo) { | 220 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoVideo) { |
| 217 | imageString = $r('app.media.icon_no_content') | 221 | imageString = $r('app.media.icon_no_content') |
| 218 | - } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent1) { | 222 | + } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent1 || this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow) { |
| 219 | imageString = $r('app.media.icon_no_appointmentMade1') | 223 | imageString = $r('app.media.icon_no_appointmentMade1') |
| 220 | } | 224 | } |
| 221 | return imageString | 225 | return imageString |
| @@ -52,7 +52,7 @@ class MineSettingDatasModel{ | @@ -52,7 +52,7 @@ class MineSettingDatasModel{ | ||
| 52 | let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean | 52 | let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean |
| 53 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch")) | 53 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch")) |
| 54 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) | 54 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,"")) |
| 55 | - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false,"")) | 55 | + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false,"clear_cache")) |
| 56 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,"")) | 56 | this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,"")) |
| 57 | 57 | ||
| 58 | return this.mainSettingData | 58 | return this.mainSettingData |
| 1 | +import { DateFormatUtil, WDPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; | ||
| 2 | +import router from '@ohos.router'; | ||
| 3 | +import { StringUtils } from 'wdKit/Index'; | ||
| 4 | +import { Action } from 'wdBean'; | ||
| 5 | + | ||
| 6 | +const TAG = 'VideoPlayPage'; | ||
| 7 | + | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +export struct VideoPlayPage { | ||
| 11 | + //是否处于播放状态中 | ||
| 12 | + @State isPlayStatus: boolean = true | ||
| 13 | + playerController: WDPlayerController = new WDPlayerController(); | ||
| 14 | + //视频地址 | ||
| 15 | + @State videoUrl: string = '' | ||
| 16 | + //封面图 | ||
| 17 | + @State videoCoverUrl: string = '' | ||
| 18 | + @State currentTime: string = '' | ||
| 19 | + @State totalTime: string = '' | ||
| 20 | + @State progressVal: number = 0; | ||
| 21 | + | ||
| 22 | + aboutToAppear(): void { | ||
| 23 | + let par: Action = router.getParams() as Action | ||
| 24 | + let params = par?.params | ||
| 25 | + this.videoUrl = params?.videoUrl ? params?.videoUrl : '' | ||
| 26 | + this.videoCoverUrl = params?.videoCoverUrl ? params?.videoCoverUrl : '' | ||
| 27 | + //播放进度监听 | ||
| 28 | + this.playerController.onTimeUpdate = (position: number, duration: number) => { | ||
| 29 | + this.currentTime = DateFormatUtil.secondToTime(Math.floor(position / 1000)); | ||
| 30 | + this.totalTime = DateFormatUtil.secondToTime(Math.floor(duration / 1000)); | ||
| 31 | + this.progressVal = Math.floor(position * 100 / duration); | ||
| 32 | + } | ||
| 33 | + this.playerController.onCanplay = () => { | ||
| 34 | + this.playerController.play() | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + build() { | ||
| 39 | + Stack() { | ||
| 40 | + WDPlayerRenderLiveView({ | ||
| 41 | + playerController: this.playerController, | ||
| 42 | + onLoad: async () => { | ||
| 43 | + this.playerController.firstPlay(this.videoUrl) | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | + .height('100%') | ||
| 47 | + .width('100%') | ||
| 48 | + .visibility(StringUtils.isEmpty(this.videoUrl) ? Visibility.None : Visibility.Visible) | ||
| 49 | + Image(this.videoCoverUrl) | ||
| 50 | + .objectFit(ImageFit.Contain) | ||
| 51 | + .visibility(StringUtils.isEmpty(this.videoUrl) ? Visibility.Visible : Visibility.None) | ||
| 52 | + Column() { | ||
| 53 | + this.getTopUIComponent() | ||
| 54 | + Stack() | ||
| 55 | + .layoutWeight(1) | ||
| 56 | + this.getBottomUIComponent() | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + .width('100%') | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @Builder | ||
| 63 | + getTopUIComponent() { | ||
| 64 | + Column() { | ||
| 65 | + Row() { | ||
| 66 | + Image($r('app.media.icon_arrow_left_white')) | ||
| 67 | + .width(24) | ||
| 68 | + .aspectRatio(1) | ||
| 69 | + .margin({ | ||
| 70 | + right: 10 | ||
| 71 | + }) | ||
| 72 | + .onClick(() => { | ||
| 73 | + router.back() | ||
| 74 | + }) | ||
| 75 | + } | ||
| 76 | + .width('100%') | ||
| 77 | + .alignItems(VerticalAlign.Center) | ||
| 78 | + .margin({ | ||
| 79 | + bottom: 10 | ||
| 80 | + }) | ||
| 81 | + }.width('100%') | ||
| 82 | + .padding({ | ||
| 83 | + top: 20, | ||
| 84 | + bottom: 6, | ||
| 85 | + left: 10, | ||
| 86 | + right: 10 | ||
| 87 | + }) | ||
| 88 | + .alignItems(HorizontalAlign.Start) | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + @Builder | ||
| 92 | + getBottomUIComponent() { | ||
| 93 | + Row() { | ||
| 94 | + this.playOrPauseBtn() | ||
| 95 | + Text(this.currentTime) | ||
| 96 | + .fontColor(Color.White) | ||
| 97 | + .fontWeight(600) | ||
| 98 | + .fontSize('12fp') | ||
| 99 | + .margin({ | ||
| 100 | + left: 16 | ||
| 101 | + }) | ||
| 102 | + this.playProgressView() | ||
| 103 | + Text(this.totalTime) | ||
| 104 | + .fontColor(Color.White) | ||
| 105 | + .fontWeight(600) | ||
| 106 | + .fontSize('12fp') | ||
| 107 | + .margin({ | ||
| 108 | + right: 16 | ||
| 109 | + }) | ||
| 110 | + } | ||
| 111 | + .alignItems(VerticalAlign.Center) | ||
| 112 | + .width('100%') | ||
| 113 | + .padding({ | ||
| 114 | + left: 10, | ||
| 115 | + right: 10, | ||
| 116 | + top: 15, | ||
| 117 | + bottom: 15 | ||
| 118 | + }) | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + @Builder | ||
| 122 | + playOrPauseBtn() { | ||
| 123 | + //暂停、播放 | ||
| 124 | + Image(this.isPlayStatus ? $r('app.media.icon_live_player_pause') : $r('app.media.player_play_ic')) | ||
| 125 | + .width(24) | ||
| 126 | + .height(24) | ||
| 127 | + .onClick(() => { | ||
| 128 | + if (this.isPlayStatus) { | ||
| 129 | + this.isPlayStatus = false | ||
| 130 | + this.playerController.pause() | ||
| 131 | + } else { | ||
| 132 | + this.isPlayStatus = true | ||
| 133 | + this.playerController.play() | ||
| 134 | + } | ||
| 135 | + }) | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + @Builder | ||
| 139 | + playProgressView() { | ||
| 140 | + Slider({ | ||
| 141 | + value: this.progressVal, | ||
| 142 | + step: 1, | ||
| 143 | + style: SliderStyle.OutSet | ||
| 144 | + }) | ||
| 145 | + .blockSize({ | ||
| 146 | + width: 18, | ||
| 147 | + height: 12 | ||
| 148 | + }) | ||
| 149 | + .blockStyle({ | ||
| 150 | + type: SliderBlockType.IMAGE, | ||
| 151 | + image: $r('app.media.ic_player_block') | ||
| 152 | + }) | ||
| 153 | + .blockColor(Color.White) | ||
| 154 | + .trackColor('#4DFFFFFF') | ||
| 155 | + .selectedColor('#FFED2800') | ||
| 156 | + .height(14) | ||
| 157 | + .trackThickness(1) | ||
| 158 | + .layoutWeight(1) | ||
| 159 | + .margin({ | ||
| 160 | + left: 8, | ||
| 161 | + right: 8 | ||
| 162 | + }) | ||
| 163 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 164 | + this.playerController?.setSeekTime(value, mode); | ||
| 165 | + }) | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + onPageHide(): void { | ||
| 169 | + this.playerController?.pause() | ||
| 170 | + this.playerController?.stop() | ||
| 171 | + } | ||
| 172 | +} |
| @@ -21,7 +21,8 @@ import { | @@ -21,7 +21,8 @@ import { | ||
| 21 | postExecuteCollectRecordParams, | 21 | postExecuteCollectRecordParams, |
| 22 | postExecuteLikeParams, | 22 | postExecuteLikeParams, |
| 23 | postInteractAccentionOperateParams, | 23 | postInteractAccentionOperateParams, |
| 24 | - postRecommendListParams | 24 | + postRecommendListParams, |
| 25 | + postThemeListParams | ||
| 25 | } from 'wdBean'; | 26 | } from 'wdBean'; |
| 26 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 27 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 27 | 28 | ||
| @@ -422,4 +423,17 @@ export class PageRepository { | @@ -422,4 +423,17 @@ export class PageRepository { | ||
| 422 | Logger.info(TAG, "getPageUrl url = " + url) | 423 | Logger.info(TAG, "getPageUrl url = " + url) |
| 423 | return url; | 424 | return url; |
| 424 | } | 425 | } |
| 426 | + | ||
| 427 | + /** | ||
| 428 | + * 获取金刚位聚合页列表 | ||
| 429 | + * https://pdapis.pdnews.cn/api/display/zh/c/themeList | ||
| 430 | + * @param params | ||
| 431 | + * @returns | ||
| 432 | + * */ | ||
| 433 | + static postThemeList(params: postThemeListParams) { | ||
| 434 | + let url = HttpUrlUtils.getThemeListUrl() | ||
| 435 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 436 | + Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) | ||
| 437 | + return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params, headers) | ||
| 438 | + }; | ||
| 425 | } | 439 | } |
| @@ -2,7 +2,7 @@ import HashMap from '@ohos.util.HashMap'; | @@ -2,7 +2,7 @@ import HashMap from '@ohos.util.HashMap'; | ||
| 2 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; | 2 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; |
| 3 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 3 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 4 | import { Logger, ToastUtils } from 'wdKit'; | 4 | import { Logger, ToastUtils } from 'wdKit'; |
| 5 | -import { LiveDetailsBean } from 'wdBean/Index'; | 5 | +import { LiveDetailsBean, ReserveBean } from 'wdBean/Index'; |
| 6 | 6 | ||
| 7 | const TAG = 'LiveModel' | 7 | const TAG = 'LiveModel' |
| 8 | 8 | ||
| @@ -66,5 +66,34 @@ export class LiveModel { | @@ -66,5 +66,34 @@ export class LiveModel { | ||
| 66 | }) | 66 | }) |
| 67 | }) | 67 | }) |
| 68 | } | 68 | } |
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * 查询预约状态 | ||
| 72 | + * | ||
| 73 | + [{"relationId":"500002824823","liveId":"20000120522"},{"relationId":"500002845517","liveId":"20000120782"}] | ||
| 74 | + * @returns | ||
| 75 | + * @returns | ||
| 76 | + */ | ||
| 77 | + static getAppointmentStatus(reserveBean: ReserveBean[]) { | ||
| 78 | + // let params: Record<string, ArrayList<ReserveBean>> = {}; | ||
| 79 | + // params = reserveBean | ||
| 80 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 81 | + return new Promise<ResponseDTO<string>>((success, fail) => { | ||
| 82 | + HttpRequest.post<ResponseDTO<string>>( | ||
| 83 | + HttpUrlUtils.getAppointmentStatusUrl(), | ||
| 84 | + reserveBean, | ||
| 85 | + headers).then((data: ResponseDTO<string>) => { | ||
| 86 | + if (data.code != 0) { | ||
| 87 | + fail(data.message) | ||
| 88 | + ToastUtils.shortToast(data.message) | ||
| 89 | + return | ||
| 90 | + } | ||
| 91 | + success(data) | ||
| 92 | + }, (error: Error) => { | ||
| 93 | + fail(error.message) | ||
| 94 | + Logger.debug(TAG + ":error ", error.toString()) | ||
| 95 | + }) | ||
| 96 | + }) | ||
| 97 | + } | ||
| 69 | } | 98 | } |
| 70 | 99 |
| @@ -5,6 +5,7 @@ import { closeRefresh } from '../utils/PullDownRefresh'; | @@ -5,6 +5,7 @@ import { closeRefresh } from '../utils/PullDownRefresh'; | ||
| 5 | import PageModel from './PageModel'; | 5 | import PageModel from './PageModel'; |
| 6 | import PageViewModel from './PageViewModel'; | 6 | import PageViewModel from './PageViewModel'; |
| 7 | import { promptAction } from '@kit.ArkUI'; | 7 | import { promptAction } from '@kit.ArkUI'; |
| 8 | +import { AdvRuleBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; | ||
| 8 | 9 | ||
| 9 | const TAG = 'PageHelper'; | 10 | const TAG = 'PageHelper'; |
| 10 | 11 | ||
| @@ -45,9 +46,50 @@ export class PageHelper { | @@ -45,9 +46,50 @@ export class PageHelper { | ||
| 45 | return; | 46 | return; |
| 46 | } | 47 | } |
| 47 | pageModel.pageInfo = pageInfo; | 48 | pageModel.pageInfo = pageInfo; |
| 49 | + //解析广告资源 | ||
| 50 | + this.analysisAdvSource(pageModel); | ||
| 51 | + | ||
| 48 | this.parseGroup(pageModel) | 52 | this.parseGroup(pageModel) |
| 53 | + | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 解析广告资源 | ||
| 58 | + * @param pageInfo | ||
| 59 | + */ | ||
| 60 | + analysisAdvSource(pageModel: PageModel) { | ||
| 61 | + | ||
| 62 | + let pageInfo = pageModel.pageInfo | ||
| 63 | + if (pageInfo.hasAdInfo === 1 && pageInfo.cornersAdv != null) { | ||
| 64 | + // 优先展示展现中心广告 | ||
| 65 | + let cornersAdv = pageInfo.cornersAdv | ||
| 66 | + | ||
| 67 | + } else if (pageInfo.cornersAdv2 != null && pageInfo.cornersAdv2.length > 0) { | ||
| 68 | + // 广告中心-挂角广告信息 | ||
| 69 | + let cornersAdv2 = pageInfo.cornersAdv2 | ||
| 70 | + // 获取 | ||
| 71 | + let showCompAdvBean = cornersAdv2[0] | ||
| 72 | + | ||
| 73 | + // | ||
| 74 | + let slotInfo = showCompAdvBean.slotInfo; | ||
| 75 | + let postion = slotInfo.position | ||
| 76 | + | ||
| 77 | + if (postion == 0) { | ||
| 78 | + //左边挂角 | ||
| 79 | + pageModel.pageLeftCornerAdv = showCompAdvBean | ||
| 80 | + pageModel.isShowLeftAds = true | ||
| 81 | + } else { | ||
| 82 | + // 右边挂角 | ||
| 83 | + pageModel.pageRightCornerAdv = showCompAdvBean | ||
| 84 | + pageModel.isShowRightAds = true | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + Logger.error("XXX", JSON.stringify(pageInfo.cornersAdv2)) | ||
| 88 | + } | ||
| 89 | + | ||
| 49 | } | 90 | } |
| 50 | 91 | ||
| 92 | + | ||
| 51 | async parseGroup(pageModel: PageModel) { | 93 | async parseGroup(pageModel: PageModel) { |
| 52 | let pageInfo: PageInfoDTO = pageModel.pageInfo | 94 | let pageInfo: PageInfoDTO = pageModel.pageInfo |
| 53 | pageModel.groupList = [] | 95 | pageModel.groupList = [] |
| @@ -4,6 +4,7 @@ import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; | @@ -4,6 +4,7 @@ import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; | ||
| 4 | import { RefreshConstants as Const } from '../utils/RefreshConstants'; | 4 | import { RefreshConstants as Const } from '../utils/RefreshConstants'; |
| 5 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 5 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 6 | import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO'; | 6 | import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO'; |
| 7 | +import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean'; | ||
| 7 | 8 | ||
| 8 | /** | 9 | /** |
| 9 | * 页面下拉刷新、上拉加载数据bean。 | 10 | * 页面下拉刷新、上拉加载数据bean。 |
| @@ -50,6 +51,15 @@ export default class PageModel { | @@ -50,6 +51,15 @@ export default class PageModel { | ||
| 50 | // keyGenerator相关字符串,用于刷新list布局 | 51 | // keyGenerator相关字符串,用于刷新list布局 |
| 51 | timestamp: String = '1'; | 52 | timestamp: String = '1'; |
| 52 | 53 | ||
| 54 | + //左右挂角广告对象 | ||
| 55 | + pageLeftCornerAdv:CompAdvBean = {} as CompAdvBean | ||
| 56 | + isShowLeftAds : boolean = true; | ||
| 57 | + pageRightCornerAdv:CompAdvBean = {} as CompAdvBean | ||
| 58 | + isShowRightAds : boolean = true; | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + | ||
| 62 | + | ||
| 53 | /** | 63 | /** |
| 54 | * 简单复制业务数据 | 64 | * 简单复制业务数据 |
| 55 | */ | 65 | */ |
| @@ -358,7 +358,7 @@ export class PageViewModel extends BaseViewModel { | @@ -358,7 +358,7 @@ export class PageViewModel extends BaseViewModel { | ||
| 358 | async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> { | 358 | async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> { |
| 359 | return new Promise<LiveReviewDTO>((success, error) => { | 359 | return new Promise<LiveReviewDTO>((success, error) => { |
| 360 | Logger.info(TAG, `getLiveMoreUrl pageInfo start`); | 360 | Logger.info(TAG, `getLiveMoreUrl pageInfo start`); |
| 361 | - PageRepository.fetchLiveMoreUrl(type,pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => { | 361 | + PageRepository.fetchLiveMoreUrl(type, pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => { |
| 362 | if (!resDTO || !resDTO.data) { | 362 | if (!resDTO || !resDTO.data) { |
| 363 | Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty'); | 363 | Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty'); |
| 364 | error('resDTO is empty'); | 364 | error('resDTO is empty'); |
| @@ -378,6 +378,30 @@ export class PageViewModel extends BaseViewModel { | @@ -378,6 +378,30 @@ export class PageViewModel extends BaseViewModel { | ||
| 378 | }) | 378 | }) |
| 379 | }) | 379 | }) |
| 380 | } | 380 | } |
| 381 | + | ||
| 382 | + async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> { | ||
| 383 | + return new Promise<LiveReviewDTO>((success, error) => { | ||
| 384 | + Logger.info(TAG, `postThemeList pageInfo start`); | ||
| 385 | + PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => { | ||
| 386 | + if (!resDTO || !resDTO.data) { | ||
| 387 | + Logger.error(TAG, 'postThemeList then navResDTO is empty'); | ||
| 388 | + error('resDTO is empty'); | ||
| 389 | + return | ||
| 390 | + } | ||
| 391 | + if (resDTO.code != 0) { | ||
| 392 | + Logger.error(TAG, `postThemeList then code:${resDTO.code}, message:${resDTO.message}`); | ||
| 393 | + error('resDTO Response Code is failure'); | ||
| 394 | + return | ||
| 395 | + } | ||
| 396 | + // let navResStr = JSON.stringify(navResDTO); | ||
| 397 | + Logger.info(TAG, "postThemeList then,navResDTO.timestamp:" + resDTO.timestamp, `${JSON.stringify(resDTO)}}`); | ||
| 398 | + success(resDTO.data); | ||
| 399 | + }).catch((err: Error) => { | ||
| 400 | + Logger.error(TAG, `postThemeList catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 401 | + error(err); | ||
| 402 | + }) | ||
| 403 | + }) | ||
| 404 | + } | ||
| 381 | } | 405 | } |
| 382 | 406 | ||
| 383 | 407 |
| @@ -121,11 +121,11 @@ | @@ -121,11 +121,11 @@ | ||
| 121 | "value": "#99636363" | 121 | "value": "#99636363" |
| 122 | }, | 122 | }, |
| 123 | { | 123 | { |
| 124 | - "name":"color_648DF2", | 124 | + "name": "color_648DF2", |
| 125 | "value": "#648DF2" | 125 | "value": "#648DF2" |
| 126 | }, | 126 | }, |
| 127 | { | 127 | { |
| 128 | - "name":"color_EEEEEE", | 128 | + "name": "color_EEEEEE", |
| 129 | "value": "#EEEEEE" | 129 | "value": "#EEEEEE" |
| 130 | }, | 130 | }, |
| 131 | { | 131 | { |
| @@ -151,6 +151,10 @@ | @@ -151,6 +151,10 @@ | ||
| 151 | { | 151 | { |
| 152 | "name": "color_0D000000", | 152 | "name": "color_0D000000", |
| 153 | "value": "#0D000000" | 153 | "value": "#0D000000" |
| 154 | + }, | ||
| 155 | + { | ||
| 156 | + "name": "res_color_general_000000_30", | ||
| 157 | + "value": "#4D000000" | ||
| 154 | } | 158 | } |
| 155 | ] | 159 | ] |
| 156 | } | 160 | } |
| @@ -209,6 +209,10 @@ | @@ -209,6 +209,10 @@ | ||
| 209 | "value": "3vp" | 209 | "value": "3vp" |
| 210 | }, | 210 | }, |
| 211 | { | 211 | { |
| 212 | + "name": "vp_2", | ||
| 213 | + "value": "2vp" | ||
| 214 | + }, | ||
| 215 | + { | ||
| 212 | "name": "vp_55", | 216 | "name": "vp_55", |
| 213 | "value": "55vp" | 217 | "value": "55vp" |
| 214 | }, | 218 | }, |
| @@ -225,6 +229,14 @@ | @@ -225,6 +229,14 @@ | ||
| 225 | "value": "16vp" | 229 | "value": "16vp" |
| 226 | }, | 230 | }, |
| 227 | { | 231 | { |
| 232 | + "name": "vp_28", | ||
| 233 | + "value": "28vp" | ||
| 234 | + }, | ||
| 235 | + { | ||
| 236 | + "name": "vp_80", | ||
| 237 | + "value": "80vp" | ||
| 238 | + }, | ||
| 239 | + { | ||
| 228 | "name": "card_comp_pagePadding_lf", | 240 | "name": "card_comp_pagePadding_lf", |
| 229 | "value": "16fp" | 241 | "value": "16fp" |
| 230 | }, | 242 | }, |
736 Bytes
2.02 KB
259 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_live_player_pause.png
0 → 100644
581 Bytes
2.13 KB
| @@ -19,6 +19,8 @@ | @@ -19,6 +19,8 @@ | ||
| 19 | "components/page/PeopleShipHomePage", | 19 | "components/page/PeopleShipHomePage", |
| 20 | "pages/MultiPictureListPage", | 20 | "pages/MultiPictureListPage", |
| 21 | "components/page/LiveMorePage", | 21 | "components/page/LiveMorePage", |
| 22 | - "components/page/ReserveMorePage" | 22 | + "components/page/ReserveMorePage", |
| 23 | + "pages/VideoPlayPage", | ||
| 24 | + "components/page/ThemeListPage" | ||
| 23 | ] | 25 | ] |
| 24 | } | 26 | } |
| 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | -import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index' | 2 | +import { EmptyComponent, ErrorComponent, WDViewDefaultType } from 'wdComponent/Index' |
| 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| 4 | -import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' | ||
| 5 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' | 4 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' |
| 6 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' | 5 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' |
| 7 | import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel' | 6 | import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel' |
| 8 | import { ViewType } from 'wdConstant/Index' | 7 | import { ViewType } from 'wdConstant/Index' |
| 9 | -import { Logger } from 'wdKit/Index' | ||
| 10 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 8 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 11 | import { TabChatItemComponent } from './TabChatItemComponent' | 9 | import { TabChatItemComponent } from './TabChatItemComponent' |
| 12 | 10 |
| 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | -import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index' | ||
| 3 | -import { LiveViewModel } from '../../viewModel/LiveViewModel' | 2 | +import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, |
| 3 | + WDViewDefaultType } from 'wdComponent/Index' | ||
| 4 | import { TabLiveItemComponent } from './TabLiveItemComponent' | 4 | import { TabLiveItemComponent } from './TabLiveItemComponent' |
| 5 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 5 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| 6 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' | 6 | import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' |
| @@ -9,6 +9,7 @@ import { ViewType } from 'wdConstant/Index' | @@ -9,6 +9,7 @@ import { ViewType } from 'wdConstant/Index' | ||
| 9 | import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' | 9 | import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout' |
| 10 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' | 10 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' |
| 11 | import { StringUtils } from 'wdKit/Index' | 11 | import { StringUtils } from 'wdKit/Index' |
| 12 | +import { LiveViewModel } from '../../viewModel/LiveViewModel' | ||
| 12 | 13 | ||
| 13 | @Component | 14 | @Component |
| 14 | export struct TabLiveComponent { | 15 | export struct TabLiveComponent { |
| @@ -110,6 +111,7 @@ export struct TabLiveComponent { | @@ -110,6 +111,7 @@ export struct TabLiveComponent { | ||
| 110 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' | 111 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' |
| 111 | liveRoomItemBeanTemp.pictureUrls=[] | 112 | liveRoomItemBeanTemp.pictureUrls=[] |
| 112 | liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) | 113 | liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) |
| 114 | + liveRoomItemBeanTemp.dataType='ZH_TEXT_AND_IMAGE_MSG' | ||
| 113 | this.liveList.push(liveRoomItemBeanTemp) | 115 | this.liveList.push(liveRoomItemBeanTemp) |
| 114 | } | 116 | } |
| 115 | } | 117 | } |
| 1 | -import { LiveRoomItemBean, PhotoListBean, } from 'wdBean/Index'; | ||
| 2 | -import { DateTimeUtils, StringUtils } from 'wdKit/Index'; | ||
| 3 | -import { Action, Params } from 'wdBean'; | ||
| 4 | -import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; | ||
| 5 | -import { WDRouterRule } from 'wdRouter/Index'; | 1 | +import { Action, LiveRoomItemBean, Params, PhotoListBean } from 'wdBean/Index' |
| 2 | +import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' | ||
| 3 | +import { DateTimeUtils, StringUtils } from 'wdKit/Index' | ||
| 4 | +import { WDRouterRule } from 'wdRouter/Index' | ||
| 6 | 5 | ||
| 7 | @Component | 6 | @Component |
| 8 | export struct TabLiveItemComponent { | 7 | export struct TabLiveItemComponent { |
| @@ -14,108 +13,190 @@ export struct TabLiveItemComponent { | @@ -14,108 +13,190 @@ export struct TabLiveItemComponent { | ||
| 14 | } | 13 | } |
| 15 | 14 | ||
| 16 | build() { | 15 | build() { |
| 17 | - Column() { | ||
| 18 | - Row() { | ||
| 19 | - Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') : this.item.senderUserAvatarUrl) | ||
| 20 | - .borderRadius(90) | ||
| 21 | - .width(24) | ||
| 22 | - .height(24) | ||
| 23 | - Text(this.item.senderUserName) | ||
| 24 | - .maxLines(1) | ||
| 25 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | 16 | + Row() { |
| 17 | + Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') : this.item.senderUserAvatarUrl) | ||
| 18 | + .borderRadius(90) | ||
| 19 | + .width(24) | ||
| 20 | + .height(24) | ||
| 21 | + | ||
| 22 | + Column() { | ||
| 23 | + Row() { | ||
| 24 | + Text(this.item.senderUserName) | ||
| 25 | + .maxLines(1) | ||
| 26 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 27 | + .fontSize('14fp') | ||
| 28 | + .fontWeight(400) | ||
| 29 | + .fontColor('#222222') | ||
| 30 | + Text('主持人') | ||
| 31 | + .maxLines(1) | ||
| 32 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 33 | + .fontSize('11fp') | ||
| 34 | + .fontWeight(400) | ||
| 35 | + .fontColor('#968562') | ||
| 36 | + .backgroundColor('#F1EFEB') | ||
| 37 | + .padding({ | ||
| 38 | + left: 4, | ||
| 39 | + top: 1, | ||
| 40 | + right: 4, | ||
| 41 | + bottom: 1 | ||
| 42 | + }) | ||
| 43 | + .borderRadius(2) | ||
| 44 | + .margin({ left: 8 }) | ||
| 45 | + .visibility('host' == this.item.role ? Visibility.Visible : Visibility.None) | ||
| 46 | + Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) | ||
| 47 | + .maxLines(1) | ||
| 48 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 49 | + .fontSize('12fp') | ||
| 50 | + .fontWeight(400) | ||
| 51 | + .fontColor('#999999') | ||
| 52 | + .margin({ left: 8 }) | ||
| 53 | + .visibility(StringUtils.isNotEmpty(this.item.time) ? Visibility.Visible : Visibility.None) | ||
| 54 | + | ||
| 55 | + Text('置顶') | ||
| 56 | + .fontSize('11fp') | ||
| 57 | + .fontWeight(400) | ||
| 58 | + .fontColor('#ED2800') | ||
| 59 | + .backgroundColor('#F1EFEB') | ||
| 60 | + .padding({ | ||
| 61 | + left: 4, | ||
| 62 | + top: 1, | ||
| 63 | + right: 4, | ||
| 64 | + bottom: 1 | ||
| 65 | + }) | ||
| 66 | + .borderRadius(2) | ||
| 67 | + .margin({ left: 8 }) | ||
| 68 | + .width(100) | ||
| 69 | + .visibility(1 == this.item.isTop ? Visibility.Visible : Visibility.None) | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + Text(this.item.text) | ||
| 26 | .fontSize('14fp') | 73 | .fontSize('14fp') |
| 27 | .fontWeight(400) | 74 | .fontWeight(400) |
| 28 | .fontColor('#222222') | 75 | .fontColor('#222222') |
| 29 | - .margin({ left: 8 }) | ||
| 30 | - Text('主持人') | ||
| 31 | - .maxLines(1) | ||
| 32 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 33 | - .fontSize('11fp') | ||
| 34 | - .fontWeight(400) | ||
| 35 | - .fontColor('#968562') | ||
| 36 | - .backgroundColor('#F1EFEB') | ||
| 37 | - .padding({ | ||
| 38 | - left: 4, | ||
| 39 | - top: 1, | ||
| 40 | - right: 4, | ||
| 41 | - bottom: 1 | 76 | + .margin({ |
| 77 | + top: 6 | ||
| 42 | }) | 78 | }) |
| 43 | - .borderRadius(2) | ||
| 44 | - .margin({ left: 8 }) | ||
| 45 | - .visibility('host' == this.item.role ? Visibility.Visible : Visibility.None) | ||
| 46 | - Text(DateTimeUtils.getCommentTime(new Date(this.item.time).getTime())) | ||
| 47 | - .maxLines(1) | ||
| 48 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 49 | - .fontSize('12fp') | ||
| 50 | - .fontWeight(400) | ||
| 51 | - .fontColor('#999999') | ||
| 52 | - .margin({ left: 8 }) | ||
| 53 | - .visibility(StringUtils.isNotEmpty(this.item.time) ? Visibility.Visible : Visibility.None) | ||
| 54 | - Blank() | ||
| 55 | - Text('置顶') | ||
| 56 | - .maxLines(1) | ||
| 57 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 58 | - .fontSize('11fp') | ||
| 59 | - .fontWeight(400) | ||
| 60 | - .fontColor('#ED2800') | ||
| 61 | - .backgroundColor('#F1EFEB') | ||
| 62 | - .padding({ | ||
| 63 | - left: 4, | ||
| 64 | - top: 1, | ||
| 65 | - right: 4, | ||
| 66 | - bottom: 1 | 79 | + .width('100%') |
| 80 | + .textAlign(TextAlign.Start) | ||
| 81 | + //ZH_TEXT_AND_IMAGE_MSG :图文,ZH_TEXT_MSG:文本,ZH_VIDEO_MSG:视频,ZH_AUDIO_MSG:音频 | ||
| 82 | + //图文 | ||
| 83 | + if (this.item.dataType === 'ZH_TEXT_AND_IMAGE_MSG') { | ||
| 84 | + List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) { | ||
| 85 | + ForEach(this.item.pictureUrls, (item: string, index: number) => { | ||
| 86 | + ListItem() { | ||
| 87 | + Image(item) | ||
| 88 | + .width(`${100 / this.item.pictureUrls.length}%`) | ||
| 89 | + .height(this.item.pictureUrls.length > 1 ? 70 : 174) | ||
| 90 | + .objectFit(ImageFit.Auto) | ||
| 91 | + .borderRadius(4) | ||
| 92 | + }.onClick(() => { | ||
| 93 | + this.photoList = [] | ||
| 94 | + for (let item of this.item.pictureUrls) { | ||
| 95 | + this.photoList.push({ | ||
| 96 | + width: 0, | ||
| 97 | + height: 0, | ||
| 98 | + picPath: item, | ||
| 99 | + picDesc: '' | ||
| 100 | + }) | ||
| 101 | + } | ||
| 102 | + this.gotoMultipleListImagePage() | ||
| 103 | + }) | ||
| 104 | + }) | ||
| 105 | + } | ||
| 106 | + .listDirection(Axis.Horizontal) | ||
| 107 | + .margin({ | ||
| 108 | + top: 8, | ||
| 109 | + right: 16 | ||
| 67 | }) | 110 | }) |
| 68 | - .borderRadius(2) | ||
| 69 | - .margin({ left: 8 }) | ||
| 70 | - .visibility(1 == this.item.isTop ? Visibility.Visible : Visibility.None) | ||
| 71 | - } | ||
| 72 | - .width('100%') | ||
| 73 | - | ||
| 74 | - Text(this.item.text) | ||
| 75 | - .fontSize('14fp') | ||
| 76 | - .fontWeight(400) | ||
| 77 | - .fontColor('#222222') | ||
| 78 | - .margin({ | ||
| 79 | - left: 32, | ||
| 80 | - top: 6 | ||
| 81 | - }) | ||
| 82 | - .width('100%') | ||
| 83 | - .textAlign(TextAlign.Start) | ||
| 84 | - List() { | ||
| 85 | - ForEach(this.item.pictureUrls, (item: string, index: number) => { | ||
| 86 | - ListItem() { | ||
| 87 | - Image(item) | ||
| 88 | - .height(174) | ||
| 89 | - .width(310) | ||
| 90 | - .aspectRatio(310 / 174) | ||
| 91 | - .objectFit(ImageFit.Auto) | ||
| 92 | - .borderRadius(4) | ||
| 93 | - }.onClick(() => { | ||
| 94 | - this.photoList=[] | ||
| 95 | - for (let item of this.item.pictureUrls) { | ||
| 96 | - this.photoList.push({ | ||
| 97 | - width: 0, | ||
| 98 | - height: 0, | ||
| 99 | - picPath: item, | ||
| 100 | - picDesc: '' | 111 | + } |
| 112 | + //音频 | ||
| 113 | + else if (this.item.dataType === 'ZH_AUDIO_MSG') { | ||
| 114 | + Row() { | ||
| 115 | + Image($r('app.media.icon_voice')) | ||
| 116 | + .width(20) | ||
| 117 | + .aspectRatio(1) | ||
| 118 | + .margin({ | ||
| 119 | + left: 8, | ||
| 120 | + right: 6 | ||
| 101 | }) | 121 | }) |
| 122 | + Text(DateTimeUtils.getFormattedDuration(this.item.duration)) | ||
| 123 | + .fontColor('#666666') | ||
| 124 | + .fontWeight(400) | ||
| 125 | + .fontSize('14fp') | ||
| 126 | + } | ||
| 127 | + .backgroundColor(Color.White) | ||
| 128 | + .height(36) | ||
| 129 | + .borderRadius(4) | ||
| 130 | + .margin({ top: 8, right: 16 }) | ||
| 131 | + .width('100%') | ||
| 132 | + } | ||
| 133 | + //视频 | ||
| 134 | + else if (this.item.dataType === 'ZH_VIDEO_MSG') { | ||
| 135 | + RelativeContainer() { | ||
| 136 | + Image(this.item.transcodeImageUrl) | ||
| 137 | + .width('100%') | ||
| 138 | + .objectFit(ImageFit.Cover) | ||
| 139 | + .borderRadius(4) | ||
| 140 | + .id('iv_id') | ||
| 141 | + Stack() { | ||
| 142 | + Row() | ||
| 143 | + .borderRadius(90) | ||
| 144 | + .width(32) | ||
| 145 | + .height(32) | ||
| 146 | + .backgroundColor('#000000') | ||
| 147 | + Image($r('app.media.player_play_ic')) | ||
| 148 | + .height(16) | ||
| 149 | + .aspectRatio(1) | ||
| 102 | } | 150 | } |
| 103 | - this.gotoMultipleListImagePage() | 151 | + .alignRules({ |
| 152 | + left: { anchor: "iv_id", align: HorizontalAlign.Start }, | ||
| 153 | + bottom: { anchor: "iv_id", align: VerticalAlign.Bottom } | ||
| 154 | + }) | ||
| 155 | + .margin({ | ||
| 156 | + left: 12, | ||
| 157 | + bottom: 12 | ||
| 158 | + }) | ||
| 159 | + .id('play_id') | ||
| 160 | + } | ||
| 161 | + .margin({ | ||
| 162 | + top: 8, | ||
| 163 | + right: 16 | ||
| 164 | + }) | ||
| 165 | + .aspectRatio(Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[0]) / Number.parseFloat(this.item.pictureResolutions[0]?.split('*')[1])) | ||
| 166 | + .onClick(() => { | ||
| 167 | + this.gotoVideoPlayPage() | ||
| 104 | }) | 168 | }) |
| 105 | - }) | ||
| 106 | - }.margin({ | ||
| 107 | - left: 32, | ||
| 108 | - top: 8 | 169 | + } |
| 170 | + | ||
| 171 | + } | ||
| 172 | + .margin({ | ||
| 173 | + left: 8, | ||
| 174 | + right: 16 | ||
| 109 | }) | 175 | }) |
| 110 | - }.margin({ | ||
| 111 | - left: 15, | ||
| 112 | - top: 15, | ||
| 113 | - right: 15 | 176 | + .layoutWeight(1) |
| 177 | + .alignItems(HorizontalAlign.Start) | ||
| 178 | + } | ||
| 179 | + .alignItems(VerticalAlign.Top) | ||
| 180 | + .padding({ | ||
| 181 | + left: 17, | ||
| 182 | + top: 8, | ||
| 183 | + bottom: 8, | ||
| 114 | }) | 184 | }) |
| 115 | } | 185 | } |
| 116 | 186 | ||
| 117 | - aboutToDisappear(): void { | ||
| 118 | - | 187 | + /** |
| 188 | + * @param content | ||
| 189 | + * */ | ||
| 190 | + gotoVideoPlayPage() { | ||
| 191 | + let taskAction: Action = { | ||
| 192 | + type: 'JUMP_DETAIL_PAGE', | ||
| 193 | + params: { | ||
| 194 | + detailPageType: 19, | ||
| 195 | + videoUrl: this.item.videoUrl, | ||
| 196 | + videoCoverUrl: this.item.transcodeImageUrl | ||
| 197 | + } as Params, | ||
| 198 | + }; | ||
| 199 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 119 | } | 200 | } |
| 120 | 201 | ||
| 121 | /** | 202 | /** |
| @@ -134,4 +215,8 @@ export struct TabLiveItemComponent { | @@ -134,4 +215,8 @@ export struct TabLiveItemComponent { | ||
| 134 | }; | 215 | }; |
| 135 | WDRouterRule.jumpWithAction(taskAction) | 216 | WDRouterRule.jumpWithAction(taskAction) |
| 136 | } | 217 | } |
| 218 | + | ||
| 219 | + aboutToDisappear(): void { | ||
| 220 | + | ||
| 221 | + } | ||
| 137 | } | 222 | } |
| @@ -269,7 +269,8 @@ export struct PlayUIComponent { | @@ -269,7 +269,8 @@ export struct PlayUIComponent { | ||
| 269 | .blockSize({ | 269 | .blockSize({ |
| 270 | width: 18, | 270 | width: 18, |
| 271 | height: 12 | 271 | height: 12 |
| 272 | - })// .blockStyle({ | 272 | + }) |
| 273 | + // .blockStyle({ | ||
| 273 | // type: SliderBlockType.IMAGE, | 274 | // type: SliderBlockType.IMAGE, |
| 274 | // image: $r('app.media.ic_player_block') | 275 | // image: $r('app.media.ic_player_block') |
| 275 | // }) | 276 | // }) |
2.05 KB
| 1 | -import mediaquery from '@ohos.mediaquery'; | ||
| 2 | import { ContentDetailDTO, InteractDataDTO } from 'wdBean'; | 1 | import { ContentDetailDTO, InteractDataDTO } from 'wdBean'; |
| 3 | import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer'; | 2 | import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer'; |
| 4 | -import { ContentDetailRequest, devicePLSensorManager } from 'wdDetailPlayApi'; | ||
| 5 | -import { PlayControlViewContainer } from '../view/PlayControlViewContainer'; | ||
| 6 | -import { PlayerDetailContainer } from '../view/PlayerDetailContainer'; | ||
| 7 | -import { DetailContainer } from '../view/DetailContainer'; | 3 | +import { ContentDetailRequest } from 'wdDetailPlayApi'; |
| 8 | import { | 4 | import { |
| 9 | batchLikeAndCollectParams, | 5 | batchLikeAndCollectParams, |
| 10 | batchLikeAndCollectResult, | 6 | batchLikeAndCollectResult, |
| @@ -13,6 +9,8 @@ import { | @@ -13,6 +9,8 @@ import { | ||
| 13 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; | 9 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; |
| 14 | import { HttpUrlUtils } from 'wdNetwork/Index'; | 10 | import { HttpUrlUtils } from 'wdNetwork/Index'; |
| 15 | import { DateTimeUtils } from 'wdKit/Index'; | 11 | import { DateTimeUtils } from 'wdKit/Index'; |
| 12 | +import { PlayerBottomView } from '../view/PlayerBottomView'; | ||
| 13 | +import { PlayerRightView } from '../view/PlayerRightView'; | ||
| 16 | 14 | ||
| 17 | const TAG = 'DetailPlayShortVideoPage'; | 15 | const TAG = 'DetailPlayShortVideoPage'; |
| 18 | 16 | ||
| @@ -32,27 +30,30 @@ export struct DetailPlayShortVideoPage { | @@ -32,27 +30,30 @@ export struct DetailPlayShortVideoPage { | ||
| 32 | @Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2 | 30 | @Provide videoLandScape?: number = 1; // 视频朝向, 横屏视频:1;竖屏视频:2 |
| 33 | @Provide newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 | 31 | @Provide newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 |
| 34 | @Provide followStatus: string = '0' // 关注状态 | 32 | @Provide followStatus: string = '0' // 关注状态 |
| 35 | - @Link @Watch('switchVideoStatusChange') switchVideoStatus: boolean | 33 | + @Provide isOpenDetail: boolean = false // 查看详情按钮点击 |
| 34 | + @Provide isDragging: boolean = false // 拖动时间进度条 | ||
| 35 | + @Consume @Watch('pageShowChange') pageShow: number | ||
| 36 | + @Consume @Watch('pageHideChange') pageHide: number | ||
| 37 | + | ||
| 38 | + pageShowChange() { | ||
| 39 | + if (this.currentIndex === this.index && this.playerController.getStatus() === PlayerConstants.STATUS_PAUSE) { | ||
| 40 | + this.playerController.play() | ||
| 41 | + this.queryNewsInfoOfUser() | ||
| 42 | + } | ||
| 43 | + } | ||
| 36 | 44 | ||
| 37 | - /** | ||
| 38 | - * 直播频道从其他频道切换回来需要继续播放视频 | ||
| 39 | - */ | ||
| 40 | - switchVideoStatusChange() { | ||
| 41 | - if (this.switchVideoStatus) { | ||
| 42 | - if (this.currentIndex === this.index && this.playerController.getStatus() === PlayerConstants.STATUS_PAUSE) { | ||
| 43 | - this.playerController.play() | ||
| 44 | - } | ||
| 45 | - } else { | ||
| 46 | - if (this.currentIndex === this.index && this.playerController.getStatus() === PlayerConstants.STATUS_START) { | ||
| 47 | - this.playerController.pause() | ||
| 48 | - } | 45 | + pageHideChange() { |
| 46 | + if (this.currentIndex === this.index && this.playerController.getStatus() === PlayerConstants.STATUS_START) { | ||
| 47 | + this.playerController.pause() | ||
| 49 | } | 48 | } |
| 50 | } | 49 | } |
| 51 | 50 | ||
| 51 | + /** | ||
| 52 | + * 监听下标变化手动创建或销毁视频 | ||
| 53 | + */ | ||
| 52 | currentIndexChange() { | 54 | currentIndexChange() { |
| 53 | if (this.currentIndex != this.index) { | 55 | if (this.currentIndex != this.index) { |
| 54 | this.playerController.pause() | 56 | this.playerController.pause() |
| 55 | - | ||
| 56 | if (this.index < this.currentIndex - 3 && this.playerController.getPlayer()) { | 57 | if (this.index < this.currentIndex - 3 && this.playerController.getPlayer()) { |
| 57 | this.playerController.release() | 58 | this.playerController.release() |
| 58 | } | 59 | } |
| @@ -64,12 +65,11 @@ export struct DetailPlayShortVideoPage { | @@ -64,12 +65,11 @@ export struct DetailPlayShortVideoPage { | ||
| 64 | } else { | 65 | } else { |
| 65 | this.playerController.play() | 66 | this.playerController.play() |
| 66 | } | 67 | } |
| 67 | - | ||
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | /** | 71 | /** |
| 72 | - * 查询用户点赞、收藏、关注等状态 | 72 | + * 查询用户点赞、收藏、关注状态、记录浏览历史 |
| 73 | */ | 73 | */ |
| 74 | queryNewsInfoOfUser() { | 74 | queryNewsInfoOfUser() { |
| 75 | if (HttpUrlUtils.getUserId()) { | 75 | if (HttpUrlUtils.getUserId()) { |
| @@ -100,7 +100,7 @@ export struct DetailPlayShortVideoPage { | @@ -100,7 +100,7 @@ export struct DetailPlayShortVideoPage { | ||
| 100 | } | 100 | } |
| 101 | }) | 101 | }) |
| 102 | 102 | ||
| 103 | - // 记录浏览历史 | 103 | + // 记录浏览历史 |
| 104 | const params2: postInteractBrowsOperateParams = { | 104 | const params2: postInteractBrowsOperateParams = { |
| 105 | delStatus: 0, | 105 | delStatus: 0, |
| 106 | contentList: [{ | 106 | contentList: [{ |
| @@ -118,51 +118,41 @@ export struct DetailPlayShortVideoPage { | @@ -118,51 +118,41 @@ export struct DetailPlayShortVideoPage { | ||
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | aboutToAppear() { | 120 | aboutToAppear() { |
| 121 | - // console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData)) | ||
| 122 | this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape | 121 | this.videoLandScape = this.contentDetailData?.videoInfo[0]?.videoLandScape |
| 123 | - this.queryNewsInfoOfUser() | ||
| 124 | this.playerController.onCanplay = () => { | 122 | this.playerController.onCanplay = () => { |
| 125 | if (this.index == 0 || this.currentIndex === this.index) { | 123 | if (this.index == 0 || this.currentIndex === this.index) { |
| 126 | this.playerController.play() | 124 | this.playerController.play() |
| 127 | } | 125 | } |
| 128 | } | 126 | } |
| 129 | - | ||
| 130 | this.playerController.onTimeUpdate = (position, duration) => { | 127 | this.playerController.onTimeUpdate = (position, duration) => { |
| 131 | this.progressVal = Math.floor(position * 100 / duration); | 128 | this.progressVal = Math.floor(position * 100 / duration); |
| 132 | } | 129 | } |
| 133 | - | ||
| 134 | - // 设置播放地址 | ||
| 135 | - let listener = mediaquery.matchMediaSync('(orientation: landscape)'); | ||
| 136 | - listener.on("change", (mediaQueryResult) => { | ||
| 137 | - if (mediaQueryResult.matches) { | ||
| 138 | - console.log("横屏 yes") | ||
| 139 | - this.isFullScreen = true | ||
| 140 | - } else { | ||
| 141 | - this.isFullScreen = false | ||
| 142 | - console.log("横屏 no") | ||
| 143 | - } | ||
| 144 | - // WindowModel.shared.setMainWindowFullScreen(this.isFullScreen) | ||
| 145 | - }) | ||
| 146 | - | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - onPageShow() { | ||
| 150 | - // this.playerController?.play(); | ||
| 151 | - // WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED); | 130 | + this.queryNewsInfoOfUser() |
| 152 | } | 131 | } |
| 153 | 132 | ||
| 154 | aboutToDisappear(): void { | 133 | aboutToDisappear(): void { |
| 155 | - console.log('aboutToDisappear', this.index) | 134 | + console.log(TAG, 'aboutToDisappear', this.index) |
| 156 | this.playerController?.pause() | 135 | this.playerController?.pause() |
| 157 | this.playerController?.release(); | 136 | this.playerController?.release(); |
| 158 | } | 137 | } |
| 159 | 138 | ||
| 160 | - onPageHide() { | ||
| 161 | - this.playerController?.pause(); | 139 | + build() { |
| 140 | + Stack({ alignContent: Alignment.Top }) { | ||
| 141 | + this.playerViewBuilder() | ||
| 142 | + PlayerBottomView({ | ||
| 143 | + playerController: this.playerController | ||
| 144 | + }) | ||
| 145 | + PlayerRightView({ | ||
| 146 | + playerController: this.playerController | ||
| 147 | + }) | ||
| 148 | + | ||
| 149 | + } | ||
| 150 | + .height('100%') | ||
| 151 | + .width('100%') | ||
| 162 | } | 152 | } |
| 163 | 153 | ||
| 164 | @Builder | 154 | @Builder |
| 165 | - playerViewContainerBuilder() { | 155 | + playerViewBuilder() { |
| 166 | // 播放窗口 | 156 | // 播放窗口 |
| 167 | WDPlayerRenderView({ | 157 | WDPlayerRenderView({ |
| 168 | playerController: this.playerController, | 158 | playerController: this.playerController, |
| @@ -181,36 +171,4 @@ export struct DetailPlayShortVideoPage { | @@ -181,36 +171,4 @@ export struct DetailPlayShortVideoPage { | ||
| 181 | this.playerController?.switchPlayOrPause(); | 171 | this.playerController?.switchPlayOrPause(); |
| 182 | }) | 172 | }) |
| 183 | } | 173 | } |
| 184 | - | ||
| 185 | - @Builder | ||
| 186 | - playControlViewContainerBuilder() { | ||
| 187 | - // 播放窗口控制bar | ||
| 188 | - PlayControlViewContainer({ | ||
| 189 | - playerController: this.playerController | ||
| 190 | - }) | ||
| 191 | - } | ||
| 192 | - | ||
| 193 | - @Builder | ||
| 194 | - detailContainerBuilder() { | ||
| 195 | - DetailContainer({ | ||
| 196 | - playerController: this.playerController | ||
| 197 | - }) | ||
| 198 | - } | ||
| 199 | - | ||
| 200 | - build() { | ||
| 201 | - Column() { | ||
| 202 | - PlayerDetailContainer({ | ||
| 203 | - playerView: () => { | ||
| 204 | - this.playerViewContainerBuilder() | ||
| 205 | - }, playControlView: () => { | ||
| 206 | - // this.playControlViewContainerBuilder() | ||
| 207 | - }, detailView: () => { | ||
| 208 | - this.detailContainerBuilder() | ||
| 209 | - } | ||
| 210 | - }) | ||
| 211 | - } | ||
| 212 | - .height('100%') | ||
| 213 | - .width('100%') | ||
| 214 | - | ||
| 215 | - } | ||
| 216 | } | 174 | } |
| @@ -16,7 +16,12 @@ export struct DetailVideoListPage { | @@ -16,7 +16,12 @@ export struct DetailVideoListPage { | ||
| 16 | private relId: string = '' | 16 | private relId: string = '' |
| 17 | private relType: string = '' | 17 | private relType: string = '' |
| 18 | private swiperController: SwiperController = new SwiperController() | 18 | private swiperController: SwiperController = new SwiperController() |
| 19 | + @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 20 | + @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 21 | + @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0 | ||
| 19 | @Provide showComment: boolean = true | 22 | @Provide showComment: boolean = true |
| 23 | + @Provide pageShow: number = -1 | ||
| 24 | + @Provide pageHide: number = -1 | ||
| 20 | @State data: ContentDetailDTO[] = [] | 25 | @State data: ContentDetailDTO[] = [] |
| 21 | @State testData: string[] = ['111', '222', '333'] | 26 | @State testData: string[] = ['111', '222', '333'] |
| 22 | @State currentIndex: number = 0 | 27 | @State currentIndex: number = 0 |
| @@ -48,17 +53,17 @@ export struct DetailVideoListPage { | @@ -48,17 +53,17 @@ export struct DetailVideoListPage { | ||
| 48 | this.closeFullScreen() | 53 | this.closeFullScreen() |
| 49 | } | 54 | } |
| 50 | 55 | ||
| 56 | + // page show/hide只能在外层组件触发 | ||
| 51 | onPageShow(): void { | 57 | onPageShow(): void { |
| 52 | console.log(TAG, 'onPageShow') | 58 | console.log(TAG, 'onPageShow') |
| 59 | + this.pageShow = Math.random() | ||
| 53 | this.openFullScreen() | 60 | this.openFullScreen() |
| 54 | 61 | ||
| 55 | - console.log('getWindowProperties', JSON.stringify(WindowModel.shared.getWindowProperties())) | ||
| 56 | - | ||
| 57 | - | ||
| 58 | } | 62 | } |
| 59 | 63 | ||
| 60 | onPageHide(): void { | 64 | onPageHide(): void { |
| 61 | console.log(TAG, 'onPageHide') | 65 | console.log(TAG, 'onPageHide') |
| 66 | + this.pageHide = Math.random() | ||
| 62 | this.closeFullScreen() | 67 | this.closeFullScreen() |
| 63 | } | 68 | } |
| 64 | 69 | ||
| @@ -68,7 +73,7 @@ export struct DetailVideoListPage { | @@ -68,7 +73,7 @@ export struct DetailVideoListPage { | ||
| 68 | */ | 73 | */ |
| 69 | openFullScreen() { | 74 | openFullScreen() { |
| 70 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 75 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 71 | - // WindowModel.shared.setWindowLayoutFullScreen(true) | 76 | + WindowModel.shared.setWindowLayoutFullScreen(true) |
| 72 | // WindowModel.shared.setWindowSystemBarEnable([]) | 77 | // WindowModel.shared.setWindowSystemBarEnable([]) |
| 73 | } | 78 | } |
| 74 | 79 | ||
| @@ -78,7 +83,7 @@ export struct DetailVideoListPage { | @@ -78,7 +83,7 @@ export struct DetailVideoListPage { | ||
| 78 | */ | 83 | */ |
| 79 | closeFullScreen() { | 84 | closeFullScreen() { |
| 80 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 85 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 81 | - // WindowModel.shared.setWindowLayoutFullScreen(false) | 86 | + WindowModel.shared.setWindowLayoutFullScreen(false) |
| 82 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | 87 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) |
| 83 | } | 88 | } |
| 84 | 89 | ||
| @@ -105,6 +110,7 @@ export struct DetailVideoListPage { | @@ -105,6 +110,7 @@ export struct DetailVideoListPage { | ||
| 105 | }).then(res => { | 110 | }).then(res => { |
| 106 | if (res.data) { | 111 | if (res.data) { |
| 107 | this.data = this.data.concat(res.data) | 112 | this.data = this.data.concat(res.data) |
| 113 | + console.log('视频列表===', JSON.stringify(res.data)) | ||
| 108 | } | 114 | } |
| 109 | }) | 115 | }) |
| 110 | } | 116 | } |
| @@ -138,7 +144,6 @@ export struct DetailVideoListPage { | @@ -138,7 +144,6 @@ export struct DetailVideoListPage { | ||
| 138 | Swiper(this.swiperController) { | 144 | Swiper(this.swiperController) { |
| 139 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { | 145 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { |
| 140 | DetailPlayShortVideoPage({ | 146 | DetailPlayShortVideoPage({ |
| 141 | - switchVideoStatus: $switchVideoStatus, | ||
| 142 | contentDetailData: item, | 147 | contentDetailData: item, |
| 143 | currentIndex: this.currentIndex, | 148 | currentIndex: this.currentIndex, |
| 144 | index: index, | 149 | index: index, |
| @@ -155,9 +160,8 @@ export struct DetailVideoListPage { | @@ -155,9 +160,8 @@ export struct DetailVideoListPage { | ||
| 155 | .displayCount(1, true) | 160 | .displayCount(1, true) |
| 156 | .onChange((index: number) => { | 161 | .onChange((index: number) => { |
| 157 | this.currentIndex = index | 162 | this.currentIndex = index |
| 158 | - console.info('onChange==', index.toString()) | ||
| 159 | - | ||
| 160 | if (this.currentIndex === this.data.length - 1) { | 163 | if (this.currentIndex === this.data.length - 1) { |
| 164 | + // TODO:下拉刷新“努力加载中” | ||
| 161 | this.queryVideoList() | 165 | this.queryVideoList() |
| 162 | } | 166 | } |
| 163 | }) | 167 | }) |
| @@ -165,6 +169,9 @@ export struct DetailVideoListPage { | @@ -165,6 +169,9 @@ export struct DetailVideoListPage { | ||
| 165 | .width('100%') | 169 | .width('100%') |
| 166 | .height('100%') | 170 | .height('100%') |
| 167 | .backgroundColor(Color.Black) | 171 | .backgroundColor(Color.Black) |
| 168 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) | 172 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 173 | + .padding({ | ||
| 174 | + bottom: this.bottomSafeHeight + 'px' | ||
| 175 | + }) | ||
| 169 | } | 176 | } |
| 170 | } | 177 | } |
| 1 | +export class PlayerConstants { | ||
| 2 | + static readonly STATUS_IDLE: number = 0; | ||
| 3 | + static readonly STATUS_START: number = 1; | ||
| 4 | + static readonly STATUS_PAUSE: number = 2; | ||
| 5 | + static readonly STATUS_STOP: number = 3; | ||
| 6 | +} | ||
| 7 | + | ||
| 8 | + | ||
| 1 | @Preview | 9 | @Preview |
| 2 | @Component | 10 | @Component |
| 3 | export struct Test { | 11 | export struct Test { |
| 4 | - build() { | ||
| 5 | - Row() { | ||
| 6 | - | ||
| 7 | - RelativeContainer() { | ||
| 8 | - Image($r('app.media.ic_like_uncheck')) | ||
| 9 | - .width('100%') | ||
| 10 | - .borderRadius(24) | ||
| 11 | - .aspectRatio(1) | ||
| 12 | - .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 13 | - .alignRules({ | ||
| 14 | - top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 15 | - left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 16 | - }) | ||
| 17 | - .id("row1") | ||
| 18 | - | ||
| 19 | - Image($r('app.media.ic_add')) | ||
| 20 | - .width(24) | ||
| 21 | - .borderRadius(12) | ||
| 22 | - .alignRules({ | ||
| 23 | - left: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 24 | - bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 25 | - }) | ||
| 26 | - .margin({ left: -12 }) | ||
| 27 | - .id("row2") | ||
| 28 | - }.height('auto') | 12 | + @State progressVal: number = 10; |
| 13 | + @State status: number = PlayerConstants.STATUS_PAUSE; | ||
| 29 | 14 | ||
| 15 | + padding1(num: string) { | ||
| 16 | + let length = 2; | ||
| 17 | + for (let len = (num.toString()).length; len < length; len = num.length) { | ||
| 18 | + num = `${'0'}${num}`; | ||
| 19 | + } | ||
| 20 | + return num; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + secondToTime(seconds: number) { | ||
| 24 | + let time = '00:00' | ||
| 25 | + let hourUnit = 60 * 60; | ||
| 26 | + let hour = Math.floor(seconds / hourUnit); | ||
| 27 | + let minute = Math.floor((seconds - hour * hourUnit) / 60); | ||
| 28 | + let second = seconds - hour * hourUnit - minute * 60; | ||
| 29 | + if (hour > 0) { | ||
| 30 | + return `${this.padding1(hour.toString())}${':'}${this.padding1(minute.toString())}${':'}${this.padding1(second.toString())}`; | ||
| 31 | + } | ||
| 32 | + if (minute > 0) { | ||
| 33 | + return `${this.padding1(minute.toString())}${':'}${this.padding1(second.toString())}`; | ||
| 34 | + } else { | ||
| 35 | + return `${'00'}${':'}${this.padding1(second.toString())}`; | ||
| 30 | } | 36 | } |
| 31 | - .height(58) | ||
| 32 | - .width(48) | ||
| 33 | - .backgroundColor(Color.Black) | 37 | + } |
| 38 | + | ||
| 39 | + build() { | ||
| 40 | + Column() { | ||
| 41 | + | ||
| 42 | + Text() { | ||
| 43 | + Span(this.secondToTime(6)) | ||
| 44 | + Span(' / ') | ||
| 45 | + Span('00:06') | ||
| 46 | + } | ||
| 47 | + .fontSize(24) | ||
| 48 | + .fontColor(Color.White) | ||
| 49 | + .fontWeight(600) | ||
| 50 | + .margin({ bottom: 30 }) | ||
| 34 | 51 | ||
| 52 | + // .visibility(Visibility.None) | ||
| 53 | + | ||
| 54 | + Slider({ | ||
| 55 | + value: this.progressVal, | ||
| 56 | + step: 0.01, | ||
| 57 | + // style: SliderStyle.OutSet | ||
| 58 | + }) | ||
| 59 | + .blockColor(this.status === PlayerConstants.STATUS_START ? Color.Transparent : $r('app.color.play_block_color')) | ||
| 60 | + .trackColor(this.status === PlayerConstants.STATUS_START ? $r('app.color.play_track_color') : $r('app.color.pause_track_color')) | ||
| 61 | + .selectedColor(this.status === PlayerConstants.STATUS_START ? $r('app.color.play_selected_color') : $r('app.color.pause_selected_color')) | ||
| 62 | + .trackThickness(this.status === PlayerConstants.STATUS_START ? 1 : 4) | ||
| 63 | + .blockStyle({ | ||
| 64 | + type: this.status === PlayerConstants.STATUS_START ? SliderBlockType.DEFAULT : SliderBlockType.IMAGE, | ||
| 65 | + image: $r('app.media.ic_player_block') | ||
| 66 | + }) | ||
| 67 | + .blockSize({ width: 18, height: 12 }) | ||
| 68 | + .width('100%')// .height(19) | ||
| 69 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 70 | + // this.playerController?.setSeekTime(Math.floor(value), mode); | ||
| 71 | + }) | ||
| 72 | + | ||
| 73 | + } | ||
| 74 | + .backgroundColor(Color.Blue) | ||
| 75 | + .height('100%') | ||
| 35 | } | 76 | } |
| 36 | } | 77 | } |
| @@ -25,7 +25,9 @@ interface loadMoreData { | @@ -25,7 +25,9 @@ interface loadMoreData { | ||
| 25 | const TAG = 'VideoChannelDetail' | 25 | const TAG = 'VideoChannelDetail' |
| 26 | let timer: number = -1 | 26 | let timer: number = -1 |
| 27 | 27 | ||
| 28 | -@Entry | 28 | +const storage = LocalStorage.getShared(); |
| 29 | + | ||
| 30 | +@Entry(storage) | ||
| 29 | @Component | 31 | @Component |
| 30 | export struct VideoChannelDetail { | 32 | export struct VideoChannelDetail { |
| 31 | private groupId: string = '' // 楼层id | 33 | private groupId: string = '' // 楼层id |
| @@ -43,6 +45,7 @@ export struct VideoChannelDetail { | @@ -43,6 +45,7 @@ export struct VideoChannelDetail { | ||
| 43 | @Link barBackgroundColor: Color | 45 | @Link barBackgroundColor: Color |
| 44 | private swiperController: SwiperController = new SwiperController() | 46 | private swiperController: SwiperController = new SwiperController() |
| 45 | @Provide showComment: boolean = false | 47 | @Provide showComment: boolean = false |
| 48 | + @Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0 | ||
| 46 | @State data: ContentDetailDTO[] = [] | 49 | @State data: ContentDetailDTO[] = [] |
| 47 | @State currentIndex: number = 0 | 50 | @State currentIndex: number = 0 |
| 48 | @State interactDataList: InteractDataDTO[] = [] | 51 | @State interactDataList: InteractDataDTO[] = [] |
| @@ -216,7 +219,6 @@ export struct VideoChannelDetail { | @@ -216,7 +219,6 @@ export struct VideoChannelDetail { | ||
| 216 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { | 219 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { |
| 217 | Column() { | 220 | Column() { |
| 218 | DetailPlayShortVideoPage({ | 221 | DetailPlayShortVideoPage({ |
| 219 | - switchVideoStatus: $switchVideoStatus, | ||
| 220 | contentDetailData: item, | 222 | contentDetailData: item, |
| 221 | currentIndex: this.currentIndex, | 223 | currentIndex: this.currentIndex, |
| 222 | index: index, | 224 | index: index, |
| 1 | +@Preview | ||
| 1 | @CustomDialog | 2 | @CustomDialog |
| 2 | export struct DetailDialog { | 3 | export struct DetailDialog { |
| 3 | controller: CustomDialogController | 4 | controller: CustomDialogController |
| 4 | @Prop name: string | 5 | @Prop name: string |
| 5 | @Prop title: string | 6 | @Prop title: string |
| 6 | @Prop summary: string | 7 | @Prop summary: string |
| 7 | - @Link isOpen: boolean | 8 | + @Link isOpenDetail: boolean |
| 8 | 9 | ||
| 9 | build() { | 10 | build() { |
| 10 | Column() { | 11 | Column() { |
| 11 | - if (this.name + '1222222') { | ||
| 12 | - Text(`@${this.name}` + '1222222') | 12 | + if (this.name) { |
| 13 | + Text(`@${this.name}`) | ||
| 13 | .fontColor(Color.White) | 14 | .fontColor(Color.White) |
| 14 | .fontSize(14) | 15 | .fontSize(14) |
| 15 | .fontWeight(600) | 16 | .fontWeight(600) |
| 16 | .lineHeight(17) | 17 | .lineHeight(17) |
| 18 | + .margin({ top: 8 }) | ||
| 17 | } | 19 | } |
| 18 | 20 | ||
| 19 | if (this.title) { | 21 | if (this.title) { |
| @@ -36,8 +38,8 @@ export struct DetailDialog { | @@ -36,8 +38,8 @@ export struct DetailDialog { | ||
| 36 | Image($r('app.media.ic_close')) | 38 | Image($r('app.media.ic_close')) |
| 37 | .height(24).margin({ top: 20 }).onClick(() => { | 39 | .height(24).margin({ top: 20 }).onClick(() => { |
| 38 | this.controller.close() | 40 | this.controller.close() |
| 39 | - if (this.isOpen) { | ||
| 40 | - this.isOpen = !this.isOpen | 41 | + if (this.isOpenDetail) { |
| 42 | + this.isOpenDetail = !this.isOpenDetail | ||
| 41 | } | 43 | } |
| 42 | }) | 44 | }) |
| 43 | }.width('100%').justifyContent(FlexAlign.Center) | 45 | }.width('100%').justifyContent(FlexAlign.Center) |
| 1 | +import { WDPlayerController } from 'wdPlayer/Index'; | ||
| 2 | +import { PlayerTitleView } from './PlayerTitleView' | ||
| 3 | +import { PlayerProgressView } from './PlayerProgressView' | ||
| 4 | +import { PlayerCommentView } from './PlayerCommentView' | ||
| 5 | +import { PlayerTimeSeekView } from './PlayerTimeSeekView' | ||
| 6 | + | ||
| 7 | +@Component | ||
| 8 | +export struct PlayerBottomView { | ||
| 9 | + private playerController?: WDPlayerController; | ||
| 10 | + @Consume showComment?: boolean | ||
| 11 | + @Consume isOpenDetail?: boolean | ||
| 12 | + @Consume isDragging?: boolean | ||
| 13 | + | ||
| 14 | + build() { | ||
| 15 | + Column() { | ||
| 16 | + PlayerTitleView() | ||
| 17 | + PlayerProgressView({ playerController: this.playerController }) | ||
| 18 | + if (this.showComment) { | ||
| 19 | + PlayerCommentView() | ||
| 20 | + } | ||
| 21 | + } | ||
| 22 | + .alignItems(HorizontalAlign.Start) | ||
| 23 | + .position({ x: 0, y: '100%' }) | ||
| 24 | + .markAnchor({ y: '100%' }) | ||
| 25 | + } | ||
| 26 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | + | ||
| 3 | +@Component | ||
| 4 | +export struct PlayerCommentView { | ||
| 5 | + @Consume showComment?: boolean | ||
| 6 | + @Consume isOpenDetail?: boolean | ||
| 7 | + @State comment: string = ''; | ||
| 8 | + | ||
| 9 | + build() { | ||
| 10 | + Row() { | ||
| 11 | + Image($r('app.media.ic_back')) | ||
| 12 | + .width(24) | ||
| 13 | + .height(24) | ||
| 14 | + .aspectRatio(1) | ||
| 15 | + .onClick(() => { | ||
| 16 | + router.back(); | ||
| 17 | + }) | ||
| 18 | + | ||
| 19 | + TextInput({ placeholder: '说两句...', text: this.comment }) | ||
| 20 | + .placeholderColor(Color.White) | ||
| 21 | + .placeholderFont({ size: 14 }) | ||
| 22 | + .fontColor(Color.White) | ||
| 23 | + .fontSize(14) | ||
| 24 | + .maxLines(1) | ||
| 25 | + .layoutWeight(1) | ||
| 26 | + .backgroundColor('#1a1a1a') | ||
| 27 | + .borderRadius(2) | ||
| 28 | + .height(30) | ||
| 29 | + .margin({ left: 12 }) | ||
| 30 | + } | ||
| 31 | + .backgroundColor(Color.Black) | ||
| 32 | + .alignItems(VerticalAlign.Center) | ||
| 33 | + .padding({ left: 16, right: 16, top: 11, bottom: 11 }) | ||
| 34 | + .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible) | ||
| 35 | + } | ||
| 36 | +} |
| @@ -14,51 +14,6 @@ export struct PlayerDetailContainer { | @@ -14,51 +14,6 @@ export struct PlayerDetailContainer { | ||
| 14 | console.log(`PlayerDetailContainer aboutToAppear`) | 14 | console.log(`PlayerDetailContainer aboutToAppear`) |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | - buildVideoHeight() { | ||
| 18 | - let videoHeight: string | number = 200 | ||
| 19 | - if (this.videoLandScape == 2) { | ||
| 20 | - videoHeight = '100%' | ||
| 21 | - } else { | ||
| 22 | - videoHeight = 200 | ||
| 23 | - } | ||
| 24 | - console.log(`PlayerDetailContainer buildVideoHeight:${videoHeight} `) | ||
| 25 | - return videoHeight | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - buildVideoTo() { | ||
| 29 | - let videoTop: number; | ||
| 30 | - if (this.videoLandScape == 2) { | ||
| 31 | - videoTop = 0 | ||
| 32 | - } else { | ||
| 33 | - videoTop = 174 | ||
| 34 | - } | ||
| 35 | - console.log(`PlayerDetailContainer videoTop:${videoTop} `) | ||
| 36 | - return videoTop | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - buildVideoBottom() { | ||
| 40 | - let videoBottom: number; | ||
| 41 | - if (this.videoLandScape == 2) { | ||
| 42 | - videoBottom = 0 | ||
| 43 | - } else { | ||
| 44 | - videoBottom = 320 | ||
| 45 | - } | ||
| 46 | - console.log(`PlayerDetailContainer buildVideoBottom:${videoBottom} `) | ||
| 47 | - return videoBottom | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - isShowBottomView() { | ||
| 51 | - console.log(`PlayerDetailContainer videoLandScape:${this.videoLandScape} `) | ||
| 52 | - let isShowBottom: boolean = false | ||
| 53 | - if (this.isFullScreen) { | ||
| 54 | - isShowBottom = false | ||
| 55 | - } else { | ||
| 56 | - isShowBottom = true | ||
| 57 | - } | ||
| 58 | - console.log(`PlayerDetailContainer isShowBottom:${isShowBottom} `) | ||
| 59 | - return isShowBottom | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | build() { | 17 | build() { |
| 63 | Stack() { | 18 | Stack() { |
| 64 | this.playerView() | 19 | this.playerView() |
| 1 | +import { ContentDetailDTO } from 'wdBean/Index'; | ||
| 2 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 3 | +import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index'; | ||
| 4 | + | ||
| 5 | +@Component | ||
| 6 | +export struct PlayerProgressView { | ||
| 7 | + private playerController?: WDPlayerController; | ||
| 8 | + @Consume contentDetailData: ContentDetailDTO | ||
| 9 | + @Consume progressVal: number; | ||
| 10 | + @Consume isOpenDetail: boolean | ||
| 11 | + @Consume isDragging: boolean | ||
| 12 | + @State status: number = PlayerConstants.STATUS_START; | ||
| 13 | + | ||
| 14 | + aboutToAppear() { | ||
| 15 | + if (this.playerController) { | ||
| 16 | + this.playerController.onStatusChange = (status: number) => { | ||
| 17 | + this.status = status | ||
| 18 | + console.log('=============', this.status) | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + build() { | ||
| 24 | + Column() { | ||
| 25 | + Text() { | ||
| 26 | + Span(DateTimeUtils.secondToTime(Math.floor(this.progressVal / 100 * this.contentDetailData.videoInfo[0].videoDuration))) | ||
| 27 | + Span(' / ') | ||
| 28 | + Span(DateTimeUtils.secondToTime(this.contentDetailData.videoInfo[0].videoDuration || 0)) | ||
| 29 | + } | ||
| 30 | + .fontSize(24) | ||
| 31 | + .fontColor(Color.White) | ||
| 32 | + .fontWeight(600) | ||
| 33 | + .margin({ bottom: 30 }) | ||
| 34 | + .visibility(this.isDragging ? Visibility.Visible : Visibility.None) | ||
| 35 | + | ||
| 36 | + Slider({ | ||
| 37 | + value: this.progressVal, | ||
| 38 | + step: 0.01, | ||
| 39 | + // style: SliderStyle.OutSet | ||
| 40 | + }) | ||
| 41 | + .blockColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? $r('app.color.play_block_color') : Color.Transparent) | ||
| 42 | + .trackColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? $r('app.color.pause_track_color') : $r('app.color.play_track_color')) | ||
| 43 | + .selectedColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? $r('app.color.pause_selected_color') : $r('app.color.play_selected_color')) | ||
| 44 | + .trackThickness(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? 4 : 1) | ||
| 45 | + .blockStyle({ | ||
| 46 | + type: this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? SliderBlockType.IMAGE : SliderBlockType.DEFAULT, | ||
| 47 | + image: $r('app.media.ic_player_block') | ||
| 48 | + }) | ||
| 49 | + .blockSize({ width: 18, height: 12 }) | ||
| 50 | + .width('100%') | ||
| 51 | + .height(19) | ||
| 52 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 53 | + this.progressVal = value | ||
| 54 | + if (mode === SliderChangeMode.Moving) { | ||
| 55 | + this.isDragging = true | ||
| 56 | + } | ||
| 57 | + if (mode === SliderChangeMode.End) { | ||
| 58 | + this.isDragging = false | ||
| 59 | + } | ||
| 60 | + this.playerController?.setSeekTime(value, mode); | ||
| 61 | + console.log('slider onChange:', value, mode) | ||
| 62 | + | ||
| 63 | + }) | ||
| 64 | + }.visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible) | ||
| 65 | + } | ||
| 66 | +} |
| 1 | +import { ContentDetailDTO, InteractDataDTO, Params, RmhInfoDTO, UserInfoDTO } from 'wdBean/Index'; | ||
| 2 | +import { | ||
| 3 | + batchLikeAndCollectParams, | ||
| 4 | + batchLikeAndCollectResult, | ||
| 5 | + ContentDetailRequest, | ||
| 6 | + contentListParams, | ||
| 7 | + postExecuteCollectRecordParams, | ||
| 8 | + postExecuteLikeParams, | ||
| 9 | + postInteractAccentionOperateParams | ||
| 10 | +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; | ||
| 11 | +import { SPHelper, ToastUtils } from 'wdKit'; | ||
| 12 | +import { HttpUrlUtils } from 'wdNetwork/Index'; | ||
| 13 | +import { WDPlayerController } from 'wdPlayer/Index'; | ||
| 14 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 15 | +import { SpConstants } from 'wdConstant/Index' | ||
| 16 | + | ||
| 17 | +export interface OperationItem { | ||
| 18 | + icon: Resource; | ||
| 19 | + icon_check?: Resource; | ||
| 20 | + | ||
| 21 | + // icon_selected: Resource; | ||
| 22 | + text: string | Resource; | ||
| 23 | + num?: number; // 个数 | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +const TAG = 'PlayerRightView'; | ||
| 27 | + | ||
| 28 | +@Component | ||
| 29 | +export struct PlayerRightView { | ||
| 30 | + private playerController?: WDPlayerController; | ||
| 31 | + @Consume interactData: InteractDataDTO | ||
| 32 | + @Consume contentDetailData: ContentDetailDTO | ||
| 33 | + @Consume newsStatusOfUser: batchLikeAndCollectResult | ||
| 34 | + @Consume followStatus: string | ||
| 35 | + @Consume isOpenDetail: boolean | ||
| 36 | + @Consume isDragging: boolean | ||
| 37 | + @State operationList: OperationItem[] = [ | ||
| 38 | + { | ||
| 39 | + icon: $r('app.media.ic_like_uncheck'), | ||
| 40 | + icon_check: $r('app.media.ic_like_check'), | ||
| 41 | + text: "赞", | ||
| 42 | + // num: 6622 | ||
| 43 | + }, | ||
| 44 | + { | ||
| 45 | + icon: $r('app.media.ic_collect_uncheck'), | ||
| 46 | + icon_check: $r('app.media.ic_collect_check'), | ||
| 47 | + text: "收藏", | ||
| 48 | + // num: 662, | ||
| 49 | + }, | ||
| 50 | + { | ||
| 51 | + icon: $r('app.media.ic_comment'), | ||
| 52 | + text: "抢首评", | ||
| 53 | + // num: 500, | ||
| 54 | + }, | ||
| 55 | + { | ||
| 56 | + icon: $r('app.media.ic_share'), | ||
| 57 | + text: "分享" | ||
| 58 | + } | ||
| 59 | + ] | ||
| 60 | + | ||
| 61 | + aboutToAppear() { | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + /** | ||
| 65 | + * 点赞、取消点赞 | ||
| 66 | + */ | ||
| 67 | + async toggleLikeStatus() { | ||
| 68 | + // 未登录,跳转登录 | ||
| 69 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') | ||
| 70 | + if (!user_id) { | ||
| 71 | + this.playerController?.pause() | ||
| 72 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 73 | + return | ||
| 74 | + } | ||
| 75 | + const params: postExecuteLikeParams = { | ||
| 76 | + status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', | ||
| 77 | + contentId: this.contentDetailData?.newsId + '', | ||
| 78 | + contentType: this.contentDetailData?.newsType + '', | ||
| 79 | + } | ||
| 80 | + ContentDetailRequest.postExecuteLike(params).then(res => { | ||
| 81 | + | ||
| 82 | + if (this.newsStatusOfUser) { | ||
| 83 | + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1' | ||
| 84 | + if (this.newsStatusOfUser.likeStatus === '1') { | ||
| 85 | + this.interactData.likeNum = Number(this.interactData.likeNum) + 1 | ||
| 86 | + } else { | ||
| 87 | + this.interactData.likeNum = Number(this.interactData.likeNum) - 1 | ||
| 88 | + } | ||
| 89 | + console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) | ||
| 90 | + // this.queryContentInteractCount() | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + }) | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + /** | ||
| 97 | + * 收藏、取消收藏 | ||
| 98 | + */ | ||
| 99 | + async toggleCollectStatus() { | ||
| 100 | + // 未登录,跳转登录 | ||
| 101 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') | ||
| 102 | + if (!user_id) { | ||
| 103 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 104 | + return | ||
| 105 | + } | ||
| 106 | + const params: postExecuteCollectRecordParams = { | ||
| 107 | + status: this.newsStatusOfUser?.collectStatus === 1 ? '0' : '1', | ||
| 108 | + contentList: [{ | ||
| 109 | + contentId: this.contentDetailData?.newsId + '', | ||
| 110 | + contentType: this.contentDetailData?.newsType + '', | ||
| 111 | + }], | ||
| 112 | + | ||
| 113 | + } | ||
| 114 | + ContentDetailRequest.postExecuteCollectRecord(params).then(res => { | ||
| 115 | + if (this.newsStatusOfUser) { | ||
| 116 | + this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | ||
| 117 | + // this.queryContentInteractCount() | ||
| 118 | + if (this.newsStatusOfUser.collectStatus === 1) { | ||
| 119 | + this.interactData.collectNum = Number(this.interactData.collectNum) + 1 | ||
| 120 | + } else { | ||
| 121 | + this.interactData.collectNum = Number(this.interactData.collectNum) - 1 | ||
| 122 | + } | ||
| 123 | + console.log('收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) | ||
| 124 | + } | ||
| 125 | + }) | ||
| 126 | + | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + /** | ||
| 130 | + * 查询点赞、收藏数量 | ||
| 131 | + */ | ||
| 132 | + queryContentInteractCount() { | ||
| 133 | + const params: contentListParams = { | ||
| 134 | + contentList: [{ | ||
| 135 | + contentId: this.contentDetailData?.newsId + '', | ||
| 136 | + contentType: this.contentDetailData?.newsType, | ||
| 137 | + }] | ||
| 138 | + } | ||
| 139 | + ContentDetailRequest.getContentInteract(params).then(res => { | ||
| 140 | + if (res.data && this.interactData) { | ||
| 141 | + this.interactData.likeNum = res.data[0]?.likeNum | ||
| 142 | + this.interactData.collectNum = res.data[0]?.collectNum | ||
| 143 | + this.interactData.commentNum = res.data[0]?.commentNum | ||
| 144 | + } | ||
| 145 | + console.log('获取互动点赞等数据===', JSON.stringify(res)) | ||
| 146 | + }) | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + getImgUrl() { | ||
| 150 | + return this.contentDetailData?.rmhInfo?.rmhHeadUrl || this.contentDetailData?.userInfo?.userHeadUrl | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + /** | ||
| 154 | + * 关注号主 | ||
| 155 | + */ | ||
| 156 | + async handleAccention() { | ||
| 157 | + // 未登录,跳转登录 | ||
| 158 | + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') | ||
| 159 | + if (!user_id) { | ||
| 160 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 161 | + return | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + const params2: postInteractAccentionOperateParams = { | ||
| 165 | + attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) | ||
| 166 | + attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 167 | + attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id | ||
| 168 | + // userType: 1, | ||
| 169 | + // userId: '1', | ||
| 170 | + status: 1, | ||
| 171 | + } | ||
| 172 | + ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { | ||
| 173 | + console.log('关注号主==', JSON.stringify(res.data)) | ||
| 174 | + if (this.followStatus == '1') { | ||
| 175 | + this.followStatus = '0' | ||
| 176 | + } else { | ||
| 177 | + this.followStatus = '1' | ||
| 178 | + } | ||
| 179 | + }) | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + @Builder | ||
| 183 | + buildUserComp() { | ||
| 184 | + Column() { | ||
| 185 | + if (this.getImgUrl()) { | ||
| 186 | + RelativeContainer() { | ||
| 187 | + Image(this.getImgUrl()) | ||
| 188 | + .width('100%') | ||
| 189 | + .borderRadius(24) | ||
| 190 | + .aspectRatio(1) | ||
| 191 | + .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | ||
| 192 | + .alignRules({ | ||
| 193 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 194 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 195 | + }) | ||
| 196 | + .id("row1") | ||
| 197 | + .onClick(() => { | ||
| 198 | + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | ||
| 199 | + // 号主页 | ||
| 200 | + const params: Params = { | ||
| 201 | + creatorId: this.contentDetailData.rmhInfo.rmhId, | ||
| 202 | + pageID: '' | ||
| 203 | + } | ||
| 204 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + }) | ||
| 208 | + if (this.followStatus == '0') { | ||
| 209 | + Image($r('app.media.ic_add')) | ||
| 210 | + .width(24) | ||
| 211 | + .borderRadius(12) | ||
| 212 | + .alignRules({ | ||
| 213 | + left: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 214 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 215 | + }) | ||
| 216 | + .margin({ left: -12 }) | ||
| 217 | + .id("row2") | ||
| 218 | + .onClick(() => { | ||
| 219 | + // 关注 | ||
| 220 | + this.handleAccention() | ||
| 221 | + }) | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + }.height(60) | ||
| 225 | + } | ||
| 226 | + }.margin({ bottom: 18 }) | ||
| 227 | + } | ||
| 228 | + | ||
| 229 | + @Builder | ||
| 230 | + buildOperationItem(item: OperationItem, index: number) { | ||
| 231 | + Column() { | ||
| 232 | + if (item.text === '赞') { | ||
| 233 | + Image(this.newsStatusOfUser?.likeStatus == '1' ? item.icon_check : item.icon) | ||
| 234 | + .width(32) | ||
| 235 | + .aspectRatio(1) | ||
| 236 | + .onClick(() => { | ||
| 237 | + this.toggleLikeStatus() | ||
| 238 | + }) | ||
| 239 | + Text(this.interactData?.likeNum ? (this.interactData.likeNum + '') : item.text) | ||
| 240 | + .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | ||
| 241 | + .fontWeight(500) | ||
| 242 | + .textAlign(TextAlign.Center) | ||
| 243 | + .fontSize(13) | ||
| 244 | + .fontColor('#FFFFFF') | ||
| 245 | + .maxLines(1) | ||
| 246 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 247 | + } else if (item.text === '收藏') { | ||
| 248 | + Image(this.newsStatusOfUser?.collectStatus == 1 ? item.icon_check : item.icon) | ||
| 249 | + .width(32) | ||
| 250 | + .aspectRatio(1) | ||
| 251 | + .onClick(() => { | ||
| 252 | + this.toggleCollectStatus() | ||
| 253 | + }) | ||
| 254 | + Text(this.interactData?.collectNum ? (this.interactData.collectNum + '') : item.text) | ||
| 255 | + .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | ||
| 256 | + .fontWeight(500) | ||
| 257 | + .textAlign(TextAlign.Center) | ||
| 258 | + .fontSize(13) | ||
| 259 | + .fontColor('#FFFFFF') | ||
| 260 | + .maxLines(1) | ||
| 261 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 262 | + } else if (item.text === '抢首评') { | ||
| 263 | + Image(item.icon) | ||
| 264 | + .width(32) | ||
| 265 | + .aspectRatio(1) | ||
| 266 | + .onClick((event: ClickEvent) => { | ||
| 267 | + ToastUtils.showToast('评论为公共方法,待开发', 1000); | ||
| 268 | + }) | ||
| 269 | + Text(this.interactData?.commentNum ? (this.interactData.commentNum + '') : item.text) | ||
| 270 | + .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | ||
| 271 | + .fontWeight(500) | ||
| 272 | + .textAlign(TextAlign.Center) | ||
| 273 | + .fontSize(13) | ||
| 274 | + .fontColor('#FFFFFF') | ||
| 275 | + .maxLines(1) | ||
| 276 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 277 | + } else { | ||
| 278 | + Image(item.icon) | ||
| 279 | + .width(32) | ||
| 280 | + .aspectRatio(1) | ||
| 281 | + .onClick((event: ClickEvent) => { | ||
| 282 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); | ||
| 283 | + }) | ||
| 284 | + Text(item.text) | ||
| 285 | + .width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown) | ||
| 286 | + .fontWeight(500) | ||
| 287 | + .textAlign(TextAlign.Center) | ||
| 288 | + .fontSize(13) | ||
| 289 | + .fontColor('#FFFFFF') | ||
| 290 | + .maxLines(1) | ||
| 291 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 292 | + } | ||
| 293 | + | ||
| 294 | + } | ||
| 295 | + // .width(48) | ||
| 296 | + .margin({ bottom: 20 }) | ||
| 297 | + .alignItems(HorizontalAlign.Center) | ||
| 298 | + .hoverEffect(HoverEffect.Scale) | ||
| 299 | + | ||
| 300 | + } | ||
| 301 | + | ||
| 302 | + build() { | ||
| 303 | + Column() { | ||
| 304 | + this.buildUserComp() | ||
| 305 | + ForEach(this.operationList, (item: OperationItem, index: number) => { | ||
| 306 | + this.buildOperationItem(item, index) | ||
| 307 | + }, (item: OperationItem, index: number) => JSON.stringify(item)) | ||
| 308 | + } | ||
| 309 | + .width(48) | ||
| 310 | + .position({ x: '100%', y: '100%' }) | ||
| 311 | + .markAnchor({ x: '100%', y: '100%' }) | ||
| 312 | + .padding({ bottom: 72 }) | ||
| 313 | + .visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible) | ||
| 314 | + } | ||
| 315 | +} |
| @@ -49,8 +49,14 @@ export struct PlayerTitleComment { | @@ -49,8 +49,14 @@ export struct PlayerTitleComment { | ||
| 49 | 49 | ||
| 50 | getName() { | 50 | getName() { |
| 51 | // console.error(this.contentDetailData?.newsSourceName + '===========' + this.contentDetailData?.editorName) | 51 | // console.error(this.contentDetailData?.newsSourceName + '===========' + this.contentDetailData?.editorName) |
| 52 | + // this.contentDetailData?.newsSourceName || authTitle | ||
| 53 | + return this.contentDetailData?.rmhInfo?.rmhName || '' | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + getIcon() { | ||
| 57 | + // console.error(this.contentDetailData?.newsSourceName + '===========' + this.contentDetailData?.editorName) | ||
| 52 | // this.contentDetailData?.newsSourceName || | 58 | // this.contentDetailData?.newsSourceName || |
| 53 | - return this.contentDetailData?.editorName || '' | 59 | + return this.contentDetailData?.rmhInfo?.authIcon || '' |
| 54 | } | 60 | } |
| 55 | 61 | ||
| 56 | getTitle() { | 62 | getTitle() { |
| @@ -99,11 +105,16 @@ export struct PlayerTitleComment { | @@ -99,11 +105,16 @@ export struct PlayerTitleComment { | ||
| 99 | Row() { | 105 | Row() { |
| 100 | Column() { | 106 | Column() { |
| 101 | if (this.getName()) { | 107 | if (this.getName()) { |
| 102 | - Text("@" + this.getName()) | ||
| 103 | - .fontColor(Color.White) | ||
| 104 | - .fontSize(15) | ||
| 105 | - .maxLines(1) | ||
| 106 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | 108 | + Row() { |
| 109 | + Text("@" + this.getName()) | ||
| 110 | + .fontColor(Color.White) | ||
| 111 | + .fontSize(15) | ||
| 112 | + .maxLines(1) | ||
| 113 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 114 | + if (this.getIcon()) { | ||
| 115 | + Image(this.getIcon()).height(10).margin({ left: 4 }) | ||
| 116 | + } | ||
| 117 | + } | ||
| 107 | } | 118 | } |
| 108 | if (this.getTitle()) { | 119 | if (this.getTitle()) { |
| 109 | Text(this.getTitle()) | 120 | Text(this.getTitle()) |
| 1 | +import measure from '@ohos.measure' | ||
| 2 | +import { ContentDetailDTO } from 'wdBean/Index' | ||
| 3 | +import { DetailDialog } from './DetailDialog' | ||
| 4 | +import { componentUtils } from '@kit.ArkUI' | ||
| 5 | + | ||
| 6 | +@Preview | ||
| 7 | +@Component | ||
| 8 | +export struct PlayerTitleView { | ||
| 9 | + @Consume contentDetailData: ContentDetailDTO | ||
| 10 | + @Consume windowWidth: number | ||
| 11 | + @Consume isOpenDetail: boolean | ||
| 12 | + @Consume isDragging: boolean | ||
| 13 | + @State titleHeight: number = 0 | ||
| 14 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 15 | + builder: DetailDialog({ | ||
| 16 | + name: this.getName(), | ||
| 17 | + title: this.getTitle(), | ||
| 18 | + summary: this.getSummary(), | ||
| 19 | + isOpenDetail: this.isOpenDetail | ||
| 20 | + | ||
| 21 | + }), | ||
| 22 | + autoCancel: false, | ||
| 23 | + customStyle: true, | ||
| 24 | + alignment: DialogAlignment.Bottom | ||
| 25 | + }) | ||
| 26 | + | ||
| 27 | + getName(): string { | ||
| 28 | + // authTitle | ||
| 29 | + return this.contentDetailData?.rmhInfo?.rmhName || '' | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + getIcon(): string { | ||
| 33 | + return this.contentDetailData?.rmhInfo?.authIcon || '' | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + getTitle(): string { | ||
| 37 | + return this.contentDetailData?.newsTitle || '' | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + getSummary(): string { | ||
| 41 | + return this.contentDetailData?.newIntroduction || '' | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + aboutToAppear(): void { | ||
| 45 | + const info = measure.measureTextSize({ | ||
| 46 | + textContent: this.getTitle(), | ||
| 47 | + fontSize: 15, | ||
| 48 | + fontWeight: 400, | ||
| 49 | + lineHeight: 20, | ||
| 50 | + constraintWidth: this.windowWidth - 100 - 16 - 22 + 'px', | ||
| 51 | + | ||
| 52 | + }) | ||
| 53 | + this.titleHeight = info?.height as number || 0 | ||
| 54 | + console.log('titleHeight:', this.titleHeight,) | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + build() { | ||
| 58 | + Column() { | ||
| 59 | + if (this.getName()) { | ||
| 60 | + Row() { | ||
| 61 | + Text("@" + this.getName()) | ||
| 62 | + .fontColor(Color.White) | ||
| 63 | + .fontSize(17) | ||
| 64 | + .maxLines(1) | ||
| 65 | + .lineHeight(25) | ||
| 66 | + .fontWeight(600) | ||
| 67 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 68 | + | ||
| 69 | + if (this.getIcon()) { | ||
| 70 | + Image(this.getIcon()).height(10).margin({ left: 4 }) | ||
| 71 | + } | ||
| 72 | + }.margin({ bottom: 8 }) | ||
| 73 | + | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + Text(this.getTitle()) | ||
| 77 | + .fontColor(Color.White) | ||
| 78 | + .fontSize(15) | ||
| 79 | + .maxLines(3) | ||
| 80 | + .lineHeight(20) | ||
| 81 | + .fontWeight(400) | ||
| 82 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 83 | + .margin({ bottom: 8 }) | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 标题大于三行或存在简介显示查看详情按钮 | ||
| 87 | + */ | ||
| 88 | + if (this.titleHeight > 200 || this.getSummary()) { | ||
| 89 | + Text('查看详情 > ') | ||
| 90 | + .padding({ left: 6, right: 6, top: 4, bottom: 4 }) | ||
| 91 | + .borderRadius(2) | ||
| 92 | + .backgroundColor('#99636363') | ||
| 93 | + .fontColor(Color.White) | ||
| 94 | + .fontSize(12) | ||
| 95 | + .lineHeight(14) | ||
| 96 | + .fontWeight(400) | ||
| 97 | + .margin({ bottom: 8 }) | ||
| 98 | + .onClick(() => { | ||
| 99 | + this.isOpenDetail = true | ||
| 100 | + this.dialogController?.open() | ||
| 101 | + }) | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + } | ||
| 105 | + .width(this.windowWidth - 100 + 'px') | ||
| 106 | + .padding({ left: 16, right: 22 }) | ||
| 107 | + .alignItems(HorizontalAlign.Start) | ||
| 108 | + .visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible) | ||
| 109 | + } | ||
| 110 | +} |
| @@ -55,6 +55,7 @@ struct LoginPage { | @@ -55,6 +55,7 @@ struct LoginPage { | ||
| 55 | alignment:DialogAlignment.Center | 55 | alignment:DialogAlignment.Center |
| 56 | }) | 56 | }) |
| 57 | loginViewModel = new LoginViewModel() | 57 | loginViewModel = new LoginViewModel() |
| 58 | + @State isProtocol:boolean=false | ||
| 58 | 59 | ||
| 59 | onCodeSend() { | 60 | onCodeSend() { |
| 60 | Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "") | 61 | Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "") |
| @@ -72,108 +73,119 @@ struct LoginPage { | @@ -72,108 +73,119 @@ struct LoginPage { | ||
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | build() { | 75 | build() { |
| 75 | - RelativeContainer() { | ||
| 76 | - | ||
| 77 | - //注册内容 | ||
| 78 | - Column() { | ||
| 79 | - Image($r("app.media.login_logo")) | ||
| 80 | - .width(120) | ||
| 81 | - .height(66) | ||
| 82 | - .margin({ top: 78 }) | ||
| 83 | - .align(Alignment.Center) | ||
| 84 | - | ||
| 85 | - if (this.checkCodePage) { | ||
| 86 | - LoginInputComponent({ | ||
| 87 | - phoneContent: $phoneContent, | ||
| 88 | - codeContent: $codeContent, | ||
| 89 | - isSubmit: $isSubmit, | ||
| 90 | - isCodeSend: $isCodeSend | ||
| 91 | - }) | ||
| 92 | - } else { | ||
| 93 | - this.addPassword() | ||
| 94 | - } | ||
| 95 | - | 76 | + Stack() { |
| 77 | + RelativeContainer() { | ||
| 96 | 78 | ||
| 97 | - Row() { | ||
| 98 | - Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected')) | ||
| 99 | - .width(15) | ||
| 100 | - .height(15) | ||
| 101 | - .onClick(() => { | ||
| 102 | - this.protocolState = !this.protocolState | 79 | + //注册内容 |
| 80 | + Column() { | ||
| 81 | + Image($r("app.media.login_logo")) | ||
| 82 | + .width(120) | ||
| 83 | + .height(66) | ||
| 84 | + .margin({ top: 78 }) | ||
| 85 | + .align(Alignment.Center) | ||
| 86 | + | ||
| 87 | + if (this.checkCodePage) { | ||
| 88 | + LoginInputComponent({ | ||
| 89 | + phoneContent: $phoneContent, | ||
| 90 | + codeContent: $codeContent, | ||
| 91 | + isSubmit: $isSubmit, | ||
| 92 | + isCodeSend: $isCodeSend | ||
| 103 | }) | 93 | }) |
| 94 | + } else { | ||
| 95 | + this.addPassword() | ||
| 96 | + } | ||
| 104 | 97 | ||
| 105 | - Text() { | ||
| 106 | - Span("我已阅读并同意").fontColor("#999999").fontSize(12) | ||
| 107 | - Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => { | ||
| 108 | - let bean={contentID:"1",pageID:""} as Params | ||
| 109 | - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) | ||
| 110 | - }) | ||
| 111 | - Span("及").fontColor("#999999").fontSize(12) | ||
| 112 | - Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => { | ||
| 113 | - let bean={contentID:"2",pageID:""} as Params | ||
| 114 | - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) | ||
| 115 | - }) | 98 | + |
| 99 | + Row() { | ||
| 100 | + Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected')) | ||
| 101 | + .width(15) | ||
| 102 | + .height(15) | ||
| 103 | + .onClick(() => { | ||
| 104 | + this.protocolState = !this.protocolState | ||
| 105 | + }) | ||
| 106 | + | ||
| 107 | + Text() { | ||
| 108 | + Span("我已阅读并同意").fontColor("#999999").fontSize(12) | ||
| 109 | + Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => { | ||
| 110 | + let bean = { contentID: "1", pageID: "" } as Params | ||
| 111 | + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | ||
| 112 | + }) | ||
| 113 | + Span("及").fontColor("#999999").fontSize(12) | ||
| 114 | + Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => { | ||
| 115 | + let bean = { contentID: "2", pageID: "" } as Params | ||
| 116 | + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | ||
| 117 | + }) | ||
| 118 | + } | ||
| 119 | + }.margin({ top: 48 }).alignItems(VerticalAlign.Center) | ||
| 120 | + | ||
| 121 | + Row() { | ||
| 122 | + Text("登录") | ||
| 123 | + .borderRadius(4) | ||
| 124 | + .fontColor(this.isSubmit ? "#FFFFFFFF" : "#66FFFFFF") | ||
| 125 | + .fontSize(18) | ||
| 126 | + .fontWeight(FontWeight.Medium) | ||
| 127 | + .margin({ top: 20 }) | ||
| 128 | + .height(44) | ||
| 129 | + .textAlign(TextAlign.Center) | ||
| 130 | + .width("100%") | ||
| 131 | + .backgroundColor(this.isSubmit ? "#FFED2800" : "#99ED2800") | ||
| 132 | + .onClick(() => { | ||
| 133 | + if (!this.isSubmit) { | ||
| 134 | + return | ||
| 135 | + } | ||
| 136 | + this.loginSubmit() | ||
| 137 | + | ||
| 138 | + }) | ||
| 139 | + }.padding({ left: 25, right: 25 }).width('100%') | ||
| 140 | + | ||
| 141 | + | ||
| 142 | + if (!this.checkCodePage) { | ||
| 143 | + Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) | ||
| 144 | + .onClick(() => { | ||
| 145 | + // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) | ||
| 146 | + let pageType = { 'pageType': 0 } as Record<string, number>; | ||
| 147 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 148 | + }) | ||
| 116 | } | 149 | } |
| 117 | - }.margin({ top: 48 }).alignItems(VerticalAlign.Center) | ||
| 118 | 150 | ||
| 119 | - Row() { | ||
| 120 | - Text("登录") | ||
| 121 | - .borderRadius(4) | ||
| 122 | - .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF") | ||
| 123 | - .fontSize(18) | ||
| 124 | - .fontWeight(FontWeight.Medium) | ||
| 125 | - .margin({ top: 20 }) | ||
| 126 | - .height(44) | ||
| 127 | - .textAlign(TextAlign.Center) | ||
| 128 | - .width("100%") | ||
| 129 | - .backgroundColor(this.isSubmit?"#FFED2800":"#99ED2800") | ||
| 130 | - .onClick(() => { | ||
| 131 | - if(!this.isSubmit){ | ||
| 132 | - return | ||
| 133 | - } | ||
| 134 | - this.loginSubmit() | 151 | + }.width("100%") |
| 152 | + .alignRules({ | ||
| 153 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 154 | + }).id("register") | ||
| 135 | 155 | ||
| 136 | - }) | ||
| 137 | - }.padding({ left: 25, right: 25 }).width('100%') | 156 | + //其他登录方式 |
| 157 | + Column() { | ||
| 158 | + this.addOtherLogin() | ||
| 159 | + }.width('100%') | ||
| 160 | + .alignRules({ | ||
| 161 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 162 | + }).id("other") | ||
| 138 | 163 | ||
| 164 | + //关闭按钮 | ||
| 165 | + Image($r('app.media.login_closed')) | ||
| 166 | + .width(24) | ||
| 167 | + .height(24) | ||
| 168 | + .margin({ top: 10, right: 15 }) | ||
| 169 | + .alignRules({ | ||
| 170 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 171 | + right: { anchor: "__container__", align: HorizontalAlign.End } | ||
| 172 | + }) | ||
| 173 | + .onClick(() => { | ||
| 174 | + router.back() | ||
| 175 | + }) | ||
| 176 | + .id('id_close') | ||
| 139 | 177 | ||
| 140 | - if (!this.checkCodePage) { | ||
| 141 | - Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) | ||
| 142 | - .onClick(() => { | ||
| 143 | - // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) | ||
| 144 | - let pageType = {'pageType': 0} as Record<string, number>; | ||
| 145 | - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 146 | - }) | ||
| 147 | - } | 178 | + }.width('100%').height('100%') |
| 148 | 179 | ||
| 149 | - }.width("100%") | ||
| 150 | - .alignRules({ | ||
| 151 | - top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 152 | - }).id("register") | 180 | + ProtocolComponent({ |
| 181 | + cancelMethod: (): void => this.cancelProtocol(), | ||
| 182 | + agreeMethod: (): void => this.agreeProtocol() | ||
| 183 | + }) | ||
| 184 | + .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) | ||
| 153 | 185 | ||
| 154 | - //其他登录方式 | ||
| 155 | - Column() { | ||
| 156 | - this.addOtherLogin() | ||
| 157 | - }.width('100%') | ||
| 158 | - .alignRules({ | ||
| 159 | - bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 160 | - }).id("other") | ||
| 161 | - | ||
| 162 | - //关闭按钮 | ||
| 163 | - Image($r('app.media.login_closed')) | ||
| 164 | - .width(24) | ||
| 165 | - .height(24) | ||
| 166 | - .margin({ top: 10, right: 15 }) | ||
| 167 | - .alignRules({ | ||
| 168 | - top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 169 | - right: { anchor: "__container__", align: HorizontalAlign.End } | ||
| 170 | - }) | ||
| 171 | - .onClick(() => { | ||
| 172 | - router.back() | ||
| 173 | - }) | ||
| 174 | - .id('id_close') | 186 | + }.width('100%') |
| 187 | + .height('100%') | ||
| 175 | 188 | ||
| 176 | - }.width('100%').height('100%') | ||
| 177 | } | 189 | } |
| 178 | 190 | ||
| 179 | @Builder | 191 | @Builder |
| @@ -188,15 +200,15 @@ struct LoginPage { | @@ -188,15 +200,15 @@ struct LoginPage { | ||
| 188 | .type(InputType.Normal) | 200 | .type(InputType.Normal) |
| 189 | .onChange((content) => { | 201 | .onChange((content) => { |
| 190 | this.accountContent = content | 202 | this.accountContent = content |
| 191 | - this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6) | 203 | + this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6) |
| 192 | }) | 204 | }) |
| 193 | 205 | ||
| 194 | RelativeContainer() { | 206 | RelativeContainer() { |
| 195 | - if (this.passwordSwitch) { | 207 | + // if (this.passwordSwitch) { |
| 196 | this.addPasswordInputLayout() | 208 | this.addPasswordInputLayout() |
| 197 | - } else { | ||
| 198 | - this.addPasswordInputLayout() | ||
| 199 | - } | 209 | + // } else { |
| 210 | + // this.addPasswordInputLayout() | ||
| 211 | + // } | ||
| 200 | 212 | ||
| 201 | Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on')) | 213 | Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on')) |
| 202 | .onClick(() => { | 214 | .onClick(() => { |
| @@ -237,7 +249,7 @@ struct LoginPage { | @@ -237,7 +249,7 @@ struct LoginPage { | ||
| 237 | .onChange((value) => { | 249 | .onChange((value) => { |
| 238 | // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent) | 250 | // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent) |
| 239 | this.passwordContent = value | 251 | this.passwordContent = value |
| 240 | - this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6) | 252 | + this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6) |
| 241 | }) | 253 | }) |
| 242 | .id("password") | 254 | .id("password") |
| 243 | } | 255 | } |
| @@ -366,8 +378,92 @@ struct LoginPage { | @@ -366,8 +378,92 @@ struct LoginPage { | ||
| 366 | if (this.protocolState) { | 378 | if (this.protocolState) { |
| 367 | this.requestLogin() | 379 | this.requestLogin() |
| 368 | } else { | 380 | } else { |
| 369 | - this.dialogController.open() | 381 | + // this.dialogController.open() |
| 382 | + this.isProtocol=true | ||
| 370 | } | 383 | } |
| 371 | 384 | ||
| 372 | } | 385 | } |
| 386 | + | ||
| 387 | + agreeProtocol(): void { | ||
| 388 | + this.isProtocol = false | ||
| 389 | + this.protocolState = true | ||
| 390 | + this.requestLogin() | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + cancelProtocol(): void { | ||
| 394 | + this.isProtocol = false | ||
| 395 | + } | ||
| 396 | +} | ||
| 397 | + | ||
| 398 | + | ||
| 399 | +@Component | ||
| 400 | +struct ProtocolComponent { | ||
| 401 | + cancelMethod?: () => void | ||
| 402 | + agreeMethod?: () => void | ||
| 403 | + | ||
| 404 | + build() { | ||
| 405 | + Stack() { | ||
| 406 | + Column() { | ||
| 407 | + Text("温馨提示") | ||
| 408 | + .fontColor("#222222") | ||
| 409 | + .fontSize(18) | ||
| 410 | + .width("100%") | ||
| 411 | + .fontWeight(FontWeight.Bold) | ||
| 412 | + .textAlign(TextAlign.Center) | ||
| 413 | + .margin({ top: 20 }) | ||
| 414 | + Text() { | ||
| 415 | + Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666") | ||
| 416 | + Span("《用户协议》").fontSize(14).fontColor("#ED2800").onClick(() => { | ||
| 417 | + let bean = { contentID: "1", pageID: "" } as Params | ||
| 418 | + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | ||
| 419 | + }) | ||
| 420 | + Span("及").fontSize(14).fontColor("#666666") | ||
| 421 | + Span("《隐私政策》").fontSize(14).fontColor("#ED2800").onClick(() => { | ||
| 422 | + let bean = { contentID: "2", pageID: "" } as Params | ||
| 423 | + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) | ||
| 424 | + }) | ||
| 425 | + Span("后进行登录").fontSize(14).fontColor("#666666") | ||
| 426 | + }.margin({ top: 12, left: 16, right: 16 }) | ||
| 427 | + | ||
| 428 | + Divider().color("#999999").width("100%").margin({ top: 14 }).height('1vp') | ||
| 429 | + Row() { | ||
| 430 | + Text('放弃登录') | ||
| 431 | + .fontSize(16) | ||
| 432 | + .fontColor("#999999") | ||
| 433 | + .layoutWeight(1) | ||
| 434 | + .fontWeight(FontWeight.Medium) | ||
| 435 | + .textAlign(TextAlign.Center) | ||
| 436 | + .onClick(() => { | ||
| 437 | + if (this.cancelMethod) { | ||
| 438 | + this.cancelMethod() | ||
| 439 | + } | ||
| 440 | + }) | ||
| 441 | + .height('100%') | ||
| 442 | + // Divider().color("#999999").height('100%').width('0.5vp') | ||
| 443 | + Text('同意并登录') | ||
| 444 | + .fontSize(16) | ||
| 445 | + .fontColor("#ED2800") | ||
| 446 | + .layoutWeight(1) | ||
| 447 | + .fontWeight(FontWeight.Medium) | ||
| 448 | + .textAlign(TextAlign.Center) | ||
| 449 | + .border({ | ||
| 450 | + width: { left: 1 }, | ||
| 451 | + color: "#999999", | ||
| 452 | + style: { left: BorderStyle.Solid } | ||
| 453 | + | ||
| 454 | + }) | ||
| 455 | + .onClick(() => { | ||
| 456 | + if (this.agreeMethod) { | ||
| 457 | + this.agreeMethod() | ||
| 458 | + } | ||
| 459 | + }) | ||
| 460 | + .height('100%') | ||
| 461 | + }.layoutWeight(1).justifyContent(FlexAlign.Center) | ||
| 462 | + }.height(161).backgroundColor(Color.White).borderRadius(6).width('74%') | ||
| 463 | + | ||
| 464 | + }.width('100%') | ||
| 465 | + .height('100%') | ||
| 466 | + .backgroundColor('#66000000') | ||
| 467 | + | ||
| 468 | + } | ||
| 373 | } | 469 | } |
| @@ -73,13 +73,12 @@ export struct WDPlayerRenderView { | @@ -73,13 +73,12 @@ export struct WDPlayerRenderView { | ||
| 73 | Row() { | 73 | Row() { |
| 74 | // 设置为“surface“类型时XComponent组件可以和其他组件一起进行布局和渲染。 | 74 | // 设置为“surface“类型时XComponent组件可以和其他组件一起进行布局和渲染。 |
| 75 | XComponent({ | 75 | XComponent({ |
| 76 | - id: 'xComponentId', | ||
| 77 | - type: 'surface', | 76 | + id: this.insId, |
| 77 | + type: XComponentType.SURFACE, | ||
| 78 | controller: this.xComponentController | 78 | controller: this.xComponentController |
| 79 | }) | 79 | }) |
| 80 | .onLoad(async (event) => { | 80 | .onLoad(async (event) => { |
| 81 | Logger.info(TAG, 'onLoad') | 81 | Logger.info(TAG, 'onLoad') |
| 82 | - // const surfaceId = this.xComponentController.getXComponentSurfaceId() | ||
| 83 | this.xComponentController.setXComponentSurfaceSize({ | 82 | this.xComponentController.setXComponentSurfaceSize({ |
| 84 | surfaceWidth: 1920, | 83 | surfaceWidth: 1920, |
| 85 | surfaceHeight: 1080 | 84 | surfaceHeight: 1080 |
| @@ -89,13 +88,16 @@ export struct WDPlayerRenderView { | @@ -89,13 +88,16 @@ export struct WDPlayerRenderView { | ||
| 89 | this.onLoad(event) | 88 | this.onLoad(event) |
| 90 | } | 89 | } |
| 91 | }) | 90 | }) |
| 92 | - .width(this.selfSize.width) | ||
| 93 | - .height(this.selfSize.height) | 91 | + .width('100%')// .width(this.selfSize.width) |
| 92 | + // .height(this.selfSize.height) | ||
| 93 | + .aspectRatio(this.videoWidth / this.videoHeight) | ||
| 94 | + .renderFit(RenderFit.RESIZE_COVER) | ||
| 94 | } | 95 | } |
| 95 | - .id(this.insId) | ||
| 96 | - .onAreaChange(() => { | ||
| 97 | - // this.updateLayout() | ||
| 98 | - }) | 96 | + |
| 97 | + // .onAreaChange(() => { | ||
| 98 | + // this.updateLayout() | ||
| 99 | + // }) | ||
| 100 | + | ||
| 99 | .backgroundColor("#000000") | 101 | .backgroundColor("#000000") |
| 100 | 102 | ||
| 101 | // .height('100%') | 103 | // .height('100%') |
| @@ -103,15 +105,21 @@ export struct WDPlayerRenderView { | @@ -103,15 +105,21 @@ export struct WDPlayerRenderView { | ||
| 103 | } | 105 | } |
| 104 | 106 | ||
| 105 | updateLayout() { | 107 | updateLayout() { |
| 106 | - let info = componentUtils.getRectangleById(this.insId); | ||
| 107 | - if (info.size.width > 0 && info.size.height > 0 && this.videoHeight > 0 && this.videoWidth > 0) { | ||
| 108 | - if (info.size.width / info.size.height > this.videoWidth / this.videoHeight) { | ||
| 109 | - let scale = info.size.height / this.videoHeight; | ||
| 110 | - this.selfSize = new Size((this.videoWidth * scale / info.size.width) * 100 + "%", '100%'); | ||
| 111 | - } else { | ||
| 112 | - let scale = info.size.width / this.videoWidth; | ||
| 113 | - this.selfSize = new Size('100%', (this.videoHeight * scale / info.size.height) * 100 + "%"); | 108 | + // let info = componentUtils.getRectangleById(this.insId); |
| 109 | + const windowRect = WindowModel.shared.getWindowProperties()?.windowRect | ||
| 110 | + if (windowRect) { | ||
| 111 | + const info = windowRect | ||
| 112 | + if (info.width > 0 && info.height > 0 && this.videoHeight > 0 && this.videoWidth > 0) { | ||
| 113 | + if (info.width / info.height > this.videoWidth / this.videoHeight) { | ||
| 114 | + let scale = info.height / this.videoHeight; | ||
| 115 | + this.selfSize = new Size((this.videoWidth * scale / info.width) * 100 + "%", '100%'); | ||
| 116 | + } else { | ||
| 117 | + let scale = info.width / this.videoWidth; | ||
| 118 | + this.selfSize = new Size('100%', (this.videoHeight * scale / info.height) * 100 + "%"); | ||
| 119 | + } | ||
| 114 | } | 120 | } |
| 115 | } | 121 | } |
| 122 | + | ||
| 123 | + | ||
| 116 | } | 124 | } |
| 117 | } | 125 | } |
| @@ -59,8 +59,12 @@ export default class EntryAbility extends UIAbility { | @@ -59,8 +59,12 @@ export default class EntryAbility extends UIAbility { | ||
| 59 | const SYSTEM_AREA = windowClass.getWindowAvoidArea(TYPE_SYSTEM); | 59 | const SYSTEM_AREA = windowClass.getWindowAvoidArea(TYPE_SYSTEM); |
| 60 | const bottomSafeHeight = NAV_AREA.bottomRect.height; // 获取到导航条区域的高度 | 60 | const bottomSafeHeight = NAV_AREA.bottomRect.height; // 获取到导航条区域的高度 |
| 61 | const topSafeHeight = SYSTEM_AREA.topRect.height; // 获取到状态栏区域的高度 | 61 | const topSafeHeight = SYSTEM_AREA.topRect.height; // 获取到状态栏区域的高度 |
| 62 | + const width = windowClass.getWindowProperties().windowRect.width | ||
| 63 | + const height = windowClass.getWindowProperties().windowRect.height | ||
| 62 | AppStorage.setOrCreate('bottomSafeHeight', bottomSafeHeight); | 64 | AppStorage.setOrCreate('bottomSafeHeight', bottomSafeHeight); |
| 63 | AppStorage.setOrCreate('topSafeHeight', topSafeHeight); | 65 | AppStorage.setOrCreate('topSafeHeight', topSafeHeight); |
| 66 | + AppStorage.setOrCreate('windowWidth', width); | ||
| 67 | + AppStorage.setOrCreate('windowHeight', height); | ||
| 64 | 68 | ||
| 65 | 69 | ||
| 66 | // let a = new WindowModel(); | 70 | // let a = new WindowModel(); |
| 1 | -import { BottomNavigationComponent, LogoutViewModel} from 'wdComponent'; | 1 | +import { BottomNavigationComponent, LogoutViewModel } from 'wdComponent'; |
| 2 | import { BreakpointConstants } from 'wdConstant'; | 2 | import { BreakpointConstants } from 'wdConstant'; |
| 3 | 3 | ||
| 4 | -import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger } from 'wdKit'; | 4 | +import { BreakpointSystem, EmitterEventId, EmitterUtils, Logger } from 'wdKit'; |
| 5 | import router from '@ohos.router'; | 5 | import router from '@ohos.router'; |
| 6 | import { promptAction } from '@kit.ArkUI'; | 6 | import { promptAction } from '@kit.ArkUI'; |
| 7 | import { HWLocationUtils } from 'wdHwAbility/Index'; | 7 | import { HWLocationUtils } from 'wdHwAbility/Index'; |
| @@ -12,7 +12,8 @@ const TAG = 'MainPage'; | @@ -12,7 +12,8 @@ const TAG = 'MainPage'; | ||
| 12 | @Entry | 12 | @Entry |
| 13 | @Component | 13 | @Component |
| 14 | struct MainPage { | 14 | struct MainPage { |
| 15 | - | 15 | + @Provide pageShow: number = -1 |
| 16 | + @Provide pageHide: number = -1 | ||
| 16 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() | 17 | private breakpointSystem: BreakpointSystem = new BreakpointSystem() |
| 17 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; | 18 | @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; |
| 18 | 19 | ||
| @@ -34,9 +35,14 @@ struct MainPage { | @@ -34,9 +35,14 @@ struct MainPage { | ||
| 34 | Logger.info(TAG, 'aboutToDisappear'); | 35 | Logger.info(TAG, 'aboutToDisappear'); |
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | - | ||
| 38 | onPageHide() { | 38 | onPageHide() { |
| 39 | Logger.info(TAG, 'onPageHide'); | 39 | Logger.info(TAG, 'onPageHide'); |
| 40 | + this.pageHide = Math.random() | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + onPageShow() { | ||
| 44 | + Logger.info(TAG, 'onPageShow'); | ||
| 45 | + this.pageShow = Math.random() | ||
| 40 | } | 46 | } |
| 41 | 47 | ||
| 42 | onBackPress() { | 48 | onBackPress() { |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | -import { WDRouterRule } from 'wdRouter'; | 2 | +import { ProcessUtils, WDRouterRule } from 'wdRouter'; |
| 3 | import { WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterPage } from 'wdRouter'; |
| 4 | import { Logger, SPHelper } from 'wdKit/Index'; | 4 | import { Logger, SPHelper } from 'wdKit/Index'; |
| 5 | import { SpConstants } from 'wdConstant/Index'; | 5 | import { SpConstants } from 'wdConstant/Index'; |
| @@ -178,23 +178,14 @@ struct LaunchAdvertisingPage { | @@ -178,23 +178,14 @@ struct LaunchAdvertisingPage { | ||
| 178 | // openType 端外 端内 打开 | 178 | // openType 端外 端内 打开 |
| 179 | if (this.model.launchAdInfo[0].matInfo.openType == '2') { | 179 | if (this.model.launchAdInfo[0].matInfo.openType == '2') { |
| 180 | //端外打开 | 180 | //端外打开 |
| 181 | - let context = getContext(this) as common.UIAbilityContext; | ||
| 182 | - let wantInfo: Want = { | ||
| 183 | - // uncomment line below if wish to implicitly query only in the specific bundle. | ||
| 184 | - // bundleName: 'com.example.myapplication', | ||
| 185 | - action: 'ohos.want.action.viewData', | ||
| 186 | - // entities can be omitted. | ||
| 187 | - entities: ['entity.system.browsable'], | ||
| 188 | - uri: 'https://news.bjd.com.cn/2024/03/19/10724331.shtml' | ||
| 189 | - } | ||
| 190 | - context.startAbility(wantInfo).then(() => { | ||
| 191 | - // ... | ||
| 192 | - }).catch((err: BusinessError) => { | ||
| 193 | - // ... | ||
| 194 | - }) | 181 | + |
| 182 | + ProcessUtils.jumpExternalWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) | ||
| 183 | + clearInterval(this.timer) | ||
| 184 | + | ||
| 195 | }else { | 185 | }else { |
| 196 | //端内打开 | 186 | //端内打开 |
| 197 | - | 187 | + ProcessUtils.gotoDefaultWebPage(this.model.launchAdInfo[0].matInfo.linkUrl) |
| 188 | + clearInterval(this.timer) | ||
| 198 | 189 | ||
| 199 | } | 190 | } |
| 200 | } | 191 | } |
| @@ -98,6 +98,12 @@ struct LaunchPage { | @@ -98,6 +98,12 @@ struct LaunchPage { | ||
| 98 | //获取本地存储的启动页数据 | 98 | //获取本地存储的启动页数据 |
| 99 | 99 | ||
| 100 | let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string | 100 | let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string |
| 101 | + if (!dataModelStr) { | ||
| 102 | + //直接跳转首页 | ||
| 103 | + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | ||
| 104 | + return | ||
| 105 | + } | ||
| 106 | + | ||
| 101 | let dataModel : LaunchDataModel = JSON.parse(dataModelStr) | 107 | let dataModel : LaunchDataModel = JSON.parse(dataModelStr) |
| 102 | console.log(dataModelStr) | 108 | console.log(dataModelStr) |
| 103 | 109 |
| 1 | +-----BEGIN NEW CERTIFICATE REQUEST----- | ||
| 2 | +MIIBSjCB8gIBADBgMQswCQYDVQQGEwI4NjEOMAwGA1UECBMFQW5odWkxDjAMBgNV | ||
| 3 | +BAcTBUhlZmVpMRIwEAYDVQQKEwlXb25kZXJUZWsxDzANBgNVBAsTBldvbmRlcjEM | ||
| 4 | +MAoGA1UEAxMDWEdZMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcpXWRUmv/W+Q | ||
| 5 | +j25o83pS3Ftb6VtfwUsapOYxIqoxmpauFHTKg1RA7h3QlILy3rhNW7I8wiwNA+kp | ||
| 6 | +jfLqCGzMQqAwMC4GCSqGSIb3DQEJDjEhMB8wHQYDVR0OBBYEFPdvSvMO2yFULBr+ | ||
| 7 | +iUFb6ytXskNHMAoGCCqGSM49BAMCA0cAMEQCID4oV66jJ0KJ23jAHFlQ+5xioszZ | ||
| 8 | +dYhhRK7tG9Dsy4VpAiAx3rhNI8RbM7s+t2hqEsbrBXznNK7omEU4hooOkewbaw== | ||
| 9 | +-----END NEW CERTIFICATE REQUEST----- |
sight_harmony/singing_config/manual_com.peopledailychina.hosactivity_sign/keystorefile.p12
0 → 100644
No preview for this file type
| 1 | +#_GCF&H_ |
No preview for this file type
| 1 | +kat[n*ytgIe |
| 1 | +ß(“a† šw‘T.âŞÄl |
| 1 | +P+"Jx.M<X |
No preview for this file type
No preview for this file type
| 1 | +-----BEGIN CERTIFICATE----- | ||
| 2 | +MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 3 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 4 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx | ||
| 5 | +NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 6 | +CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw | ||
| 7 | +EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs | ||
| 8 | +GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB | ||
| 9 | +wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T | ||
| 10 | +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI | ||
| 11 | +zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn | ||
| 12 | +BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h | ||
| 13 | +FTjgDHctXJlC5L7+ZDY= | ||
| 14 | +-----END CERTIFICATE----- | ||
| 15 | +-----BEGIN CERTIFICATE----- | ||
| 16 | +MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 17 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 18 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw | ||
| 19 | +NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 20 | +CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs | ||
| 21 | +YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP | ||
| 22 | +bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ | ||
| 23 | +luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD | ||
| 24 | +VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk | ||
| 25 | +/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo | ||
| 26 | +dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI | ||
| 27 | +MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6 | ||
| 28 | +Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du | ||
| 29 | +LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw | ||
| 30 | +ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl | ||
| 31 | +ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o | ||
| 32 | +Q+FzM3c= | ||
| 33 | +-----END CERTIFICATE----- | ||
| 34 | +-----BEGIN CERTIFICATE----- | ||
| 35 | +MIIC0jCCAligAwIBAgIOY8sBbjnB96BZITO8K44wCgYIKoZIzj0EAwMwYjELMAkG | ||
| 36 | +A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt | ||
| 37 | +MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X | ||
| 38 | +DTI0MDQyMzEwNDkxNVoXDTI1MDQyMzEwNDkxNVowgYExCzAJBgNVBAYTAkNOMRgw | ||
| 39 | +FgYDVQQKDA/kurrmsJHml6XmiqXnpL4xHDAaBgNVBAsMEzE0MDU5MDg1MTcwMDg3 | ||
| 40 | +Mjk5ODUxOjA4BgNVBAMMMeS6uuawkeaXpeaKpeekvigxNDA1OTA4NTE3MDA4NzI5 | ||
| 41 | +OTg1KVwsRGV2ZWxvcG1lbnQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARyldZF | ||
| 42 | +Sa/9b5CPbmjzelLcW1vpW1/BSxqk5jEiqjGalq4UdMqDVEDuHdCUgvLeuE1bsjzC | ||
| 43 | +LA0D6SmN8uoIbMxCo4HRMIHOMAwGA1UdEwEB/wQCMAAwWQYDVR0fBFIwUDBOoEyg | ||
| 44 | +SoZIaHR0cDovL2g1aG9zdGluZy1kcmNuLmRiYW5rY2RuLmNuL2NjaDUvY3JsL2hk | ||
| 45 | +cmNhZzIvSHVhd2VpQ0JHSERSRzJjcmwuY3JsMB8GA1UdIwQYMBaAFNtek7Ij6NDk | ||
| 46 | +/nF6Zumkc0dbf/NeMB0GA1UdDgQWBBT3b0rzDtshVCwa/olBW+srV7JDRzAOBgNV | ||
| 47 | +HQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwCgYIKoZIzj0EAwMDaAAw | ||
| 48 | +ZQIxALQlPju1pWaQmEkj4DRezSJGS2jiPFfpSjxTJDrG2ipXHQ5jkC4QP/3AzlLe | ||
| 49 | +LJ70VAIwBpsn6UOHBmNywFrdw2qpdJNueiHHefZlXFD8043LtpeYfQaHi0/gIdCQ | ||
| 50 | +BclpH6Ga | ||
| 51 | +-----END CERTIFICATE----- |
sight_harmony/singing_config/manual_com.peopledailychina.hosactivity_sign/鸿蒙中文版客户端证书正式.cer
0 → 100644
| 1 | +-----BEGIN CERTIFICATE----- | ||
| 2 | +MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 3 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 4 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx | ||
| 5 | +NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 6 | +CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw | ||
| 7 | +EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs | ||
| 8 | +GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB | ||
| 9 | +wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T | ||
| 10 | +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI | ||
| 11 | +zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn | ||
| 12 | +BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h | ||
| 13 | +FTjgDHctXJlC5L7+ZDY= | ||
| 14 | +-----END CERTIFICATE----- | ||
| 15 | +-----BEGIN CERTIFICATE----- | ||
| 16 | +MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 17 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 18 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw | ||
| 19 | +NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 20 | +CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs | ||
| 21 | +YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP | ||
| 22 | +bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ | ||
| 23 | +luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD | ||
| 24 | +VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk | ||
| 25 | +/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo | ||
| 26 | +dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI | ||
| 27 | +MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6 | ||
| 28 | +Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du | ||
| 29 | +LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw | ||
| 30 | +ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl | ||
| 31 | +ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o | ||
| 32 | +Q+FzM3c= | ||
| 33 | +-----END CERTIFICATE----- | ||
| 34 | +-----BEGIN CERTIFICATE----- | ||
| 35 | +MIICzjCCAlOgAwIBAgIOCfqzV9Lb4emhfwEBhZkwCgYIKoZIzj0EAwMwYjELMAkG | ||
| 36 | +A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt | ||
| 37 | +MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X | ||
| 38 | +DTI0MDQyMzEwNTA0OFoXDTI3MDQyMzEwNTA0OFowfTELMAkGA1UEBhMCQ04xGDAW | ||
| 39 | +BgNVBAoMD+S6uuawkeaXpeaKpeekvjEcMBoGA1UECwwTMTQwNTkwODUxNzAwODcy | ||
| 40 | +OTk4NTE2MDQGA1UEAwwt5Lq65rCR5pel5oql56S+KDE0MDU5MDg1MTcwMDg3Mjk5 | ||
| 41 | +ODUpXCxSZWxlYXNlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcpXWRUmv/W+Q | ||
| 42 | +j25o83pS3Ftb6VtfwUsapOYxIqoxmpauFHTKg1RA7h3QlILy3rhNW7I8wiwNA+kp | ||
| 43 | +jfLqCGzMQqOB0TCBzjAMBgNVHRMBAf8EAjAAMFkGA1UdHwRSMFAwTqBMoEqGSGh0 | ||
| 44 | +dHA6Ly9oNWhvc3RpbmctZHJjbi5kYmFua2Nkbi5jbi9jY2g1L2NybC9oZHJjYWcy | ||
| 45 | +L0h1YXdlaUNCR0hEUkcyY3JsLmNybDAfBgNVHSMEGDAWgBTbXpOyI+jQ5P5xembp | ||
| 46 | +pHNHW3/zXjAdBgNVHQ4EFgQU929K8w7bIVQsGv6JQVvrK1eyQ0cwDgYDVR0PAQH/ | ||
| 47 | +BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMAoGCCqGSM49BAMDA2kAMGYCMQD1 | ||
| 48 | +UL0Qj+pCjOirB7hB80Pcd5jrvy1fM1a6MptJdmZtIpUBcMPk8CKO/GeUu4rPrdEC | ||
| 49 | +MQDN7j9hEa4VJWu35BmoSAyZuJw4bmZ5Y56qmtLX1xFwvu9NDQiO4uZyR7q0M3Oj | ||
| 50 | +FgA= | ||
| 51 | +-----END CERTIFICATE----- |
-
Please register or login to post a comment