index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <u-swiper :list="config.file" height="240px" indicator indicatorMode="line" circular></u-swiper>
  5. </view>
  6. <view class="two">
  7. <view class="value">
  8. <view class="title">公司地址</view>
  9. <view class="label">{{config.address||'暂无'}}</view>
  10. </view>
  11. <view class="value">
  12. <view class="title">联系电话</view>
  13. <view class="label">{{config.phone||'暂无'}}</view>
  14. </view>
  15. <view class="value">
  16. <view class="title">邮箱</view>
  17. <view class="label">{{config.email||'暂无'}}</view>
  18. </view>
  19. <view class="value">
  20. <view class="title">工作时间</view>
  21. <view class="label">{{config.time||'暂无'}}</view>
  22. </view>
  23. <view class="value">
  24. <view class="title">办证须知</view>
  25. <view class="other">
  26. <rich-text :nodes="config.notice"></rich-text>
  27. </view>
  28. </view>
  29. <view class="value">
  30. <view class="title">简介</view>
  31. <view class="other">
  32. <rich-text :nodes="config.brief"></rich-text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script setup lang="ts">
  39. import { getCurrentInstance, ref } from 'vue';
  40. //该依赖已内置不需要单独安装
  41. import { onShow, onPullDownRefresh } from "@dcloudio/uni-app";
  42. // 请求接口
  43. const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
  44. // 基本信息
  45. const config = ref({ logo: [], file: [] });
  46. onShow(async () => {
  47. await searchConfig();
  48. })
  49. // config信息
  50. const searchConfig = async () => {
  51. config.value = uni.getStorageSync('config');
  52. };
  53. </script>
  54. <style lang="scss" scoped>
  55. .content {
  56. display: flex;
  57. flex-direction: column;
  58. .two {
  59. margin: 2vw;
  60. .value {
  61. padding: 2vw;
  62. margin: 2vw 0;
  63. border-bottom: 1px solid var(--f5Color);
  64. .title {
  65. font-size: var(--font16Size);
  66. font-weight: bold;
  67. margin: 2vw 0;
  68. }
  69. .label {
  70. padding: 1vw;
  71. font-size: var(--font12Size);
  72. color: var(--f85Color);
  73. }
  74. }
  75. }
  76. }
  77. </style>