@quicktvui/ai 1.0.9 → 1.1.1
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/README.md +31 -0
- package/USAGE.md +22 -7
- package/package.json +1 -1
- package/rules/.clinerules +1 -0
- package/rules/.cursorrules +1 -0
- package/rules/.docs/zh-CN/guide/ai/ai-assistant.md +16 -6
- 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,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="device-info-root-css"
|
|
4
|
+
:gradientBackground="{
|
|
5
|
+
colors: ThemeConfig.bgGradientColor,
|
|
6
|
+
orientation: 0,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<span class="device-info-title">相关信息</span>
|
|
10
|
+
<qt-list-view class="device-info-list" :listData="mInfoList">
|
|
11
|
+
<div class="device-info-item-root" :type="1">
|
|
12
|
+
<qt-text
|
|
13
|
+
class="device-info-item-text device-info-item-name"
|
|
14
|
+
:lines="1"
|
|
15
|
+
:fontSize="36"
|
|
16
|
+
gravity="center|start"
|
|
17
|
+
text="${name}"
|
|
18
|
+
/>
|
|
19
|
+
<qt-text
|
|
20
|
+
class="device-info-item-text device-info-item-value"
|
|
21
|
+
:lines="1"
|
|
22
|
+
:fontSize="36"
|
|
23
|
+
gravity="center|end"
|
|
24
|
+
text="${info}"
|
|
25
|
+
/>
|
|
26
|
+
<div
|
|
27
|
+
style="
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 1020px;
|
|
30
|
+
height: 2px;
|
|
31
|
+
top: 118px;
|
|
32
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
33
|
+
"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</qt-list-view>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
import { qtRef } from "@quicktvui/quicktvui3";
|
|
42
|
+
import userManager from "../../api/user/user-manager";
|
|
43
|
+
import ThemeConfig from "../../config/theme-config";
|
|
44
|
+
import BuildConfig from "../../config/build-config";
|
|
45
|
+
defineOptions({
|
|
46
|
+
name: "index",
|
|
47
|
+
});
|
|
48
|
+
const mInfoList = qtRef();
|
|
49
|
+
const onESCreate = () => {
|
|
50
|
+
initDeviceInfo();
|
|
51
|
+
};
|
|
52
|
+
const initDeviceInfo = () => {
|
|
53
|
+
const userId = userManager.getUserInfo()?.userId;
|
|
54
|
+
const isLogin = userManager.isLogin();
|
|
55
|
+
const macE = qt.device.getDeviceEthMac();
|
|
56
|
+
const macW = qt.device.getDeviceWifiMac();
|
|
57
|
+
let mac = macE;
|
|
58
|
+
if (mac && macW) {
|
|
59
|
+
mac = mac + "/" + macW;
|
|
60
|
+
} else {
|
|
61
|
+
if (!mac) {
|
|
62
|
+
mac = macW;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const ipAddress = qt.device.getIPAddress();
|
|
66
|
+
const versionRelease =
|
|
67
|
+
qt.develop.getVersionName() + "-" + BuildConfig.VUE_PLUGIN_VERSION;
|
|
68
|
+
const clientType = qt.device.getBuildModel() + "-" + qt.develop.getChannel();
|
|
69
|
+
const dnum = qt.runtime.getRuntimeDeviceId();
|
|
70
|
+
const infoList: any = [];
|
|
71
|
+
infoList.push({
|
|
72
|
+
type: 1,
|
|
73
|
+
name: "用户ID ",
|
|
74
|
+
info: isLogin ? userId : "未登录",
|
|
75
|
+
});
|
|
76
|
+
infoList.push({
|
|
77
|
+
type: 1,
|
|
78
|
+
name: "软件版本号 ",
|
|
79
|
+
info: versionRelease,
|
|
80
|
+
});
|
|
81
|
+
infoList.push({
|
|
82
|
+
type: 1,
|
|
83
|
+
name: "设备机型 ",
|
|
84
|
+
info: clientType,
|
|
85
|
+
});
|
|
86
|
+
infoList.push({
|
|
87
|
+
type: 1,
|
|
88
|
+
name: "IP地址 ",
|
|
89
|
+
info: ipAddress,
|
|
90
|
+
});
|
|
91
|
+
infoList.push({
|
|
92
|
+
type: 1,
|
|
93
|
+
name: "MAC地址 ",
|
|
94
|
+
info: mac,
|
|
95
|
+
});
|
|
96
|
+
infoList.push({
|
|
97
|
+
type: 1,
|
|
98
|
+
name: "设备序列号 ",
|
|
99
|
+
info: dnum,
|
|
100
|
+
});
|
|
101
|
+
mInfoList.value = infoList;
|
|
102
|
+
};
|
|
103
|
+
defineExpose({ onESCreate });
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style lang="scss" src="./scss/device-info.scss"></style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.device-info-root-css {
|
|
2
|
+
width: 1920px;
|
|
3
|
+
height: 1080px;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.device-info-title {
|
|
9
|
+
color: white;
|
|
10
|
+
font-size: 50px;
|
|
11
|
+
height: 60px;
|
|
12
|
+
width: 240px;
|
|
13
|
+
font-weight: normal;
|
|
14
|
+
margin-top: 68px;
|
|
15
|
+
margin-left: 90px;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.device-info-list {
|
|
20
|
+
width: 1020px;
|
|
21
|
+
height: 720px;
|
|
22
|
+
margin-top: 46px;
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
flex: 0;
|
|
25
|
+
align-self: center;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.device-info-item-root {
|
|
30
|
+
width: 1020px;
|
|
31
|
+
height: 120px;
|
|
32
|
+
background-color: transparent;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.device-info-item-text {
|
|
38
|
+
height: 46px;
|
|
39
|
+
margin-top: 44px;
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
}
|
|
42
|
+
.device-info-item-name {
|
|
43
|
+
width: 200px;
|
|
44
|
+
color: rgba(255, 255, 255, 0.5);
|
|
45
|
+
}
|
|
46
|
+
.device-info-item-value {
|
|
47
|
+
width: 800px;
|
|
48
|
+
color: white;
|
|
49
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 筛选
|
|
2
|
+
|
|
3
|
+
## 页面功能
|
|
4
|
+
|
|
5
|
+
页面支持三种布局方式,通过页面级配置文件config.ts中layoutMode来控制。
|
|
6
|
+
|
|
7
|
+
layoutMode: 1 # 单栏布局,基础单页面
|
|
8
|
+
2 # 两栏布局,左侧筛选项列表、右侧基础单页面
|
|
9
|
+
3 # 三栏布局,在两栏布局的基础上增加了扩展一级筛选项列表
|
|
10
|
+
|
|
11
|
+
## 页面布局
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
### 基础单页面(single-contents.vue)
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
### 左侧筛选项列表、右侧基础单页面(sidebar-contents.vue)
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
### 左侧筛选项列表(支持向左扩展一级筛选项列表)、右侧基础单页面(expand-sidebar-contents.vue)
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
## 目录结构
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
src/pages/filter
|
|
31
|
+
├── README.md // 自述文件
|
|
32
|
+
├── adapter // 数据转换及类型定义
|
|
33
|
+
│ ├── index.ts
|
|
34
|
+
│ └── interface.ts
|
|
35
|
+
├── api // 网络请求
|
|
36
|
+
│ ├── index.ts
|
|
37
|
+
│ ├── interface.ts
|
|
38
|
+
│ └── request-url.ts
|
|
39
|
+
├── components // 页面组件
|
|
40
|
+
│ ├── content // 筛选内容
|
|
41
|
+
│ │ ├── grid-item-h.vue
|
|
42
|
+
│ │ ├── grid-item-v.vue
|
|
43
|
+
│ │ ├── index.vue
|
|
44
|
+
│ │ ├── list-item-record.vue
|
|
45
|
+
│ │ └── list-item.vue
|
|
46
|
+
│ ├── expand // 左侧列表扩展
|
|
47
|
+
│ │ └── index.vue
|
|
48
|
+
│ └── sidebar // 左侧列表
|
|
49
|
+
│ ├── index.vue
|
|
50
|
+
│ ├── list-item-filter-title.vue
|
|
51
|
+
│ ├── list-item-filter.vue
|
|
52
|
+
│ ├── list-item-line.vue
|
|
53
|
+
│ ├── list-item-text.vue
|
|
54
|
+
│ └── list-item-title.vue
|
|
55
|
+
├── scss // 样式文件
|
|
56
|
+
│ ├── filter-content-grid-item.scss
|
|
57
|
+
│ ├── filter-content-list-item.scss
|
|
58
|
+
│ ├── filter-content.scss
|
|
59
|
+
│ ├── filter-expand.scss
|
|
60
|
+
│ ├── filter-sidebar.scss
|
|
61
|
+
│ └── filter.scss
|
|
62
|
+
├── config.ts // 页面配置
|
|
63
|
+
├── expand-sidebar-contents.vue
|
|
64
|
+
├── sidebar-contents.vue
|
|
65
|
+
└── single-contents.vue
|
|
66
|
+
```
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { QTListViewItem } from "@quicktvui/quicktvui3";
|
|
2
|
+
import { Filters, Contents } from "../api/interface";
|
|
3
|
+
import {
|
|
4
|
+
GridContent,
|
|
5
|
+
GridContentType,
|
|
6
|
+
ListItemType,
|
|
7
|
+
Primary,
|
|
8
|
+
PrimaryType,
|
|
9
|
+
Secondary,
|
|
10
|
+
SecondaryType,
|
|
11
|
+
Tertiary,
|
|
12
|
+
TertiaryType,
|
|
13
|
+
} from "./interface";
|
|
14
|
+
import config from "../config";
|
|
15
|
+
import icFilterNormal from "../../../assets/filter/ic_filter_normal.png";
|
|
16
|
+
import icFilterFocused from "../../../assets/filter/ic_filter_focused.png";
|
|
17
|
+
import icFilterSelected from "../../../assets/filter/ic_filter_selected.png";
|
|
18
|
+
import icLeftNormal from "../../../assets/filter/ic_left_normal.png";
|
|
19
|
+
import icLeftFocused from "../../../assets/filter/ic_left_focused.png";
|
|
20
|
+
import icLeftSelected from "../../../assets/filter/ic_left_selected.png";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 构建一级、二级、三级筛选项
|
|
24
|
+
* @param primaryId 一级筛选项ID
|
|
25
|
+
* @param rawData 原始数据
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export const buildFilters = function (
|
|
29
|
+
primaryId: string,
|
|
30
|
+
rawData: Filters,
|
|
31
|
+
defaultTags: string[],
|
|
32
|
+
): { primaries: Primary[]; secondaries: Secondary[]; tertiaries: Tertiary[] } {
|
|
33
|
+
// 一级列表, 左侧扩展
|
|
34
|
+
const primaries: Primary[] = rawData.primary.map((item) => ({
|
|
35
|
+
type: PrimaryType.TEXT,
|
|
36
|
+
...item,
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
// 二级列表, 左侧筛选项
|
|
40
|
+
const secondaries: Secondary[] = [];
|
|
41
|
+
switch (config.layoutMode) {
|
|
42
|
+
case 1: // 单栏布局
|
|
43
|
+
break;
|
|
44
|
+
case 2: // 两栏布局
|
|
45
|
+
secondaries.push(
|
|
46
|
+
...[
|
|
47
|
+
{
|
|
48
|
+
type: SecondaryType.TITLE,
|
|
49
|
+
id: "NIL",
|
|
50
|
+
name: primaries.find((item) => item.id === primaryId)?.name || "",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: SecondaryType.FILTER,
|
|
54
|
+
id: "NIL",
|
|
55
|
+
name: "筛选",
|
|
56
|
+
icon: {
|
|
57
|
+
normal: "file://" + icFilterNormal,
|
|
58
|
+
focused: "file://" + icFilterFocused,
|
|
59
|
+
selected: "file://" + icFilterSelected,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
);
|
|
64
|
+
break;
|
|
65
|
+
case 3: // 三栏布局
|
|
66
|
+
secondaries.push(
|
|
67
|
+
...[
|
|
68
|
+
{
|
|
69
|
+
type: SecondaryType.FILTER_TITLE,
|
|
70
|
+
id: "NIL",
|
|
71
|
+
name:
|
|
72
|
+
"全部" + primaries.find((item) => item.id === primaryId)?.name ||
|
|
73
|
+
"",
|
|
74
|
+
icon: {
|
|
75
|
+
normal: "file://" + icLeftNormal,
|
|
76
|
+
focused: "file://" + icLeftFocused,
|
|
77
|
+
selected: "file://" + icLeftSelected,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{ type: SecondaryType.LINE, id: "NIL", name: "line" },
|
|
81
|
+
],
|
|
82
|
+
);
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
secondaries.push(...rawData.secondary.map((item) => ({ type: 9, ...item })));
|
|
86
|
+
|
|
87
|
+
// 三级列表, 右侧筛选条件
|
|
88
|
+
const tertiaries: Tertiary[] = rawData.tertiary.map((item) => {
|
|
89
|
+
const tagNames = item.tags.map((tag) => tag.name);
|
|
90
|
+
const defaultTagIndex = tagNames.findIndex((tagName) =>
|
|
91
|
+
defaultTags.includes(tagName),
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
type: TertiaryType.LIST,
|
|
96
|
+
groupKey: item.groupKey,
|
|
97
|
+
groupName: item.groupName,
|
|
98
|
+
list: [
|
|
99
|
+
{ type: ListItemType.TEXT, name: item.groupName },
|
|
100
|
+
...item.tags.map((tag) => ({ type: ListItemType.TEXT, ...tag })),
|
|
101
|
+
],
|
|
102
|
+
defaultSelectedPos: defaultTagIndex !== -1 ? defaultTagIndex + 1 : 0,
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// 优化内容区域焦点首次向上体验, 值需要全局唯一
|
|
107
|
+
tertiaries[tertiaries.length - 1].list[0].sid = "--sid--";
|
|
108
|
+
|
|
109
|
+
// 优化最后一组筛选条件向下焦点
|
|
110
|
+
tertiaries[tertiaries.length - 1].list.map(
|
|
111
|
+
(item) => (item.nextFocusName = { down: "contentGrid" }),
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
return { primaries, secondaries, tertiaries };
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 构建筛选内容组件数据
|
|
119
|
+
* @param rawData 原始数据
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
export const buildContents = function (rawData: Contents): GridContent[] {
|
|
123
|
+
return rawData.items.map((item) => ({
|
|
124
|
+
type:
|
|
125
|
+
config.gridItemMode === 1
|
|
126
|
+
? GridContentType.HORIZONTAL
|
|
127
|
+
: GridContentType.VERTICAL,
|
|
128
|
+
decoration: { top: 22, right: 40, bottom: 18 },
|
|
129
|
+
id: item.id,
|
|
130
|
+
title: item.title,
|
|
131
|
+
cover: item.image,
|
|
132
|
+
corner: "免费",
|
|
133
|
+
showCorner: true,
|
|
134
|
+
score: item.score.toFixed(1),
|
|
135
|
+
showRating: true,
|
|
136
|
+
jumpParams: item.jumpParams,
|
|
137
|
+
}));
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 获取请求筛选内容查询参数
|
|
142
|
+
* @param filters 筛选条件列表
|
|
143
|
+
* @returns
|
|
144
|
+
*/
|
|
145
|
+
export const getContentsQuery = (filters: QTListViewItem[]): string[] => {
|
|
146
|
+
const query: string[] = [];
|
|
147
|
+
|
|
148
|
+
filters.forEach((item) => {
|
|
149
|
+
if (item.defaultSelectedPos > 0) {
|
|
150
|
+
query.push(item.list[item.defaultSelectedPos].name);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return query;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 判断是否需要添加到底提示
|
|
159
|
+
* @param showConditions 是否展示筛选条件
|
|
160
|
+
* @param gridDataLength 筛选内容数据条数
|
|
161
|
+
* @returns
|
|
162
|
+
*/
|
|
163
|
+
export const shouldAddEndSection = (
|
|
164
|
+
showConditions: boolean,
|
|
165
|
+
gridDataLength: number,
|
|
166
|
+
): boolean => {
|
|
167
|
+
const cfgGridSpanCount = config.gridSpanCount;
|
|
168
|
+
switch (config.gridItemMode) {
|
|
169
|
+
case 1:
|
|
170
|
+
return showConditions
|
|
171
|
+
? gridDataLength > cfgGridSpanCount * 2
|
|
172
|
+
: gridDataLength > cfgGridSpanCount * 3;
|
|
173
|
+
case 2:
|
|
174
|
+
return showConditions
|
|
175
|
+
? gridDataLength > cfgGridSpanCount
|
|
176
|
+
: gridDataLength > cfgGridSpanCount * 2;
|
|
177
|
+
default:
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { QTListViewItemDecoration } from "@quicktvui/quicktvui3";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 一级筛选项类型
|
|
5
|
+
*/
|
|
6
|
+
export enum PrimaryType {
|
|
7
|
+
// 文本
|
|
8
|
+
TEXT = 1,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 一级筛选项
|
|
13
|
+
*/
|
|
14
|
+
export interface Primary {
|
|
15
|
+
type: PrimaryType;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 二级筛选项类型
|
|
22
|
+
*/
|
|
23
|
+
export enum SecondaryType {
|
|
24
|
+
// 标题
|
|
25
|
+
TITLE = 1,
|
|
26
|
+
// 两栏筛选项
|
|
27
|
+
FILTER = 2,
|
|
28
|
+
// 三栏筛选项
|
|
29
|
+
FILTER_TITLE = 3,
|
|
30
|
+
// 文本
|
|
31
|
+
TEXT = 9,
|
|
32
|
+
// 横线
|
|
33
|
+
LINE = 10,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 二级筛选项
|
|
38
|
+
*/
|
|
39
|
+
export interface Secondary {
|
|
40
|
+
type: SecondaryType;
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
icon?: {
|
|
44
|
+
normal: string;
|
|
45
|
+
focused: string;
|
|
46
|
+
selected: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 三级筛选项类型
|
|
52
|
+
*/
|
|
53
|
+
export enum TertiaryType {
|
|
54
|
+
// 列表
|
|
55
|
+
LIST = 1,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 三级筛选项
|
|
60
|
+
*/
|
|
61
|
+
export interface Tertiary {
|
|
62
|
+
type: TertiaryType;
|
|
63
|
+
groupKey: string; // 接口筛选参数
|
|
64
|
+
groupName: string; // 分组展示名称
|
|
65
|
+
list: ListItem[]; // 子列表数据
|
|
66
|
+
defaultSelectedPos: number; // 默认选中
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 筛选子列表项类型
|
|
71
|
+
*/
|
|
72
|
+
export enum ListItemType {
|
|
73
|
+
// 文本
|
|
74
|
+
TEXT = 1,
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 三级筛选项子列表项类型
|
|
79
|
+
*/
|
|
80
|
+
export interface ListItem {
|
|
81
|
+
type: ListItemType;
|
|
82
|
+
name: string;
|
|
83
|
+
sid?: string;
|
|
84
|
+
nextFocusName?: object;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 筛选内容类型
|
|
89
|
+
*/
|
|
90
|
+
export enum GridContentType {
|
|
91
|
+
// 横图
|
|
92
|
+
HORIZONTAL = 1,
|
|
93
|
+
// 竖图
|
|
94
|
+
VERTICAL = 2,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 筛选内容
|
|
99
|
+
*/
|
|
100
|
+
export interface GridContent {
|
|
101
|
+
type: GridContentType;
|
|
102
|
+
decoration: QTListViewItemDecoration;
|
|
103
|
+
id: string;
|
|
104
|
+
title: string;
|
|
105
|
+
cover: string;
|
|
106
|
+
corner?: string;
|
|
107
|
+
showCorner?: boolean;
|
|
108
|
+
score?: string;
|
|
109
|
+
showRating?: boolean;
|
|
110
|
+
jumpParams: any;
|
|
111
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FilterApi, Filters } from "./interface";
|
|
2
|
+
import { filterContentsUrl, filterLeftListUrl } from "./request-url";
|
|
3
|
+
import { replacePlaceholders } from "../../../tools/common";
|
|
4
|
+
import requestManager from "../../../tools/request";
|
|
5
|
+
import config from "../../../config/build-config";
|
|
6
|
+
|
|
7
|
+
class FilterManager implements FilterApi {
|
|
8
|
+
// 获取筛选左侧列表
|
|
9
|
+
getFilters(primaryId: string): Promise<Filters> {
|
|
10
|
+
return requestManager.get(
|
|
11
|
+
replacePlaceholders(filterLeftListUrl, {
|
|
12
|
+
packageName: config.packageName,
|
|
13
|
+
primaryId,
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 获取筛选内容
|
|
19
|
+
getContents(
|
|
20
|
+
primaryId: string,
|
|
21
|
+
query?: string,
|
|
22
|
+
page: number = 1,
|
|
23
|
+
limit: number = 10,
|
|
24
|
+
): Promise<any> {
|
|
25
|
+
return requestManager.get(
|
|
26
|
+
replacePlaceholders(filterContentsUrl, {
|
|
27
|
+
packageName: config.packageName,
|
|
28
|
+
primaryId,
|
|
29
|
+
query,
|
|
30
|
+
page,
|
|
31
|
+
limit,
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const filterManager = new FilterManager();
|
|
38
|
+
export default filterManager;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface FilterApi {
|
|
2
|
+
// 获取筛选项列表
|
|
3
|
+
getFilters(primaryId: string, secondaryId: string): Promise<Filters>;
|
|
4
|
+
// 获取筛选内容
|
|
5
|
+
getContents(
|
|
6
|
+
primaryId: string,
|
|
7
|
+
query?: string,
|
|
8
|
+
page?: number,
|
|
9
|
+
limit?: number,
|
|
10
|
+
): Promise<Contents>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Filters {
|
|
14
|
+
primary: Tag[]; // 一级筛选项
|
|
15
|
+
secondary: Tag[]; // 二级筛选项
|
|
16
|
+
tertiary: Tertiary[]; // 三级筛选项
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Tertiary {
|
|
20
|
+
groupKey: string;
|
|
21
|
+
groupName: string;
|
|
22
|
+
tags: Tag[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Tag {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Contents {
|
|
31
|
+
total: number;
|
|
32
|
+
items: {
|
|
33
|
+
id: string;
|
|
34
|
+
image: string;
|
|
35
|
+
title: string;
|
|
36
|
+
subTitle: string;
|
|
37
|
+
floatTitle: string;
|
|
38
|
+
score: number;
|
|
39
|
+
jumpParams: {
|
|
40
|
+
type: number;
|
|
41
|
+
options: object;
|
|
42
|
+
};
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BuildConfig from "../../../config/build-config";
|
|
2
|
+
|
|
3
|
+
export const filterLeftListUrl =
|
|
4
|
+
BuildConfig.requestBaseUrl +
|
|
5
|
+
"/filter/${primaryId}/tags?packageName=${packageName}";
|
|
6
|
+
export const filterContentsUrl =
|
|
7
|
+
BuildConfig.requestBaseUrl +
|
|
8
|
+
"/filter/${primaryId}/contents?packageName=${packageName}&query=${query}&page=${page}&limit=${limit}";
|