index.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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',
  27. data() {
  28. return {
  29. list: [],
  30. }
  31. },
  32. computed: {
  33. ...mapGetters(['supplierInfo', 'routePrefix', 'themeName']),
  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: this.themeName === 'ross' ? '体疗师认证' : '医师认证',
  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. min-height: calc(100vh - 80px - 80px);
  70. background-color: #fff;
  71. }
  72. .page-top {
  73. height: 360px;
  74. @include themify($themes) {
  75. background: themed('pc-banner-approve');
  76. background-size: auto 360px;
  77. }
  78. .logo {
  79. display: block;
  80. width: 120px;
  81. height: 120px;
  82. border-radius: 50%;
  83. background: #fff;
  84. }
  85. .name {
  86. font-size: 30px;
  87. color: #fff;
  88. }
  89. }
  90. .page-content {
  91. width: 1200px;
  92. margin: 0 auto;
  93. .list {
  94. display: flex;
  95. justify-content: space-between;
  96. align-items: center;
  97. }
  98. .section {
  99. width: 380px;
  100. height: 220px;
  101. background-size: 380px 220px;
  102. margin-left: auto;
  103. margin-right: auto;
  104. cursor: pointer;
  105. transition: all 0.4s;
  106. &:hover {
  107. box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  108. }
  109. .icon {
  110. width: 48px;
  111. height: 48px;
  112. }
  113. .line {
  114. width: 24px;
  115. height: 2px;
  116. @include themify($themes) {
  117. background-color: themed('color');
  118. }
  119. }
  120. .name {
  121. font-size: 20px;
  122. color: #fff;
  123. }
  124. .icon-image {
  125. width: 48px;
  126. height: 48px;
  127. background-size: 48px 48px;
  128. background-repeat: no-repeat;
  129. background-position: center;
  130. &.item1 {
  131. background-image: url(~assets/theme-images/common/pc-icon-club.png);
  132. }
  133. &.item2 {
  134. background-image: url(~assets/theme-images/common/pc-icon-device.png);
  135. }
  136. &.item3 {
  137. background-image: url(~assets/theme-images/common/pc-icon-doctor.png);
  138. }
  139. }
  140. &:nth-child(1) {
  141. @include themify($themes) {
  142. background-image: themed('pc-entry-club-bg');
  143. }
  144. }
  145. &:nth-child(2) {
  146. @include themify($themes) {
  147. background-image: themed('pc-entry-device-bg');
  148. }
  149. }
  150. &:nth-child(3) {
  151. @include themify($themes) {
  152. background-image: themed('pc-entry-doctor-bg');
  153. }
  154. }
  155. }
  156. }
  157. }
  158. // 移动 端
  159. @media screen and (max-width: 768px) {
  160. .page-top {
  161. height: 46vw;
  162. @include themify($themes) {
  163. background: themed('h5-banner-approve');
  164. background-size: auto 46vw;
  165. }
  166. .logo {
  167. display: block;
  168. width: 14.8vw;
  169. height: 14.8vw;
  170. border-radius: 50%;
  171. background: #fff;
  172. }
  173. .name {
  174. font-size: 4vw;
  175. color: #fff;
  176. }
  177. }
  178. .page-content {
  179. .section {
  180. width: 92vw;
  181. height: 42vw;
  182. background-size: 92vw 42vw;
  183. margin-left: auto;
  184. margin-right: auto;
  185. .icon {
  186. width: 8.8vw;
  187. height: 8.8vw;
  188. }
  189. .line {
  190. width: 4.2vw;
  191. height: 0.3vw;
  192. @include themify($themes) {
  193. background-color: themed('color');
  194. }
  195. }
  196. .name {
  197. font-size: 4.2vw;
  198. color: #fff;
  199. }
  200. .icon-image {
  201. width: 48px;
  202. height: 48px;
  203. background-size: 48px 48px;
  204. background-repeat: no-repeat;
  205. background-position: center;
  206. &.item1 {
  207. background-image: url(~assets/theme-images/common/pc-icon-club.png);
  208. }
  209. &.item2 {
  210. background-image: url(~assets/theme-images/common/pc-icon-device.png);
  211. }
  212. &.item3 {
  213. background-image: url(~assets/theme-images/common/pc-icon-doctor.png);
  214. }
  215. }
  216. &:nth-child(1) {
  217. @include themify($themes) {
  218. background-image: themed('pc-entry-club-bg');
  219. }
  220. }
  221. &:nth-child(2) {
  222. @include themify($themes) {
  223. background-image: themed('pc-entry-device-bg');
  224. }
  225. }
  226. &:nth-child(3) {
  227. @include themify($themes) {
  228. background-image: themed('pc-entry-doctor-bg');
  229. }
  230. }
  231. }
  232. }
  233. }
  234. </style>