| | |
| | | <view class="header"> |
| | | <up-icon name="list" size="40rpx" color="#333333" @click="onSettingClick" /> |
| | | <view> |
| | | <up-tabs :list="list1"> |
| | | <!-- <up-tabs :list="list1"> --> |
| | | <up-tabs :list="userTabList"> |
| | | <!-- <template #left> |
| | | <up-icon name="list" size="40rpx" color="#333333" /> |
| | | </template> --> |
| | |
| | | <script setup lang="ts"> |
| | | import SettingPopup from '@/components/setting/setting-popup.vue'; |
| | | import { reactive, ref, onMounted } from 'vue'; |
| | | import { onLoad } from '@dcloudio/uni-app' |
| | | |
| | | import { FilmCategoryTree, FilmWorks } from '@/types/index' |
| | | import { onLoad, onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app' |
| | | import { FilmTabCategory, FilmWorksCategory } from '@/enums/dict' |
| | | import { useGlobal } from '@/composables/useGlobal' |
| | | const { $http, $message, $store } = useGlobal() |
| | | import { getTabList } from '@/sub-pages/utils/api' |
| | | // 控制设置弹窗显示 |
| | | const settingShow = ref(false); |
| | | // 方法定义 |
| | |
| | | } |
| | | |
| | | // 创建响应式数据 |
| | | const list1 = reactive([ |
| | | { name: '关注' }, |
| | | { name: '发现' }, |
| | | { name: '苏州' }, |
| | | ]); |
| | | |
| | | const tabList = ref([ |
| | | { id: 'recommend', name: '推荐' }, |
| | | { id: 'straight', name: '直播' }, |
| | | { id: 'short', name: '短剧' }, |
| | | { id: 'food', name: '美食' }, |
| | | { id: 'travel', name: '穿搭' }, |
| | | { id: 'beauty', name: '美甲' }, |
| | | { id: 'more', name: '更多' }, |
| | | ]) |
| | | // const list1 = reactive([ |
| | | // { name: '关注' }, |
| | | // { name: '发现' }, |
| | | // { name: '苏州' }, |
| | | // ]); |
| | | const userTabList = ref<FilmCategoryTree[]>([]) |
| | | const tabList = ref<FilmCategoryTree[]>([]) |
| | | |
| | | const flowList = ref([ |
| | | { |
| | |
| | | theme.value = storedTheme |
| | | }) |
| | | |
| | | |
| | | onShow(() => { |
| | | getTabList(FilmTabCategory.USER_TYPE,userTabList,false) |
| | | getTabList(FilmTabCategory.FILM_TYPE, tabList) |
| | | }); |
| | | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .header { |