detail.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <div class="page md:flex md:justify-between">
  3. <div class="page-title">{{ themeName === 'ross' ? '体疗师认证' : '医师认证' }}</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 px-4 pt-4 md:pt-0">
  11. <div class="name pb-4">{{ doctorInfo.doctorName }}</div>
  12. <div class="tag pb-1">{{ doctorInfo.tagList.join(' | ') }}</div>
  13. <div class="code pb-1">
  14. 从业资格证编号:{{ doctorInfo.certificateNo }}
  15. </div>
  16. <div class="club-name">所在机构:{{ doctorInfo.clubName }}</div>
  17. </div>
  18. <div class="section param-list pb-4">
  19. <div
  20. class="param px-4 pt-4"
  21. v-for="(param, index) in doctorInfo.paramList"
  22. :key="index"
  23. >
  24. <div class="name py-2" v-text="param.name"></div>
  25. <div class="content" v-text="param.content"></div>
  26. </div>
  27. </div>
  28. <div class="divider"></div>
  29. <div class="device-list p-4">
  30. <div class="title">具备操作资格设备</div>
  31. <div class="list">
  32. <div
  33. class="device flex items-center py-4"
  34. v-for="item in doctorInfo.equipmentList"
  35. :key="item.productId"
  36. >
  37. <img class="cover" :src="item.image" />
  38. <div class="info">
  39. <div class="name" v-text="item.equipmentName"></div>
  40. <div class="brand mt-2">品牌:{{ item.brand }}</div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </template>
  48. <script>
  49. import { mapGetters } from 'vuex'
  50. export default {
  51. layout: 'app-ross',
  52. data() {
  53. return {
  54. doctorId: '',
  55. doctorInfo: {
  56. tagList: [],
  57. paramList: [],
  58. },
  59. }
  60. },
  61. computed:{
  62. ...mapGetters(['themeName'])
  63. },
  64. mounted() {
  65. this.initData()
  66. },
  67. methods: {
  68. initData() {
  69. this.doctorId = parseInt(this.$route.query.id)
  70. this.fetchDetail()
  71. },
  72. async fetchDetail() {
  73. try {
  74. const res = await this.$http.api.fetchDoctorDetail({
  75. doctorId: this.doctorId,
  76. })
  77. this.doctorInfo = { ...this.clubInfo, ...res.data }
  78. } catch (error) {
  79. console.log(error)
  80. }
  81. if (this.doctorInfo.bannerList.length <= 0) {
  82. this.doctorInfo.bannerList.push('/placeholder.png')
  83. }
  84. },
  85. },
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. // pc 端
  90. @media screen and (min-width: 768px) {
  91. .page {
  92. position: relative;
  93. width: 1200px;
  94. height: 612px;
  95. margin-left: auto;
  96. margin-right: auto;
  97. margin-top: 80px;
  98. background-color: #fff;
  99. box-sizing: border-box;
  100. padding: 16px;
  101. padding-right: 0;
  102. }
  103. .page-title {
  104. position: absolute;
  105. font-size: 24px;
  106. color: #333;
  107. top: -50px;
  108. left: 0;
  109. }
  110. .page-top {
  111. .swiper {
  112. width: 580px;
  113. height: 580px;
  114. background: #f7f7f7;
  115. ::v-deep {
  116. img {
  117. width: 580px;
  118. height: 580px;
  119. }
  120. }
  121. }
  122. }
  123. .page-content {
  124. width: 580px;
  125. padding: 0 24px;
  126. overflow-y: auto;
  127. .doctor-info {
  128. line-height: 1.6;
  129. .name {
  130. font-size: 24px;
  131. color: #101010;
  132. font-weight: bold;
  133. &::after {
  134. content: '';
  135. display: inline-block;
  136. width: 76px;
  137. height: 28px;
  138. background: url(~assets/theme-images/common/h5-icon-doctor-ad.png)
  139. no-repeat;
  140. background-size: 76px 28px;
  141. vertical-align: -5px;
  142. margin-left: 8px;
  143. }
  144. }
  145. .tag {
  146. font-size: 14px;
  147. color: #909399;
  148. }
  149. .code,
  150. .club-name {
  151. font-size: 14px;
  152. color: #404040;
  153. }
  154. }
  155. .param-list {
  156. .param {
  157. .name {
  158. font-size: 18px;
  159. color: #101010;
  160. font-weight: bold;
  161. }
  162. .content {
  163. font-size: 14px;
  164. color: #404040;
  165. line-height: 1.6;
  166. text-align: justify;
  167. }
  168. }
  169. }
  170. .device-list {
  171. .title {
  172. padding: 16px;
  173. font-size: 20px;
  174. font-weight: bold;
  175. color: #404040;
  176. background-color: #f3f5f6;
  177. }
  178. .list {
  179. display: flex;
  180. align-items: center;
  181. flex-direction: column;
  182. .device {
  183. width: 100%;
  184. box-sizing: border-box;
  185. border-bottom: 1px solid #d8d8d8;
  186. .cover {
  187. width: 84px;
  188. height: 84px;
  189. display: block;
  190. }
  191. .info {
  192. margin-left: 16px;
  193. width: 300px;
  194. .name {
  195. font-size: 18px;
  196. color: #101010;
  197. text-overflow: ellipsis;
  198. overflow: hidden;
  199. white-space: nowrap;
  200. }
  201. .brand {
  202. font-size: 14px;
  203. color: #666666;
  204. text-overflow: ellipsis;
  205. overflow: hidden;
  206. white-space: nowrap;
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }
  213. }
  214. // 移动 端
  215. @media screen and (max-width: 768px) {
  216. .page-title {
  217. display: none;
  218. }
  219. .page-top {
  220. .swiper {
  221. height: 100vw;
  222. background: #f7f7f7;
  223. ::v-deep {
  224. img {
  225. height: 100vw;
  226. }
  227. }
  228. }
  229. }
  230. .page-content {
  231. .divider {
  232. height: 3.2vw;
  233. background-color: #f7f7f7;
  234. }
  235. .doctor-info {
  236. line-height: 1.6;
  237. .name {
  238. font-size: 5vw;
  239. color: #101010;
  240. font-weight: bold;
  241. &::after {
  242. content: '';
  243. display: inline-block;
  244. width: 13.6vw;
  245. height: 5vw;
  246. background: url(~assets/theme-images/common/h5-icon-doctor-ad.png)
  247. no-repeat;
  248. background-size: 13.6vw 5vw;
  249. vertical-align: -0.8vw;
  250. margin-left: 1.2vw;
  251. }
  252. }
  253. .tag {
  254. font-size: 3vw;
  255. color: #909399;
  256. }
  257. .code,
  258. .club-name {
  259. font-size: 3.2vw;
  260. color: #404040;
  261. }
  262. }
  263. .param-list {
  264. .param {
  265. .name {
  266. font-size: 3.8vw;
  267. color: #101010;
  268. font-weight: bold;
  269. }
  270. .content {
  271. font-size: 3.2vw;
  272. color: #404040;
  273. line-height: 1.6;
  274. text-align: justify;
  275. }
  276. }
  277. }
  278. .device-list {
  279. .title {
  280. font-size: 4vw;
  281. color: #101010;
  282. font-weight: bold;
  283. }
  284. .list {
  285. display: flex;
  286. align-items: center;
  287. flex-direction: column;
  288. .device {
  289. width: 100%;
  290. box-sizing: border-box;
  291. border-bottom: 0.1vw solid #d8d8d8;
  292. .cover {
  293. width: 19.6vw;
  294. height: 19.6vw;
  295. display: block;
  296. }
  297. .info {
  298. margin-left: 3.2vw;
  299. width: 66vw;
  300. .name {
  301. font-size: 3.6vw;
  302. color: #101010;
  303. text-overflow: ellipsis;
  304. overflow: hidden;
  305. white-space: nowrap;
  306. }
  307. .brand {
  308. font-size: 3vw;
  309. color: #666666;
  310. text-overflow: ellipsis;
  311. overflow: hidden;
  312. white-space: nowrap;
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. }
  320. </style>