detail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <div class="page">
  3. <div class="page-title">专业美容培训师</div>
  4. <div class="page-top">
  5. <div class="swiper">
  6. <SimpleSwiper :imageList="doctorInfo.bannerList"></SimpleSwiper>
  7. </div>
  8. </div>
  9. <div class="page-content">
  10. <div class="doctor-info">
  11. <div class="name">{{ doctorInfo.doctorName }}</div>
  12. <div class="tag">{{ doctorInfo.tagList.join(' | ') }}</div>
  13. </div>
  14. <div class="param-list">
  15. <div
  16. class="param"
  17. v-for="(param, index) in doctorInfo.paramList"
  18. :key="index"
  19. >
  20. <div class="name" v-text="param.name"></div>
  21. <div class="content" v-text="param.content"></div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. layout: 'app-ldm',
  30. data() {
  31. return {
  32. doctorId: '',
  33. doctorInfo: {
  34. tagList: [],
  35. paramList: [],
  36. },
  37. }
  38. },
  39. mounted() {
  40. this.initData()
  41. },
  42. methods: {
  43. initData() {
  44. this.doctorId = this.$route.query.id
  45. this.fetchDetail()
  46. },
  47. async fetchDetail() {
  48. try {
  49. const res = await this.$http.api.fetchDoctorDetail({
  50. doctorId: this.doctorId,
  51. })
  52. this.doctorInfo = { ...this.clubInfo, ...res.data }
  53. } catch (error) {
  54. console.log(error)
  55. }
  56. if (this.doctorInfo.bannerList.length <= 0) {
  57. this.doctorInfo.bannerList.push('/placeholder.png')
  58. }
  59. },
  60. },
  61. }
  62. </script>
  63. <style scoped lang="scss">
  64. @media screen and (min-width: 768px) {
  65. .page {
  66. position: relative;
  67. display: flex;
  68. justify-content: space-between;
  69. width: 1016px;
  70. margin: 0 auto;
  71. padding-top: 117px;
  72. }
  73. .page-title {
  74. position: absolute;
  75. left: 0;
  76. top: 60px;
  77. font-size: 26px;
  78. color: #221815;
  79. }
  80. .page-top {
  81. .swiper {
  82. width: 452px;
  83. height: 452px;
  84. background-color: pink;
  85. }
  86. }
  87. .page-content {
  88. width: 503px;
  89. .doctor-info {
  90. padding-bottom: 35px;
  91. .name {
  92. font-size: 35px;
  93. font-weight: bold;
  94. color: #000;
  95. margin-bottom: 22px;
  96. &::after {
  97. content: '';
  98. display: inline-block;
  99. margin-left: 12px;
  100. width: 36px;
  101. height: 42px;
  102. background: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-badge.png)
  103. no-repeat center;
  104. background-size: 36px 42px;
  105. vertical-align: -8px;
  106. }
  107. }
  108. .tag {
  109. font-size: 16px;
  110. color: #221815;
  111. }
  112. }
  113. .param-list {
  114. .param {
  115. padding: 32px 0;
  116. border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  117. &:first-child {
  118. border-top: 1px solid rgba(0, 0, 0, 0.3);
  119. }
  120. .name {
  121. font-size: 18px;
  122. font-weight: bold;
  123. color: #000;
  124. }
  125. .content {
  126. font-size: 16px;
  127. color: #9c9c9c;
  128. margin-top: 12px;
  129. text-align: justify;
  130. line-height: 1.7;
  131. }
  132. }
  133. }
  134. }
  135. }
  136. @media screen and (max-width: 768px) {
  137. .page-title {
  138. display: none;
  139. }
  140. .page-top {
  141. .swiper {
  142. width: 100vw;
  143. height: 100vw;
  144. background-color: pink;
  145. }
  146. }
  147. .page-content {
  148. padding: 4.7vw 6.2vw;
  149. .doctor-info {
  150. padding-bottom: 6vw;
  151. .name {
  152. font-size: 6.2vw;
  153. font-weight: bold;
  154. color: #000;
  155. margin-bottom: 3.2vw;
  156. &::after {
  157. content: '';
  158. display: inline-block;
  159. margin-left: 1.8vw;
  160. width: 6.5vw;
  161. height: 7.6vw;
  162. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge.png)
  163. no-repeat center;
  164. background-size: 6.4vw 7.6vw;
  165. vertical-align: -1.4vw;
  166. }
  167. }
  168. .tag {
  169. font-size: 3vw;
  170. color: #221815;
  171. }
  172. }
  173. .param-list {
  174. .param {
  175. padding: 6vw 0;
  176. border-bottom: 0.1vw solid rgba(0, 0, 0, 0.3);
  177. &:first-child {
  178. border-top: 0.1vw solid rgba(0, 0, 0, 0.3);
  179. }
  180. .name {
  181. font-size: 3.2vw;
  182. font-weight: bold;
  183. color: #000;
  184. }
  185. .content {
  186. font-size: 3vw;
  187. color: #9c9c9c;
  188. margin-top: 1.6vw;
  189. text-align: justify;
  190. line-height: 1.7;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. </style>