info.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.value = options && options.id
  20. uni.setNavigationBarTitle({
  21. title: options && options.name || '活动详情'
  22. });
  23. await searchConfig();
  24. await search();
  25. })
  26. // config信息
  27. const searchConfig = async () => {
  28. config.value = uni.getStorageSync('config');
  29. };
  30. // 查询
  31. const search = async () => {
  32. if (id.value) { }
  33. };
  34. </script>
  35. <style lang="scss" scoped>
  36. .content {
  37. display: flex;
  38. flex-direction: column;
  39. width: 100vw;
  40. height: 100vh;
  41. .one {
  42. padding: 2vw;
  43. }
  44. }
  45. </style>