index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <u-swiper :list="config.file" height="240px" indicator indicatorMode="dot" circular></u-swiper>
  5. </view>
  6. </view>
  7. </template>
  8. <script setup lang="ts">
  9. import { getCurrentInstance, ref } from 'vue';
  10. //该依赖已内置不需要单独安装
  11. import { onShow, onPullDownRefresh } from "@dcloudio/uni-app";
  12. // 请求接口
  13. const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
  14. const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
  15. // 基本信息
  16. const config = ref({ logo: [], file: [] });
  17. const list = ref([]);
  18. const total = ref(0);
  19. const menuList = ref([]);
  20. onShow(async () => {
  21. await searchConfig();
  22. await searchOther();
  23. await search();
  24. })
  25. // config信息
  26. const searchConfig = async () => {
  27. config.value = uni.getStorageSync('config');
  28. };
  29. // 其他查询信息
  30. const searchOther = async () => { };
  31. // 查询
  32. const search = async () => { };
  33. </script>
  34. <style lang="scss" scoped>
  35. .content {
  36. display: flex;
  37. flex-direction: column;
  38. background-color: var(--f1Color);
  39. }
  40. </style>