detail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. &::before {
  80. content: '';
  81. display: inline-block;
  82. width: 24px;
  83. height: 28px;
  84. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge-black.png)
  85. no-repeat center;
  86. background-size: 24px;
  87. vertical-align: -7px;
  88. margin-right: 8px;
  89. }
  90. }
  91. .page-top {
  92. .swiper {
  93. width: 452px;
  94. height: 452px;
  95. background: #f7f7f7;
  96. ::v-deep {
  97. img {
  98. width: 452px;
  99. height: 452px;
  100. }
  101. }
  102. }
  103. }
  104. .page-content {
  105. width: 503px;
  106. .doctor-info {
  107. padding-bottom: 30px;
  108. .name {
  109. font-size: 35px;
  110. font-weight: bold;
  111. color: #000;
  112. margin-bottom: 22px;
  113. &::after {
  114. content: '';
  115. display: inline-block;
  116. margin-left: 12px;
  117. width: 36px;
  118. height: 42px;
  119. background: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-badge.png)
  120. no-repeat center;
  121. background-size: 36px 42px;
  122. vertical-align: -8px;
  123. }
  124. }
  125. .tag {
  126. font-size: 16px;
  127. color: #221815;
  128. }
  129. }
  130. .param-list {
  131. .param {
  132. padding: 24px 0;
  133. min-height: 160px;
  134. box-sizing: border-box;
  135. border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  136. &:first-child {
  137. border-top: 1px solid rgba(0, 0, 0, 0.3);
  138. }
  139. .name {
  140. font-size: 18px;
  141. font-weight: bold;
  142. color: #000;
  143. }
  144. .content {
  145. font-size: 16px;
  146. color: #9c9c9c;
  147. margin-top: 6px;
  148. text-align: justify;
  149. line-height: 1.6;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. @media screen and (max-width: 768px) {
  156. .page-title {
  157. display: none;
  158. }
  159. .page-top {
  160. .swiper {
  161. height: 100vw;
  162. background: #f7f7f7;
  163. ::v-deep {
  164. img {
  165. height: 100vw;
  166. }
  167. }
  168. }
  169. }
  170. .page-content {
  171. padding: 4.7vw 6.2vw;
  172. .doctor-info {
  173. padding-bottom: 6vw;
  174. .name {
  175. font-size: 6.2vw;
  176. font-weight: bold;
  177. color: #000;
  178. margin-bottom: 3.2vw;
  179. &::after {
  180. content: '';
  181. display: inline-block;
  182. margin-left: 1.8vw;
  183. width: 6.5vw;
  184. height: 7.6vw;
  185. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge.png)
  186. no-repeat center;
  187. background-size: 6.4vw 7.6vw;
  188. vertical-align: -1.4vw;
  189. }
  190. }
  191. .tag {
  192. font-size: 3vw;
  193. color: #221815;
  194. }
  195. }
  196. .param-list {
  197. .param {
  198. padding: 6vw 0;
  199. border-bottom: 0.1vw solid rgba(0, 0, 0, 0.3);
  200. &:first-child {
  201. border-top: 0.1vw solid rgba(0, 0, 0, 0.3);
  202. }
  203. .name {
  204. font-size: 3.2vw;
  205. font-weight: bold;
  206. color: #000;
  207. }
  208. .content {
  209. font-size: 3vw;
  210. color: #9c9c9c;
  211. margin-top: 1.6vw;
  212. text-align: justify;
  213. line-height: 1.7;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. </style>