index.vue 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="content">
  3. 教师详情
  4. </view>
  5. </template>
  6. <script setup lang="ts">
  7. import { inject, computed, ref } from 'vue';
  8. //该依赖已内置不需要单独安装
  9. import { onLoad } from "@dcloudio/uni-app";
  10. // 请求接口
  11. const $api = inject('$api');
  12. const id = ref('');
  13. // 基本信息
  14. const config = ref({ logo: [], file: [] });
  15. const info = ref({});
  16. // user
  17. const user = computed(() => {
  18. return uni.getStorageSync('user');
  19. })
  20. onLoad(async (options) => {
  21. id.value = options && options.id
  22. await searchConfig();
  23. await searchOther();
  24. await search();
  25. });
  26. // config信息
  27. const searchConfig = async () => {
  28. config.value = uni.getStorageSync('config');
  29. };
  30. // 其他查询信息
  31. const searchOther = async () => { };
  32. // 查询
  33. const search = async () => { };
  34. </script>
  35. <style lang="scss" scoped>
  36. .content {
  37. display: flex;
  38. flex-direction: column;
  39. min-height: 100vh;
  40. background-color: var(--f1Color);
  41. }
  42. </style>