index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" :src="supplierInfo.logo" />
  5. <div class="name mt-2" v-text="supplierInfo.shopName"></div>
  6. </div>
  7. <div class="page-content">
  8. <div class="list">
  9. <div
  10. class="section flex flex-col justify-center items-center mt-5 mb-5"
  11. v-for="item in list"
  12. :key="item.id"
  13. @click="toDetail(item)"
  14. >
  15. <icon-image class="icon" :name="item.image"></icon-image>
  16. <div class="line mt-3 mb-3"></div>
  17. <div class="name" v-text="item.name"></div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { mapGetters } from 'vuex'
  25. export default {
  26. layout: 'app',
  27. data() {
  28. return {
  29. list: [],
  30. }
  31. },
  32. asyncData() {
  33. return {
  34. list: [
  35. {
  36. id: 1,
  37. name: '机构认证',
  38. image: 'icon-club.png',
  39. path: '/approve/club',
  40. },
  41. {
  42. id: 2,
  43. name: '设备认证',
  44. image: 'icon-device.png',
  45. path: '/approve/device',
  46. },
  47. {
  48. id: 3,
  49. name: '医师认证',
  50. image: 'icon-doctor.png',
  51. path: '/approve/personnel/operate',
  52. },
  53. ],
  54. }
  55. },
  56. computed: {
  57. ...mapGetters(['supplierInfo', 'routePrefix']),
  58. },
  59. methods: {
  60. toDetail(item) {
  61. const url = this.routePrefix + item.path
  62. this.$router.push(url)
  63. },
  64. },
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. // pc 端
  69. @media screen and (min-width: 768px) {
  70. .page {
  71. min-height: calc(100vh - 80px - 80px);
  72. background-color: #fff;
  73. }
  74. .page-top {
  75. height: 360px;
  76. @include themify($themes) {
  77. background: themed('banner-approve-pc');
  78. background-size: auto 360px;
  79. }
  80. .logo {
  81. display: block;
  82. width: 120px;
  83. height: 120px;
  84. border-radius: 50%;
  85. background: #fff;
  86. }
  87. .name {
  88. font-size: 30px;
  89. color: #fff;
  90. }
  91. }
  92. .page-content {
  93. width: 1200px;
  94. margin: 0 auto;
  95. .list {
  96. display: flex;
  97. justify-content: space-between;
  98. align-items: center;
  99. }
  100. .section {
  101. width: 380px;
  102. height: 220px;
  103. background-size: 380px 220px;
  104. margin-left: auto;
  105. margin-right: auto;
  106. cursor: pointer;
  107. transition: all 0.4s;
  108. &:hover {
  109. box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  110. }
  111. .icon {
  112. width: 48px;
  113. height: 48px;
  114. }
  115. .line {
  116. width: 24px;
  117. height: 2px;
  118. @include themify($themes) {
  119. background-color: themed('color');
  120. }
  121. }
  122. .name {
  123. font-size: 20px;
  124. color: #fff;
  125. }
  126. &:nth-child(1) {
  127. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-club.png);
  128. }
  129. &:nth-child(2) {
  130. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-device.png);
  131. }
  132. &:nth-child(3) {
  133. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-doctor.png);
  134. }
  135. }
  136. }
  137. }
  138. // 移动 端
  139. @media screen and (max-width: 768px) {
  140. .page-top {
  141. height: 46vw;
  142. @include themify($themes) {
  143. background: themed('banner-approve-h5');
  144. background-size: auto 46vw;
  145. }
  146. .logo {
  147. display: block;
  148. width: 14.8vw;
  149. height: 14.8vw;
  150. border-radius: 50%;
  151. background: #fff;
  152. }
  153. .name {
  154. font-size: 4vw;
  155. color: #fff;
  156. }
  157. }
  158. .page-content {
  159. .section {
  160. width: 92vw;
  161. height: 42vw;
  162. background-size: 92vw 42vw;
  163. margin-left: auto;
  164. margin-right: auto;
  165. .icon {
  166. width: 8.8vw;
  167. height: 8.8vw;
  168. }
  169. .line {
  170. width: 4.2vw;
  171. height: 0.3vw;
  172. @include themify($themes) {
  173. background-color: themed('color');
  174. }
  175. }
  176. .name {
  177. font-size: 4.2vw;
  178. color: #fff;
  179. }
  180. &:nth-child(1) {
  181. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-club.png);
  182. }
  183. &:nth-child(2) {
  184. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-device.png);
  185. }
  186. &:nth-child(3) {
  187. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-doctor.png);
  188. }
  189. }
  190. }
  191. }
  192. </style>