@quicktvui/ai 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/.clinerules +1 -0
- package/rules/.cursorrules +1 -0
- package/rules/.github/copilot-instructions.md +1 -0
- package/rules/.source/hellotv/PROJECT-README.md +52 -0
- package/rules/.source/hellotv/app.d.ts +11 -0
- package/rules/.source/hellotv/package.json +146 -0
- package/rules/.source/hellotv/scripts/build-apk.ts +12 -0
- package/rules/.source/hellotv/scripts/build.ts +35 -0
- package/rules/.source/hellotv/scripts/dev.ts +12 -0
- package/rules/.source/hellotv/scripts/pack.ts +24 -0
- package/rules/.source/hellotv/scripts/process.ts +37 -0
- package/rules/.source/hellotv/scripts/quicktvui-webpack.android.ts +187 -0
- package/rules/.source/hellotv/scripts/quicktvui-webpack.dev.ts +147 -0
- package/rules/.source/hellotv/scripts/webpack-watch.ts +24 -0
- package/rules/.source/hellotv/src/App.vue +192 -0
- package/rules/.source/hellotv/src/api/my/index.ts +198 -0
- package/rules/.source/hellotv/src/api/user/impl-user.ts +52 -0
- package/rules/.source/hellotv/src/api/user/qr-code-mock.ts +2 -0
- package/rules/.source/hellotv/src/api/user/request-url.ts +11 -0
- package/rules/.source/hellotv/src/api/user/user-manager.ts +258 -0
- package/rules/.source/hellotv/src/app.scss +8 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_pause.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_play.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_selected.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_collect_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_collect_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_full_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_full_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_info_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_info_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_introduction_bg.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_selected.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_media_player_pause.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_media_player_placeholder.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_media_player_play.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_vip_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/ic_vip_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/detail/skeleton.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_empty.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_filter_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_filter_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_filter_selected.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_left_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_left_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/filter/ic_left_selected.png +0 -0
- package/rules/.source/hellotv/src/assets/history/ic_delete.png +0 -0
- package/rules/.source/hellotv/src/assets/history/ic_empty.png +0 -0
- package/rules/.source/hellotv/src/assets/home/bg_history_item.png +0 -0
- package/rules/.source/hellotv/src/assets/home/bg_shadow.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_4k_logo.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_4k_play_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_4k_subtitle_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_arrow_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_arrow_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_exit_corner.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_exit_header.png +0 -0
- package/rules/.source/hellotv/src/assets/home/ic_play.png +0 -0
- package/rules/.source/hellotv/src/assets/live/bg-error.png +0 -0
- package/rules/.source/hellotv/src/assets/live/bg-play-info.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-arrow-left.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-arrow-right.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-back.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-change.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-corner-vip-tips.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-corner-vip.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-key.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-loading-error.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-menu-ext-arrow.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-menu-ext.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-menu.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-mine.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-network-error.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-ok.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-playing.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-playing2.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-playing3.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic-service.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic_live_broadcast.png +0 -0
- package/rules/.source/hellotv/src/assets/live/ic_live_broadcast_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_collect_focus.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_collect_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_order_focus.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_order_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_record_focus.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_record_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_user.png +0 -0
- package/rules/.source/hellotv/src/assets/my/ic_vip_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_back.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_back_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_clear.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_clear_dark.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_clear_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/search/ic_search.png +0 -0
- package/rules/.source/hellotv/src/assets/top-view/ic_logo.png +0 -0
- package/rules/.source/hellotv/src/assets/top-view/ic_top_search_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/top-view/ic_top_search_normal.png +0 -0
- package/rules/.source/hellotv/src/assets/top-view/ic_top_user_focused.png +0 -0
- package/rules/.source/hellotv/src/assets/top-view/ic_top_user_normal.png +0 -0
- package/rules/.source/hellotv/src/components/bg-animation.scss +14 -0
- package/rules/.source/hellotv/src/components/bg-animation.vue +176 -0
- package/rules/.source/hellotv/src/components/btn-pack-view.vue +172 -0
- package/rules/.source/hellotv/src/components/btn-pack.scss +53 -0
- package/rules/.source/hellotv/src/components/grid-item-horizontal.vue +203 -0
- package/rules/.source/hellotv/src/components/grid-item-vertical.vue +201 -0
- package/rules/.source/hellotv/src/components/media/build-data/media-config.ts +4 -0
- package/rules/.source/hellotv/src/components/media/build-data/media-control-adapter.ts +378 -0
- package/rules/.source/hellotv/src/components/media/build-data/media-imp.ts +44 -0
- package/rules/.source/hellotv/src/components/media/view/media-loading-component.vue +50 -0
- package/rules/.source/hellotv/src/components/media/view/media-loading-view.vue +154 -0
- package/rules/.source/hellotv/src/components/media/view/media-manager-view.vue +931 -0
- package/rules/.source/hellotv/src/components/media/view/media-menu-detail-item.vue +42 -0
- package/rules/.source/hellotv/src/components/media/view/media-menu-detail-view.vue +109 -0
- package/rules/.source/hellotv/src/components/media/view/media-menu-icon-item.vue +43 -0
- package/rules/.source/hellotv/src/components/media/view/media-menu-text-item.vue +27 -0
- package/rules/.source/hellotv/src/components/media/view/media-menu-view.vue +88 -0
- package/rules/.source/hellotv/src/components/media/view/media-player-view.vue +408 -0
- package/rules/.source/hellotv/src/components/media/view/scss/media-loading.scss +51 -0
- package/rules/.source/hellotv/src/components/media/view/scss/media-manager.scss +79 -0
- package/rules/.source/hellotv/src/components/media/view/scss/media-menu.scss +114 -0
- package/rules/.source/hellotv/src/components/media/view/scss/media-player.scss +6 -0
- package/rules/.source/hellotv/src/components/qt-tabs-component.ts +268 -0
- package/rules/.source/hellotv/src/components/qt-ul-component.ts +792 -0
- package/rules/.source/hellotv/src/components/top-view.scss +38 -0
- package/rules/.source/hellotv/src/components/top-view.vue +114 -0
- package/rules/.source/hellotv/src/config/README.md +22 -0
- package/rules/.source/hellotv/src/config/build-config.ts +22 -0
- package/rules/.source/hellotv/src/config/private-theme-config.ts +21 -0
- package/rules/.source/hellotv/src/config/public-config.scss +16 -0
- package/rules/.source/hellotv/src/config/test.scss +45 -0
- package/rules/.source/hellotv/src/config/theme-config.ts +51 -0
- package/rules/.source/hellotv/src/main.ts +45 -0
- package/rules/.source/hellotv/src/pages/activity/adapter/config.ts +37 -0
- package/rules/.source/hellotv/src/pages/activity/adapter/index.ts +849 -0
- package/rules/.source/hellotv/src/pages/activity/adapter/interface.ts +173 -0
- package/rules/.source/hellotv/src/pages/activity/api/index.ts +36 -0
- package/rules/.source/hellotv/src/pages/activity/api/interface.ts +11 -0
- package/rules/.source/hellotv/src/pages/activity/api/request-url.ts +10 -0
- package/rules/.source/hellotv/src/pages/activity/components/item/focus-change-img-item.vue +40 -0
- package/rules/.source/hellotv/src/pages/activity/components/item/inner-out-title-item.vue +59 -0
- package/rules/.source/hellotv/src/pages/activity/components/item/no-title-item.vue +45 -0
- package/rules/.source/hellotv/src/pages/activity/components/item/placeholder-item.vue +25 -0
- package/rules/.source/hellotv/src/pages/activity/index.vue +219 -0
- package/rules/.source/hellotv/src/pages/activity/scss/index.scss +46 -0
- package/rules/.source/hellotv/src/pages/activity/scss/item.scss +69 -0
- package/rules/.source/hellotv/src/pages/detail/adapter/index.ts +317 -0
- package/rules/.source/hellotv/src/pages/detail/adapter/interface.ts +150 -0
- package/rules/.source/hellotv/src/pages/detail/adapter/media-player.ts +378 -0
- package/rules/.source/hellotv/src/pages/detail/api/index.ts +77 -0
- package/rules/.source/hellotv/src/pages/detail/api/request-url.ts +8 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-definition.vue +192 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-list-item.vue +108 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-media-series.vue +349 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-order.vue +194 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-speed.vue +192 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/index.vue +404 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-small-view.vue +382 -0
- package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-view.vue +1099 -0
- package/rules/.source/hellotv/src/pages/detail/components/recommend-item.vue +167 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/basic-section.vue +218 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/config.ts +6 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/header-section.vue +15 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/item/button-menu.vue +259 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/item/media-introduction.vue +238 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/item/media-series.vue +308 -0
- package/rules/.source/hellotv/src/pages/detail/components/section/item/player-placeholder.vue +88 -0
- package/rules/.source/hellotv/src/pages/detail/index.vue +571 -0
- package/rules/.source/hellotv/src/pages/detail/scss/index.scss +22 -0
- package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-loading.vue +78 -0
- package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-menu-view.vue +803 -0
- package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-view.vue +219 -0
- package/rules/.source/hellotv/src/pages/detail-full-player/index.vue +101 -0
- package/rules/.source/hellotv/src/pages/detail-full-player/scss/full-player-view.scss +6 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/index.ts +0 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/interface.ts +133 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/api/index.ts +77 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/api/request-url.ts +8 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-info.vue +263 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-player.vue +42 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-series-section.vue +26 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/components/recommend-item.vue +167 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/index.vue +163 -0
- package/rules/.source/hellotv/src/pages/detail-full-screen/scss/index.scss +41 -0
- package/rules/.source/hellotv/src/pages/device-info/index.vue +106 -0
- package/rules/.source/hellotv/src/pages/device-info/scss/device-info.scss +49 -0
- package/rules/.source/hellotv/src/pages/filter/README.md +66 -0
- package/rules/.source/hellotv/src/pages/filter/adapter/index.ts +180 -0
- package/rules/.source/hellotv/src/pages/filter/adapter/interface.ts +111 -0
- package/rules/.source/hellotv/src/pages/filter/api/index.ts +38 -0
- package/rules/.source/hellotv/src/pages/filter/api/interface.ts +44 -0
- package/rules/.source/hellotv/src/pages/filter/api/request-url.ts +8 -0
- package/rules/.source/hellotv/src/pages/filter/components/content/index.vue +469 -0
- package/rules/.source/hellotv/src/pages/filter/components/content/list-item-record.vue +16 -0
- package/rules/.source/hellotv/src/pages/filter/components/content/list-item.vue +78 -0
- package/rules/.source/hellotv/src/pages/filter/components/expand/index.vue +83 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/index.vue +81 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter-title.vue +78 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter.vue +68 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-line.vue +11 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-text.vue +43 -0
- package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-title.vue +14 -0
- package/rules/.source/hellotv/src/pages/filter/config.ts +10 -0
- package/rules/.source/hellotv/src/pages/filter/expand-sidebar-contents.vue +203 -0
- package/rules/.source/hellotv/src/pages/filter/scss/filter-content-list-item.scss +42 -0
- package/rules/.source/hellotv/src/pages/filter/scss/filter-content.scss +60 -0
- package/rules/.source/hellotv/src/pages/filter/scss/filter-expand.scss +30 -0
- package/rules/.source/hellotv/src/pages/filter/scss/filter-sidebar.scss +45 -0
- package/rules/.source/hellotv/src/pages/filter/scss/filter.scss +21 -0
- package/rules/.source/hellotv/src/pages/filter/sidebar-contents.vue +145 -0
- package/rules/.source/hellotv/src/pages/filter/single-contents.vue +61 -0
- package/rules/.source/hellotv/src/pages/history/adapter/index.ts +51 -0
- package/rules/.source/hellotv/src/pages/history/adapter/interface.ts +22 -0
- package/rules/.source/hellotv/src/pages/history/api/index.ts +54 -0
- package/rules/.source/hellotv/src/pages/history/api/interface.ts +41 -0
- package/rules/.source/hellotv/src/pages/history/api/request-url.ts +10 -0
- package/rules/.source/hellotv/src/pages/history/components/confirm-dialog.vue +155 -0
- package/rules/.source/hellotv/src/pages/history/config.ts +8 -0
- package/rules/.source/hellotv/src/pages/history/index-raw.vue +540 -0
- package/rules/.source/hellotv/src/pages/history/index.vue +431 -0
- package/rules/.source/hellotv/src/pages/history/mock.ts +32 -0
- package/rules/.source/hellotv/src/pages/history/scss/history-raw.scss +181 -0
- package/rules/.source/hellotv/src/pages/history/scss/history.scss +148 -0
- package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-adapter.ts +20 -0
- package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-imp.ts +13 -0
- package/rules/.source/hellotv/src/pages/home/adapter/media/create-home-player-interceptor.ts +50 -0
- package/rules/.source/hellotv/src/pages/home/adapter/media/home-media-imp.ts +74 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-adapter.ts +151 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-config.ts +17 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-imp.ts +53 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-item-type.ts +6 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-adapter.ts +1304 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-config.ts +30 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-imp.ts +173 -0
- package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-item-type.ts +17 -0
- package/rules/.source/hellotv/src/pages/home/api/index.ts +157 -0
- package/rules/.source/hellotv/src/pages/home/api/interface.ts +56 -0
- package/rules/.source/hellotv/src/pages/home/api/request-url.ts +22 -0
- package/rules/.source/hellotv/src/pages/home/components/exit-dialog.vue +148 -0
- package/rules/.source/hellotv/src/pages/home/components/media/bg-player.vue +440 -0
- package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-img-item.vue +39 -0
- package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-text-item.vue +100 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-img.vue +54 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-text.vue +67 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-list-player-item.vue +74 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-player-item.vue +40 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/focus-change-img-item.vue +41 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/history-item.vue +362 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/inner-out-title-item.vue +60 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/no-title-item.vue +46 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/placeholder-item.vue +25 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section-item.vue +80 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section.vue +70 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/small-4k/small-four-section.vue +76 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section-item.vue +90 -0
- package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section.vue +57 -0
- package/rules/.source/hellotv/src/pages/home/components/waterfall-tabs.vue +1307 -0
- package/rules/.source/hellotv/src/pages/home/index.vue +117 -0
- package/rules/.source/hellotv/src/pages/home/scss/bar-img-item.scss +11 -0
- package/rules/.source/hellotv/src/pages/home/scss/bar-text-item.scss +80 -0
- package/rules/.source/hellotv/src/pages/home/scss/base.scss +8 -0
- package/rules/.source/hellotv/src/pages/home/scss/bg-player-cell-list-item.scss +24 -0
- package/rules/.source/hellotv/src/pages/home/scss/bg-player.scss +50 -0
- package/rules/.source/hellotv/src/pages/home/scss/cell-player-item.scss +24 -0
- package/rules/.source/hellotv/src/pages/home/scss/exit-dialog.scss +89 -0
- package/rules/.source/hellotv/src/pages/home/scss/focus-change-img-item.scss +12 -0
- package/rules/.source/hellotv/src/pages/home/scss/home.scss +32 -0
- package/rules/.source/hellotv/src/pages/home/scss/inner-out-title-item.scss +24 -0
- package/rules/.source/hellotv/src/pages/home/scss/no-title-item.scss +15 -0
- package/rules/.source/hellotv/src/pages/home/scss/placeholder-item.scss +14 -0
- package/rules/.source/hellotv/src/pages/home/scss/short-video-section.scss +59 -0
- package/rules/.source/hellotv/src/pages/home/scss/small-four-section.scss +14 -0
- package/rules/.source/hellotv/src/pages/home/scss/waterfall-tabs.scss +50 -0
- package/rules/.source/hellotv/src/pages/home/scss/world-four-section.scss +106 -0
- package/rules/.source/hellotv/src/pages/introduction/index.vue +227 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-icon-text.vue +35 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-img.vue +16 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-text.vue +16 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/index.vue +266 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/second-list-item.vue +80 -0
- package/rules/.source/hellotv/src/pages/live/components/menu/third-list-item.vue +68 -0
- package/rules/.source/hellotv/src/pages/live/components/player/index.vue +168 -0
- package/rules/.source/hellotv/src/pages/live/components/player/player-error.vue +48 -0
- package/rules/.source/hellotv/src/pages/live/components/player/player-loading.vue +50 -0
- package/rules/.source/hellotv/src/pages/live/components/player/player-tips.vue +125 -0
- package/rules/.source/hellotv/src/pages/live/components/player/tips-icon-text.vue +27 -0
- package/rules/.source/hellotv/src/pages/live/css/menu.css +109 -0
- package/rules/.source/hellotv/src/pages/live/css/player.css +56 -0
- package/rules/.source/hellotv/src/pages/live/index.vue +128 -0
- package/rules/.source/hellotv/src/pages/live/mock/index.ts +263 -0
- package/rules/.source/hellotv/src/pages/live/types/index.ts +42 -0
- package/rules/.source/hellotv/src/pages/login/index.vue +116 -0
- package/rules/.source/hellotv/src/pages/login/scss/login.scss +61 -0
- package/rules/.source/hellotv/src/pages/m-test.vue +84 -0
- package/rules/.source/hellotv/src/pages/my/README.md +87 -0
- package/rules/.source/hellotv/src/pages/my/index.vue +177 -0
- package/rules/.source/hellotv/src/pages/my/my-data-manager.ts +606 -0
- package/rules/.source/hellotv/src/pages/my/my-templates.vue +24 -0
- package/rules/.source/hellotv/src/pages/my/poster/index.vue +98 -0
- package/rules/.source/hellotv/src/pages/my/poster/my-card2.vue +90 -0
- package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-col.vue +72 -0
- package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-row.vue +72 -0
- package/rules/.source/hellotv/src/pages/my/poster/my-info.vue +50 -0
- package/rules/.source/hellotv/src/pages/my/poster/my-user.vue +126 -0
- package/rules/.source/hellotv/src/pages/play-test.vue +95 -0
- package/rules/.source/hellotv/src/pages/search/README.md +57 -0
- package/rules/.source/hellotv/src/pages/search/adapter/index.ts +285 -0
- package/rules/.source/hellotv/src/pages/search/adapter/interface.ts +60 -0
- package/rules/.source/hellotv/src/pages/search/api/index.ts +100 -0
- package/rules/.source/hellotv/src/pages/search/api/interface.ts +64 -0
- package/rules/.source/hellotv/src/pages/search/api/request-url.ts +20 -0
- package/rules/.source/hellotv/src/pages/search/components/search-content-tabs.vue +153 -0
- package/rules/.source/hellotv/src/pages/search/components/search-content.vue +282 -0
- package/rules/.source/hellotv/src/pages/search/components/search-keyboard.vue +252 -0
- package/rules/.source/hellotv/src/pages/search/components/search-keyword-grid.vue +85 -0
- package/rules/.source/hellotv/src/pages/search/components/search-keyword.vue +346 -0
- package/rules/.source/hellotv/src/pages/search/config.ts +10 -0
- package/rules/.source/hellotv/src/pages/search/scss/search-content.scss +130 -0
- package/rules/.source/hellotv/src/pages/search/scss/search-keyboard.scss +91 -0
- package/rules/.source/hellotv/src/pages/search/scss/search-keyword-grid.scss +30 -0
- package/rules/.source/hellotv/src/pages/search/scss/search-keyword.scss +104 -0
- package/rules/.source/hellotv/src/pages/search/scss/search.scss +18 -0
- package/rules/.source/hellotv/src/pages/search/three-columns.vue +164 -0
- package/rules/.source/hellotv/src/pages/search/two-columns.vue +128 -0
- package/rules/.source/hellotv/src/pages/tabs-test.vue +339 -0
- package/rules/.source/hellotv/src/pages/webview/load-web-view.vue +44 -0
- package/rules/.source/hellotv/src/routes.ts +142 -0
- package/rules/.source/hellotv/src/tools/common.ts +18 -0
- package/rules/.source/hellotv/src/tools/format-date.ts +16 -0
- package/rules/.source/hellotv/src/tools/index.ts +58 -0
- package/rules/.source/hellotv/src/tools/launch.ts +339 -0
- package/rules/.source/hellotv/src/tools/request/index.ts +206 -0
- package/rules/.source/hellotv/src/tools/request/interface.ts +64 -0
- package/rules/.source/hellotv/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/hellotv/src/vue.config.js +3 -0
- package/rules/.source/hellotv/tsconfig.json +34 -0
- package/rules/.windsurfrules +1 -0
- package/rules/AGENTS.md +1 -0
- package/rules/CLAUDE.md +1 -0
- package/rules/GEMINI.md +1 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ESRouteType } from "@extscreen/es3-router";
|
|
2
|
+
import home from "./pages/home/index.vue";
|
|
3
|
+
import live from "./pages/live/index.vue";
|
|
4
|
+
import test from "./pages/m-test.vue";
|
|
5
|
+
import playTest from "./pages/play-test.vue";
|
|
6
|
+
import tabsTest from "./pages/tabs-test.vue";
|
|
7
|
+
import fullPlay from "./pages/detail-full-player/index.vue";
|
|
8
|
+
|
|
9
|
+
// 筛选布局模式选择
|
|
10
|
+
import filterConfig from "./pages/filter/config";
|
|
11
|
+
const filter = () => {
|
|
12
|
+
switch (filterConfig.layoutMode) {
|
|
13
|
+
case 1:
|
|
14
|
+
return import("./pages/filter/single-contents.vue");
|
|
15
|
+
case 2:
|
|
16
|
+
return import("./pages/filter/sidebar-contents.vue");
|
|
17
|
+
case 3:
|
|
18
|
+
return import("./pages/filter/expand-sidebar-contents.vue");
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// 搜索布局模式选择
|
|
23
|
+
import searchConfig from "./pages/search/config";
|
|
24
|
+
const search = () => {
|
|
25
|
+
switch (searchConfig.layoutMode) {
|
|
26
|
+
case 2:
|
|
27
|
+
return import("./pages/search/two-columns.vue");
|
|
28
|
+
case 3:
|
|
29
|
+
return import("./pages/search/three-columns.vue");
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const routes = [
|
|
34
|
+
{
|
|
35
|
+
path: "/home",
|
|
36
|
+
name: "home",
|
|
37
|
+
component: home,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
path: "/login",
|
|
41
|
+
name: "login",
|
|
42
|
+
component: () => import("./pages/login/index.vue"),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
path: "/filter",
|
|
46
|
+
name: "filter",
|
|
47
|
+
component: filter,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: "/search",
|
|
51
|
+
name: "search",
|
|
52
|
+
component: search,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: "/detail",
|
|
56
|
+
name: "detail",
|
|
57
|
+
// component: detail
|
|
58
|
+
component: () => import("./pages/detail/index.vue"),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: "/detail-old",
|
|
62
|
+
name: "series_view",
|
|
63
|
+
// component: detail
|
|
64
|
+
component: () => import("./pages/detail/index.vue"),
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
{
|
|
68
|
+
path: "/introduction",
|
|
69
|
+
name: "introduction",
|
|
70
|
+
component: () => import("./pages/introduction/index.vue"),
|
|
71
|
+
type: ESRouteType.ES_ROUTE_TYPE_DIALOG,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: "/detail-full-screen",
|
|
75
|
+
name: "detail-full-screen",
|
|
76
|
+
component: () => import("./pages/detail-full-screen/index.vue"),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "history",
|
|
80
|
+
path: "/history",
|
|
81
|
+
component: () => import("./pages/history/index-raw.vue"),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "confirm",
|
|
85
|
+
path: "/confirm",
|
|
86
|
+
component: () => import("./pages/history/components/confirm-dialog.vue"),
|
|
87
|
+
type: ESRouteType.ES_ROUTE_TYPE_DIALOG,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: "/exit-dialog",
|
|
91
|
+
name: "exit_dialog",
|
|
92
|
+
component: () => import("./pages/home/components/exit-dialog.vue"),
|
|
93
|
+
type: ESRouteType.ES_ROUTE_TYPE_DIALOG,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
path: "/test",
|
|
97
|
+
name: "test",
|
|
98
|
+
component: test,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: "/playTest",
|
|
102
|
+
name: "playTest",
|
|
103
|
+
component: playTest,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
path: "/tabsTest",
|
|
107
|
+
name: "tabsTest",
|
|
108
|
+
component: tabsTest,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
path: "/activity",
|
|
112
|
+
name: "activity",
|
|
113
|
+
component: () => import("./pages/activity/index.vue"),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "my",
|
|
117
|
+
path: "/my",
|
|
118
|
+
component: () => import("./pages/my/index.vue"),
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
path: "/device_info",
|
|
122
|
+
name: "device_info",
|
|
123
|
+
component: () => import("./pages/device-info/index.vue"),
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
path: "/load_web_view",
|
|
127
|
+
name: "load_web_view",
|
|
128
|
+
component: () => import("./pages/webview/load-web-view.vue"),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
path: "/live",
|
|
132
|
+
name: "live",
|
|
133
|
+
component: live,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
path: "/fullPlay",
|
|
137
|
+
name: "fullPlay",
|
|
138
|
+
component: fullPlay,
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
export default routes;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function replacePlaceholders(template, replacements): string {
|
|
2
|
+
return template.replace(/\$\{(\w+)\}/g, (match, placeholder) => {
|
|
3
|
+
return replacements[placeholder] || ""; // 如果替换项不存在,则返回空字符串
|
|
4
|
+
});
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function getHistorySubTitle(item) {
|
|
8
|
+
//通过description1可以获得总集数
|
|
9
|
+
let head = `第${item.episode}集 `;
|
|
10
|
+
if (item.description1 == "共1集") {
|
|
11
|
+
head = "";
|
|
12
|
+
}
|
|
13
|
+
return (
|
|
14
|
+
item.totalPlayTime > 0
|
|
15
|
+
? `${head}已看${Math.floor((item.currentPlayTime / item.totalPlayTime) * 100)}%`
|
|
16
|
+
: `${head}已看0%`
|
|
17
|
+
).replace("已看0%", "不足1%");
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function s_to_hs(s) {
|
|
2
|
+
//计算分钟
|
|
3
|
+
//算法:将秒数除以60,然后下舍入,既得到分钟数
|
|
4
|
+
let h;
|
|
5
|
+
h = Math.floor(s / 60);
|
|
6
|
+
//计算秒
|
|
7
|
+
//算法:取得秒%60的余数,既得到秒数
|
|
8
|
+
s = s % 60;
|
|
9
|
+
//将变量转换为字符串
|
|
10
|
+
h += "";
|
|
11
|
+
s += "";
|
|
12
|
+
//如果只有一位数,前面增加一个0
|
|
13
|
+
h = h.length == 1 ? "0" + h : h;
|
|
14
|
+
s = s.length == 1 ? "0" + s : s;
|
|
15
|
+
return h + ":" + s;
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 阿拉伯数字转中文
|
|
3
|
+
* @param num 阿拉伯数字
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function numberToChinese(num) {
|
|
7
|
+
if (num === 0) return "零";
|
|
8
|
+
|
|
9
|
+
const digits = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"];
|
|
10
|
+
const units = ["", "十", "百", "千"];
|
|
11
|
+
const bigUnits = ["", "万", "亿", "兆"];
|
|
12
|
+
|
|
13
|
+
let result = "";
|
|
14
|
+
let zero = false; // 用于处理连续的零
|
|
15
|
+
let section = 0; // 当前处理的节(万、亿等)
|
|
16
|
+
|
|
17
|
+
while (num > 0) {
|
|
18
|
+
let part = num % 10000; // 每次处理四位数
|
|
19
|
+
if (part !== 0) {
|
|
20
|
+
let partResult = "";
|
|
21
|
+
for (let i = 0; part > 0; i++) {
|
|
22
|
+
const digit = part % 10;
|
|
23
|
+
if (digit !== 0) {
|
|
24
|
+
if (zero) partResult = digits[0] + partResult; // 处理中间的零
|
|
25
|
+
partResult = digits[digit] + units[i] + partResult;
|
|
26
|
+
} else {
|
|
27
|
+
zero = true;
|
|
28
|
+
}
|
|
29
|
+
part = Math.floor(part / 10);
|
|
30
|
+
}
|
|
31
|
+
result = partResult + bigUnits[section] + result;
|
|
32
|
+
zero = false; // 每处理完一节,重置零标志
|
|
33
|
+
} else {
|
|
34
|
+
zero = true;
|
|
35
|
+
}
|
|
36
|
+
num = Math.floor(num / 10000);
|
|
37
|
+
section++;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 特殊处理:如果结果以“一十”开头,改为“十”
|
|
41
|
+
if (result.startsWith("一十")) {
|
|
42
|
+
result = result.replace("一十", "十");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function isJSON(str) {
|
|
49
|
+
if (typeof str == "string") {
|
|
50
|
+
try {
|
|
51
|
+
const obj = JSON.parse(str);
|
|
52
|
+
return !!(typeof obj == "object" && obj);
|
|
53
|
+
} catch (e) {
|
|
54
|
+
qt.log.e("isJson", e);
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ESDevelop } from "@extscreen/es3-core";
|
|
2
|
+
import {
|
|
3
|
+
ESNativeRouter,
|
|
4
|
+
RouteLocationRaw,
|
|
5
|
+
Router,
|
|
6
|
+
} from "@extscreen/es3-router";
|
|
7
|
+
|
|
8
|
+
export interface LaunchParams {
|
|
9
|
+
//0:快应用之间跳转; 1: 快应用内部跳转; 3:第三方应用跳转
|
|
10
|
+
type: string | number;
|
|
11
|
+
//type = 0 option是字符串;1、3:option是对象
|
|
12
|
+
options:
|
|
13
|
+
| string
|
|
14
|
+
| {
|
|
15
|
+
//外层 type = 3 存在 值:ACTION、ACTIVITY、URL
|
|
16
|
+
type?: string;
|
|
17
|
+
//type=3存在
|
|
18
|
+
packageName?: string;
|
|
19
|
+
//type = ACTIVITY 存在
|
|
20
|
+
activityPath?: string;
|
|
21
|
+
//type = URL 存在
|
|
22
|
+
url?: string;
|
|
23
|
+
//type = ACTION 存在
|
|
24
|
+
action?: string;
|
|
25
|
+
//"[{\"key\":\"activityKey\",\"value\":\"666\",\"type\":\"string\"},{\"key\":\"activityKey1\",\"value\":\"888\",\"type\":\"int\"}]"
|
|
26
|
+
//外层type=1 params 是对象,外层 type=3 params字符串
|
|
27
|
+
params?: object | string;
|
|
28
|
+
//外层type=1 name 存在
|
|
29
|
+
name?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class Launch {
|
|
34
|
+
//内部路由
|
|
35
|
+
router: Router;
|
|
36
|
+
//跳转三方路由
|
|
37
|
+
nativeRouter: ESNativeRouter;
|
|
38
|
+
//获取本地包名
|
|
39
|
+
develop: ESDevelop;
|
|
40
|
+
allowClick = false;
|
|
41
|
+
|
|
42
|
+
init(...params: any[]): Promise<any> {
|
|
43
|
+
this.router = params[0];
|
|
44
|
+
this.nativeRouter = params[1];
|
|
45
|
+
this.develop = params[2];
|
|
46
|
+
return Promise.resolve();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 跳转方法
|
|
51
|
+
* @param item
|
|
52
|
+
* @param isReplace
|
|
53
|
+
*/
|
|
54
|
+
launch(item: LaunchParams, isReplace: boolean = false): void {
|
|
55
|
+
//防止同时触发多次跳转
|
|
56
|
+
if (this.allowClick) return;
|
|
57
|
+
this.allowClick = true;
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
this.allowClick = false;
|
|
60
|
+
}, 1000);
|
|
61
|
+
if (!item) return;
|
|
62
|
+
const type = item.type;
|
|
63
|
+
switch (type) {
|
|
64
|
+
//快应用间跳转
|
|
65
|
+
case 0:
|
|
66
|
+
case "0":
|
|
67
|
+
this.jumpType0(item);
|
|
68
|
+
break;
|
|
69
|
+
//快应用内部跳转
|
|
70
|
+
case 1:
|
|
71
|
+
case "1":
|
|
72
|
+
this.jumpType1(item, isReplace);
|
|
73
|
+
break;
|
|
74
|
+
//三方应用跳转
|
|
75
|
+
case 3:
|
|
76
|
+
case "3":
|
|
77
|
+
this.jumpType3(item);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 快应用间跳转
|
|
84
|
+
* "options":{
|
|
85
|
+
"type": 0,
|
|
86
|
+
"options": "esapp://action/start?es_pkg=es.com.fishing.tv&from=fishing&args={\"url\":\"find\",\"params\":{\"home\":1}}"
|
|
87
|
+
}
|
|
88
|
+
* @param item
|
|
89
|
+
*/
|
|
90
|
+
jumpType0(item: LaunchParams) {
|
|
91
|
+
const url = item.options;
|
|
92
|
+
if (url && typeof url === "string") {
|
|
93
|
+
this.launchByUrl(url, true, "", []);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 内部跳转
|
|
99
|
+
* "options":{
|
|
100
|
+
"name": "series_view",
|
|
101
|
+
"params": {
|
|
102
|
+
"mediaId": "1732640344681091074",
|
|
103
|
+
"startPosition": "0"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
* @param item
|
|
107
|
+
* @param isReplace
|
|
108
|
+
*/
|
|
109
|
+
jumpType1(item: LaunchParams, isReplace: boolean = false) {
|
|
110
|
+
//{"options":{"name":"screen_main_view","params":{"screenId":"1764924767380697089","defaultSelectTabTag":"科普"}},"type":1}
|
|
111
|
+
const options = item.options;
|
|
112
|
+
if (options && typeof options !== "string") {
|
|
113
|
+
if (isReplace) {
|
|
114
|
+
this.router.replace(<RouteLocationRaw>options).then(() => {});
|
|
115
|
+
} else {
|
|
116
|
+
this.router.push(<RouteLocationRaw>options).then(() => {});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 跳转三方应用
|
|
123
|
+
* @param item
|
|
124
|
+
*/
|
|
125
|
+
jumpType3(item: LaunchParams) {
|
|
126
|
+
const options = item.options;
|
|
127
|
+
if (typeof options !== "string") {
|
|
128
|
+
const type = options.type;
|
|
129
|
+
const packageName = options.packageName;
|
|
130
|
+
let params = [];
|
|
131
|
+
if (options.params && typeof options.params === "string") {
|
|
132
|
+
params = JSON.parse(options.params);
|
|
133
|
+
}
|
|
134
|
+
switch (type) {
|
|
135
|
+
case "URL":
|
|
136
|
+
this.launchByUrl(options.url, false, packageName, params);
|
|
137
|
+
break;
|
|
138
|
+
case "ACTIVITY":
|
|
139
|
+
this.launchByActivity(
|
|
140
|
+
packageName + "/" + options.activityPath,
|
|
141
|
+
packageName,
|
|
142
|
+
params,
|
|
143
|
+
);
|
|
144
|
+
break;
|
|
145
|
+
case "ACTION":
|
|
146
|
+
this.launchByAction(options.action, packageName, params);
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* URL scheme跳转
|
|
154
|
+
* @param url
|
|
155
|
+
* @param isUseLocalPkg
|
|
156
|
+
* @param packageName
|
|
157
|
+
* @param params
|
|
158
|
+
*/
|
|
159
|
+
launchByUrl(
|
|
160
|
+
url,
|
|
161
|
+
isUseLocalPkg: boolean = true,
|
|
162
|
+
packageName = "",
|
|
163
|
+
params = [],
|
|
164
|
+
) {
|
|
165
|
+
if (!url) return;
|
|
166
|
+
const args: Array<any> = [];
|
|
167
|
+
args.push(["-d", url]);
|
|
168
|
+
if (!url.includes("-p")) {
|
|
169
|
+
if (isUseLocalPkg) {
|
|
170
|
+
const mPackageName = this.develop.getPackageName();
|
|
171
|
+
args.push(["-p", mPackageName]);
|
|
172
|
+
} else if (packageName) {
|
|
173
|
+
args.push(["-p", packageName]);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
this.jumpNative(args, params);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* ACTION 跳转
|
|
181
|
+
* @param action
|
|
182
|
+
* @param packageName
|
|
183
|
+
* @param params
|
|
184
|
+
*/
|
|
185
|
+
launchByAction(action, packageName, params) {
|
|
186
|
+
const args: Array<any> = [];
|
|
187
|
+
args.push(["-a", action]);
|
|
188
|
+
args.push(["-p", packageName]);
|
|
189
|
+
this.jumpNative(args, params);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* ACTIVITY 跳转
|
|
194
|
+
* @param activityPath
|
|
195
|
+
* @param packageName
|
|
196
|
+
* @param params
|
|
197
|
+
*/
|
|
198
|
+
launchByActivity(activityPath, packageName, params) {
|
|
199
|
+
const args: Array<any> = [];
|
|
200
|
+
if (activityPath) {
|
|
201
|
+
args.push(["-n", activityPath]);
|
|
202
|
+
}
|
|
203
|
+
// args.push(['-a', "android.intent.action.VIEW"]);
|
|
204
|
+
args.push(["-p", packageName]);
|
|
205
|
+
this.jumpNative(args, params);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 封装跳转
|
|
210
|
+
* @param args
|
|
211
|
+
* @param params
|
|
212
|
+
*/
|
|
213
|
+
jumpNative(args: Array<any> = [], params = []) {
|
|
214
|
+
let mArgs = args;
|
|
215
|
+
const mParam = this.buildParams(params);
|
|
216
|
+
if (mParam && mParam.length > 0) {
|
|
217
|
+
mArgs = args.concat(mParam);
|
|
218
|
+
}
|
|
219
|
+
this.nativeRouter.launch(mArgs).then(() => {});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* build参数
|
|
224
|
+
* @param params
|
|
225
|
+
*/
|
|
226
|
+
buildParams(params: []) {
|
|
227
|
+
const mParam = [];
|
|
228
|
+
if (params && params.length > 0) {
|
|
229
|
+
for (const item of params) {
|
|
230
|
+
const key = item["key"];
|
|
231
|
+
const value = item["value"];
|
|
232
|
+
const type = item["type"];
|
|
233
|
+
mParam.push(this.decodeParams(key, value, type));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return mParam;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 解析参数
|
|
241
|
+
* @param key
|
|
242
|
+
* @param value
|
|
243
|
+
* @param type
|
|
244
|
+
*/
|
|
245
|
+
decodeParams(key, value, type) {
|
|
246
|
+
let param = [];
|
|
247
|
+
switch (type.toLowerCase()) {
|
|
248
|
+
case "string":
|
|
249
|
+
param = ["--es", key, value];
|
|
250
|
+
break;
|
|
251
|
+
case "int":
|
|
252
|
+
param = ["--ei", key, value];
|
|
253
|
+
break;
|
|
254
|
+
case "boolean":
|
|
255
|
+
param = ["--ez", key, value];
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
return param;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* 跳转个人中心
|
|
263
|
+
*/
|
|
264
|
+
launchMy() {
|
|
265
|
+
this.router.push({
|
|
266
|
+
name: "my",
|
|
267
|
+
params: {},
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* 跳转搜索
|
|
273
|
+
*/
|
|
274
|
+
launchSearch() {
|
|
275
|
+
this.router.push({
|
|
276
|
+
name: "search",
|
|
277
|
+
params: {},
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* 跳转详情
|
|
283
|
+
*/
|
|
284
|
+
launchDetail(jumpId: string) {
|
|
285
|
+
this.router.push({
|
|
286
|
+
name: "detail",
|
|
287
|
+
params: { mediaId: jumpId },
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
launchDetailFull() {
|
|
292
|
+
this.router.push({
|
|
293
|
+
name: "fullPlay",
|
|
294
|
+
params: {},
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
launchExitDialog() {
|
|
299
|
+
this.router.push({
|
|
300
|
+
name: "exit_dialog",
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
launchBack() {
|
|
304
|
+
this.router.back();
|
|
305
|
+
}
|
|
306
|
+
launchGo() {
|
|
307
|
+
this.router.go(-2);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
launchHome() {
|
|
311
|
+
this.router.push({
|
|
312
|
+
name: "home",
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
launchLive() {
|
|
317
|
+
this.router.push({
|
|
318
|
+
name: "live",
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
//拼接快应用scheme
|
|
323
|
+
buildScheme(
|
|
324
|
+
esPackageName: string,
|
|
325
|
+
from: string,
|
|
326
|
+
url?: string,
|
|
327
|
+
params?: object,
|
|
328
|
+
): string {
|
|
329
|
+
let scheme = `esapp://action/start?es_pkg=${esPackageName}&from=${from}&splash=-1`;
|
|
330
|
+
if (url !== undefined && url !== null) {
|
|
331
|
+
const argsParams = { url, params };
|
|
332
|
+
scheme += `&args=${JSON.stringify(argsParams)}`;
|
|
333
|
+
}
|
|
334
|
+
return scheme;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const launch = new Launch();
|
|
339
|
+
export default launch;
|