index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 { 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. // 查询
  33. const search = async () => {
  34. const info = {
  35. skip: 0,
  36. limit: 2,
  37. status: '0'
  38. }
  39. // const res = await $api('car', 'GET', info);
  40. // if (res.errcode === 0) {
  41. // list.value = list.value.concat(res.data)
  42. // total.value = res.total
  43. // } else {
  44. // uni.showToast({
  45. // title: res.errmsg || '',
  46. // icon: 'error',
  47. // });
  48. // }
  49. };
  50. </script>
  51. <style lang="scss" scoped>
  52. .content {
  53. display: flex;
  54. flex-direction: column;
  55. background-color: var(--f1Color);
  56. }
  57. </style>