@quicktvui/ai 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/package.json +1 -1
  2. package/rules/.clinerules +1 -0
  3. package/rules/.cursorrules +1 -0
  4. package/rules/.github/copilot-instructions.md +1 -0
  5. package/rules/.source/hellotv/PROJECT-README.md +52 -0
  6. package/rules/.source/hellotv/app.d.ts +11 -0
  7. package/rules/.source/hellotv/package.json +146 -0
  8. package/rules/.source/hellotv/scripts/build-apk.ts +12 -0
  9. package/rules/.source/hellotv/scripts/build.ts +35 -0
  10. package/rules/.source/hellotv/scripts/dev.ts +12 -0
  11. package/rules/.source/hellotv/scripts/pack.ts +24 -0
  12. package/rules/.source/hellotv/scripts/process.ts +37 -0
  13. package/rules/.source/hellotv/scripts/quicktvui-webpack.android.ts +187 -0
  14. package/rules/.source/hellotv/scripts/quicktvui-webpack.dev.ts +147 -0
  15. package/rules/.source/hellotv/scripts/webpack-watch.ts +24 -0
  16. package/rules/.source/hellotv/src/App.vue +192 -0
  17. package/rules/.source/hellotv/src/api/my/index.ts +198 -0
  18. package/rules/.source/hellotv/src/api/user/impl-user.ts +52 -0
  19. package/rules/.source/hellotv/src/api/user/qr-code-mock.ts +2 -0
  20. package/rules/.source/hellotv/src/api/user/request-url.ts +11 -0
  21. package/rules/.source/hellotv/src/api/user/user-manager.ts +258 -0
  22. package/rules/.source/hellotv/src/app.scss +8 -0
  23. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_pause.png +0 -0
  24. package/rules/.source/hellotv/src/assets/component-media/ic_media_btn_play.png +0 -0
  25. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_focused.png +0 -0
  26. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_setting_normal.png +0 -0
  27. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_focused.png +0 -0
  28. package/rules/.source/hellotv/src/assets/component-media/ic_media_menu_xuanji_normal.png +0 -0
  29. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_focused.png +0 -0
  30. package/rules/.source/hellotv/src/assets/component-media/ic_media_ok_selected.png +0 -0
  31. package/rules/.source/hellotv/src/assets/detail/ic_collect_focused.png +0 -0
  32. package/rules/.source/hellotv/src/assets/detail/ic_collect_normal.png +0 -0
  33. package/rules/.source/hellotv/src/assets/detail/ic_full_focused.png +0 -0
  34. package/rules/.source/hellotv/src/assets/detail/ic_full_normal.png +0 -0
  35. package/rules/.source/hellotv/src/assets/detail/ic_info_focused.png +0 -0
  36. package/rules/.source/hellotv/src/assets/detail/ic_info_normal.png +0 -0
  37. package/rules/.source/hellotv/src/assets/detail/ic_introduction_bg.png +0 -0
  38. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_normal.png +0 -0
  39. package/rules/.source/hellotv/src/assets/detail/ic_media_list_item_selected.png +0 -0
  40. package/rules/.source/hellotv/src/assets/detail/ic_media_player_pause.png +0 -0
  41. package/rules/.source/hellotv/src/assets/detail/ic_media_player_placeholder.png +0 -0
  42. package/rules/.source/hellotv/src/assets/detail/ic_media_player_play.png +0 -0
  43. package/rules/.source/hellotv/src/assets/detail/ic_vip_focused.png +0 -0
  44. package/rules/.source/hellotv/src/assets/detail/ic_vip_normal.png +0 -0
  45. package/rules/.source/hellotv/src/assets/detail/skeleton.png +0 -0
  46. package/rules/.source/hellotv/src/assets/filter/ic_empty.png +0 -0
  47. package/rules/.source/hellotv/src/assets/filter/ic_filter_focused.png +0 -0
  48. package/rules/.source/hellotv/src/assets/filter/ic_filter_normal.png +0 -0
  49. package/rules/.source/hellotv/src/assets/filter/ic_filter_selected.png +0 -0
  50. package/rules/.source/hellotv/src/assets/filter/ic_left_focused.png +0 -0
  51. package/rules/.source/hellotv/src/assets/filter/ic_left_normal.png +0 -0
  52. package/rules/.source/hellotv/src/assets/filter/ic_left_selected.png +0 -0
  53. package/rules/.source/hellotv/src/assets/history/ic_delete.png +0 -0
  54. package/rules/.source/hellotv/src/assets/history/ic_empty.png +0 -0
  55. package/rules/.source/hellotv/src/assets/home/bg_history_item.png +0 -0
  56. package/rules/.source/hellotv/src/assets/home/bg_shadow.png +0 -0
  57. package/rules/.source/hellotv/src/assets/home/ic_4k_logo.png +0 -0
  58. package/rules/.source/hellotv/src/assets/home/ic_4k_play_focused.png +0 -0
  59. package/rules/.source/hellotv/src/assets/home/ic_4k_subtitle_normal.png +0 -0
  60. package/rules/.source/hellotv/src/assets/home/ic_arrow_focused.png +0 -0
  61. package/rules/.source/hellotv/src/assets/home/ic_arrow_normal.png +0 -0
  62. package/rules/.source/hellotv/src/assets/home/ic_exit_corner.png +0 -0
  63. package/rules/.source/hellotv/src/assets/home/ic_exit_header.png +0 -0
  64. package/rules/.source/hellotv/src/assets/home/ic_play.png +0 -0
  65. package/rules/.source/hellotv/src/assets/live/bg-error.png +0 -0
  66. package/rules/.source/hellotv/src/assets/live/bg-play-info.png +0 -0
  67. package/rules/.source/hellotv/src/assets/live/ic-arrow-left.png +0 -0
  68. package/rules/.source/hellotv/src/assets/live/ic-arrow-right.png +0 -0
  69. package/rules/.source/hellotv/src/assets/live/ic-back.png +0 -0
  70. package/rules/.source/hellotv/src/assets/live/ic-change.png +0 -0
  71. package/rules/.source/hellotv/src/assets/live/ic-corner-vip-tips.png +0 -0
  72. package/rules/.source/hellotv/src/assets/live/ic-corner-vip.png +0 -0
  73. package/rules/.source/hellotv/src/assets/live/ic-key.png +0 -0
  74. package/rules/.source/hellotv/src/assets/live/ic-loading-error.png +0 -0
  75. package/rules/.source/hellotv/src/assets/live/ic-menu-ext-arrow.png +0 -0
  76. package/rules/.source/hellotv/src/assets/live/ic-menu-ext.png +0 -0
  77. package/rules/.source/hellotv/src/assets/live/ic-menu.png +0 -0
  78. package/rules/.source/hellotv/src/assets/live/ic-mine.png +0 -0
  79. package/rules/.source/hellotv/src/assets/live/ic-network-error.png +0 -0
  80. package/rules/.source/hellotv/src/assets/live/ic-ok.png +0 -0
  81. package/rules/.source/hellotv/src/assets/live/ic-playing.png +0 -0
  82. package/rules/.source/hellotv/src/assets/live/ic-playing2.png +0 -0
  83. package/rules/.source/hellotv/src/assets/live/ic-playing3.png +0 -0
  84. package/rules/.source/hellotv/src/assets/live/ic-service.png +0 -0
  85. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast.png +0 -0
  86. package/rules/.source/hellotv/src/assets/live/ic_live_broadcast_focused.png +0 -0
  87. package/rules/.source/hellotv/src/assets/my/ic_collect_focus.png +0 -0
  88. package/rules/.source/hellotv/src/assets/my/ic_collect_normal.png +0 -0
  89. package/rules/.source/hellotv/src/assets/my/ic_order_focus.png +0 -0
  90. package/rules/.source/hellotv/src/assets/my/ic_order_normal.png +0 -0
  91. package/rules/.source/hellotv/src/assets/my/ic_record_focus.png +0 -0
  92. package/rules/.source/hellotv/src/assets/my/ic_record_normal.png +0 -0
  93. package/rules/.source/hellotv/src/assets/my/ic_user.png +0 -0
  94. package/rules/.source/hellotv/src/assets/my/ic_vip_normal.png +0 -0
  95. package/rules/.source/hellotv/src/assets/search/ic_back.png +0 -0
  96. package/rules/.source/hellotv/src/assets/search/ic_back_focused.png +0 -0
  97. package/rules/.source/hellotv/src/assets/search/ic_clear.png +0 -0
  98. package/rules/.source/hellotv/src/assets/search/ic_clear_dark.png +0 -0
  99. package/rules/.source/hellotv/src/assets/search/ic_clear_focused.png +0 -0
  100. package/rules/.source/hellotv/src/assets/search/ic_search.png +0 -0
  101. package/rules/.source/hellotv/src/assets/top-view/ic_logo.png +0 -0
  102. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_focused.png +0 -0
  103. package/rules/.source/hellotv/src/assets/top-view/ic_top_search_normal.png +0 -0
  104. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_focused.png +0 -0
  105. package/rules/.source/hellotv/src/assets/top-view/ic_top_user_normal.png +0 -0
  106. package/rules/.source/hellotv/src/components/bg-animation.scss +14 -0
  107. package/rules/.source/hellotv/src/components/bg-animation.vue +176 -0
  108. package/rules/.source/hellotv/src/components/btn-pack-view.vue +172 -0
  109. package/rules/.source/hellotv/src/components/btn-pack.scss +53 -0
  110. package/rules/.source/hellotv/src/components/grid-item-horizontal.vue +203 -0
  111. package/rules/.source/hellotv/src/components/grid-item-vertical.vue +201 -0
  112. package/rules/.source/hellotv/src/components/media/build-data/media-config.ts +4 -0
  113. package/rules/.source/hellotv/src/components/media/build-data/media-control-adapter.ts +378 -0
  114. package/rules/.source/hellotv/src/components/media/build-data/media-imp.ts +44 -0
  115. package/rules/.source/hellotv/src/components/media/view/media-loading-component.vue +50 -0
  116. package/rules/.source/hellotv/src/components/media/view/media-loading-view.vue +154 -0
  117. package/rules/.source/hellotv/src/components/media/view/media-manager-view.vue +931 -0
  118. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-item.vue +42 -0
  119. package/rules/.source/hellotv/src/components/media/view/media-menu-detail-view.vue +109 -0
  120. package/rules/.source/hellotv/src/components/media/view/media-menu-icon-item.vue +43 -0
  121. package/rules/.source/hellotv/src/components/media/view/media-menu-text-item.vue +27 -0
  122. package/rules/.source/hellotv/src/components/media/view/media-menu-view.vue +88 -0
  123. package/rules/.source/hellotv/src/components/media/view/media-player-view.vue +408 -0
  124. package/rules/.source/hellotv/src/components/media/view/scss/media-loading.scss +51 -0
  125. package/rules/.source/hellotv/src/components/media/view/scss/media-manager.scss +79 -0
  126. package/rules/.source/hellotv/src/components/media/view/scss/media-menu.scss +114 -0
  127. package/rules/.source/hellotv/src/components/media/view/scss/media-player.scss +6 -0
  128. package/rules/.source/hellotv/src/components/qt-tabs-component.ts +268 -0
  129. package/rules/.source/hellotv/src/components/qt-ul-component.ts +792 -0
  130. package/rules/.source/hellotv/src/components/top-view.scss +38 -0
  131. package/rules/.source/hellotv/src/components/top-view.vue +114 -0
  132. package/rules/.source/hellotv/src/config/README.md +22 -0
  133. package/rules/.source/hellotv/src/config/build-config.ts +22 -0
  134. package/rules/.source/hellotv/src/config/private-theme-config.ts +21 -0
  135. package/rules/.source/hellotv/src/config/public-config.scss +16 -0
  136. package/rules/.source/hellotv/src/config/test.scss +45 -0
  137. package/rules/.source/hellotv/src/config/theme-config.ts +51 -0
  138. package/rules/.source/hellotv/src/main.ts +45 -0
  139. package/rules/.source/hellotv/src/pages/activity/adapter/config.ts +37 -0
  140. package/rules/.source/hellotv/src/pages/activity/adapter/index.ts +849 -0
  141. package/rules/.source/hellotv/src/pages/activity/adapter/interface.ts +173 -0
  142. package/rules/.source/hellotv/src/pages/activity/api/index.ts +36 -0
  143. package/rules/.source/hellotv/src/pages/activity/api/interface.ts +11 -0
  144. package/rules/.source/hellotv/src/pages/activity/api/request-url.ts +10 -0
  145. package/rules/.source/hellotv/src/pages/activity/components/item/focus-change-img-item.vue +40 -0
  146. package/rules/.source/hellotv/src/pages/activity/components/item/inner-out-title-item.vue +59 -0
  147. package/rules/.source/hellotv/src/pages/activity/components/item/no-title-item.vue +45 -0
  148. package/rules/.source/hellotv/src/pages/activity/components/item/placeholder-item.vue +25 -0
  149. package/rules/.source/hellotv/src/pages/activity/index.vue +219 -0
  150. package/rules/.source/hellotv/src/pages/activity/scss/index.scss +46 -0
  151. package/rules/.source/hellotv/src/pages/activity/scss/item.scss +69 -0
  152. package/rules/.source/hellotv/src/pages/detail/adapter/index.ts +317 -0
  153. package/rules/.source/hellotv/src/pages/detail/adapter/interface.ts +150 -0
  154. package/rules/.source/hellotv/src/pages/detail/adapter/media-player.ts +378 -0
  155. package/rules/.source/hellotv/src/pages/detail/api/index.ts +77 -0
  156. package/rules/.source/hellotv/src/pages/detail/api/request-url.ts +8 -0
  157. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-definition.vue +192 -0
  158. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-list-item.vue +108 -0
  159. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-media-series.vue +349 -0
  160. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-order.vue +194 -0
  161. package/rules/.source/hellotv/src/pages/detail/components/media-player/collapse/media-collapse-speed.vue +192 -0
  162. package/rules/.source/hellotv/src/pages/detail/components/media-player/index.vue +404 -0
  163. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-small-view.vue +382 -0
  164. package/rules/.source/hellotv/src/pages/detail/components/media-player/media-player-view.vue +1099 -0
  165. package/rules/.source/hellotv/src/pages/detail/components/recommend-item.vue +167 -0
  166. package/rules/.source/hellotv/src/pages/detail/components/section/basic-section.vue +218 -0
  167. package/rules/.source/hellotv/src/pages/detail/components/section/config.ts +6 -0
  168. package/rules/.source/hellotv/src/pages/detail/components/section/header-section.vue +15 -0
  169. package/rules/.source/hellotv/src/pages/detail/components/section/item/button-menu.vue +259 -0
  170. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-introduction.vue +238 -0
  171. package/rules/.source/hellotv/src/pages/detail/components/section/item/media-series.vue +308 -0
  172. package/rules/.source/hellotv/src/pages/detail/components/section/item/player-placeholder.vue +88 -0
  173. package/rules/.source/hellotv/src/pages/detail/index.vue +571 -0
  174. package/rules/.source/hellotv/src/pages/detail/scss/index.scss +22 -0
  175. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-loading.vue +78 -0
  176. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-menu-view.vue +803 -0
  177. package/rules/.source/hellotv/src/pages/detail-full-player/components/media-player/full-player-view.vue +219 -0
  178. package/rules/.source/hellotv/src/pages/detail-full-player/index.vue +101 -0
  179. package/rules/.source/hellotv/src/pages/detail-full-player/scss/full-player-view.scss +6 -0
  180. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/index.ts +0 -0
  181. package/rules/.source/hellotv/src/pages/detail-full-screen/adapter/interface.ts +133 -0
  182. package/rules/.source/hellotv/src/pages/detail-full-screen/api/index.ts +77 -0
  183. package/rules/.source/hellotv/src/pages/detail-full-screen/api/request-url.ts +8 -0
  184. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-info.vue +263 -0
  185. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-player.vue +42 -0
  186. package/rules/.source/hellotv/src/pages/detail-full-screen/components/media-series-section.vue +26 -0
  187. package/rules/.source/hellotv/src/pages/detail-full-screen/components/recommend-item.vue +167 -0
  188. package/rules/.source/hellotv/src/pages/detail-full-screen/index.vue +163 -0
  189. package/rules/.source/hellotv/src/pages/detail-full-screen/scss/index.scss +41 -0
  190. package/rules/.source/hellotv/src/pages/device-info/index.vue +106 -0
  191. package/rules/.source/hellotv/src/pages/device-info/scss/device-info.scss +49 -0
  192. package/rules/.source/hellotv/src/pages/filter/README.md +66 -0
  193. package/rules/.source/hellotv/src/pages/filter/adapter/index.ts +180 -0
  194. package/rules/.source/hellotv/src/pages/filter/adapter/interface.ts +111 -0
  195. package/rules/.source/hellotv/src/pages/filter/api/index.ts +38 -0
  196. package/rules/.source/hellotv/src/pages/filter/api/interface.ts +44 -0
  197. package/rules/.source/hellotv/src/pages/filter/api/request-url.ts +8 -0
  198. package/rules/.source/hellotv/src/pages/filter/components/content/index.vue +469 -0
  199. package/rules/.source/hellotv/src/pages/filter/components/content/list-item-record.vue +16 -0
  200. package/rules/.source/hellotv/src/pages/filter/components/content/list-item.vue +78 -0
  201. package/rules/.source/hellotv/src/pages/filter/components/expand/index.vue +83 -0
  202. package/rules/.source/hellotv/src/pages/filter/components/sidebar/index.vue +81 -0
  203. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter-title.vue +78 -0
  204. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-filter.vue +68 -0
  205. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-line.vue +11 -0
  206. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-text.vue +43 -0
  207. package/rules/.source/hellotv/src/pages/filter/components/sidebar/list-item-title.vue +14 -0
  208. package/rules/.source/hellotv/src/pages/filter/config.ts +10 -0
  209. package/rules/.source/hellotv/src/pages/filter/expand-sidebar-contents.vue +203 -0
  210. package/rules/.source/hellotv/src/pages/filter/scss/filter-content-list-item.scss +42 -0
  211. package/rules/.source/hellotv/src/pages/filter/scss/filter-content.scss +60 -0
  212. package/rules/.source/hellotv/src/pages/filter/scss/filter-expand.scss +30 -0
  213. package/rules/.source/hellotv/src/pages/filter/scss/filter-sidebar.scss +45 -0
  214. package/rules/.source/hellotv/src/pages/filter/scss/filter.scss +21 -0
  215. package/rules/.source/hellotv/src/pages/filter/sidebar-contents.vue +145 -0
  216. package/rules/.source/hellotv/src/pages/filter/single-contents.vue +61 -0
  217. package/rules/.source/hellotv/src/pages/history/adapter/index.ts +51 -0
  218. package/rules/.source/hellotv/src/pages/history/adapter/interface.ts +22 -0
  219. package/rules/.source/hellotv/src/pages/history/api/index.ts +54 -0
  220. package/rules/.source/hellotv/src/pages/history/api/interface.ts +41 -0
  221. package/rules/.source/hellotv/src/pages/history/api/request-url.ts +10 -0
  222. package/rules/.source/hellotv/src/pages/history/components/confirm-dialog.vue +155 -0
  223. package/rules/.source/hellotv/src/pages/history/config.ts +8 -0
  224. package/rules/.source/hellotv/src/pages/history/index-raw.vue +540 -0
  225. package/rules/.source/hellotv/src/pages/history/index.vue +431 -0
  226. package/rules/.source/hellotv/src/pages/history/mock.ts +32 -0
  227. package/rules/.source/hellotv/src/pages/history/scss/history-raw.scss +181 -0
  228. package/rules/.source/hellotv/src/pages/history/scss/history.scss +148 -0
  229. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-adapter.ts +20 -0
  230. package/rules/.source/hellotv/src/pages/home/adapter/exit/home-exit-imp.ts +13 -0
  231. package/rules/.source/hellotv/src/pages/home/adapter/media/create-home-player-interceptor.ts +50 -0
  232. package/rules/.source/hellotv/src/pages/home/adapter/media/home-media-imp.ts +74 -0
  233. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-adapter.ts +151 -0
  234. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-config.ts +17 -0
  235. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-imp.ts +53 -0
  236. package/rules/.source/hellotv/src/pages/home/adapter/tab-bar/tab-bar-item-type.ts +6 -0
  237. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-adapter.ts +1304 -0
  238. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-config.ts +30 -0
  239. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-imp.ts +173 -0
  240. package/rules/.source/hellotv/src/pages/home/adapter/tab-content/tab-content-item-type.ts +17 -0
  241. package/rules/.source/hellotv/src/pages/home/api/index.ts +157 -0
  242. package/rules/.source/hellotv/src/pages/home/api/interface.ts +56 -0
  243. package/rules/.source/hellotv/src/pages/home/api/request-url.ts +22 -0
  244. package/rules/.source/hellotv/src/pages/home/components/exit-dialog.vue +148 -0
  245. package/rules/.source/hellotv/src/pages/home/components/media/bg-player.vue +440 -0
  246. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-img-item.vue +39 -0
  247. package/rules/.source/hellotv/src/pages/home/components/nav-bar/bar-text-item.vue +100 -0
  248. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-img.vue +54 -0
  249. package/rules/.source/hellotv/src/pages/home/components/tab-content/bg-player-cell-list-item-text.vue +67 -0
  250. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-list-player-item.vue +74 -0
  251. package/rules/.source/hellotv/src/pages/home/components/tab-content/cell-player-item.vue +40 -0
  252. package/rules/.source/hellotv/src/pages/home/components/tab-content/focus-change-img-item.vue +41 -0
  253. package/rules/.source/hellotv/src/pages/home/components/tab-content/history-item.vue +362 -0
  254. package/rules/.source/hellotv/src/pages/home/components/tab-content/inner-out-title-item.vue +60 -0
  255. package/rules/.source/hellotv/src/pages/home/components/tab-content/no-title-item.vue +46 -0
  256. package/rules/.source/hellotv/src/pages/home/components/tab-content/placeholder-item.vue +25 -0
  257. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section-item.vue +80 -0
  258. package/rules/.source/hellotv/src/pages/home/components/tab-content/short-video/short-video-section.vue +70 -0
  259. package/rules/.source/hellotv/src/pages/home/components/tab-content/small-4k/small-four-section.vue +76 -0
  260. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section-item.vue +90 -0
  261. package/rules/.source/hellotv/src/pages/home/components/tab-content/world-4k/world-four-section.vue +57 -0
  262. package/rules/.source/hellotv/src/pages/home/components/waterfall-tabs.vue +1307 -0
  263. package/rules/.source/hellotv/src/pages/home/index.vue +117 -0
  264. package/rules/.source/hellotv/src/pages/home/scss/bar-img-item.scss +11 -0
  265. package/rules/.source/hellotv/src/pages/home/scss/bar-text-item.scss +80 -0
  266. package/rules/.source/hellotv/src/pages/home/scss/base.scss +8 -0
  267. package/rules/.source/hellotv/src/pages/home/scss/bg-player-cell-list-item.scss +24 -0
  268. package/rules/.source/hellotv/src/pages/home/scss/bg-player.scss +50 -0
  269. package/rules/.source/hellotv/src/pages/home/scss/cell-player-item.scss +24 -0
  270. package/rules/.source/hellotv/src/pages/home/scss/exit-dialog.scss +89 -0
  271. package/rules/.source/hellotv/src/pages/home/scss/focus-change-img-item.scss +12 -0
  272. package/rules/.source/hellotv/src/pages/home/scss/home.scss +32 -0
  273. package/rules/.source/hellotv/src/pages/home/scss/inner-out-title-item.scss +24 -0
  274. package/rules/.source/hellotv/src/pages/home/scss/no-title-item.scss +15 -0
  275. package/rules/.source/hellotv/src/pages/home/scss/placeholder-item.scss +14 -0
  276. package/rules/.source/hellotv/src/pages/home/scss/short-video-section.scss +59 -0
  277. package/rules/.source/hellotv/src/pages/home/scss/small-four-section.scss +14 -0
  278. package/rules/.source/hellotv/src/pages/home/scss/waterfall-tabs.scss +50 -0
  279. package/rules/.source/hellotv/src/pages/home/scss/world-four-section.scss +106 -0
  280. package/rules/.source/hellotv/src/pages/introduction/index.vue +227 -0
  281. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-icon-text.vue +35 -0
  282. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-img.vue +16 -0
  283. package/rules/.source/hellotv/src/pages/live/components/menu/first-list-item-text.vue +16 -0
  284. package/rules/.source/hellotv/src/pages/live/components/menu/index.vue +266 -0
  285. package/rules/.source/hellotv/src/pages/live/components/menu/second-list-item.vue +80 -0
  286. package/rules/.source/hellotv/src/pages/live/components/menu/third-list-item.vue +68 -0
  287. package/rules/.source/hellotv/src/pages/live/components/player/index.vue +168 -0
  288. package/rules/.source/hellotv/src/pages/live/components/player/player-error.vue +48 -0
  289. package/rules/.source/hellotv/src/pages/live/components/player/player-loading.vue +50 -0
  290. package/rules/.source/hellotv/src/pages/live/components/player/player-tips.vue +125 -0
  291. package/rules/.source/hellotv/src/pages/live/components/player/tips-icon-text.vue +27 -0
  292. package/rules/.source/hellotv/src/pages/live/css/menu.css +109 -0
  293. package/rules/.source/hellotv/src/pages/live/css/player.css +56 -0
  294. package/rules/.source/hellotv/src/pages/live/index.vue +128 -0
  295. package/rules/.source/hellotv/src/pages/live/mock/index.ts +263 -0
  296. package/rules/.source/hellotv/src/pages/live/types/index.ts +42 -0
  297. package/rules/.source/hellotv/src/pages/login/index.vue +116 -0
  298. package/rules/.source/hellotv/src/pages/login/scss/login.scss +61 -0
  299. package/rules/.source/hellotv/src/pages/m-test.vue +84 -0
  300. package/rules/.source/hellotv/src/pages/my/README.md +87 -0
  301. package/rules/.source/hellotv/src/pages/my/index.vue +177 -0
  302. package/rules/.source/hellotv/src/pages/my/my-data-manager.ts +606 -0
  303. package/rules/.source/hellotv/src/pages/my/my-templates.vue +24 -0
  304. package/rules/.source/hellotv/src/pages/my/poster/index.vue +98 -0
  305. package/rules/.source/hellotv/src/pages/my/poster/my-card2.vue +90 -0
  306. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-col.vue +72 -0
  307. package/rules/.source/hellotv/src/pages/my/poster/my-icon-title-row.vue +72 -0
  308. package/rules/.source/hellotv/src/pages/my/poster/my-info.vue +50 -0
  309. package/rules/.source/hellotv/src/pages/my/poster/my-user.vue +126 -0
  310. package/rules/.source/hellotv/src/pages/play-test.vue +95 -0
  311. package/rules/.source/hellotv/src/pages/search/README.md +57 -0
  312. package/rules/.source/hellotv/src/pages/search/adapter/index.ts +285 -0
  313. package/rules/.source/hellotv/src/pages/search/adapter/interface.ts +60 -0
  314. package/rules/.source/hellotv/src/pages/search/api/index.ts +100 -0
  315. package/rules/.source/hellotv/src/pages/search/api/interface.ts +64 -0
  316. package/rules/.source/hellotv/src/pages/search/api/request-url.ts +20 -0
  317. package/rules/.source/hellotv/src/pages/search/components/search-content-tabs.vue +153 -0
  318. package/rules/.source/hellotv/src/pages/search/components/search-content.vue +282 -0
  319. package/rules/.source/hellotv/src/pages/search/components/search-keyboard.vue +252 -0
  320. package/rules/.source/hellotv/src/pages/search/components/search-keyword-grid.vue +85 -0
  321. package/rules/.source/hellotv/src/pages/search/components/search-keyword.vue +346 -0
  322. package/rules/.source/hellotv/src/pages/search/config.ts +10 -0
  323. package/rules/.source/hellotv/src/pages/search/scss/search-content.scss +130 -0
  324. package/rules/.source/hellotv/src/pages/search/scss/search-keyboard.scss +91 -0
  325. package/rules/.source/hellotv/src/pages/search/scss/search-keyword-grid.scss +30 -0
  326. package/rules/.source/hellotv/src/pages/search/scss/search-keyword.scss +104 -0
  327. package/rules/.source/hellotv/src/pages/search/scss/search.scss +18 -0
  328. package/rules/.source/hellotv/src/pages/search/three-columns.vue +164 -0
  329. package/rules/.source/hellotv/src/pages/search/two-columns.vue +128 -0
  330. package/rules/.source/hellotv/src/pages/tabs-test.vue +339 -0
  331. package/rules/.source/hellotv/src/pages/webview/load-web-view.vue +44 -0
  332. package/rules/.source/hellotv/src/routes.ts +142 -0
  333. package/rules/.source/hellotv/src/tools/common.ts +18 -0
  334. package/rules/.source/hellotv/src/tools/format-date.ts +16 -0
  335. package/rules/.source/hellotv/src/tools/index.ts +58 -0
  336. package/rules/.source/hellotv/src/tools/launch.ts +339 -0
  337. package/rules/.source/hellotv/src/tools/request/index.ts +206 -0
  338. package/rules/.source/hellotv/src/tools/request/interface.ts +64 -0
  339. package/rules/.source/hellotv/src/typings/shims-vue.d.ts +6 -0
  340. package/rules/.source/hellotv/src/vue.config.js +3 -0
  341. package/rules/.source/hellotv/tsconfig.json +34 -0
  342. package/rules/.windsurfrules +1 -0
  343. package/rules/AGENTS.md +1 -0
  344. package/rules/CLAUDE.md +1 -0
  345. package/rules/GEMINI.md +1 -0
