@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.
Files changed (348) hide show
  1. package/README.md +31 -0
  2. package/USAGE.md +22 -7
  3. package/package.json +1 -1
  4. package/rules/.clinerules +1 -0
  5. package/rules/.cursorrules +1 -0
  6. package/rules/.docs/zh-CN/guide/ai/ai-assistant.md +16 -6
  7. package/rules/.github/copilot-instructions.md +1 -0
  8. package/rules/.source/hellotv/PROJECT-README.md +52 -0
  9. package/rules/.source/hellotv/app.d.ts +11 -0
  10. package/rules/.source/hellotv/package.json +146 -0
  11. package/rules/.source/hellotv/scripts/build-apk.ts +12 -0
  12. package/rules/.source/hellotv/scripts/build.ts +35 -0
  13. package/rules/.source/hellotv/scripts/dev.ts +12 -0
  14. package/rules/.source/hellotv/scripts/pack.ts +24 -0
  15. package/rules/.source/hellotv/scripts/process.ts +37 -0
  16. package/rules/.source/hellotv/scripts/quicktvui-webpack.android.ts +187 -0
  17. package/rules/.source/hellotv/scripts/quicktvui-webpack.dev.ts +147 -0
  18. package/rules/.source/hellotv/scripts/webpack-watch.ts +24 -0
  19. package/rules/.source/hellotv/src/App.vue +192 -0
  20. package/rules/.source/hellotv/src/api/my/index.ts +198 -0
  21. package/rules/.source/hellotv/src/api/user/impl-user.ts +52 -0
  22. package/rules/.source/hellotv/src/api/user/qr-code-mock.ts +2 -0
  23. package/rules/.source/hellotv/src/api/user/request-url.ts +11 -0
  24. package/rules/.source/hellotv/src/api/user/user-manager.ts +258 -0
  25. package/rules/.source/hellotv/src/app.scss +8 -0
  26. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_pause.png +0 -0
  27. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_play.png +0 -0
  28. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_focused.png +0 -0
  29. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_normal.png +0 -0
  30. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_focused.png +0 -0
  31. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_normal.png +0 -0
  32. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_focused.png +0 -0
  33. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_selected.png +0 -0
  34. package/rules/.source/hellotv/src/assets/detail/ic_collect_focused.png +0 -0
  35. package/rules/.source/hellotv/src/assets/detail/ic_collect_normal.png +0 -0
  36. package/rules/.source/hellotv/src/assets/detail/ic_full_focused.png +0 -0
  37. package/rules/.source/hellotv/src/assets/detail/ic_full_normal.png +0 -0
  38. package/rules/.source/hellotv/src/assets/detail/ic_info_focused.png +0 -0
  39. package/rules/.source/hellotv/src/assets/detail/ic_info_normal.png +0 -0
  40. package/rules/.source/hellotv/src/assets/detail/ic_introduction_bg.png +0 -0
  41. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_normal.png +0 -0
  42. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_selected.png +0 -0
  43. package/rules/.source/hellotv/src/assets/detail/ic_media_player_pause.png +0 -0
  44. package/rules/.source/hellotv/src/assets/detail/ic_media_player_placeholder.png +0 -0
  45. package/rules/.source/hellotv/src/assets/detail/ic_media_player_play.png +0 -0
  46. package/rules/.source/hellotv/src/assets/detail/ic_vip_focused.png +0 -0
  47. package/rules/.source/hellotv/src/assets/detail/ic_vip_normal.png +0 -0
  48. package/rules/.source/hellotv/src/assets/detail/skeleton.png +0 -0
  49. package/rules/.source/hellotv/src/assets/filter/ic_empty.png +0 -0
  50. package/rules/.source/hellotv/src/assets/filter/ic_filter_focused.png +0 -0
  51. package/rules/.source/hellotv/src/assets/filter/ic_filter_normal.png +0 -0
  52. package/rules/.source/hellotv/src/assets/filter/ic_filter_selected.png +0 -0
  53. package/rules/.source/hellotv/src/assets/filter/ic_left_focused.png +0 -0
  54. package/rules/.source/hellotv/src/assets/filter/ic_left_normal.png +0 -0
  55. package/rules/.source/hellotv/src/assets/filter/ic_left_selected.png +0 -0
  56. package/rules/.source/hellotv/src/assets/history/ic_delete.png +0 -0
  57. package/rules/.source/hellotv/src/assets/history/ic_empty.png +0 -0
  58. package/rules/.source/hellotv/src/assets/home/bg_history_item.png +0 -0
  59. package/rules/.source/hellotv/src/assets/home/bg_shadow.png +0 -0
  60. package/rules/.source/hellotv/src/assets/home/ic_4k_logo.png +0 -0
  61. package/rules/.source/hellotv/src/assets/home/ic_4k_play_focused.png +0 -0
  62. package/rules/.source/hellotv/src/assets/home/ic_4k_subtitle_normal.png +0 -0
  63. package/rules/.source/hellotv/src/assets/home/ic_arrow_focused.png +0 -0
  64. package/rules/.source/hellotv/src/assets/home/ic_arrow_normal.png +0 -0
  65. package/rules/.source/hellotv/src/assets/home/ic_exit_corner.png +0 -0
  66. package/rules/.source/hellotv/src/assets/home/ic_exit_header.png +0 -0
  67. package/rules/.source/hellotv/src/assets/home/ic_play.png +0 -0
  68. package/rules/.source/hellotv/src/assets/live/bg-error.png +0 -0
  69. package/rules/.source/hellotv/src/assets/live/bg-play-info.png +0 -0
  70. package/rules/.source/hellotv/src/assets/live/ic-arrow-left.png +0 -0
  71. package/rules/.source/hellotv/src/assets/live/ic-arrow-right.png +0 -0
  72. package/rules/.source/hellotv/src/assets/live/ic-back.png +0 -0
  73. package/rules/.source/hellotv/src/assets/live/ic-change.png +0 -0
  74. package/rules/.source/hellotv/src/assets/live/ic-corner-vip-tips.png +0 -0
  75. package/rules/.source/hellotv/src/assets/live/ic-corner-vip.png +0 -0
  76. package/rules/.source/hellotv/src/assets/live/ic-key.png +0 -0
  77. package/rules/.source/hellotv/src/assets/live/ic-loading-error.png +0 -0
  78. package/rules/.source/hellotv/src/assets/live/ic-menu-ext-arrow.png +0 -0
  79. package/rules/.source/hellotv/src/assets/live/ic-menu-ext.png +0 -0
  80. package/rules/.source/hellotv/src/assets/live/ic-menu.png +0 -0
  81. package/rules/.source/hellotv/src/assets/live/ic-mine.png +0 -0
  82. package/rules/.source/hellotv/src/assets/live/ic-network-error.png +0 -0
  83. package/rules/.source/hellotv/src/assets/live/ic-ok.png +0 -0
  84. package/rules/.source/hellotv/src/assets/live/ic-playing.png +0 -0
  85. package/rules/.source/hellotv/src/assets/live/ic-playing2.png +0 -0
  86. package/rules/.source/hellotv/src/assets/live/ic-playing3.png +0 -0
  87. package/rules/.source/hellotv/src/assets/live/ic-service.png +0 -0
  88. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast.png +0 -0
  89. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast_focused.png +0 -0
  90. package/rules/.source/hellotv/src/assets/my/ic_collect_focus.png +0 -0
  91. package/rules/.source/hellotv/src/assets/my/ic_collect_normal.png +0 -0
  92. package/rules/.source/hellotv/src/assets/my/ic_order_focus.png +0 -0
  93. package/rules/.source/hellotv/src/assets/my/ic_order_normal.png +0 -0
  94. package/rules/.source/hellotv/src/assets/my/ic_record_focus.png +0 -0
  95. package/rules/.source/hellotv/src/assets/my/ic_record_normal.png +0 -0
  96. package/rules/.source/hellotv/src/assets/my/ic_user.png +0 -0
  97. package/rules/.source/hellotv/src/assets/my/ic_vip_normal.png +0 -0
  98. package/rules/.source/hellotv/src/assets/search/ic_back.png +0 -0
  99. package/rules/.source/hellotv/src/assets/search/ic_back_focused.png +0 -0
  100. package/rules/.source/hellotv/src/assets/search/ic_clear.png +0 -0
  101. package/rules/.source/hellotv/src/assets/search/ic_clear_dark.png +0 -0
  102. package/rules/.source/hellotv/src/assets/search/ic_clear_focused.png +0 -0
  103. package/rules/.source/hellotv/src/assets/search/ic_search.png +0 -0
  104. package/rules/.source/hellotv/src/assets/top-view/ic_logo.png +0 -0
  105. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_focused.png +0 -0
  106. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_normal.png +0 -0
  107. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_focused.png +0 -0
  108. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_normal.png +0 -0
  109. package/rules/.source/hellotv/src/components/bg-animation.scss +14 -0
  110. package/rules/.source/hellotv/src/components/bg-animation.vue +176 -0
  111. package/rules/.source/hellotv/src/components/btn-pack-view.vue +172 -0
  112. package/rules/.source/hellotv/src/components/btn-pack.scss +53 -0
  113. package/rules/.source/hellotv/src/components/grid-item-horizontal.vue +203 -0
  114. package/rules/.source/hellotv/src/components/grid-item-vertical.vue +201 -0
  115. package/rules/.source/hellotv/src/components/media/build-data/media-config.ts +4 -0
  116. package/rules/.source/hellotv/src/components/media/build-data/media-control-adapter.ts +378 -0
  117. package/rules/.source/hellotv/src/components/media/build-data/media-imp.ts +44 -0
  118. package/rules/.source/hellotv/src/components/media/view/media-loading-component.vue +50 -0
  119. package/rules/.source/hellotv/src/components/media/view/media-loading-view.vue +154 -0
  120. package/rules/.source/hellotv/src/components/media/view/media-manager-view.vue +931 -0
  121. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-item.vue +42 -0
  122. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-view.vue +109 -0
  123. package/rules/.source/hellotv/src/components/media/view/media-menu-icon-item.vue +43 -0
  124. package/rules/.source/hellotv/src/components/media/view/media-menu-text-item.vue +27 -0
  125. package/rules/.source/hellotv/src/components/media/view/media-menu-view.vue +88 -0
  126. package/rules/.source/hellotv/src/components/media/view/media-player-view.vue +408 -0
  127. package/rules/.source/hellotv/src/components/media/view/scss/media-loading.scss +51 -0
  128. package/rules/.source/hellotv/src/components/media/view/scss/media-manager.scss +79 -0
  129. package/rules/.source/hellotv/src/components/media/view/scss/media-menu.scss +114 -0
  130. package/rules/.source/hellotv/src/components/media/view/scss/media-player.scss +6 -0
  131. package/rules/.source/hellotv/src/components/qt-tabs-component.ts +268 -0
  132. package/rules/.source/hellotv/src/components/qt-ul-component.ts +792 -0
  133. package/rules/.source/hellotv/src/components/top-view.scss +38 -0
  134. package/rules/.source/hellotv/src/components/top-view.vue +114 -0
  135. package/rules/.source/hellotv/src/config/README.md +22 -0
  136. package/rules/.source/hellotv/src/config/build-config.ts +22 -0
  137. package/rules/.source/hellotv/src/config/private-theme-config.ts +21 -0
  138. package/rules/.source/hellotv/src/config/public-config.scss +16 -0
  139. package/rules/.source/hellotv/src/config/test.scss +45 -0
  140. package/rules/.source/hellotv/src/config/theme-config.ts +51 -0
  141. package/rules/.source/hellotv/src/main.ts +45 -0
  142. package/rules/.source/hellotv/src/pages/activity/adapter/config.ts +37 -0
  143. package/rules/.source/hellotv/src/pages/activity/adapter/index.ts +849 -0
  144. package/rules/.source/hellotv/src/pages/activity/adapter/interface.ts +173 -0
  145. package/rules/.source/hellotv/src/pages/activity/api/index.ts +36 -0
  146. package/rules/.source/hellotv/src/pages/activity/api/interface.ts +11 -0
  147. package/rules/.source/hellotv/src/pages/activity/api/request-url.ts +10 -0
  148. package/rules/.source/hellotv/src/pages/activity/components/item/focus-change-img-item.vue +40 -0
  149. package/rules/.source/hellotv/src/pages/activity/components/item/inner-out-title-item.vue +59 -0
  150. package/rules/.source/hellotv/src/pages/activity/components/item/no-title-item.vue +45 -0
  151. package/rules/.source/hellotv/src/pages/activity/components/item/placeholder-item.vue +25 -0
  152. package/rules/.source/hellotv/src/pages/activity/index.vue +219 -0
  153. package/rules/.source/hellotv/src/pages/activity/scss/index.scss +46 -0
  154. package/rules/.source/hellotv/src/pages/activity/scss/item.scss +69 -0
  155. package/rules/.source/hellotv/src/pages/detail/adapter/index.ts +317 -0
  156. package/rules/.source/hellotv/src/pages/detail/adapter/interface.ts +150 -0
  157. package/rules/.source/hellotv/src/pages/detail/adapter/media-player.ts +378 -0
  158. package/rules/.source/hellotv/src/pages/detail/api/index.ts +77 -0
  159. package/rules/.source/hellotv/src/pages/detail/api/request-url.ts +8 -0
  160. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-definition.vue +192 -0
  161. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-list-item.vue +108 -0
  162. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-media-series.vue +349 -0
  163. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-order.vue +194 -0
  164. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-speed.vue +192 -0
  165. package/rules/.source/hellotv/src/pages/detail/components/media-player/index.vue +404 -0
  166. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-small-view.vue +382 -0
  167. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-view.vue +1099 -0
  168. package/rules/.source/hellotv/src/pages/detail/components/recommend-item.vue +167 -0
  169. package/rules/.source/hellotv/src/pages/detail/components/section/basic-section.vue +218 -0
  170. package/rules/.source/hellotv/src/pages/detail/components/section/config.ts +6 -0
  171. package/rules/.source/hellotv/src/pages/detail/components/section/header-section.vue +15 -0
  172. package/rules/.source/hellotv/src/pages/detail/components/section/item/button-menu.vue +259 -0
  173. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-introduction.vue +238 -0
  174. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-series.vue +308 -0
  175. package/rules/.source/hellotv/src/pages/detail/components/section/item/player-placeholder.vue +88 -0
  176. package/rules/.source/hellotv/src/pages/detail/index.vue +571 -0
  177. package/rules/.source/hellotv/src/pages/detail/scss/index.scss +22 -0
  178. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-loading.vue +78 -0
  179. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-menu-view.vue +803 -0
  180. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-view.vue +219 -0
  181. package/rules/.source/hellotv/src/pages/detail-full-player/index.vue +101 -0
  182. package/rules/.source/hellotv/src/pages/detail-full-player/scss/full-player-view.scss +6 -0
  183. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/index.ts +0 -0
  184. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/interface.ts +133 -0
  185. package/rules/.source/hellotv/src/pages/detail-full-screen/api/index.ts +77 -0
  186. package/rules/.source/hellotv/src/pages/detail-full-screen/api/request-url.ts +8 -0
  187. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-info.vue +263 -0
  188. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-player.vue +42 -0
  189. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-series-section.vue +26 -0
  190. package/rules/.source/hellotv/src/pages/detail-full-screen/components/recommend-item.vue +167 -0
  191. package/rules/.source/hellotv/src/pages/detail-full-screen/index.vue +163 -0
  192. package/rules/.source/hellotv/src/pages/detail-full-screen/scss/index.scss +41 -0
  193. package/rules/.source/hellotv/src/pages/device-info/index.vue +106 -0
  194. package/rules/.source/hellotv/src/pages/device-info/scss/device-info.scss +49 -0
  195. package/rules/.source/hellotv/src/pages/filter/README.md +66 -0
  196. package/rules/.source/hellotv/src/pages/filter/adapter/index.ts +180 -0
  197. package/rules/.source/hellotv/src/pages/filter/adapter/interface.ts +111 -0
  198. package/rules/.source/hellotv/src/pages/filter/api/index.ts +38 -0
  199. package/rules/.source/hellotv/src/pages/filter/api/interface.ts +44 -0
  200. package/rules/.source/hellotv/src/pages/filter/api/request-url.ts +8 -0
  201. package/rules/.source/hellotv/src/pages/filter/components/content/index.vue +469 -0
  202. package/rules/.source/hellotv/src/pages/filter/components/content/list-item-record.vue +16 -0
  203. package/rules/.source/hellotv/src/pages/filter/components/content/list-item.vue +78 -0
  204. package/rules/.source/hellotv/src/pages/filter/components/expand/index.vue +83 -0
  205. package/rules/.source/hellotv/src/pages/filter/components/sidebar/index.vue +81 -0
  206. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter-title.vue +78 -0
  207. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter.vue +68 -0
  208. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-line.vue +11 -0
  209. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-text.vue +43 -0
  210. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-title.vue +14 -0
  211. package/rules/.source/hellotv/src/pages/filter/config.ts +10 -0
  212. package/rules/.source/hellotv/src/pages/filter/expand-sidebar-contents.vue +203 -0
  213. package/rules/.source/hellotv/src/pages/filter/scss/filter-content-list-item.scss +42 -0
  214. package/rules/.source/hellotv/src/pages/filter/scss/filter-content.scss +60 -0
  215. package/rules/.source/hellotv/src/pages/filter/scss/filter-expand.scss +30 -0
  216. package/rules/.source/hellotv/src/pages/filter/scss/filter-sidebar.scss +45 -0
  217. package/rules/.source/hellotv/src/pages/filter/scss/filter.scss +21 -0
  218. package/rules/.source/hellotv/src/pages/filter/sidebar-contents.vue +145 -0
  219. package/rules/.source/hellotv/src/pages/filter/single-contents.vue +61 -0
  220. package/rules/.source/hellotv/src/pages/history/adapter/index.ts +51 -0
  221. package/rules/.source/hellotv/src/pages/history/adapter/interface.ts +22 -0
  222. package/rules/.source/hellotv/src/pages/history/api/index.ts +54 -0
  223. package/rules/.source/hellotv/src/pages/history/api/interface.ts +41 -0
  224. package/rules/.source/hellotv/src/pages/history/api/request-url.ts +10 -0
  225. package/rules/.source/hellotv/src/pages/history/components/confirm-dialog.vue +155 -0
  226. package/rules/.source/hellotv/src/pages/history/config.ts +8 -0
  227. package/rules/.source/hellotv/src/pages/history/index-raw.vue +540 -0
  228. package/rules/.source/hellotv/src/pages/history/index.vue +431 -0
  229. package/rules/.source/hellotv/src/pages/history/mock.ts +32 -0
  230. package/rules/.source/hellotv/src/pages/history/scss/history-raw.scss +181 -0
  231. package/rules/.source/hellotv/src/pages/history/scss/history.scss +148 -0
  232. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-adapter.ts +20 -0
  233. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-imp.ts +13 -0
  234. package/rules/.source/hellotv/src/pages/home/adapter/media/create-home-player-interceptor.ts +50 -0
  235. package/rules/.source/hellotv/src/pages/home/adapter/media/home-media-imp.ts +74 -0
  236. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-adapter.ts +151 -0
  237. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-config.ts +17 -0
  238. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-imp.ts +53 -0
  239. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-item-type.ts +6 -0
  240. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-adapter.ts +1304 -0
  241. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-config.ts +30 -0
  242. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-imp.ts +173 -0
  243. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-item-type.ts +17 -0
  244. package/rules/.source/hellotv/src/pages/home/api/index.ts +157 -0
  245. package/rules/.source/hellotv/src/pages/home/api/interface.ts +56 -0
  246. package/rules/.source/hellotv/src/pages/home/api/request-url.ts +22 -0
  247. package/rules/.source/hellotv/src/pages/home/components/exit-dialog.vue +148 -0
  248. package/rules/.source/hellotv/src/pages/home/components/media/bg-player.vue +440 -0
  249. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-img-item.vue +39 -0
  250. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-text-item.vue +100 -0
  251. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-img.vue +54 -0
  252. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-text.vue +67 -0
  253. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-list-player-item.vue +74 -0
  254. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-player-item.vue +40 -0
  255. package/rules/.source/hellotv/src/pages/home/components/tab-content/focus-change-img-item.vue +41 -0
  256. package/rules/.source/hellotv/src/pages/home/components/tab-content/history-item.vue +362 -0
  257. package/rules/.source/hellotv/src/pages/home/components/tab-content/inner-out-title-item.vue +60 -0
  258. package/rules/.source/hellotv/src/pages/home/components/tab-content/no-title-item.vue +46 -0
  259. package/rules/.source/hellotv/src/pages/home/components/tab-content/placeholder-item.vue +25 -0
  260. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section-item.vue +80 -0
  261. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section.vue +70 -0
  262. package/rules/.source/hellotv/src/pages/home/components/tab-content/small-4k/small-four-section.vue +76 -0
  263. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section-item.vue +90 -0
  264. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section.vue +57 -0
  265. package/rules/.source/hellotv/src/pages/home/components/waterfall-tabs.vue +1307 -0
  266. package/rules/.source/hellotv/src/pages/home/index.vue +117 -0
  267. package/rules/.source/hellotv/src/pages/home/scss/bar-img-item.scss +11 -0
  268. package/rules/.source/hellotv/src/pages/home/scss/bar-text-item.scss +80 -0
  269. package/rules/.source/hellotv/src/pages/home/scss/base.scss +8 -0
  270. package/rules/.source/hellotv/src/pages/home/scss/bg-player-cell-list-item.scss +24 -0
  271. package/rules/.source/hellotv/src/pages/home/scss/bg-player.scss +50 -0
  272. package/rules/.source/hellotv/src/pages/home/scss/cell-player-item.scss +24 -0
  273. package/rules/.source/hellotv/src/pages/home/scss/exit-dialog.scss +89 -0
  274. package/rules/.source/hellotv/src/pages/home/scss/focus-change-img-item.scss +12 -0
  275. package/rules/.source/hellotv/src/pages/home/scss/home.scss +32 -0
  276. package/rules/.source/hellotv/src/pages/home/scss/inner-out-title-item.scss +24 -0
  277. package/rules/.source/hellotv/src/pages/home/scss/no-title-item.scss +15 -0
  278. package/rules/.source/hellotv/src/pages/home/scss/placeholder-item.scss +14 -0
  279. package/rules/.source/hellotv/src/pages/home/scss/short-video-section.scss +59 -0
  280. package/rules/.source/hellotv/src/pages/home/scss/small-four-section.scss +14 -0
  281. package/rules/.source/hellotv/src/pages/home/scss/waterfall-tabs.scss +50 -0
  282. package/rules/.source/hellotv/src/pages/home/scss/world-four-section.scss +106 -0
  283. package/rules/.source/hellotv/src/pages/introduction/index.vue +227 -0
  284. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-icon-text.vue +35 -0
  285. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-img.vue +16 -0
  286. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-text.vue +16 -0
  287. package/rules/.source/hellotv/src/pages/live/components/menu/index.vue +266 -0
  288. package/rules/.source/hellotv/src/pages/live/components/menu/second-list-item.vue +80 -0
  289. package/rules/.source/hellotv/src/pages/live/components/menu/third-list-item.vue +68 -0
  290. package/rules/.source/hellotv/src/pages/live/components/player/index.vue +168 -0
  291. package/rules/.source/hellotv/src/pages/live/components/player/player-error.vue +48 -0
  292. package/rules/.source/hellotv/src/pages/live/components/player/player-loading.vue +50 -0
  293. package/rules/.source/hellotv/src/pages/live/components/player/player-tips.vue +125 -0
  294. package/rules/.source/hellotv/src/pages/live/components/player/tips-icon-text.vue +27 -0
  295. package/rules/.source/hellotv/src/pages/live/css/menu.css +109 -0
  296. package/rules/.source/hellotv/src/pages/live/css/player.css +56 -0
  297. package/rules/.source/hellotv/src/pages/live/index.vue +128 -0
  298. package/rules/.source/hellotv/src/pages/live/mock/index.ts +263 -0
  299. package/rules/.source/hellotv/src/pages/live/types/index.ts +42 -0
  300. package/rules/.source/hellotv/src/pages/login/index.vue +116 -0
  301. package/rules/.source/hellotv/src/pages/login/scss/login.scss +61 -0
  302. package/rules/.source/hellotv/src/pages/m-test.vue +84 -0
  303. package/rules/.source/hellotv/src/pages/my/README.md +87 -0
  304. package/rules/.source/hellotv/src/pages/my/index.vue +177 -0
  305. package/rules/.source/hellotv/src/pages/my/my-data-manager.ts +606 -0
  306. package/rules/.source/hellotv/src/pages/my/my-templates.vue +24 -0
  307. package/rules/.source/hellotv/src/pages/my/poster/index.vue +98 -0
  308. package/rules/.source/hellotv/src/pages/my/poster/my-card2.vue +90 -0
  309. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-col.vue +72 -0
  310. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-row.vue +72 -0
  311. package/rules/.source/hellotv/src/pages/my/poster/my-info.vue +50 -0
  312. package/rules/.source/hellotv/src/pages/my/poster/my-user.vue +126 -0
  313. package/rules/.source/hellotv/src/pages/play-test.vue +95 -0
  314. package/rules/.source/hellotv/src/pages/search/README.md +57 -0
  315. package/rules/.source/hellotv/src/pages/search/adapter/index.ts +285 -0
  316. package/rules/.source/hellotv/src/pages/search/adapter/interface.ts +60 -0
  317. package/rules/.source/hellotv/src/pages/search/api/index.ts +100 -0
  318. package/rules/.source/hellotv/src/pages/search/api/interface.ts +64 -0
  319. package/rules/.source/hellotv/src/pages/search/api/request-url.ts +20 -0
  320. package/rules/.source/hellotv/src/pages/search/components/search-content-tabs.vue +153 -0
  321. package/rules/.source/hellotv/src/pages/search/components/search-content.vue +282 -0
  322. package/rules/.source/hellotv/src/pages/search/components/search-keyboard.vue +252 -0
  323. package/rules/.source/hellotv/src/pages/search/components/search-keyword-grid.vue +85 -0
  324. package/rules/.source/hellotv/src/pages/search/components/search-keyword.vue +346 -0
  325. package/rules/.source/hellotv/src/pages/search/config.ts +10 -0
  326. package/rules/.source/hellotv/src/pages/search/scss/search-content.scss +130 -0
  327. package/rules/.source/hellotv/src/pages/search/scss/search-keyboard.scss +91 -0
  328. package/rules/.source/hellotv/src/pages/search/scss/search-keyword-grid.scss +30 -0
  329. package/rules/.source/hellotv/src/pages/search/scss/search-keyword.scss +104 -0
  330. package/rules/.source/hellotv/src/pages/search/scss/search.scss +18 -0
  331. package/rules/.source/hellotv/src/pages/search/three-columns.vue +164 -0
  332. package/rules/.source/hellotv/src/pages/search/two-columns.vue +128 -0
  333. package/rules/.source/hellotv/src/pages/tabs-test.vue +339 -0
  334. package/rules/.source/hellotv/src/pages/webview/load-web-view.vue +44 -0
  335. package/rules/.source/hellotv/src/routes.ts +142 -0
  336. package/rules/.source/hellotv/src/tools/common.ts +18 -0
  337. package/rules/.source/hellotv/src/tools/format-date.ts +16 -0
  338. package/rules/.source/hellotv/src/tools/index.ts +58 -0
  339. package/rules/.source/hellotv/src/tools/launch.ts +339 -0
  340. package/rules/.source/hellotv/src/tools/request/index.ts +206 -0
  341. package/rules/.source/hellotv/src/tools/request/interface.ts +64 -0
  342. package/rules/.source/hellotv/src/typings/shims-vue.d.ts +6 -0
  343. package/rules/.source/hellotv/src/vue.config.js +3 -0
  344. package/rules/.source/hellotv/tsconfig.json +34 -0
  345. package/rules/.windsurfrules +1 -0
  346. package/rules/AGENTS.md +1 -0
  347. package/rules/CLAUDE.md +1 -0
  348. package/rules/GEMINI.md +1 -0
