index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="content">
  3. 意见反馈
  4. <up-overlay :show="show">
  5. <login @showChange='showChange'></login>
  6. </up-overlay>
  7. </view>
  8. </template>
  9. <script setup lang="ts">
  10. import login from "@/components/login.vue"
  11. import { inject, computed, ref } from 'vue';
  12. //该依赖已内置不需要单独安装
  13. import { onShow, onPullDownRefresh } from "@dcloudio/uni-app";
  14. // 请求接口
  15. const $api = inject('$api');
  16. const $config = inject('$config');
  17. // 基本信息
  18. const config = ref({ logo: [], file: [] });
  19. const list = ref([]);
  20. const total = ref(0);
  21. // 遮罩层
  22. const show = ref(false);
  23. // user
  24. const user = computed(() => {
  25. return uni.getStorageSync('user');
  26. })
  27. onShow(async () => {
  28. await searchConfig();
  29. await searchOther();
  30. await search();
  31. if (!user.value) show.value = true
  32. })
  33. // config信息
  34. const searchConfig = async () => {
  35. config.value = uni.getStorageSync('config');
  36. };
  37. // 其他查询信息
  38. const searchOther = async () => { };
  39. // 查询
  40. const search = async () => { };
  41. const showChange = () => {
  42. show.value = false
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .content {
  47. display: flex;
  48. flex-direction: column;
  49. background-color: var(--f1Color);
  50. }
  51. </style>