index.vue 1.0 KB

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