@@ -0,0 +1,849 @@
1
+ import {
2
+ QTTab,
3
+ QTFlexStyleText,
4
+ QTTabPageData,
5
+ QTWaterfallItem,
6
+ QTWaterfallSection,
7
+ QTWaterfallSectionType,
8
+ } from "@quicktvui/quicktvui3";
9
+ import { QTListViewItemDecoration } from "@quicktvui/quicktvui3/dist/src/list-view/core/QTListViewItemDecoration";
10
+ import { QTWaterfallFlexStyle } from "@quicktvui/quicktvui3/dist/src/waterfall/core/QTWaterfallFlexStyle";
11
+ import ThemeConfig from "../../../config/theme-config";
12
+ import {
13
+ Section,
14
+ SectionItem,
15
+ SectionItemType,
16
+ SectionType,
17
+ TabContent,
18
+ } from "./interface";
19
+ import { TabContentConfig, TabContentItemType } from "./config";
20
+
21
+ class TabsContent {
22
+ //存储板块高度
23
+ sectionTotalHeight: Map<string, number> = new Map<string, number>();
24
+ //存储二屏图
25
+ tab2BackgroundUrls: Map<string, string> = new Map<string, string>();
26
+ // 首页4k列表第一页数据
27
+ home4KList: Array<any> = [];
28
+ }
29
+
30
+ const tabsContent = new TabsContent();
31
+ export default tabsContent;
32
+
33
+ export function buildTab(): QTTab {
34
+ return {
35
+ defaultFocusIndex: 0,
36
+ defaultIndex: 0,
37
+ itemList: [
38
+ {
39
+ type: 20000,
40
+ text: "单TAB",
41
+ titleSize: 20,
42
+ decoration: {
43
+ left: 40,
44
+ right: 20,
45
+ },
46
+ },
47
+ ],
48
+ };
49
+ }
50
+
51
+ /**
52
+ * build导航下对应内容
53
+ * @param tabContent 接口数据
54
+ * @param pageNo 当前页数
55
+ * @param tabId 导航 ID
56
+ * @param tabPageIndex 导航 index
57
+ */
58
+ export async function buildTabContentAdapter(
59
+ tabContent: TabContent,
60
+ pageNo: number = 1,
61
+ tabId: string,
62
+ tabPageIndex: number,
63
+ ): Promise<QTTabPageData> {
64
+ const isFirstPage = pageNo === 1;
65
+ //首次加载清除当前板块高度
66
+ if (isFirstPage) {
67
+ tabsContent.sectionTotalHeight.delete(tabId);
68
+ }
69
+ //解析自定义参数
70
+ const { firstSectionMarginTop, disableScrollOnFirstScreen } = parseParameter(
71
+ tabContent.customParams,
72
+ );
73
+
74
+ if (!tabContent || !tabContent.sections || tabContent.sections.length === 0) {
75
+ return {
76
+ data: [],
77
+ isLoadPageEnd: true,
78
+ };
79
+ }
80
+ //存储二屏图
81
+ if (tabContent.backgroundImage != null) {
82
+ tabsContent.tab2BackgroundUrls.set(tabId, tabContent.backgroundImage);
83
+ }
84
+ //获取当前导航Tab下Section原始数据
85
+ const sectionSourceData: Array<Section> = tabContent.sections;
86
+ //创建sectionList板块集合列表
87
+ const sectionList: Array<QTWaterfallSection> = [];
88
+ if (sectionSourceData && sectionSourceData.length > 0) {
89
+ for (
90
+ let sectionIndex = 0;
91
+ sectionIndex < sectionSourceData.length;
92
+ sectionIndex++
93
+ ) {
94
+ const section: Section = sectionSourceData[sectionIndex];
95
+ //如果是图片标题 板块标题高度从后台获取
96
+ if (
97
+ section.title?.image &&
98
+ section.title?.style?.height &&
99
+ section.title?.style?.width
100
+ ) {
101
+ TabContentConfig.sectionTitleHeightDefault = section.title.style.height;
102
+ }
103
+ //获取板块高度
104
+ const sectionHeight: number = getSectionHeight(section);
105
+ //存储板块高度 用于判断是否展示底部提示
106
+ saveSectionTotalHeight(sectionHeight, tabId);
107
+ const firstSectionIndex: boolean = sectionIndex === 0 && isFirstPage;
108
+ // build section列表数据
109
+ const res = buildSectionItemList(section, sectionIndex, tabPageIndex);
110
+ const sectionWaterfallItemList: Array<QTWaterfallItem> =
111
+ res.buildSectionItemList;
112
+ const isFocusScrollTarget: boolean = res.isFocusScrollTarget;
113
+ //获取展示的板块高度
114
+ section.style.height = buildSectionHeightBySectionType(section);
115
+ //build 板块数据
116
+ const buildSectionData: QTWaterfallSection = buildSection(
117
+ section,
118
+ sectionWaterfallItemList,
119
+ firstSectionIndex,
120
+ firstSectionMarginTop,
121
+ isFocusScrollTarget,
122
+ );
123
+ sectionList.push(buildSectionData);
124
+ }
125
+ }
126
+ /********根据板块高度,分页是否结束数据判断是否加载结束板块***********/
127
+ //加载结束标识
128
+ let isLoadPageEnd: boolean;
129
+ //当前已经加载的板块个数
130
+ const curLoadTotal =
131
+ (pageNo - 1) * TabContentConfig.sectionLoadLimit +
132
+ sectionSourceData?.length;
133
+ //当前板块总高度
134
+ const singleNavBarOffsetY = TabContentConfig.firstSectionOffsetY;
135
+ const sectionTotalHeight =
136
+ getSectionTotalHeight(tabId) +
137
+ firstSectionMarginTop +
138
+ TabContentConfig.firstSectionTop +
139
+ singleNavBarOffsetY;
140
+ if (
141
+ sectionTotalHeight > 1080 &&
142
+ tabContent.total &&
143
+ curLoadTotal >= tabContent.total
144
+ ) {
145
+ isLoadPageEnd = true;
146
+ const endSection = buildEndSection("5");
147
+ sectionList.push(endSection);
148
+ } else {
149
+ isLoadPageEnd = sectionList.length === 0;
150
+ }
151
+ const tabPage: QTTabPageData = buildTabContent(
152
+ disableScrollOnFirstScreen,
153
+ sectionList,
154
+ );
155
+ tabPage.isLoadPageEnd = isLoadPageEnd;
156
+ return tabPage;
157
+ }
158
+
159
+ /**
160
+ * 根据板块类型 build 板块展示高度
161
+ * @param section type:SectionType.TYPE_DEFAULT / SectionType.TYPE_LINE_SCROLL
162
+ */
163
+ export function buildSectionHeightBySectionType(section: Section): number {
164
+ const sectionType = section.type;
165
+ let height: number = getSectionHeight(section);
166
+ if (sectionType === SectionType.TYPE_DEFAULT) {
167
+ //默认flex布局的板块 会自动计算板块标题高度所以此处减掉板块标题高度
168
+ height = section.showTitle
169
+ ? height - TabContentConfig.sectionTitleHeightDefault
170
+ : height;
171
+ }
172
+ return height;
173
+ }
174
+
175
+ /**
176
+ * 获取板块高度
177
+ * @param section
178
+ */
179
+ export function getSectionHeight(section: Section): number {
180
+ let sectionHeight: number = section.style?.height || 0;
181
+ //获取是否展示板块标题 flag
182
+ const showTitle = section.showTitle;
183
+ if (showTitle) {
184
+ if (section.type === SectionType.TYPE_SWIPER_PLAY) {
185
+ //放映厅板块 需要展示标题的时候,不加间距高度
186
+ sectionHeight += TabContentConfig.sectionTitleHeightDefault;
187
+ } else {
188
+ sectionHeight +=
189
+ TabContentConfig.sectionGap +
190
+ TabContentConfig.sectionTitleHeightDefault;
191
+ }
192
+ }
193
+ return sectionHeight;
194
+ }
195
+
196
+ /**
197
+ * 存储板块整体高度
198
+ * @param sectionHeight 已有板块高度
199
+ * @param tabId 导航 ID
200
+ */
201
+ export function saveSectionTotalHeight(
202
+ sectionHeight: number,
203
+ tabId: string,
204
+ ): void {
205
+ const sectionHeightOld = tabsContent.sectionTotalHeight.get(tabId) || 0;
206
+ const totalH = sectionHeightOld + sectionHeight;
207
+ tabsContent.sectionTotalHeight.set(tabId, totalH);
208
+ }
209
+
210
+ /**
211
+ * 获取板块总高度
212
+ * @param tabId
213
+ */
214
+ export function getSectionTotalHeight(tabId: string): number {
215
+ return tabsContent.sectionTotalHeight.get(tabId) || 0;
216
+ }
217
+
218
+ /**
219
+ * 解析自定义参数
220
+ * @param parameter
221
+ */
222
+ export function parseParameter(parameter) {
223
+ const params = {
224
+ //首个板块距离顶部距离
225
+ firstSectionMarginTop: 0,
226
+ //首次获得焦点是否禁止移动
227
+ disableScrollOnFirstScreen: false,
228
+ //4k内容Id
229
+ content4kId: "",
230
+ //短视频内容Id
231
+ shortVideoId: "",
232
+ //预约内容Id
233
+ reservationId: "",
234
+ };
235
+ if (parameter) {
236
+ const param = JSON.parse(parameter);
237
+ for (let j = 0; j < param.length; j++) {
238
+ const key = param[j].key;
239
+ switch (key) {
240
+ case "switchBgMarginTop":
241
+ if (param[j].value) {
242
+ const value = Number(param[j].value);
243
+ if (value) {
244
+ params.firstSectionMarginTop += value;
245
+ }
246
+ }
247
+ break;
248
+ case "disableScrollOnFirstScreen":
249
+ if (param[j].value) {
250
+ params.disableScrollOnFirstScreen = param[j].value === "true";
251
+ }
252
+ break;
253
+ case "content4kId":
254
+ if (param[j].value) {
255
+ params.content4kId = param[j].value;
256
+ }
257
+ break;
258
+ default:
259
+ if (param[j].value) {
260
+ params[key] = param[j].value;
261
+ }
262
+ break;
263
+ }
264
+ }
265
+ }
266
+ return params;
267
+ }
268
+
269
+ /**
270
+ * 封装板块数据
271
+ * @param section 板块数据
272
+ * @param sectionIndex 板块 index
273
+ * @param tabPageIndex 导航 index
274
+ */
275
+ export function buildSectionItemList(
276
+ section: Section,
277
+ sectionIndex: number,
278
+ tabPageIndex: number,
279
+ ): {
280
+ buildSectionItemList: Array<QTWaterfallItem>;
281
+ isFocusScrollTarget: boolean;
282
+ } {
283
+ //定义封装后的数据
284
+ const buildSectionItemList: Array<QTWaterfallItem> = [];
285
+ const isFocusScrollTarget: boolean = false;
286
+ //获取板块内容列表
287
+ const sectionItemList: Array<SectionItem> = section.items;
288
+ if (sectionItemList && sectionItemList.length > 0) {
289
+ const length = sectionItemList.length;
290
+ //板块类型
291
+ const type = section.type;
292
+ //是否展示板块标题
293
+ const showTitle = section.showTitle;
294
+ const isFirstSetPlay: boolean = true;
295
+ for (const sectionItem of sectionItemList) {
296
+ const sectionItemIndex: number = sectionItemList.indexOf(sectionItem);
297
+ //封装格子数据
298
+ const qtWaterfallItem: QTWaterfallItem = buildSectionItem(
299
+ sectionItem,
300
+ showTitle,
301
+ tabPageIndex,
302
+ type,
303
+ );
304
+ //针对一行滚动格子设置decoration
305
+ if (type === SectionType.TYPE_LINE_SCROLL) {
306
+ qtWaterfallItem.decoration = {
307
+ left:
308
+ sectionItemIndex === 0
309
+ ? TabContentConfig.decorationLeftGap
310
+ : TabContentConfig.sectionItemGap,
311
+ right:
312
+ sectionItemIndex === length - 1
313
+ ? TabContentConfig.decorationLeftGap
314
+ : 0,
315
+ top: section.showTitle ? TabContentConfig.sectionItemGap : 0,
316
+ };
317
+ }
318
+ buildSectionItemList.push(qtWaterfallItem);
319
+ }
320
+ }
321
+ return {
322
+ buildSectionItemList: buildSectionItemList,
323
+ isFocusScrollTarget: isFocusScrollTarget,
324
+ };
325
+ }
326
+
327
+ /**
328
+ * 封装格子数据
329
+ * @param sectionItem
330
+ * @param showTitle
331
+ * @param tabPageIndex
332
+ * @param sectionType
333
+ */
334
+ export function buildSectionItem(
335
+ sectionItem: SectionItem,
336
+ showTitle: boolean,
337
+ tabPageIndex: number,
338
+ sectionType: number | string,
339
+ ): QTWaterfallItem {
340
+ //根据是否展示板块标题和是否是一行滚动
341
+ const posY =
342
+ sectionItem.posY + (showTitle ? TabContentConfig.sectionItemGap : 0);
343
+ if (sectionType === SectionType.TYPE_LINE_SCROLL) {
344
+ sectionItem.posY = 0;
345
+ } else {
346
+ sectionItem.posY = posY;
347
+ }
348
+ let buildSectionItem: QTWaterfallItem;
349
+ const sectionItemType: SectionItemType = sectionItem.type;
350
+ switch (sectionItemType) {
351
+ case SectionItemType.TYPE_DEFAULT: //无标题
352
+ buildSectionItem = buildNoTitleSectionItem(sectionItem);
353
+ break;
354
+ case SectionItemType.TYPE_INNER:
355
+ case SectionItemType.TYPE_OUT: //带标题
356
+ buildSectionItem = buildTitleSectionItem(sectionItem);
357
+ break;
358
+ case SectionItemType.TYPE_PLACE_HOLDER: //占位格子
359
+ buildSectionItem = buildPlaceHolderSectionItem(sectionItem);
360
+ break;
361
+ case SectionItemType.TYPE_TEXT_HISTORY:
362
+ case SectionItemType.TYPE_IMG_HISTORY:
363
+ buildSectionItem = buildTextHistorySectionItem(sectionItem);
364
+ break;
365
+ // case SectionItemType.TYPE_IMG_HISTORY:
366
+ // break
367
+ case SectionItemType.TYPE_FOCUS_CHANGE_IMG: //焦点换图格子
368
+ buildSectionItem = buildFocusChangeImgSectionItem(sectionItem);
369
+ break;
370
+ case SectionItemType.TYPE_SMALL_PLAY: //小窗播放
371
+ buildSectionItem = buildSmallPlayerSectionItem(sectionItem, tabPageIndex);
372
+ break;
373
+ // case SectionItemType.TYPE_SMALL_LIST_PLAY:
374
+ // break
375
+ default: //默认--无标题格子
376
+ buildSectionItem = buildNoTitleSectionItem(sectionItem);
377
+ break;
378
+ }
379
+ return buildSectionItem;
380
+ }
381
+
382
+ /**
383
+ * 封装无标题格子
384
+ * @param sectionItem 格子数据
385
+ */
386
+ export function buildNoTitleSectionItem(
387
+ sectionItem: SectionItem,
388
+ ): QTWaterfallItem {
389
+ return {
390
+ type: TabContentItemType.TYPE_ITEM_SECTION_NO_TITLE,
391
+ style: buildStyle(sectionItem),
392
+ image: {
393
+ style: {
394
+ width: sectionItem.width,
395
+ height: sectionItem.height,
396
+ },
397
+ normal: sectionItem.image,
398
+ },
399
+ corner: buildCorner(sectionItem),
400
+ imageFocusBackground: sectionItem.imageFocusBackground,
401
+ jumpParams: sectionItem.jumpParams,
402
+ shimmer: {
403
+ enable: true,
404
+ size: [sectionItem.width, sectionItem.height],
405
+ },
406
+ };
407
+ }
408
+
409
+ /**
410
+ * 封装带题格子
411
+ * @param sectionItem 格子数据
412
+ */
413
+ export function buildTitleSectionItem(
414
+ sectionItem: SectionItem,
415
+ ): QTWaterfallItem {
416
+ const style = buildStyle(sectionItem);
417
+ const type = sectionItem.type;
418
+ let height = sectionItem.height;
419
+ let colors = ["#00000000", "#00000000"];
420
+ if (type === SectionItemType.TYPE_OUT) {
421
+ height += TabContentConfig.sectionItemHeight;
422
+ } else {
423
+ colors = ThemeConfig.tabContentFloatBgColor;
424
+ }
425
+ style.height = height;
426
+ return {
427
+ type: TabContentItemType.TYPE_ITEM_SECTION_HAS_TITLE,
428
+ style: style,
429
+ image: {
430
+ style: {
431
+ width: sectionItem.width,
432
+ height: sectionItem.height,
433
+ },
434
+ normal: sectionItem.image,
435
+ },
436
+ title: {
437
+ style: {
438
+ width: sectionItem.width,
439
+ height: TabContentConfig.sectionItemHeight,
440
+ marginTop: height - TabContentConfig.sectionItemHeight,
441
+ },
442
+ text: sectionItem.title,
443
+ background: {
444
+ colors: colors,
445
+ cornerRadii4: [
446
+ 0,
447
+ 0,
448
+ ThemeConfig.focusBorderCorner,
449
+ ThemeConfig.focusBorderCorner,
450
+ ],
451
+ orientation: 4,
452
+ },
453
+ },
454
+ corner: buildCorner(sectionItem),
455
+ shimmer: {
456
+ enable: true,
457
+ size: [sectionItem.width, sectionItem.height],
458
+ },
459
+ jumpParams: sectionItem.jumpParams,
460
+ };
461
+ }
462
+
463
+ /**
464
+ * 封装焦点变图格子
465
+ * @param sectionItem 格子数据
466
+ */
467
+ export function buildFocusChangeImgSectionItem(
468
+ sectionItem: SectionItem,
469
+ ): QTWaterfallItem {
470
+ return {
471
+ type: TabContentItemType.TYPE_ITEM_SECTION_FOCUS_CHANGE_IMG,
472
+ style: buildStyle(sectionItem),
473
+ image: {
474
+ style: {
475
+ width: sectionItem.width,
476
+ height: sectionItem.height,
477
+ },
478
+ normal: sectionItem.image,
479
+ focused: sectionItem.imageFocus,
480
+ },
481
+ jumpParams: sectionItem.jumpParams,
482
+ imageFocusBackground: sectionItem.imageFocusBackground,
483
+ shimmer: {
484
+ enable: true,
485
+ size: [sectionItem.width, sectionItem.height],
486
+ },
487
+ };
488
+ }
489
+
490
+ /**
491
+ * 封装小窗播放格子数据
492
+ * @param sectionItem 格子数据
493
+ * @param tabPageIndex tab 导航 index
494
+ */
495
+ export function buildSmallPlayerSectionItem(
496
+ sectionItem: SectionItem,
497
+ tabPageIndex: number,
498
+ ): QTWaterfallItem {
499
+ return {
500
+ type: TabContentItemType.TYPE_ITEM_SECTION_CELL_PLAYER,
501
+ style: buildStyle(sectionItem),
502
+ image: {
503
+ style: {
504
+ width: sectionItem.width,
505
+ height: sectionItem.height,
506
+ },
507
+ normal: sectionItem.image,
508
+ },
509
+ play: {
510
+ style: {
511
+ width: sectionItem.width,
512
+ height: sectionItem.height,
513
+ },
514
+ sid: "cellSid" + sectionItem.id + "tabIndex" + tabPageIndex,
515
+ playData: sectionItem.playData,
516
+ },
517
+ jumpParams: sectionItem.jumpParams,
518
+ };
519
+ }
520
+
521
+ /**
522
+ * 封装占位格子
523
+ * @param sectionItem 格子数据
524
+ */
525
+ export function buildPlaceHolderSectionItem(
526
+ sectionItem: SectionItem,
527
+ ): QTWaterfallItem {
528
+ return {
529
+ type: TabContentItemType.TYPE_ITEM_SECTION_PLACEHOLDER,
530
+ style: buildStyle(sectionItem),
531
+ image: {
532
+ style: {
533
+ width: sectionItem.width,
534
+ height: sectionItem.height,
535
+ },
536
+ normal: sectionItem.image,
537
+ },
538
+ };
539
+ }
540
+
541
+ export function buildTextHistorySectionItem(
542
+ sectionItem: SectionItem,
543
+ ): QTWaterfallItem {
544
+ return {
545
+ type: TabContentItemType.TYPE_ITEM_HISTORY_TEXT,
546
+ style: buildStyle(sectionItem),
547
+ gradientBackground: {
548
+ colors: ["#fAff0000", "#99ffffff"],
549
+ cornerRadius: ThemeConfig.focusBorderCorner,
550
+ orientation: 7,
551
+ },
552
+ };
553
+ }
554
+
555
+ /**
556
+ * build 板块
557
+ * @param section 板块数据
558
+ * @param sectionWaterfallItemList 板块中格子数据
559
+ * @param isFirstSection 是否第一个板块
560
+ * @param firstSectionMarginTop 首个板块距离顶部距离
561
+ * @param isFocusScrollTarget 焦点滚动
562
+ *
563
+ */
564
+ export function buildSection(
565
+ section: Section,
566
+ sectionWaterfallItemList: Array<QTWaterfallItem>,
567
+ isFirstSection: boolean,
568
+ firstSectionMarginTop: number,
569
+ isFocusScrollTarget: boolean,
570
+ ): QTWaterfallSection {
571
+ let buildSection: QTWaterfallSection;
572
+ if (
573
+ section.title?.image &&
574
+ section.title?.style?.height &&
575
+ section.title?.style?.width
576
+ ) {
577
+ buildSection = buildImgSectionTitle(
578
+ section,
579
+ sectionWaterfallItemList,
580
+ isFirstSection,
581
+ firstSectionMarginTop,
582
+ isFocusScrollTarget,
583
+ );
584
+ } else {
585
+ buildSection = buildTextSectionTitle(
586
+ section,
587
+ sectionWaterfallItemList,
588
+ isFirstSection,
589
+ firstSectionMarginTop,
590
+ isFocusScrollTarget,
591
+ );
592
+ }
593
+ return buildSection;
594
+ }
595
+
596
+ /**
597
+ * 文字板块标题 build 对应数据
598
+ * @param section 板块数据
599
+ * @param sectionWaterfallItemList 板块中格子数据
600
+ * @param isFirstSection 是否第一个板块
601
+ * @param firstSectionMarginTop 首个板块距离顶部距离
602
+ * @param isFocusScrollTarget 焦点滚动
603
+ */
604
+ export function buildTextSectionTitle(
605
+ section: Section,
606
+ sectionWaterfallItemList: Array<QTWaterfallItem>,
607
+ isFirstSection: boolean,
608
+ firstSectionMarginTop: number,
609
+ isFocusScrollTarget: boolean,
610
+ ): QTWaterfallSection {
611
+ return {
612
+ _id: section.id,
613
+ type: buildSectionType(section.type),
614
+ title: section.showTitle ? section.title.text : "",
615
+ titleStyle: buildSectionTitleStyle(section),
616
+ decoration: buildSectionDecoration(isFirstSection, firstSectionMarginTop),
617
+ style: buildSectionStyle(section.style.height),
618
+ itemList: sectionWaterfallItemList,
619
+ isFocusScrollTarget: isFocusScrollTarget,
620
+ };
621
+ }
622
+
623
+ /**
624
+ * 图片板块标题 build 对应数据
625
+ * @param section 板块数据
626
+ * @param sectionWaterfallItemList 板块中格子数据
627
+ * @param isFirstSection 是否第一个板块
628
+ * @param firstSectionMarginTop 首个板块距离顶部距离
629
+ * @param isFocusScrollTarget 焦点滚动
630
+ */
631
+ export function buildImgSectionTitle(
632
+ section: Section,
633
+ sectionWaterfallItemList: Array<QTWaterfallItem>,
634
+ isFirstSection: boolean,
635
+ firstSectionMarginTop: number,
636
+ isFocusScrollTarget: boolean,
637
+ ): QTWaterfallSection {
638
+ return {
639
+ _id: section.id,
640
+ type: buildSectionType(section.type),
641
+ imgTitle: section.showTitle ? section.title.image : "",
642
+ imgTitleStyle: buildSectionTitleStyle(section, true),
643
+ decoration: buildSectionDecoration(isFirstSection, firstSectionMarginTop),
644
+ style: buildSectionStyle(section.style.height),
645
+ itemList: sectionWaterfallItemList,
646
+ isFocusScrollTarget: isFocusScrollTarget,
647
+ };
648
+ }
649
+
650
+ /**
651
+ * 小 4K 板块 对应数据
652
+ * @param section
653
+ * @param sectionWaterfallItemList
654
+ * @param isFirstSection
655
+ * @param firstSectionMarginTop
656
+ */
657
+ export function buildSmallSection(
658
+ section: Section,
659
+ sectionWaterfallItemList: Array<QTWaterfallItem>,
660
+ isFirstSection: boolean,
661
+ firstSectionMarginTop: number,
662
+ ): QTWaterfallSection {
663
+ const isShowPlateName = section.showTitle;
664
+ return {
665
+ _id: section.id,
666
+ type: buildSectionType(section.type),
667
+ title: section.showTitle ? section.title.text : "",
668
+ titleStyle: buildSectionTitleStyle(section),
669
+ decoration: buildSectionDecoration(isFirstSection, firstSectionMarginTop),
670
+ style: buildSectionStyle(section.style.height),
671
+ listStyle: { width: 1920, height: 484 },
672
+ replaceChildStyle: {
673
+ width: 860,
674
+ height: 484,
675
+ },
676
+ mLayout: isShowPlateName
677
+ ? [530, TabContentConfig.sectionTitleHeightDefault, 860, 484]
678
+ : [530, 0, 860, 484],
679
+ itemList: sectionWaterfallItemList,
680
+ };
681
+ }
682
+
683
+ /**
684
+ * build 板块 style 数据
685
+ * @param sectionHeight 板块高度
686
+ */
687
+ export function buildSectionStyle(sectionHeight: number): QTWaterfallFlexStyle {
688
+ return {
689
+ width: 1920,
690
+ height: sectionHeight,
691
+ marginLeft: -1,
692
+ // gradientBackground:{ colors: ['#FFFF00', '#00FFFF'],orientation:0 }
693
+ };
694
+ }
695
+
696
+ /**
697
+ * build 板块间距
698
+ * @param isFirstSection 是否第一个板块
699
+ * @param firstSectionMarginTop 第一个板块距离顶部距离
700
+ */
701
+ export function buildSectionDecoration(
702
+ isFirstSection: boolean,
703
+ firstSectionMarginTop: number,
704
+ ): QTListViewItemDecoration {
705
+ let decoration: QTListViewItemDecoration;
706
+ if (isFirstSection) {
707
+ const singleNavBarOffsetY = TabContentConfig.firstSectionOffsetY;
708
+ decoration = {
709
+ top:
710
+ TabContentConfig.firstSectionTop +
711
+ firstSectionMarginTop +
712
+ singleNavBarOffsetY,
713
+ };
714
+ } else {
715
+ decoration = {
716
+ top: TabContentConfig.sectionItemGap,
717
+ };
718
+ }
719
+ return decoration;
720
+ }
721
+
722
+ /**
723
+ * build板块类型
724
+ * @param sectionType 板块类型
725
+ */
726
+ function buildSectionType(sectionType: SectionType): number {
727
+ let type: number;
728
+ switch (sectionType) {
729
+ case SectionType.TYPE_DEFAULT:
730
+ type = QTWaterfallSectionType.QT_WATERFALL_SECTION_TYPE_FLEX;
731
+ break;
732
+ case SectionType.TYPE_LINE_SCROLL:
733
+ type = QTWaterfallSectionType.QT_WATERFALL_SECTION_TYPE_LIST;
734
+ break;
735
+ case SectionType.TYPE_SWIPER_PLAY:
736
+ type = TabContentItemType.TYPE_WATERFALL_SECTION_SMALL_4K;
737
+ break;
738
+ default:
739
+ type = QTWaterfallSectionType.QT_WATERFALL_SECTION_TYPE_FLEX;
740
+ break;
741
+ }
742
+ return type;
743
+ }
744
+
745
+ /**
746
+ * build板块标题样式
747
+ * @param section 板块数据
748
+ * @param isImgTitle 标题类型
749
+ */
750
+ function buildSectionTitleStyle(
751
+ section: Section,
752
+ isImgTitle: boolean = false,
753
+ ): QTWaterfallFlexStyle & QTFlexStyleText {
754
+ let titleStyle: QTWaterfallFlexStyle & QTFlexStyleText = {
755
+ width: 0,
756
+ height: 0,
757
+ };
758
+ if (isImgTitle) {
759
+ if (section.showTitle) {
760
+ titleStyle = {
761
+ width: section.title.style?.width,
762
+ height: section.title.style?.height,
763
+ marginLeft: TabContentConfig.decorationLeftGap,
764
+ };
765
+ }
766
+ } else {
767
+ if (section.showTitle) {
768
+ titleStyle = {
769
+ height: TabContentConfig.sectionTitleHeightDefault,
770
+ marginLeft: TabContentConfig.decorationLeftGap,
771
+ fontSize: TabContentConfig.sectionTitleFontSize,
772
+ };
773
+ }
774
+ }
775
+ return titleStyle;
776
+ }
777
+
778
+ /**
779
+ * 封装 整体格子style
780
+ * @param sectionItem 格子内容
781
+ */
782
+ function buildStyle(sectionItem: SectionItem): QTWaterfallFlexStyle {
783
+ return {
784
+ width: sectionItem.width,
785
+ height: sectionItem.height,
786
+ x: sectionItem.posX,
787
+ y: sectionItem.posY,
788
+ };
789
+ }
790
+
791
+ /**
792
+ * 封装 Corner 角标
793
+ * @param sectionItem 格子内容
794
+ */
795
+ function buildCorner(sectionItem: SectionItem) {
796
+ const colors =
797
+ sectionItem.corner?.textGradient || ThemeConfig.tabCornerColors;
798
+ return {
799
+ enable: !!sectionItem.corner?.text,
800
+ text: sectionItem.corner?.text ?? "",
801
+ background: {
802
+ colors: colors,
803
+ cornerRadii4: [
804
+ 0,
805
+ ThemeConfig.focusBorderCorner,
806
+ 0,
807
+ ThemeConfig.focusBorderCorner,
808
+ ],
809
+ orientation: 2,
810
+ },
811
+ };
812
+ }
813
+
814
+ /**
815
+ * 底部
816
+ * @param sectionId 板块id
817
+ */
818
+ export function buildEndSection(sectionId: string): QTWaterfallSection {
819
+ return {
820
+ _id: sectionId,
821
+ type: QTWaterfallSectionType.QT_WATERFALL_SECTION_TYPE_END,
822
+ title: "已经到底啦,按【返回键】回到顶部",
823
+ style: {
824
+ width: 1920,
825
+ height: 200,
826
+ },
827
+ titleStyle: {
828
+ fontSize: 30,
829
+ },
830
+ itemList: [],
831
+ };
832
+ }
833
+
834
+ /**
835
+ * build瀑布流Tab Content内容
836
+ * @param disableScrollOnFirstScreen 首次移动是否滚动
837
+ * @param waterfallSectionList 加载内容
838
+ */
839
+ export function buildTabContent(
840
+ disableScrollOnFirstScreen: boolean = false,
841
+ sections: Array<QTWaterfallSection>,
842
+ ): QTTabPageData {
843
+ return {
844
+ useDiff: false,
845
+ disableScrollOnFirstScreen,
846
+ data: sections,
847
+ bindingPlayer: "",
848
+ };
849
+ }