index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
  5. <div class="w_1200">
  6. <el-row class="help">
  7. <el-col :span="6" class="left">
  8. <a-menu
  9. v-model:selectedKeys="selectedKeys"
  10. style="width: 256px"
  11. mode="inline"
  12. :items="menuList"
  13. @select="onOpenChange"
  14. ></a-menu>
  15. </el-col>
  16. <el-col v-if="select === '1'" :span="18" class="right">
  17. <h2>关于我们</h2>
  18. <el-col :span="24" class="other">
  19. <div v-html="configInfo.brief"></div>
  20. </el-col>
  21. </el-col>
  22. <!-- <el-col v-else-if="select === '2'" :span="18" class="right">意见反馈</el-col> -->
  23. <el-col v-else-if="select === '3'" :span="18" class="right">
  24. <el-row :gutter="20">
  25. <el-col :span="12" class="left">
  26. <el-image class="image" :src="map" fit="fill" />
  27. </el-col>
  28. <el-col :span="12" class="right">
  29. <el-col :span="24" class="other">
  30. <el-icon color="#2374ff">
  31. <Message />
  32. </el-icon>
  33. <span>联系我们</span> {{ configInfo.footInfo.Company }}
  34. </el-col>
  35. <el-col :span="24" class="other">
  36. <el-icon color="#2374ff">
  37. <Location />
  38. </el-icon>
  39. <span>联系地址</span> {{ configInfo.footInfo.Address }}
  40. </el-col>
  41. <el-col :span="24" class="other">
  42. <el-icon color="#2374ff">
  43. <Iphone />
  44. </el-icon>
  45. <span>联系电话</span> {{ configInfo.footInfo.Phone }}
  46. </el-col>
  47. </el-col>
  48. </el-row>
  49. </el-col>
  50. <!-- <el-col v-else-if="select === '4'" :span="18" class="right">法律条款</el-col> -->
  51. </el-row>
  52. </div>
  53. </el-col>
  54. </el-row>
  55. </div>
  56. </template>
  57. <script setup>
  58. const $checkRes = inject('$checkRes')
  59. // 接口
  60. import { DesignStore } from '@/store/api/platform/design'
  61. const designStore = DesignStore()
  62. // 图片引入
  63. import map from '/images/map.png'
  64. const route = useRoute()
  65. // 加载中
  66. const loading = ref(false)
  67. const selectedKeys = ref(['1'])
  68. const select = ref('1')
  69. const menuList = reactive([
  70. {
  71. key: '1',
  72. label: '关于我们',
  73. title: '关于我们'
  74. },
  75. // {
  76. // key: '2',
  77. // label: '意见反馈',
  78. // title: '意见反馈'
  79. // },
  80. {
  81. key: '3',
  82. label: '联系我们',
  83. title: '联系我们'
  84. }
  85. // {
  86. // key: '4',
  87. // label: '法律条款',
  88. // title: '法律条款'
  89. // }
  90. ])
  91. const configInfo = ref({ footInfo: {} })
  92. // 请求
  93. onMounted(async () => {
  94. loading.value = true
  95. search()
  96. loading.value = false
  97. })
  98. const search = async () => {
  99. if (route.query.type) {
  100. select.value = route.query.type
  101. selectedKeys.value = [route.query.type]
  102. }
  103. // 基础设置
  104. const result = await designStore.query({})
  105. if ($checkRes(result)) configInfo.value = result.data[0] || {}
  106. }
  107. const onOpenChange = (item) => {
  108. select.value = item.key
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .main {
  113. .help {
  114. padding: 10px 0;
  115. min-height: 650px;
  116. .left {
  117. display: flex;
  118. align-items: normal;
  119. }
  120. .right {
  121. background: rgba(40, 77, 191, 0.03);
  122. padding: 20px;
  123. h2 {
  124. font-size: 32px;
  125. color: #284dbf;
  126. }
  127. .other {
  128. margin-bottom: 10px;
  129. font-family: PingFangSC-Regular;
  130. font-size: $global-font-size-16;
  131. color: #7e8288;
  132. line-height: 25px;
  133. span {
  134. font-family: PingFangSC-Regular;
  135. font-size: $global-font-size-16;
  136. color: #383b40;
  137. line-height: 25px;
  138. margin: 0 5px;
  139. }
  140. }
  141. }
  142. }
  143. }
  144. </style>