index.vue 952 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. 创建
  5. </view>
  6. </view>
  7. </template>
  8. <script setup lang="ts">
  9. import { getCurrentInstance, ref } from 'vue';
  10. //该依赖已内置不需要单独安装
  11. import { onLoad } from "@dcloudio/uni-app";
  12. // 请求接口
  13. const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
  14. // 基本信息
  15. const config = ref({ logoUrl: '' });
  16. // 详情信息id
  17. const id = ref('');
  18. onLoad(async (options) => {
  19. // 球队id
  20. id.value = options && options.id
  21. await searchConfig();
  22. await search();
  23. })
  24. // config信息
  25. const searchConfig = async () => {
  26. config.value = uni.getStorageSync('config');
  27. };
  28. // 查询
  29. const search = async () => {
  30. if (id.value) { }
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. .content {
  35. display: flex;
  36. flex-direction: column;
  37. width: 100vw;
  38. height: 100vh;
  39. .one {
  40. padding: 2vw;
  41. }
  42. }
  43. </style>