index.vue 4.1 KB

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