index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. <div class="icon-image" :class="'item' + item.id"></div>
  16. <div class="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-ph',
  27. data() {
  28. return {
  29. list: [],
  30. }
  31. },
  32. computed: {
  33. ...mapGetters(['supplierInfo', 'routePrefix']),
  34. },
  35. created() {
  36. this.list = this.generateList()
  37. },
  38. methods: {
  39. generateList() {
  40. return [
  41. {
  42. id: 1,
  43. name: '机构认证',
  44. path: '/approve/club',
  45. },
  46. {
  47. id: 2,
  48. name: '设备认证',
  49. path: '/approve/device',
  50. },
  51. {
  52. id: 3,
  53. name: '体疗师认证',
  54. path: '/approve/personnel/operate',
  55. },
  56. ]
  57. },
  58. toDetail(item) {
  59. const url = this.routePrefix + item.path
  60. this.$router.push(url)
  61. },
  62. },
  63. }
  64. </script>
  65. <style scoped lang="scss">
  66. // pc 端
  67. @media screen and (min-width: 768px) {
  68. .page {
  69. @include useTheme() {
  70. min-height: calc(100vh - 80px - 80px);
  71. background-color: #fff;
  72. .page-top {
  73. height: 360px;
  74. background: fetch('pc-banner-approve');
  75. background-size: auto 360px;
  76. .logo {
  77. display: block;
  78. width: 120px;
  79. height: 120px;
  80. border-radius: 50%;
  81. background: #fff;
  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: fetch('color');
  115. }
  116. .name {
  117. font-size: 20px;
  118. color: #fff;
  119. }
  120. .icon-image {
  121. width: 48px;
  122. height: 48px;
  123. background-size: 48px 48px;
  124. background-repeat: no-repeat;
  125. background-position: center;
  126. &.item1 {
  127. background-image: url(~assets/theme-images/common/pc-icon-club.png);
  128. }
  129. &.item2 {
  130. background-image: url(~assets/theme-images/common/pc-icon-device.png);
  131. }
  132. &.item3 {
  133. background-image: url(~assets/theme-images/common/pc-icon-doctor.png);
  134. }
  135. }
  136. &:nth-child(1) {
  137. background-image: fetch('pc-entry-club-bg');
  138. }
  139. &:nth-child(2) {
  140. background-image: fetch('pc-entry-device-bg');
  141. }
  142. &:nth-child(3) {
  143. background-image: fetch('pc-entry-doctor-bg');
  144. }
  145. }
  146. }
  147. }
  148. }
  149. }
  150. // 移动 端
  151. @media screen and (max-width: 768px) {
  152. .page {
  153. @include useTheme() {
  154. .page-top {
  155. height: 46vw;
  156. background: fetch('h5-banner-approve');
  157. background-size: auto 46vw;
  158. .logo {
  159. display: block;
  160. width: 14.8vw;
  161. height: 14.8vw;
  162. border-radius: 50%;
  163. background: #fff;
  164. }
  165. .name {
  166. font-size: 4vw;
  167. color: #fff;
  168. }
  169. }
  170. .page-content {
  171. .section {
  172. width: 92vw;
  173. height: 42vw;
  174. background-size: 92vw 42vw;
  175. margin-left: auto;
  176. margin-right: auto;
  177. .icon {
  178. width: 8.8vw;
  179. height: 8.8vw;
  180. }
  181. .line {
  182. width: 4.2vw;
  183. height: 0.3vw;
  184. background-color: fetch('color');
  185. }
  186. .name {
  187. font-size: 4.2vw;
  188. color: #fff;
  189. }
  190. .icon-image {
  191. width: 48px;
  192. height: 48px;
  193. background-size: 48px 48px;
  194. background-repeat: no-repeat;
  195. background-position: center;
  196. &.item1 {
  197. background-image: url(~assets/theme-images/common/pc-icon-club.png);
  198. }
  199. &.item2 {
  200. background-image: url(~assets/theme-images/common/pc-icon-device.png);
  201. }
  202. &.item3 {
  203. background-image: url(~assets/theme-images/common/pc-icon-doctor.png);
  204. }
  205. }
  206. &:nth-child(1) {
  207. background-image: fetch('pc-entry-club-bg');
  208. }
  209. &:nth-child(2) {
  210. background-image: fetch('pc-entry-device-bg');
  211. }
  212. &:nth-child(3) {
  213. background-image: fetch('pc-entry-doctor-bg');
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }
  220. </style>