doctorInfo.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. <template>
  2. <view class="content">
  3. <view class="bg"></view>
  4. <view class="cont">
  5. <view class="doc-box">
  6. <view class="left">
  7. <image @click="showImg()" :src="doctor.avatar" mode="aspectFill"></image>
  8. </view>
  9. <view class="right">
  10. <view class="doc-name-box">
  11. <view class="doc-name">
  12. {{doctor.doctorName}}
  13. </view>
  14. <view class="doc-ping">
  15. <u-rate activeColor="#ffc603" count="5" readonly v-model="doctor.pingStar"></u-rate>
  16. </view>
  17. </view>
  18. <view class="doc-dept-box">
  19. {{department.deptName}}|{{doctor.position}}
  20. </view>
  21. <view class="doc-his-box">
  22. {{hospital.hospitalName}}
  23. </view>
  24. </view>
  25. </view>
  26. <view class="desc-box">
  27. <view class="title-box">
  28. <view class="line"></view>
  29. <view class="title">擅长方向</view>
  30. </view>
  31. <view class="desc" >
  32. {{doctor.speciality}}
  33. </view>
  34. </view>
  35. <view class="desc-box">
  36. <view class="title-box">
  37. <view class="line"></view>
  38. <view class="title">医生介绍</view>
  39. </view>
  40. <view class="desc" >
  41. {{doctor.introduction}}
  42. </view>
  43. </view>
  44. <view class="desc-box" v-if="imgs&&imgs.length>0">
  45. <view class="title-box">
  46. <view class="line"></view>
  47. <view class="title">荣誉资质</view>
  48. </view>
  49. <view class="desc doc-imgs" >
  50. <image v-for="i in imgs" :src="i" mode="aspectFill" @click="previewImage"></image>
  51. </view>
  52. </view>
  53. <view class="desc-box" v-if="videoUrl">
  54. <view class="title-box">
  55. <view class="line"></view>
  56. <view class="title">医生风采</view>
  57. </view>
  58. <view class="desc" >
  59. <video :src="videoUrl" :poster="thumbnail" :autoplay='true' class="doc-video"></video>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import {checkFollow,doFollow,getDoctorDetails,getDoctorPingList} from '@/api/doctor.js'
  67. export default {
  68. data() {
  69. return {
  70. isFollow:false,
  71. doctorId:null,
  72. doctor:null,
  73. department:null,
  74. hospital:null,
  75. pings:[],
  76. videoUrl: '',
  77. imgs: [],
  78. thumbnail: ''
  79. }
  80. },
  81. onLoad(options) {
  82. this.doctorId=options.doctorId;
  83. },
  84. onShow() {
  85. this.getDoctorDetails();
  86. },
  87. methods: {
  88. showImg(){
  89. var data=[];
  90. data.push(this.doctor.avatar)
  91. uni.previewImage({
  92. current: 0,
  93. urls: data
  94. });
  95. },
  96. previewImage() {
  97. uni.previewImage({
  98. current: 0,
  99. urls: this.imgs
  100. });
  101. },
  102. getDoctorDetails() {
  103. //联网加载数据
  104. var that = this;
  105. var data = {
  106. doctorId: this.doctorId
  107. };
  108. getDoctorDetails(data).then(res => {
  109. if(res.code==200){
  110. this.doctor=res.data.doctor;
  111. this.department=res.data.department;
  112. this.hospital=res.data.hospital;
  113. this.thumbnail = this.doctor&&this.doctor.thumbnail;
  114. this.videoUrl = this.doctor&&this.doctor.videoUrl;
  115. this.imgs = this.doctor&&this.doctor.honorImgUrl? this.doctor.honorImgUrl.split(','):[];
  116. }else{
  117. uni.showToast({
  118. icon:'none',
  119. title: "请求失败",
  120. });
  121. }
  122. });
  123. },
  124. }
  125. }
  126. </script>
  127. <style scoped lang="scss">
  128. .content{
  129. height: 100%;
  130. position: relative;
  131. .bg{
  132. width: 100%;
  133. height:280rpx;
  134. background-color: #C39A58;
  135. background: linear-gradient(#C39A58, #E2C99E);
  136. border-radius: 0rpx 0rpx 50rpx 50rpx;
  137. position: fixed;
  138. // z-index: 1;
  139. }
  140. .cont{
  141. top:50rpx;
  142. position: relative;
  143. padding: 0rpx 20rpx;
  144. z-index: 999;
  145. width: 100%;
  146. display: flex;
  147. flex-direction: column;
  148. .doc-box{
  149. margin-bottom: 20rpx;
  150. padding: 30rpx;
  151. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  152. background-color: #fff;
  153. border-radius: 15rpx;
  154. display: flex;
  155. align-items: center;
  156. justify-content: flex-start;
  157. .left{
  158. width: 190upx;
  159. height: 190upx;
  160. border-radius: 8upx;
  161. image{
  162. width: 190upx;
  163. height: 190upx;
  164. }
  165. }
  166. .right{
  167. display: flex;
  168. flex-direction: column;
  169. justify-content: flex-start;
  170. margin-left: 20rpx;
  171. height:190upx;
  172. width: calc(100% - 210upx);
  173. .doc-name-box{
  174. display: flex;
  175. align-items: center;
  176. justify-content: flex-start;
  177. position: relative;
  178. .doc-name{
  179. font-size: 38rpx;
  180. font-weight: bold;
  181. }
  182. .doc-ping{
  183. margin-left: 10rpx;
  184. }
  185. .doc-star{
  186. position: absolute;
  187. top:5rpx;
  188. right:0rpx;
  189. width:32rpx;
  190. height:32rpx;
  191. image{
  192. width:100%;
  193. height:100%;
  194. }
  195. }
  196. }
  197. .doc-dept-box{
  198. display: flex;
  199. align-items: center;
  200. justify-content: flex-start;
  201. margin-top: 15rpx;
  202. font-size: 28upx;
  203. font-family: PingFang SC;
  204. color: #2d2b36;
  205. }
  206. .doc-his-box{
  207. display: flex;
  208. align-items: center;
  209. justify-content: flex-start;
  210. margin-top: 15rpx;
  211. font-size: 28upx;
  212. font-family: PingFang SC;
  213. color: #9a9a9c;
  214. }
  215. .doc-spec-box{
  216. width: 100%;
  217. display: flex;
  218. align-items: center;
  219. justify-content: space-between;
  220. margin-top: 15rpx;
  221. .spec-left{
  222. width: 80%;
  223. display: flex;
  224. align-items: center;
  225. justify-content: flex-start;
  226. .title{
  227. font-size: 28upx;
  228. font-family: PingFang SC;
  229. color: #9a9a9c;
  230. }
  231. .spec{
  232. // margin-left: 10rpx;
  233. font-size: 28upx;
  234. font-family: PingFang SC;
  235. color: #9a9a9c;
  236. }
  237. }
  238. .spec-right{
  239. .btn{
  240. font-size: 28upx;
  241. font-family: PingFang SC;
  242. color: #C39A58;
  243. }
  244. }
  245. }
  246. }
  247. }
  248. .price-box{
  249. margin-bottom: 20rpx;
  250. padding: 15rpx;
  251. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  252. background-color: #fff;
  253. border-radius: 15rpx;
  254. .title-box{
  255. display: flex;
  256. flex-direction: row;
  257. align-items: center;
  258. justify-content: flex-start;
  259. .title{
  260. font-size: 32upx;
  261. font-family: PingFang SC;
  262. font-weight: bold;
  263. color: #111111;
  264. }
  265. .line{
  266. margin-right: 15rpx;
  267. height: 30rpx;
  268. width: 6rpx;
  269. background-color: #C39A58;
  270. }
  271. }
  272. .price-list{
  273. display: flex;
  274. flex-direction: column;
  275. align-items: flex-start;
  276. justify-content: flex-start;
  277. margin-top: 15rpx;
  278. padding: 15rpx;
  279. .price-item{
  280. margin-bottom: 15rpx;
  281. padding: 15rpx;
  282. width: 100%;
  283. display: flex;
  284. align-items: center;
  285. justify-content: space-between;
  286. border-radius: 15rpx;
  287. background-color: #f1f6fc;
  288. .left{
  289. .price-name{
  290. font-size: 32upx;
  291. font-family: PingFang SC;
  292. color: #111111;
  293. display: flex;
  294. align-items: center;
  295. justify-content: flex-start;
  296. .price{
  297. margin-left: 15rpx;
  298. font-size: 32upx;
  299. font-family: PingFang SC;
  300. color: #fe9460;
  301. }
  302. }
  303. .price-desc{
  304. margin-top: 20rpx;
  305. font-size: 28upx;
  306. font-family: PingFang SC;
  307. color: #9a9a9c;
  308. }
  309. }
  310. .right{
  311. .btn{
  312. padding: 15rpx 30rpx;
  313. background-color: #ff9561;
  314. color: #fff;
  315. font-size: 28rpx;
  316. border-radius: 15rpx;
  317. }
  318. }
  319. }
  320. }
  321. }
  322. .his-box{
  323. margin-bottom: 20rpx;
  324. padding: 15rpx;
  325. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  326. background-color: #fff;
  327. border-radius: 15rpx;
  328. .title-box{
  329. display: flex;
  330. flex-direction: row;
  331. align-items: center;
  332. justify-content: flex-start;
  333. .title{
  334. font-size: 32upx;
  335. font-family: PingFang SC;
  336. font-weight: bold;
  337. color: #111111;
  338. }
  339. .line{
  340. margin-right: 15rpx;
  341. height: 30rpx;
  342. width: 6rpx;
  343. background-color: #C39A58;
  344. }
  345. }
  346. .his{
  347. display: flex;
  348. align-items: center;
  349. justify-content: space-between;
  350. margin-top: 15rpx;
  351. .left{
  352. display: flex;
  353. flex-direction: column;
  354. align-items: flex-start;
  355. justify-content: center;
  356. .his-name{
  357. font-size: 32upx;
  358. font-family: PingFang SC;
  359. color: #111111;
  360. }
  361. .his-desc{
  362. margin-top: 15rpx;
  363. font-size: 28upx;
  364. font-family: PingFang SC;
  365. color: #9a9a9c;
  366. }
  367. }
  368. .right{
  369. image{
  370. width:30rpx;
  371. height:30rpx;
  372. }
  373. }
  374. }
  375. }
  376. .desc-box{
  377. margin-bottom: 20rpx;
  378. padding: 15rpx;
  379. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  380. background-color: #fff;
  381. border-radius: 15rpx;
  382. .title-box{
  383. display: flex;
  384. flex-direction: row;
  385. align-items: center;
  386. justify-content: flex-start;
  387. .title{
  388. font-size: 32upx;
  389. font-family: PingFang SC;
  390. font-weight: bold;
  391. color: #111111;
  392. }
  393. .line{
  394. margin-right: 15rpx;
  395. height: 30rpx;
  396. width: 6rpx;
  397. background-color: #C39A58;
  398. }
  399. }
  400. .desc{
  401. margin-top: 15rpx;
  402. font-size: 28upx;
  403. font-family: PingFang SC;
  404. color: #9a9a9c;
  405. }
  406. }
  407. .ping-box{
  408. margin-bottom: 20rpx;
  409. padding: 15rpx;
  410. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  411. background-color: #fff;
  412. border-radius: 15rpx;
  413. .title-box{
  414. display: flex;
  415. flex-direction: row;
  416. align-items: center;
  417. justify-content: space-between;
  418. .left{
  419. display: flex;
  420. align-items: center;
  421. justify-content: center;
  422. .title{
  423. font-size: 32upx;
  424. font-family: PingFang SC;
  425. font-weight: bold;
  426. color: #111111;
  427. }
  428. .line{
  429. margin-right: 15rpx;
  430. height: 30rpx;
  431. width: 6rpx;
  432. background-color: #C39A58;
  433. }
  434. }
  435. .more{
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. font-size: 28upx;
  440. font-family: PingFang SC;
  441. color: #9a9a9c;
  442. image{
  443. margin-left: 10rpx;
  444. width: 30rpx;
  445. height:30rpx;
  446. }
  447. }
  448. }
  449. .ping-list{
  450. display: flex;
  451. flex-direction: column;
  452. align-items: flex-start;
  453. justify-content: flex-start;
  454. margin-top: 15rpx;
  455. padding: 15rpx;
  456. .ping-item{
  457. padding: 20rpx 0rpx;
  458. border-bottom: 1rpx solid #efefef;
  459. width: 100%;
  460. display: flex;
  461. align-items: flex-start;
  462. justify-content: flex-start;
  463. &:last-child{
  464. padding-bottom: 0rpx;
  465. border-bottom: none;
  466. }
  467. .left{
  468. image{
  469. width:80rpx;
  470. height:80rpx;
  471. border-radius: 50%;
  472. }
  473. }
  474. .right{
  475. width: 100%;
  476. margin-left: 15rpx;
  477. .user-name-box{
  478. display: flex;
  479. align-items: center;
  480. justify-content: space-between;
  481. font-size: 28upx;
  482. font-family: PingFang SC;
  483. font-weight: bold;
  484. color: #111111;
  485. }
  486. .ping-cont{
  487. margin-top: 10rpx;
  488. font-size: 28upx;
  489. font-family: PingFang SC;
  490. color: #9a9a9c;
  491. }
  492. .ping-time{
  493. margin-top: 10rpx;
  494. font-size: 28upx;
  495. font-family: PingFang SC;
  496. color: #9a9a9c;
  497. }
  498. }
  499. }
  500. }
  501. }
  502. }
  503. }
  504. .doc-video {
  505. width: 680rpx;
  506. height: 382.5rpx;
  507. }
  508. .doc-imgs {
  509. display: flex;
  510. flex-direction: row;
  511. flex-wrap: wrap;
  512. align-items: center;
  513. image {
  514. height: 180rpx;
  515. width: 320rpx;
  516. margin: 0 10rpx 20rpx;
  517. }
  518. }
  519. </style>