doctorInfo.vue 10 KB

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