index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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: '/app/approve/club',
  40. },
  41. {
  42. id: 2,
  43. name: '设备认证',
  44. image: 'icon-device.png',
  45. path: '/app/approve/device',
  46. },
  47. {
  48. id: 3,
  49. name: '医师认证',
  50. image: 'icon-doctor.png',
  51. path: '/app/approve/personnel/operate',
  52. },
  53. ],
  54. }
  55. },
  56. computed: {
  57. ...mapGetters(['supplierInfo', 'authUserId']),
  58. },
  59. methods: {
  60. toDetail(item) {
  61. const url = `/${this.authUserId}${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. background: url(https://static.caimei365.com/www/authentic/pc/bg-approve.png);
  77. background-size: auto 360px;
  78. .logo {
  79. display: block;
  80. width: 120px;
  81. height: 120px;
  82. border-radius: 50%;
  83. }
  84. .name {
  85. font-size: 30px;
  86. color: #fff;
  87. }
  88. }
  89. .page-content {
  90. width: 1200px;
  91. margin: 0 auto;
  92. .list {
  93. display: flex;
  94. justify-content: space-between;
  95. align-items: center;
  96. }
  97. .section {
  98. width: 380px;
  99. height: 220px;
  100. background-size: 380px 220px;
  101. margin-left: auto;
  102. margin-right: auto;
  103. cursor: pointer;
  104. transition: all 0.4s;
  105. &:hover {
  106. box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  107. }
  108. .icon {
  109. width: 48px;
  110. height: 48px;
  111. }
  112. .line {
  113. width: 24px;
  114. height: 2px;
  115. background-color: #bc1724;
  116. }
  117. .name {
  118. font-size: 20px;
  119. color: #fff;
  120. }
  121. &:nth-child(1) {
  122. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-club.png);
  123. }
  124. &:nth-child(2) {
  125. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-device.png);
  126. }
  127. &:nth-child(3) {
  128. background-image: url(https://static.caimei365.com/www/authentic/pc/section-bg-doctor.png);
  129. }
  130. }
  131. }
  132. }
  133. // 移动 端
  134. @media screen and (max-width: 768px) {
  135. .page-top {
  136. height: 46vw;
  137. background: url(https://static.caimei365.com/www/authentic/h5/bg-approve.png);
  138. background-size: auto 46vw;
  139. .logo {
  140. display: block;
  141. width: 14.8vw;
  142. height: 14.8vw;
  143. border-radius: 50%;
  144. }
  145. .name {
  146. font-size: 4vw;
  147. color: #fff;
  148. }
  149. }
  150. .page-content {
  151. .section {
  152. width: 92vw;
  153. height: 42vw;
  154. background-size: 92vw 42vw;
  155. margin-left: auto;
  156. margin-right: auto;
  157. .icon {
  158. width: 8.8vw;
  159. height: 8.8vw;
  160. }
  161. .line {
  162. width: 4.2vw;
  163. height: 0.3vw;
  164. background-color: #bc1724;
  165. }
  166. .name {
  167. font-size: 4.2vw;
  168. color: #fff;
  169. }
  170. &:nth-child(1) {
  171. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-club.png);
  172. }
  173. &:nth-child(2) {
  174. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-device.png);
  175. }
  176. &:nth-child(3) {
  177. background-image: url(https://static.caimei365.com/www/authentic/h5/bg-doctor.png);
  178. }
  179. }
  180. }
  181. }
  182. </style>