select_doctor.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <view class="main">
  3. <view class="margin-bottom-sm bg-white">
  4. <u-dropdown>
  5. <u-dropdown-item @change="allserive" v-model="value1" :title="options1[value1].label" :options="options1"></u-dropdown-item>
  6. <u-dropdown-item @change="city" v-model="value2" :title="options2[value2].label" :options="options2"></u-dropdown-item>
  7. <u-dropdown-item @change="recommend" v-model="value3" :title="options3[value3].label" :options="options3"></u-dropdown-item>
  8. </u-dropdown>
  9. <u-search :clearabled="true" shape="round" :show-action="false" @blur="searchg" placeholder="搜索医生姓名、医院名" v-model="keyword"></u-search>
  10. <view style="width: 100%;background-color: #FFFFFF;">
  11. <view @click="goinfo" class="recommendstyle margin-top-xs" v-for="(item,index) in test" :key="index" style="position: relative;overflow: hidden;height: 485rpx;">
  12. <view class="base_item">
  13. <view class="base_item_zi">
  14. <view class="base_item_zi_items">
  15. <view class="base_item_zi_content">
  16. <u-image :fade="true" duration="450" width="120rpx" height="120rpx" src="https://file.supermm.me/UEditor/uploadFile/2020-09-21/D229A665CBFB4817A518A5C47726AB18.jpg"
  17. shape="circle"></u-image>
  18. <view class="content_right">
  19. <view class="" style="display: flex;align-items: center;">
  20. <text style="font-size: 32rpx; font-weight: bold;">张三</text>
  21. <text class="text_style">全科医学科</text>
  22. <text class="text_style">医生</text>
  23. </view>
  24. <view class="m_gray_small">
  25. 昆明市西山区永昌西区社区卫生服务中心昆明市西山区永昌西区社区卫生服务中心
  26. </view>
  27. <view class="flex justify-start align-center flex-wrap" style="position: relative;">
  28. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="图文" shape="circle" mode="dark" type="primary" />
  29. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="电话" shape="circle" mode="dark" type="warning" />
  30. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="门诊" shape="circle" mode="dark" type="error" />
  31. </view>
  32. </view>
  33. </view>
  34. <view class="foot_juli padding-sm">
  35. <u-line color="#f6f6f6" />
  36. <view class="flex justify-center margin-top-sm" style="color: rgba(0,0,0,0.54);">
  37. <view class="text-sm" style="flex: 1; text-align: left;">
  38. 评分:
  39. <text style="color: #FF7B72;">5.0分</text>
  40. </view>
  41. <view class="text-sm" style="flex: 1; text-align: center;">
  42. 服务:
  43. <text style="color: #FF7B72;">7人</text>
  44. </view>
  45. <view class="text-sm" style="flex: 1; text-align: right;">
  46. 距离:
  47. <text style="color: #FF7B72;">650km</text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="padding-sm doctor_style">
  54. <view class="doctor_style_item">
  55. 2010年毕业于红河卫校,2010年8月工作至今,从事预防接种工作7年,对预防接种工作排苗等其他流程熟练,对接种疫苗后出现的一些不良反应有一定经验。
  56. </view>
  57. <view class="text-black flex justify-between align-center margin-top-xs" style="font-size: 30rpx;">
  58. <view>急速响应</view>
  59. <view class="">
  60. 服务
  61. <text class="text-red">¥19.90</text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="margin-tb padding-tb-xs">
  70. <u-loadmore :status="nomore" :icon-type="flower" />
  71. </view>
  72. <u-back-top :scroll-top="scrollTop" bottom="80" top="400"></u-back-top>
  73. </view>
  74. </template>
  75. <script>
  76. var user = require('../../common/user.js');
  77. import {
  78. mapState,
  79. mapMutations,
  80. mapGetters,
  81. mapActions
  82. } from 'vuex';
  83. export default {
  84. onLoad(options) {
  85. },
  86. mounted() {
  87. console.log(this.value1)
  88. this.getDoctorList()
  89. },
  90. data() {
  91. return {
  92. scrollTop: 0,
  93. keyword: "",
  94. test: [1, 2, 3, 4, 5],
  95. value1: 0,
  96. value2: 0,
  97. value3: 0,
  98. options1: [{
  99. label: '全部服务',
  100. value: 0,
  101. }, {
  102. label: '电话咨询',
  103. value: 1,
  104. },
  105. {
  106. label: '图文咨询',
  107. value: 2,
  108. },
  109. {
  110. label: '门诊预约',
  111. value: 3,
  112. }
  113. ],
  114. options2: [{
  115. label: '成都市',
  116. value: 0,
  117. }, {
  118. label: 'xx市',
  119. value: 1,
  120. },
  121. {
  122. label: 'xx市',
  123. value: 2,
  124. },
  125. ],
  126. options3: [{
  127. label: '推荐排序',
  128. value: 0,
  129. }, {
  130. label: '距离最近',
  131. value: 1,
  132. },
  133. {
  134. label: '好评最多',
  135. value: 2,
  136. },
  137. {
  138. label: '服务最多',
  139. value: 3,
  140. },
  141. ],
  142. }
  143. },
  144. methods: {
  145. //监听滚动
  146. onPageScroll(e) {
  147. this.scrollTop = e.scrollTop;
  148. },
  149. allserive(value) {
  150. this.value1 = value
  151. this.getDoctorList()
  152. },
  153. city(value) {
  154. this.value2 = value
  155. },
  156. recommend(value) {
  157. this.value3 = value
  158. this.getDoctorList()
  159. },
  160. goinfo() {
  161. uni.navigateTo({
  162. url: "./doctor_info"
  163. })
  164. },
  165. getDoctorList: async function() {
  166. let res = await this.$request.post("/api/v1/docter/docterList", {
  167. page: 1,
  168. list_type: this.value1,
  169. name: this.keyword,
  170. sort_type: this.value3
  171. }, )
  172. console.log(res)
  173. },
  174. searchg(value) {
  175. console.log(this.value1, this.value3)
  176. this.getDoctorList()
  177. }
  178. }
  179. };
  180. </script>
  181. <style scoped lang="scss">
  182. .main {
  183. padding-top: 10rpx;
  184. padding-left: 20rpx;
  185. padding-right: 20rpx;
  186. }
  187. .base_item {
  188. position: absolute;
  189. top: 0;
  190. left: 0;
  191. right: 0;
  192. z-index: 1;
  193. width: 100%;
  194. height: auto;
  195. box-sizing: border-box;
  196. }
  197. .doctor_style {
  198. color: rgba(0, 0, 0, 0.54);
  199. }
  200. .doctor_style_item {
  201. overflow: hidden;
  202. text-overflow: ellipsis;
  203. display: -webkit-box;
  204. -webkit-line-clamp: 2;
  205. -webkit-box-orient: vertical;
  206. }
  207. .base_item_zi {
  208. padding-top: 20rpx;
  209. margin: 0 20rpx;
  210. position: relative;
  211. box-sizing: border-box;
  212. }
  213. .base_item_zi_items {
  214. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  215. background-color: #fff;
  216. position: relative;
  217. border-radius: 8rpx;
  218. box-sizing: border-box;
  219. }
  220. .base_item_zi_content {
  221. display: flex;
  222. justify-content: center;
  223. align-items: center;
  224. padding: 30rpx 30rpx;
  225. overflow: hidden;
  226. position: relative;
  227. width: 100%;
  228. box-sizing: border-box;
  229. }
  230. .text_style {
  231. font-size: 24rpx;
  232. color: rgba(0, 0, 0, .54);
  233. display: block;
  234. margin-left: 10rpx;
  235. }
  236. .m_gray_small {
  237. white-space: nowrap;
  238. overflow: hidden;
  239. text-overflow: ellipsis;
  240. color: rgba(0, 0, 0, 0.54);
  241. margin-top: 20rpx;
  242. font-size: 28rpx;
  243. }
  244. .content_right {
  245. flex: 1;
  246. margin-left: 20rpx;
  247. overflow: hidden;
  248. position: relative;
  249. box-sizing: border-box;
  250. }
  251. .foot_item {
  252. background-color: #F7F7F7;
  253. box-sizing: border-box;
  254. }
  255. .grid-text {
  256. font-size: 28rpx;
  257. margin-top: 4rpx;
  258. color: $u-type-info;
  259. }
  260. .tltleStyle {
  261. padding: 30rpx 30rpx 15rpx 15rpx;
  262. font-weight: bold;
  263. font-size: 40rpx;
  264. background-color: #fff;
  265. }
  266. </style>