@@ -0,0 +1,606 @@
1
+ import {
2
+ QTPoster,
3
+ QTWaterfallSection,
4
+ QTWaterfallSectionType,
5
+ QTITab,
6
+ QTTabPageData,
7
+ QTTabPageState,
8
+ } from "@quicktvui/quicktvui3";
9
+ import { Ref } from "vue";
10
+ import myApi from "../../api/my";
11
+ import userManager from "../../api/user/user-manager";
12
+ import launch, { LaunchParams } from "../../tools/launch";
13
+ import BuildConfig from "../../config/build-config";
14
+ import { UserChangeListener, UserInfo } from "../../api/user/impl-user";
15
+ import ic_record_normal from "../../assets/my/ic_record_normal.png";
16
+ import ic_record_focus from "../../assets/my/ic_record_focus.png";
17
+ import { ICollect } from "../detail/adapter/interface";
18
+ export const activity_redirectTypes = {
19
+ innerRouter: 1, //跳转到当前app内部页面
20
+ innerApp: 0, //跳转到内部其他app
21
+ test: -1,
22
+ };
23
+
24
+ const dcornerGradientBg = {
25
+ colors: ["#FFE398", "#EEB364"],
26
+ cornerRadii4: [0, 9, 0, 9],
27
+ orientation: 2,
28
+ };
29
+
30
+ export const posterTypes = {
31
+ poster: 101,
32
+ iconTitleRow: 102,
33
+ info: 103,
34
+ user: 104,
35
+ iconTitleCol: 105,
36
+ card2: 106,
37
+ };
38
+ export interface IBlockItemData {
39
+ id: string;
40
+ img?: string; //图片
41
+ title?: string; //标题
42
+ subTitle?: string; //副标题,有副标题时取副标题,无副标题时取播放进度 playCount+currentPlayTime/allTime
43
+ floatTitle?: string; //浮动标题
44
+ corner?: string; //角标
45
+ cornerGradientBg?: typeof dcornerGradientBg; //角标背景色
46
+ score?: string; //评分
47
+ cornerNum?: number;
48
+
49
+ currentPlayTime?: number; //当前播放时间-毫秒
50
+ allTime?: number; //视频总时间-毫秒
51
+ playCount?: string; //播放到第几集
52
+ playTime?: string; //播放时间(时间戳或2024-03-28 20:43:42格式字符串)
53
+
54
+ gradientBb?: typeof dcornerGradientBg; //背景色-渐变色
55
+ //跳转数据
56
+ jumpParams: LaunchParams;
57
+ _action?: string; // 内部其他app地址
58
+ _redirectType?: number | string; //跳转类型,取值见activity_redirectTypes
59
+ _layout?: { x?: number; y?: number; width?: number; height?: number };
60
+ [k: string]: any;
61
+ }
62
+ interface Ioptions {
63
+ //Partial
64
+ posterWidth?: number;
65
+ posterHeight?: number;
66
+ imgWidth?: number;
67
+ imgHeight?: number;
68
+ posterBottom?: number;
69
+ space?: number;
70
+ posterType?: number;
71
+ posterTitleHeight?: number;
72
+ posterSubTitleHeight?: number;
73
+ titleFontSize?: number;
74
+ subTitleFontSize?: number;
75
+ iconWidth?: number;
76
+ iconHeight?: number;
77
+ }
78
+ interface IblockOptions {
79
+ blockTitleFontSize?: number;
80
+ blockTitleTop?: number;
81
+ columns?: number;
82
+ space?: number;
83
+ posterBottom?: number;
84
+ posterType?: number;
85
+ [k: string]: any;
86
+ }
87
+ interface IBlockData {
88
+ id: string;
89
+ title?: string;
90
+ list: IBlockItemData[];
91
+ options?: IblockOptions;
92
+ }
93
+
94
+ const titleTop = 15;
95
+
96
+ const dWidth = 408;
97
+ const dHeight = 228;
98
+ const whRatio = dHeight / dWidth;
99
+ const dPosterBottom = 30;
100
+ const dPosterTitleHeight = 30;
101
+ const dPosterSubTitleHeight = 25;
102
+ const dTitleFontSize = 30;
103
+ const dFloatTitleFontSize = 24;
104
+ const dSubTitleFontSize = 24;
105
+ const dSpace = 36; //36
106
+ const dBlockTitleFontSize = 40;
107
+ const dPadding = 0;
108
+ const dColumns = 4;
109
+ const dIconWidth = 80;
110
+ const dIconHeight = 80;
111
+ const dPosterType = posterTypes.poster;
112
+ export const dPageWidth = 1920;
113
+ export const dPageheight = 1080;
114
+ export const dPageMarginSpace = 80; // 页面两端间距
115
+ const getSubTitle = (data: IBlockItemData) => {
116
+ if (!data) return "";
117
+ let subTitle = data.subTitle || "";
118
+ try {
119
+ if (!subTitle && data.playCount) {
120
+ subTitle = data.playCount;
121
+ if (!isNaN(Number(data.playCount))) {
122
+ subTitle = `第${data.playCount}集`;
123
+ }
124
+ let progress = "";
125
+ if (data.allTime && data.allTime > 0) {
126
+ progress =
127
+ (((data.currentPlayTime || 0) / (data.allTime || 1)) * 100).toFixed(
128
+ 0,
129
+ ) + "%";
130
+ if (Number(data.currentPlayTime) <= 0) {
131
+ progress = "不足1%";
132
+ }
133
+ subTitle += " 已看" + progress;
134
+ }
135
+ }
136
+ } catch (error) {
137
+ console.error(error);
138
+ }
139
+ return subTitle;
140
+ };
141
+ export const getPosterConfig = (
142
+ data: IBlockItemData,
143
+ options: IblockOptions = {},
144
+ ): QTPoster => {
145
+ const itemPadding = options.itemPadding || dPadding;
146
+ const space = options.space == undefined ? dSpace : options.space;
147
+ const contentWidth =
148
+ dPageWidth - dPageMarginSpace - (dPageMarginSpace - space);
149
+
150
+ const subTitle = getSubTitle(data);
151
+ const columns = options?.columns || dColumns;
152
+
153
+ let posterWidth = data._layout?.width || 0;
154
+ let posterHeight = data._layout?.height || 0;
155
+ if (!posterWidth) {
156
+ posterWidth = Math.floor(contentWidth / columns) - space;
157
+ }
158
+ if (!posterHeight) {
159
+ posterHeight = posterWidth * whRatio;
160
+ }
161
+ const imgWidth = posterWidth;
162
+ const imgHeight = posterHeight;
163
+
164
+ const ratio = imgWidth / dWidth;
165
+ const titleFontColor = data._titleFontColor;
166
+ const titleFontSize = data._titleFontSize || dTitleFontSize * ratio;
167
+ const subTitleFontSize = data._subTitleFontSize || dSubTitleFontSize * ratio;
168
+ const posterTitleHeight = titleFontSize + 20;
169
+ const posterSubTitleHeight = subTitleFontSize + 6;
170
+ const iconWidth = dIconWidth * ratio;
171
+ const iconHeight = dIconHeight * ratio;
172
+ const posterType =
173
+ options.posterType || data.posterType || dPosterType || posterTypes.poster;
174
+ if (posterType === posterTypes.poster) {
175
+ //||posterType==posterTypes.info
176
+ if (data.title) {
177
+ posterHeight += posterTitleHeight;
178
+ }
179
+ if (subTitle) {
180
+ posterHeight += posterSubTitleHeight;
181
+ }
182
+ posterHeight += titleTop;
183
+ }
184
+
185
+ const titleboxHeight =
186
+ (data.title ? posterTitleHeight : 0) +
187
+ (subTitle ? posterSubTitleHeight : 0);
188
+ const cornerNum =
189
+ data.cornerNum && data.cornerNum > 0
190
+ ? data.cornerNum > 99
191
+ ? 99 + "+"
192
+ : data.cornerNum + ""
193
+ : "0";
194
+ return {
195
+ _id: data._sectionItemId || data.id,
196
+ jumpParams: data.jumpParams,
197
+ _action: data._action,
198
+ tip: data.tip,
199
+ focusedImageSrc: data.focusedImage || data.img,
200
+ focusedBgColor: data.focusedBgColor,
201
+ bgColor: data._bgColor,
202
+ showMoreImg: !!(data.clist && data.clist.length),
203
+ moreImg: data.clist?.[0]?.assetLongCoverH,
204
+ moreImg2: data.clist?.[1]?.assetLongCoverH,
205
+ item: {
206
+ redirectType: data._redirectType || activity_redirectTypes.innerRouter,
207
+ innerArgs: data._router ? JSON.stringify(data._router) : "",
208
+ },
209
+ _redirectType: data._redirectType || activity_redirectTypes.innerRouter,
210
+ cornerNum,
211
+ _isShowCornerNum: cornerNum !== "0",
212
+ _isCornerNum: data.cornerNum ? true : false,
213
+ focus: { enable: true, scale: 1, border: false },
214
+ type: posterType, //10001
215
+ editMode: false,
216
+ decoration: {
217
+ left: 0,
218
+ right: space,
219
+ bottom: options?.posterBottom || dPosterBottom,
220
+ },
221
+ style: {
222
+ width: posterWidth,
223
+ height: posterHeight,
224
+ },
225
+ imageBgStyle: {
226
+ width: imgWidth + itemPadding * 2,
227
+ height: imgHeight + itemPadding * 2,
228
+ marginTop: -itemPadding,
229
+ marginLeft: -itemPadding,
230
+ },
231
+ image: {
232
+ src: data.img,
233
+ enable: !!data.img,
234
+ style: {
235
+ width: imgWidth,
236
+ height: imgHeight,
237
+ },
238
+ },
239
+ corner: {
240
+ text: data.corner || "",
241
+ enable: !!data.corner,
242
+ style: {
243
+ width: imgWidth,
244
+ },
245
+ background: data.cornerGradientBg || dcornerGradientBg,
246
+ },
247
+ score: {
248
+ text: data.score || "",
249
+ enable: !!data.score,
250
+ style: {
251
+ width: imgWidth,
252
+ height: 30,
253
+ },
254
+ },
255
+ title: {
256
+ text: data.title || "",
257
+ enable: !!data.title,
258
+ style: {
259
+ width: imgWidth,
260
+ height: data.title ? posterTitleHeight : 0,
261
+ fontSize: titleFontSize,
262
+ },
263
+ },
264
+ titleFontColor,
265
+ focusTitle: {
266
+ text: data._focusTitle || data.title || "",
267
+ enable: !!(data._focusTitle || data.title),
268
+ },
269
+ titleBoxStyle: {
270
+ width: posterWidth,
271
+ height: titleboxHeight,
272
+ marginTop: imgHeight + titleTop,
273
+ },
274
+ titleFocuseBoxStyle: {
275
+ width: posterWidth,
276
+ height: titleboxHeight,
277
+ marginTop: imgHeight - 16,
278
+ paddingTop: 5,
279
+ },
280
+ bgStyle: {
281
+ width: posterWidth, // + itemPadding*2,
282
+ height: posterHeight - 20, // + itemPadding,
283
+ // marginTop: -(itemPadding+1), marginLeft: -(itemPadding+1),
284
+ },
285
+ coverStyle: {
286
+ width: posterWidth,
287
+ height: posterHeight - 20,
288
+ },
289
+ titleEllipsizeMode: 3,
290
+ titleLines: 1,
291
+ subTitle: {
292
+ text: subTitle || "",
293
+ enable: !!subTitle,
294
+ style: {
295
+ width: imgWidth,
296
+ height: subTitle ? posterSubTitleHeight : 0,
297
+ fontSize: subTitleFontSize,
298
+ },
299
+ },
300
+ floatTitle: {
301
+ text: data.floatTitle || "",
302
+ enable: !!data.floatTitle,
303
+ style: {
304
+ width: imgWidth,
305
+ },
306
+ },
307
+ infoStyle: {
308
+ width: imgWidth * (data._infoWidthRatio || 0.6),
309
+ },
310
+ icon: {
311
+ style: {
312
+ width: data._iconWidth || iconWidth,
313
+ height: data._iconHeight || iconHeight,
314
+ },
315
+ },
316
+ };
317
+ };
318
+ export interface ImySectionRes {
319
+ section: QTWaterfallSection;
320
+ options?: IblockOptions;
321
+ sectionHeight: number;
322
+ }
323
+ export interface VipInfo {
324
+ isVip: boolean;
325
+ endTime: string;
326
+ payLimit?: number;
327
+ endDateTime: string;
328
+ }
329
+ export const getMysection = (
330
+ data: IBlockData,
331
+ sectionType: number = QTWaterfallSectionType.QT_WATERFALL_SECTION_TYPE_FLEX,
332
+ ): ImySectionRes => {
333
+ const space = data.options?.space == undefined ? dSpace : data.options.space;
334
+ const contentWidth =
335
+ dPageWidth - dPageMarginSpace - (dPageMarginSpace - space);
336
+ const sectionHeight = 0;
337
+ const itemList = data.list.map((item, index) => {
338
+ const posterData = getPosterConfig(
339
+ { ...item, _sectionItemId: data.id + item.id + index },
340
+ data.options,
341
+ );
342
+ // sectionHeight += (posterData.style.height||0)+(posterData.decoration?.bottom||0)
343
+ // console.log('posterData:'+JSON.stringify(posterData))
344
+ return posterData;
345
+ });
346
+ const blockTitleFontSize =
347
+ data.options?.blockTitleFontSize || dBlockTitleFontSize;
348
+ const section: QTWaterfallSection = {
349
+ _id: data.id,
350
+ type: sectionType, //QT_WATERFALL_SECTION_TYPE_FLEX
351
+ title: data.title || "",
352
+ titleStyle: {
353
+ marginTop: data.options?.blockTitleTop || 0,
354
+ marginBottom: data.title ? data.options?.blockTitleBottom || 20 : 0,
355
+ fontSize: blockTitleFontSize,
356
+ height: data.title ? blockTitleFontSize : 0,
357
+ width: 1000,
358
+ marginLeft: 0,
359
+ },
360
+ //3.构造section中item列表数据
361
+ itemList,
362
+ style: {
363
+ width: contentWidth,
364
+ height: -1,
365
+ },
366
+ decoration: {
367
+ left: dPageMarginSpace,
368
+ // right: dPageMarginSpace-space,
369
+ top: data.options?.sDecorationTop ?? 0,
370
+ bottom: data.options?.sDecorationBottom ?? 0,
371
+ },
372
+ isSwitchCellBg: "0",
373
+ };
374
+ return {
375
+ section,
376
+ options: data.options,
377
+ sectionHeight: sectionHeight, //+(section.decoration?.bottom||0)+(section.titleStyle?.height||0)+(section.titleStyle?.marginBottom||0)
378
+ };
379
+ };
380
+
381
+ export const transHistorySection = (
382
+ historyRes: ImySectionRes,
383
+ userInfo: UserInfo | null | undefined,
384
+ ) => {
385
+ const isEmpty = historyRes.section.itemList.length === 0;
386
+ //如果无记录,则显示的是无记录的格子
387
+ const poster = getPosterConfig(
388
+ {
389
+ id: "2getHistoryMore",
390
+ img: "file://" + ic_record_normal,
391
+ focusedImage: "file://" + ic_record_focus,
392
+ title: isEmpty ? "您还没有观看历史哦~" : "全部记录",
393
+ _titleFontSize: 36,
394
+ _titleFontColor: isEmpty ? "rgba(255,255,255,0.55)" : "#FFFFFF",
395
+ tip: "",
396
+ subTitle: "",
397
+ _layout: { width: isEmpty ? 1760 : 410, height: 230 },
398
+ jumpParams: {
399
+ type: 1,
400
+ options: { name: "history", params: { menuIndex: 0 } },
401
+ },
402
+ _iconWidth: 80,
403
+ _iconHeight: 80,
404
+ },
405
+ {
406
+ posterType: !userInfo
407
+ ? posterTypes.iconTitleCol
408
+ : posterTypes.iconTitleRow,
409
+ space: historyRes.options?.space,
410
+ },
411
+ );
412
+ historyRes.section.itemList.push(poster);
413
+ return historyRes.section;
414
+ };
415
+ export const transMoreSectin = (sections: ImySectionRes[]) => {
416
+ return sections.map((item) => {
417
+ return item.section;
418
+ });
419
+ };
420
+
421
+ const userConfig = {
422
+ btn: "立即登录",
423
+ nickName: "登录同步云端记录",
424
+ tip: "",
425
+ router: { type: 0, options: "" },
426
+ loginBtn: "账号管理",
427
+ loginTip: "",
428
+ };
429
+
430
+ export const updateUserInfoItem = (userinfo, newInfo?: UserInfo | null) => {
431
+ userinfo.image.src = "";
432
+ userinfo.image.enable = false;
433
+ userinfo.title.text = userConfig.nickName;
434
+ userinfo.subTitle.text = userConfig.btn;
435
+ userinfo.jumpParams = userConfig.router;
436
+ userinfo.tip = userConfig.tip;
437
+ console.log("newInfo:" + JSON.stringify(newInfo));
438
+ return userinfo;
439
+ };
440
+ //第一行板块
441
+ export const transCenterSection = (vipInfo: VipInfo, info: UserInfo | null) => {
442
+ //获取第一行板块数据
443
+ const sectionRes = myApi.getCenterInfo(vipInfo, info);
444
+ //更新其中格子的跳转
445
+ sectionRes.section.itemList.unshift(
446
+ getPosterConfig(
447
+ {
448
+ id:
449
+ (sectionRes.section._id || "my_userinfo") +
450
+ sectionRes.section.itemList.length,
451
+ img: info ? info?.headImage : "",
452
+ title: info ? info?.nickname : userConfig.nickName,
453
+ tip: info ? userConfig.loginTip : userConfig.tip,
454
+ subTitle: info ? userConfig.loginBtn : userConfig.btn,
455
+ _layout: { width: 557, height: 314 },
456
+ jumpParams: userConfig.router,
457
+ },
458
+ {
459
+ posterType: posterTypes.user,
460
+ space: sectionRes.options?.space,
461
+ },
462
+ ),
463
+ );
464
+ // console.log('centerSection:'+JSON.stringify(sectionRes))
465
+ return sectionRes.section;
466
+ };
467
+
468
+ class MyDataManager {
469
+ tabPageIndex = -1;
470
+ isUserChange = false;
471
+ isShow = false;
472
+ tabRef?: Ref<QTITab | undefined>;
473
+ lastRouter: string = "";
474
+ triggerRouterId = "";
475
+ agreementConfig = {
476
+ //协议配置
477
+ agreementUrlList: [],
478
+ };
479
+ lastHistoryData: ICollect | null = null; //上次上报的历史记录,用于解决服务器刷新不及时问题
480
+ constructor() {}
481
+
482
+ async getData(): Promise<QTWaterfallSection[]> {
483
+ //获取会员信息
484
+ const vipInfo = await myApi.getVipInfo();
485
+ const historyRes = await myApi.getHistorys();
486
+ //获取协议配置
487
+ const moreRes = await myApi.getMoreList([
488
+ {
489
+ code: "user",
490
+ name: "用户协议",
491
+ url: "https://api.extscreen.com/extscreenapi/api/v3/zero/user/agreement/index?name=es.tv.huan.hellotv&default=user",
492
+ },
493
+ {
494
+ code: "privacy",
495
+ name: "隐私政策",
496
+ url: "https://api.extscreen.com/extscreenapi/api/v3/zero/user/agreement/index?name=es.tv.huan.hellotv&default=privacy",
497
+ },
498
+ {
499
+ code: "child",
500
+ name: "儿童保护协议",
501
+ url: "https://api.extscreen.com/extscreenapi/api/v3/zero/user/agreement/index?name=es.tv.huan.hellotv&default=child",
502
+ },
503
+ {
504
+ code: "sdk",
505
+ name: "三方SDK清单",
506
+ url: "https://api.extscreen.com/extscreenapi/api/v3/zero/user/agreement/index?name=es.tv.huan.hellotv&default=sdk",
507
+ },
508
+ {
509
+ code: "share",
510
+ name: "三方信息共享",
511
+ url: "https://api.extscreen.com/extscreenapi/api/v3/zero/user/agreement/index?name=es.tv.huan.hellotv&default=share",
512
+ },
513
+ ]);
514
+ const info = userManager.getUserInfo();
515
+ //获取卡片列表
516
+ const res = [
517
+ transCenterSection(vipInfo, info),
518
+ transHistorySection(historyRes, info),
519
+ ];
520
+ return res.concat(transMoreSectin(moreRes));
521
+ }
522
+ async updateUser() {
523
+ if (this.tabRef) {
524
+ const userinfo = this.tabRef.value?.getPageItem(this.tabPageIndex, 0, 0);
525
+ const newInfo = userManager.getUserInfo();
526
+ if (userinfo?._id) {
527
+ updateUserInfoItem(userinfo, newInfo);
528
+ }
529
+ }
530
+ }
531
+ async updateHistory(userInfo: UserInfo | null) {
532
+ if (this.tabRef) {
533
+ const historyRes = await myApi.getHistorys();
534
+ const hisSection = transHistorySection(historyRes, userInfo);
535
+ this.tabRef.value?.updatePageSection(this.tabPageIndex, 1, hisSection);
536
+ if (this.triggerRouterId && this.lastRouter == "history") {
537
+ this.lastRouter = "";
538
+ this.tabRef?.value?.setAutoFocus(this.triggerRouterId, 0);
539
+ }
540
+ }
541
+ }
542
+ async updateData(userInfo: UserInfo | null) {
543
+ if (this.tabPageIndex >= 0 && this.tabRef && this.isShow) {
544
+ const cIndex = await this.tabRef.value?.getCurrentTabIndex();
545
+ if (cIndex === this.tabPageIndex) {
546
+ if (this.isUserChange) {
547
+ this.isUserChange = false;
548
+ this.checkRouter();
549
+ this.updateUser();
550
+ }
551
+ this.updateHistory(userInfo);
552
+ }
553
+ }
554
+ }
555
+ async setData(tabRef: Ref<QTITab | undefined>, tabIndex, tabContentTop = 0) {
556
+ const tData = await this.getData();
557
+ tData[0].decoration!.top = tabContentTop;
558
+ tData[tData.length - 1].decoration!.bottom = 20;
559
+ const tabPage: QTTabPageData = {
560
+ data: tData,
561
+ useDiff: false,
562
+ disableScrollOnFirstScreen: false,
563
+ isEndPage: true,
564
+ };
565
+ tabRef.value?.setPageData(tabIndex, tabPage);
566
+ this.tabPageIndex = tabIndex;
567
+ tabRef.value?.setPageState(
568
+ tabIndex,
569
+ QTTabPageState.QT_TAB_PAGE_STATE_COMPLETE,
570
+ );
571
+ userManager.addUserChangeListener(userChangeListener);
572
+ this.tabRef = tabRef;
573
+ this.isShow = true;
574
+ }
575
+ clear() {
576
+ userManager.removeUserChangeListener(userChangeListener);
577
+ this.isShow = false;
578
+ }
579
+ logout() {
580
+ userManager.clearUserInfo();
581
+ }
582
+ routerLaunch(item: any) {
583
+ console.log("router:" + JSON.stringify(item.jumpParams));
584
+ if (!item.jumpParams) return;
585
+ this.lastRouter = item._router?.url || "";
586
+ this.triggerRouterId = item.id || item._id;
587
+ launch.launch(item.jumpParams);
588
+ }
589
+ checkRouter() {
590
+ // console.log(this.lastRouter, '--lsj-this.lastRouter')
591
+ }
592
+ }
593
+ const myDataManager = new MyDataManager();
594
+ export const myDataManager2 = new MyDataManager();
595
+ const userChangeListener: UserChangeListener = {
596
+ onUserChanged(user) {
597
+ myDataManager.isUserChange = true;
598
+ myDataManager.updateData(user);
599
+ myDataManager2.isUserChange = true;
600
+ myDataManager2.updateData(user);
601
+ },
602
+ };
603
+ // if(pageIndex === myDataManager.tabPageIndex){
604
+ // myDataManager.setData(tabRef, tabContentTop)
605
+ // }
606
+ export default myDataManager;
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div class="my_template">
3
+ <my-poster-user />
4
+ <my-poster-card2 />
5
+ <my-icon-title-col />
6
+ <my-poster />
7
+ <my-poster-info />
8
+ <my-icon-title-row />
9
+ </div>
10
+ </template>
11
+ <script lang="ts" setup>
12
+ import MyPoster from "./poster/index.vue";
13
+ import MyPosterInfo from "./poster/my-info.vue";
14
+ import MyPosterUser from "./poster/my-user.vue";
15
+ import MyPosterCard2 from "./poster/my-card2.vue";
16
+ import MyIconTitleRow from "./poster/my-icon-title-row.vue";
17
+ import MyIconTitleCol from "./poster/my-icon-title-col.vue";
18
+
19
+ defineExpose({});
20
+ </script>
21
+ <style scoped>
22
+ .my_template {
23
+ }
24
+ </style>