index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <div class="page">
  3. <div class="page-top"></div>
  4. <div class="page-content">
  5. <keep-alive>
  6. <div class="list">
  7. <div
  8. class="section flex flex-col justify-center items-center rounded-md"
  9. v-for="item in list"
  10. :key="item.id"
  11. >
  12. <icon-image class="icon" :name="item.image"></icon-image>
  13. <div
  14. class="name mt-4"
  15. v-text="item.name"
  16. @click="toDetail(item)"
  17. ></div>
  18. </div>
  19. </div>
  20. </keep-alive>
  21. </div>
  22. <div class="page-footer flex flex-col justify-center">
  23. <div class="name mb-1">需要帮助吗?</div>
  24. <div class="contact">联系我们 +86 1382160616</div>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. layout: 'app-ldm',
  31. data() {
  32. return {
  33. list: [],
  34. }
  35. },
  36. asyncData() {
  37. return {
  38. list: [
  39. {
  40. id: 0,
  41. name: '授权认证',
  42. image: 'ldm-icon-approve.png',
  43. path: '/ldm/approve',
  44. },
  45. {
  46. id: 1,
  47. name: '官方产品资料',
  48. image: 'ldm-icon-database.png',
  49. path: '/ldm/database/package',
  50. },
  51. ],
  52. }
  53. },
  54. methods: {
  55. toDetail(item) {
  56. const hasLogin = this.$store.getters.accessToken
  57. if (item.id > 0 && !hasLogin) {
  58. this.$toast({ message: '请先登录', duration: 1000 })
  59. this.$store.commit('app/SHOW_LOGIN')
  60. return
  61. }
  62. this.$router.push(item.path)
  63. },
  64. },
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. @media screen and (min-width: 768px) {
  69. .page-top {
  70. height: 596px;
  71. background: url(https://static.caimei365.com/www/authentic/pc/ldm-bg-home.png)
  72. no-repeat center;
  73. background-size: auto 596px;
  74. }
  75. .page-content {
  76. width: 700px;
  77. margin: 0 auto;
  78. min-height: calc(100vh - 596px - 100px);
  79. overflow: hidden;
  80. .list {
  81. display: flex;
  82. align-items: center;
  83. justify-content: space-between;
  84. margin-top: 124px;
  85. margin-bottom: 314px;
  86. .section {
  87. .icon {
  88. width: 120px;
  89. height: 120px;
  90. }
  91. .name {
  92. width: 241px;
  93. height: 73px;
  94. background: #000;
  95. text-align: center;
  96. line-height: 73px;
  97. color: #fff;
  98. font-size: 22px;
  99. cursor: pointer;
  100. }
  101. }
  102. }
  103. }
  104. .page-footer {
  105. position: relative;
  106. height: 100px;
  107. padding-left: 194px;
  108. background: linear-gradient(to bottom, #f1f1f1, #fdfdfd, #f1f1f1);
  109. .name {
  110. font-size: 24px;
  111. color: #9d9d9d;
  112. }
  113. .contact {
  114. font-size: 19px;
  115. color: #9d9d9d;
  116. }
  117. &::before {
  118. position: absolute;
  119. left: 120px;
  120. top: 50%;
  121. transform: translateY(-50%);
  122. content: '';
  123. display: block;
  124. width: 56px;
  125. height: 56px;
  126. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact1.png)
  127. no-repeat center;
  128. background-size: 56px auto;
  129. }
  130. }
  131. }
  132. @media screen and (max-width: 768px) {
  133. .page-top {
  134. height: 59.6vw;
  135. background: url(https://static.caimei365.com/www/authentic/h5/ldm-bg-home.png);
  136. background-size: auto 59.6vw;
  137. }
  138. .page-content {
  139. min-height: calc(100vh - 59.6vw - 15.4vw);
  140. overflow: hidden;
  141. .list {
  142. display: flex;
  143. flex-direction: column;
  144. align-items: center;
  145. margin-top: 10.9vw;
  146. .section {
  147. width: 80vw;
  148. height: 48vw;
  149. background: #f8f8f8;
  150. border: 0.1vw solid #bfbfbf;
  151. margin-bottom: 5.8vw;
  152. .icon {
  153. width: 18.9vw;
  154. height: 18.9vw;
  155. }
  156. .name {
  157. width: 37.8vw;
  158. height: 11.4vw;
  159. background: #000;
  160. text-align: center;
  161. line-height: 11.4vw;
  162. color: #fff;
  163. }
  164. }
  165. }
  166. }
  167. .page-footer {
  168. position: relative;
  169. height: 15.4vw;
  170. padding-left: 12.5vw;
  171. background: linear-gradient(to bottom, #f1f1f1, #fdfdfd, #f1f1f1);
  172. .name {
  173. font-size: 3.2vw;
  174. color: #9d9d9d;
  175. }
  176. .contact {
  177. font-size: 2.6vw;
  178. color: #9d9d9d;
  179. }
  180. &::before {
  181. position: absolute;
  182. left: 2.4vw;
  183. top: 50%;
  184. transform: translateY(-50%);
  185. content: '';
  186. display: block;
  187. width: 7.5vw;
  188. height: 7.5vw;
  189. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact1.png)
  190. no-repeat center;
  191. background-size: 7.4vw auto;
  192. }
  193. }
  194. }
  195. </style>