api
tj
2025-05-29 05d1310a6ec27656712c0c5e5e57b3365d3faf56
sub-pages/community/index.vue
@@ -4,7 +4,8 @@
      <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> -->
@@ -43,8 +44,12 @@
<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);
// 方法定义
@@ -53,21 +58,13 @@
}
// 创建响应式数据  
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([
  {
@@ -124,6 +121,12 @@
  theme.value = storedTheme
})
onShow(() => {
  getTabList(FilmTabCategory.USER_TYPE,userTabList,false)
  getTabList(FilmTabCategory.FILM_TYPE, tabList)
});
</script>
<style lang="scss" scoped>
.header {