doctor_info.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <template>
  2. <view class="main">
  3. <view>
  4. <view class="pr det-body">
  5. <image class="det-bg-img" mode="scaleToFill" src="http://file.supermm.me/miniProgram/images/det/det_bg_01.png"></image>
  6. <view class="det-head pr plr15 bdr8 m-bg-white mlr15 pt25">
  7. <view class="m-xstart pr m-bottom-line pb25 margin-bottom-sm">
  8. <view class="m-flex overflow mr10">
  9. <view class="m-xend">
  10. <text class="dpb fb f16">{{doctor.name}}</text>
  11. <text class="dpb f14 m-gray-small ml5" v-for="(itm,index) in doctor.label" :key="index">{{itm}}</text>
  12. <text class="dpb m-flex"></text>
  13. </view>
  14. <view class="m-xend mt25">
  15. <view class="f14 m-gray-big">评分:<text class="m-theme">{{doctor.score}}</text>
  16. <text class="f11 margin-left-xs">分</text>
  17. </view>
  18. <view class="f14 ml15 m-gray-big">服务:<text class="m-theme">{{doctor.service_persons}}</text>
  19. <text class="f11">人</text>
  20. </view>
  21. <view class="m-flex ml15">距离:{{parseInt(doctor.distance/1000)}}km</view>
  22. </view>
  23. </view>
  24. <view class="pr pt5">
  25. <view class="follow_style" @click="submitCollect" :data-index="index" :data-id="doctor.id" v-if="doctor.is_collect==0">
  26. 关注
  27. </view>
  28. <view class="follow_style" @click="submitCollect" :data-index="index" :data-id="doctor.id" style="background-color: #fff;color: rgb(208, 105, 150);border:2rpx solid rgb(208, 105, 150);"
  29. v-else>
  30. 已关注
  31. </view>
  32. <u-image shape="circle" width="120rpx" height="120rpx" :src="doctor.avatar"></u-image>
  33. </view>
  34. </view>
  35. <u-read-more :toggle="true" show-height="0" :shadow-style="shadowStyle" close-text=" " open-text=" ">
  36. <rich-text :nodes="content"></rich-text>
  37. </u-read-more>
  38. </view>
  39. </view>
  40. <view class="gridstyle padding-sm margin-lr-sm">
  41. <u-grid :col="3" :border="false">
  42. <view @click="gotoxuanze" data-index="1">
  43. <u-grid-item>
  44. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  45. <view class="grid-text margin-top-sm">电话咨询</view>
  46. </u-grid-item>
  47. </view>
  48. <view class="" @click="gotoxuanze" data-index="2">
  49. <u-grid-item>
  50. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  51. <view class="grid-text margin-top-sm">图文咨询</view>
  52. </u-grid-item>
  53. </view>
  54. <view class="" @click="gotoxuanze" data-index="3">
  55. <u-grid-item>
  56. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  57. <view class="grid-text margin-top-sm">门诊预约</view>
  58. </u-grid-item>
  59. </view>
  60. </u-grid>
  61. <u-line color="#efefef" :hair-line="true" />
  62. <view v-if="!isjigou" class="text-lg text-center margin-top-sm" style="color: rgb(238, 170, 63);">
  63. 平均回复低至1分钟
  64. </view>
  65. <view v-else class="text-lg margin-top-sm" style="color: rgb(238, 170, 63);border-bottom: 3rpx solid rgb(238, 170, 63); width: 375rpx;"
  66. @click="xuantime">
  67. 已选时间:{{daytime}}
  68. <!-- <u-picker mode="multiSelector" v-model="show" @confirm="test" safe-area-inset-bottom :params="params"></u-picker> -->
  69. </view>
  70. </view>
  71. <view v-if="isjigou" bindtap="goAdrPostion" class="pr pt10 pb10 margin-lr-sm margin-top-sm m-bg-white" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  72. <view class="pr pt15 pb15">
  73. <view class="f18 fb plr15">机构地址</view>
  74. <view class="pr m-xcenter plr15 mt15">
  75. <image class="dpb" mode="scaleToFill" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAABx0lEQVQoU2WSP2gTcRTHv+/dH4IdmkVcFAvSgihNLi1SRKE4uNhek4I6iNLY5AQnB93dpHNBMEltIbgUc5pUF0F0cDBIk2twKiJBBAWHVgOl5u5+TxrINeCbvnz5Pnh8vo8wMBPOE8NXx6YIcpKJfu74Ox/aa9n9foT6IrFYtVjjMkHOHO7TV6Ww6JVm3x94vXBy4fkombGPUMEwEW+oMPRY44QAs0TcDfzwUms1Xe+FrXztJURsIdz0inPPkgsv4t5aZjd5u3qDGGUiqjeK9nmauLo+rOLmDyJuNQr2VMrZWBJR90DacrMwc9/K1+qAmvQDjNB4rnJcg/aN2Kg2ClcyqTuvP0nYnWQ2vM3CjGU5tQpE5gPfP03T0+/036OdLwBinT19bCjmn2JCPoBa6SreHtJpWwTdzvf2WO/mRM7NaqQ/BeFN92949/Oe3z57xBgxTe0xgMuhCm9trWTKfXSUcmquKJUGUQBgF0AcIroQvfKKtg2QRJyt7PpRMmKbosITEWfW2vD3zzVXr/2KOEfFOO4FFu0tRJnE+h8odbFRmmv912DfSObcB8zGI5HgerOYqQy+Q3TGofmQE7nx9FZp3h0MHuh/o0mz0Kcr4U0AAAAASUVORK5CYII="
  76. style="width: 10px; height: 12px;"></image>
  77. <view class="m-flex tl ml5">xxxxxxxxxxxxxxxxxxxxxx</view>
  78. </view>
  79. <view class="pr m-xcenter plr15 mt10">
  80. <view class="m-flex tl m-gray-small f12 pl15 mr5">地址:xxxxxxxxxxxxxxxxxx</view>
  81. <view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" v-if="true">
  82. {{0}}km
  83. </view>
  84. <view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" wx:else>暂无距离</view>
  85. <text class="dpb iconfont icon-arrow-right m-gray-letter f20"></text>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="margin-lr-sm mt30 bg-white" style="border-radius: 16rpx; box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  90. <view class="f18 fb flex align-center plr15 pt15">患者评价 <text class="f12 m-gray-letter margin-left-xs">({{doctor.evaluate.length}})</text>
  91. </view>
  92. <view class="cu-list menu-avatar card-menu">
  93. <view class="cu-item" v-for="(item,index) in doctor.evaluate" :key="index">
  94. <view class="cu-avatar round lg" :style="'background-image:url('+item.user.avatar+');'"></view>
  95. <view class="content">
  96. <view class="text-grey margin-right-sm">
  97. {{item.user.nickname}}
  98. <u-rate :count="5" v-model="item.score" :disabled="true"></u-rate>
  99. </view>
  100. <view class="text-gray text-sm flex">
  101. <text class="text-cut">
  102. {{item.content}}
  103. </text>
  104. </view>
  105. </view>
  106. <view class="action" style="width: 104rpx;">
  107. <view class="text-grey text-xs">{{item.created_at}}</view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="cu-tabbar-height"></view>
  113. <view class="cu-tabbar-height"></view>
  114. </view>
  115. <view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
  116. <button class="action text-orange" open-type="share" style="width: 200rpx;">
  117. <view class="cuIcon-share text-orange">
  118. </view>
  119. 分享
  120. </button>
  121. <view v-if="barindex==1" class="submit text-white" style="background-color: rgb(11,115,186);">电话咨询</view>
  122. <view v-else-if="barindex==2" class="submit text-white" style="background-color: rgb(11,115,186)">图文咨询</view>
  123. <view v-else class="submit text-white" style="background-color: rgb(11,115,186)">门诊预约</view>
  124. </view>
  125. </view>
  126. </template>
  127. <script>
  128. export default {
  129. onLoad(options) {
  130. this.doctorid = options.id
  131. this.daytime = options.time
  132. console.log(options)
  133. },
  134. mounted() {
  135. this.getdoctorInfo()
  136. },
  137. data() {
  138. return {
  139. content: `浔阳江头夜送客,枫叶荻花秋瑟瑟。主人下马客在船,举酒欲饮无管弦。醉不成欢惨将别,别时茫茫江浸月。
  140. 忽闻水上琵琶声,主人忘归客不发。寻声暗问弹者谁,琵琶声停欲语迟。移船相近邀相见,添酒回灯重开宴。千呼万唤始出来,犹抱琵琶半遮面。转轴拨弦三两声,未成曲调先有情。弦弦掩抑声声思,似诉平生不得志。低眉信手续续弹,说尽心中无限事。轻拢慢捻抹复挑,初为《霓裳》后《六幺》。大弦嘈嘈如急雨,小弦切切如私语。嘈嘈切切错杂弹,大珠小珠落玉盘。间关莺语花底滑,幽咽泉流冰下难。冰泉冷涩弦凝绝,凝绝不通声暂歇。别有幽愁暗恨生,此时无声胜有声。银瓶乍破水浆迸,铁骑突出刀枪鸣。曲终收拨当心画,四弦一声如裂帛。东船西舫悄无言,唯见江心秋月白。
  141. 沉吟放拨插弦中,整顿衣裳起敛容。自言本是京城女,家在虾蟆陵下住。十三学得琵琶成,名属教坊第一部。曲罢曾教善才服,妆成每被秋娘妒。五陵年少争缠头,一曲红绡不知数。钿头银篦击节碎,血色罗裙翻酒污。今年欢笑复明年,秋月春风等闲度。弟走从军阿姨死,暮去朝来颜色故。门前冷落鞍马稀,老大嫁作商人妇。商人重利轻别离,前月浮梁买茶去。去来江口守空船,绕船月明江水寒。夜深忽梦少年事,梦啼妆泪红阑干。
  142. 我闻琵琶已叹息,又闻此语重唧唧。同是天涯沦落人,相逢何必曾相识!我从去年辞帝京,谪居卧病浔阳城。浔阳地僻无音乐,终岁不闻丝竹声。住近湓江地低湿,黄芦苦竹绕宅生。其间旦暮闻何物?杜鹃啼血猿哀鸣。春江花朝秋月夜,往往取酒还独倾。岂无山歌与村笛?呕哑嘲哳难为听。今夜闻君琵琶语,如听仙乐耳暂明。莫辞更坐弹一曲,为君翻作《琵琶行》。感我此言良久立,却坐促弦弦转急。凄凄不似向前声,满座重闻皆掩泣。座中泣下谁最多?江州司马青衫湿。`,
  143. doctorid: "",
  144. doctor: {},
  145. shadowStyle: {
  146. backgroundImage: "none"
  147. },
  148. isjigou: false,
  149. barindex: 1, //显示按钮
  150. daytime: ""
  151. }
  152. },
  153. methods: {
  154. getdoctorInfo: async function() {
  155. let res = await this.$request.post("/api/v1/docter/docterDetail", {
  156. docter_id: this.doctorid,
  157. latitude: uni.getStorageSync("latitude"),
  158. longitude: uni.getStorageSync("longitude")
  159. })
  160. this.doctor = res
  161. console.log(res)
  162. },
  163. submitCollect: async function(e) {
  164. let res = await this.$request.post("/api/v1/collection/submitCollect", {
  165. type: 1,
  166. relation_id: e.currentTarget.dataset.id
  167. })
  168. if (res.status == 0) {
  169. if (res.data.is_collect == 0) {
  170. uni.showToast({
  171. title: "取消成功",
  172. icon: "none"
  173. })
  174. this.doctor.is_collect = res.data.is_collect
  175. } else {
  176. uni.showToast({
  177. title: "关注成功",
  178. icon: "none"
  179. })
  180. this.doctor.is_collect = res.data.is_collect
  181. }
  182. }
  183. },
  184. gotoxuanze(e) {
  185. this.barindex = e.currentTarget.dataset.index
  186. if (e.currentTarget.dataset.index == 3) {
  187. this.isjigou = true
  188. } else {
  189. this.isjigou = false
  190. }
  191. },
  192. xuantime() {
  193. this.show = !this.show
  194. },
  195. }
  196. };
  197. </script>
  198. <style scoped>
  199. @import url("../index/mine.css");
  200. .gridstyle {
  201. height: 340rpx;
  202. background-color: #fff;
  203. border-radius: 16rpx;
  204. margin-top: 60rpx;
  205. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  206. }
  207. .det-body {
  208. z-index: 1;
  209. padding-top: 80rpx;
  210. }
  211. .det-bg-img {
  212. position: absolute;
  213. top: 0;
  214. left: 0;
  215. right: 0;
  216. z-index: 1;
  217. display: block;
  218. width: 100%;
  219. height: 400rpx;
  220. }
  221. .det-head {
  222. z-index: 2;
  223. box-shadow: 0 0 50rpx 0 rgba(248, 151, 164, 0.13);
  224. }
  225. .det-attention {
  226. position: absolute;
  227. display: block;
  228. bottom: -22rpx;
  229. right: 50%;
  230. z-index: 1;
  231. width: 128rpx;
  232. height: auto;
  233. margin-right: -64rpx;
  234. padding: 4rpx 0;
  235. background-color: #F897A1;
  236. box-sizing: border-box;
  237. }
  238. .det-attention.active {
  239. background-color: #E6E6E6;
  240. }
  241. .det-item {
  242. width: calc((100% - 120rpx) / 4);
  243. }
  244. .det-item.active {
  245. background-color: rgba(255, 123, 114, 0.24);
  246. }
  247. .det-item .text {
  248. color: rgba(0, 0, 0, 0.54);
  249. }
  250. .det-item .price {
  251. color: rgba(0, 0, 0, 0.40);
  252. }
  253. .det-item.active .text,
  254. .det-item.active .price {
  255. color: #FF979C;
  256. }
  257. .det-item.disabled .text,
  258. .det-item.disabled .price {
  259. color: rgba(0, 0, 0, 0.3);
  260. }
  261. .button-reset {
  262. height: 102rpx;
  263. background: none !important;
  264. color: rgba(0, 0, 0, 0.54) !important;
  265. }
  266. button::after {
  267. border: none;
  268. }
  269. .button-reset::after {
  270. border: none;
  271. }
  272. .package-list {
  273. width: 100%;
  274. height: 178rpx;
  275. overflow: hidden;
  276. }
  277. .package-list .warp {
  278. white-space: nowrap;
  279. overflow: scroll;
  280. }
  281. .package-list .warp .list {
  282. background: red;
  283. display: inline-block;
  284. font-size: 14px;
  285. width: 266rpx;
  286. height: 178rpx;
  287. background: linear-gradient(270deg, rgba(255, 100, 101, 1) 0%, rgba(255, 148, 133, 1) 100%);
  288. box-shadow: 0px 3px 5px 0px rgba(255, 110, 110, 0.5);
  289. border-radius: 8rpx;
  290. margin-right: 18rpx;
  291. padding: 30rpx 20rpx 24rpx 20rpx;
  292. overflow: hidden;
  293. }
  294. .package-list .warp .list:nth-child(3) {
  295. margin-right: 0;
  296. }
  297. .package-list .warp .list .name {
  298. font-size: 30rpx;
  299. font-weight: 500;
  300. color: rgba(255, 255, 255, 1);
  301. line-height: 30rpx;
  302. }
  303. .package-list .warp .list .desc {
  304. font-size: 24rpx;
  305. font-weight: 400;
  306. color: rgba(255, 255, 255, .87);
  307. margin-top: 16rpx;
  308. line-height: 24rpx;
  309. }
  310. .package-list .warp .list .price {
  311. font-size: 24rpx;
  312. font-weight: 500;
  313. color: rgba(255, 255, 255, 1);
  314. margin-top: 30rpx;
  315. line-height: 24rpx;
  316. }
  317. .det-desc {
  318. height: 40px;
  319. overflow: hidden;
  320. }
  321. .det-desc.active {
  322. height: auto;
  323. }
  324. .follow_style {
  325. position: absolute;
  326. bottom: -12rpx;
  327. left: 8rpx;
  328. z-index: 1;
  329. width: 106rpx;
  330. height: 40rpx;
  331. padding: 4rpx 0;
  332. background-color: rgb(208, 105, 150);
  333. box-sizing: border-box;
  334. color: #fff;
  335. text-align: center;
  336. border-radius: 60rpx;
  337. font-size: 24rpx;
  338. display: flex;
  339. justify-content: center;
  340. align-items: center;
  341. }
  342. </style>