index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <view class="main">
  3. <view class="">
  4. <u-search :clearabled="true" shape="round" :show-action="true" placeholder="搜索医生姓名、医院名" v-model="keyword"></u-search>
  5. </view>
  6. <view class="indexswiper" style="margin-top: 10rpx;">
  7. <u-swiper :list="list" mode="dot"></u-swiper>
  8. </view>
  9. <view class="tltleStyle">
  10. <u-section title="精选服务" font-size="40" line-color="#0B73BA" :bold="true" :right="false"></u-section>
  11. </view>
  12. <view class="gridstyle">
  13. <u-grid :col="3" :border="false">
  14. <u-grid-item @click="tests">
  15. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  16. <view class="grid-text">电话咨询</view>
  17. </u-grid-item>
  18. <u-grid-item>
  19. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  20. <view class="grid-text">图文咨询</view>
  21. </u-grid-item>
  22. <u-grid-item>
  23. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  24. <view class="grid-text">门诊预约</view>
  25. </u-grid-item>
  26. <u-grid-item>
  27. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  28. <view class="grid-text">疫苗接种</view>
  29. </u-grid-item>
  30. <u-grid-item>
  31. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  32. <view class="grid-text">儿保预约</view>
  33. </u-grid-item>
  34. <u-grid-item>
  35. <u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
  36. <view class="grid-text">服务包</view>
  37. </u-grid-item>
  38. </u-grid>
  39. </view>
  40. <view class="margin-top-sm">
  41. <u-notice-bar type="error" bg-color="white" color="black" border-radius="15" :list="listtext" mode="vertical"></u-notice-bar>
  42. </view>
  43. <view class="tltleStyle">
  44. <u-section title="热门推荐" font-size="40" line-color="#0B73BA" :bold="true" :right="false"></u-section>
  45. </view>
  46. <view class="cu-card case" style="margin-top: 20rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  47. <view class="cu-item" style="margin: 0;">
  48. <view class="flex justify-between">
  49. <swiper :current="currentindex" style="width: 430rpx;height: 430rpx;" :indicator-dots="false" :autoplay="true"
  50. :circular="true" :interval="3000" :duration="1000">
  51. <swiper-item>
  52. <view class="image">
  53. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" mode=""></image>
  54. <!-- <view class="cu-bar bg-shadeBottom">
  55. <text class="text-cut">我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。</text>
  56. </view> -->
  57. </view>
  58. </swiper-item>
  59. <swiper-item>
  60. <view class="image">
  61. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" mode=""></image>
  62. <!-- <view class="cu-bar bg-shadeBottom">
  63. <text class="text-cut">我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。</text>
  64. </view> -->
  65. </view>
  66. </swiper-item>
  67. <swiper-item>
  68. <view class="image">
  69. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" mode=""></image>
  70. <!-- <view class="cu-bar bg-shadeBottom">
  71. <text class="text-cut">我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。</text>
  72. </view> -->
  73. </view>
  74. </swiper-item>
  75. </swiper>
  76. <view class="margin-left-xs" style="width: 360rpx;">
  77. <image style="width: 100%;height: 50%;" src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
  78. mode=""></image>
  79. <image style="width: 100%;height: 50%;" src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
  80. mode=""></image>
  81. </view>
  82. </view>
  83. <swiper :current="currentindex" style="height: 100rpx;" :indicator-dots="false" :vertical="true" :autoplay="true"
  84. :circular="true" :interval="3000" :duration="1000">
  85. <swiper-item>
  86. <view class="cu-list menu">
  87. <view class="cu-item">
  88. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view> -->
  89. <view class="content flex-sub">
  90. <view class="text-grey">主标题主标题</view>
  91. <view class="text-gray text-sm flex justify-between">
  92. 第一副标题副标题副标题副标题副标题副标题副标题
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </swiper-item>
  98. <swiper-item>
  99. <view class="cu-list menu">
  100. <view class="cu-item">
  101. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view> -->
  102. <view class="content flex-sub">
  103. <view class="text-grey">主标题主标题</view>
  104. <view class="text-gray text-sm flex justify-between">
  105. 第二副标题副标题副标题副标题副标题副标题副标题
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </swiper-item>
  111. <swiper-item>
  112. <view class="cu-list menu">
  113. <view class="cu-item">
  114. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view> -->
  115. <view class="content flex-sub">
  116. <view class="text-grey">主标题主标题</view>
  117. <view class="text-gray text-sm flex justify-between">
  118. 第三副标题副标题副标题副标题副标题副标题副标题
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </swiper-item>
  124. </swiper>
  125. </view>
  126. </view>
  127. <view class="tltleStyle" @click="gototest">
  128. <u-section title="推荐医生" font-size="40" line-color="#0B73BA" :bold="true" :right="false"></u-section>
  129. </view>
  130. <view style="width: 100%;">
  131. <view class="recommendstyle margin-top-sm" v-for="(item,index) in test" :key="index">
  132. <view class="base_item">
  133. <view class="base_item_zi">
  134. <view class="base_item_zi_items">
  135. <view class="base_item_zi_content">
  136. <u-image :fade="true" duration="450" width="120rpx" height="120rpx" src="https://file.supermm.me/UEditor/uploadFile/2020-09-21/D229A665CBFB4817A518A5C47726AB18.jpg"
  137. shape="circle">
  138. </u-image>
  139. <view class="follow_style" v-if="true">
  140. 关注
  141. </view>
  142. <view class="follow_style" style="background-color: #fff;color: rgb(208, 105, 150);border:2rpx solid rgb(208, 105, 150);"
  143. v-else>
  144. 已关注
  145. </view>
  146. <view class="content_right">
  147. <view class="" style="display: flex;align-items: center;">
  148. <text style="font-size: 32rpx; font-weight: bold;">张三</text>
  149. <text class="text_style">全科医学科</text>
  150. <text class="text_style">医生</text>
  151. </view>
  152. <view class="m_gray_small">
  153. 昆明市西山区永昌西区社区卫生服务中心昆明市西山区永昌西区社区卫生服务中心
  154. </view>
  155. <view class="flex justify-start align-center flex-wrap" style="position: relative;">
  156. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="图文" shape="circle" mode="dark" type="info" />
  157. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="电话" shape="circle" mode="dark" type="info" />
  158. <u-tag style="margin-top:20rpx ; margin-right: 20rpx;" text="门诊" shape="circle" mode="dark" type="info" />
  159. </view>
  160. </view>
  161. </view>
  162. <view class="foot_juli padding-sm">
  163. <u-line color="#f6f6f6" />
  164. <view class="flex justify-center margin-top-sm" style="color: rgba(0,0,0,0.54);">
  165. <view class="text-sm" style="flex: 1; text-align: left;">
  166. 评分:
  167. <text style="color: #FF7B72;">5.0分</text>
  168. </view>
  169. <view class="text-sm" style="flex: 1; text-align: center;">
  170. 服务:
  171. <text style="color: #FF7B72;">7人</text>
  172. </view>
  173. <view class="text-sm" style="flex: 1; text-align: right;">
  174. 距离:
  175. <text style="color: #FF7B72;">650km</text>
  176. </view>
  177. </view>
  178. <view class="doctor_style margin-top-sm">
  179. <view class="doctor_style_item">
  180. 2010年毕业于红河卫校,2010年8月工作至今,从事预防接种工作7年,对预防接种工作排苗等其他流程熟练,对接种疫苗后出现的一些不良反应有一定经验。
  181. </view>
  182. <view class="text-black flex justify-between align-center margin-top-sm" style="font-size: 30rpx;">
  183. <view class="jisu">急速响应</view>
  184. <view class="">
  185. 服务
  186. <text class="text-red text-bold text-xl">¥19.90</text>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. <view class="margin-tb padding-tb-xs">
  197. <u-loadmore :status="nomore" :load-text="loadText" :icon-type="flower" />
  198. </view>
  199. <u-back-top :scroll-top="scrollTop" bottom="80" top="400"></u-back-top>
  200. </view>
  201. </template>
  202. <script>
  203. var user = require('../../common/user.js');
  204. import {
  205. mapState,
  206. mapMutations,
  207. mapGetters,
  208. mapActions
  209. } from 'vuex';
  210. export default {
  211. computed: {
  212. ...mapGetters({
  213. hasLogin: 'verifyJwt'
  214. }),
  215. ...mapState(['user'])
  216. },
  217. onLoad(options) {
  218. this.getDoctorList()
  219. },
  220. data() {
  221. return {
  222. scrollTop: 0,
  223. keyword: "",
  224. loadText: {
  225. nomore: '暂无更多医生推荐'
  226. },
  227. list: [{
  228. image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
  229. },
  230. {
  231. image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
  232. },
  233. {
  234. image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
  235. }
  236. ],
  237. test: [1, 2, 3, 4, 5],
  238. currentindex: 0,
  239. listtext: [
  240. "xxxxxxxxxxx",
  241. "yyyyyyyyyyy",
  242. "zzzzzzzzzzz"
  243. ]
  244. }
  245. },
  246. methods: {
  247. //监听滚动
  248. onPageScroll(e) {
  249. this.scrollTop = e.scrollTop;
  250. },
  251. tests() {
  252. uni.navigateTo({
  253. url: '../doctor_related/select_doctor'
  254. })
  255. },
  256. gototest() {
  257. uni.navigateTo({
  258. url: "../login/login"
  259. })
  260. },
  261. getDoctorList: async function() {
  262. let res = await this.$request.post("/api/v1/docter/docterList", {
  263. page: 1,
  264. })
  265. console.log(res)
  266. }
  267. }
  268. };
  269. </script>
  270. <style scoped lang="scss">
  271. .main {
  272. padding-top: 10rpx;
  273. padding-left: 20rpx;
  274. padding-right: 20rpx;
  275. }
  276. .gridstyle {
  277. height: 450rpx;
  278. background-color: #fff;
  279. border-radius: 15rpx;
  280. display: flex;
  281. align-items: center;
  282. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  283. margin-top: 20rpx;
  284. }
  285. .doctor_style {
  286. color: rgba(0, 0, 0, 0.54);
  287. }
  288. .doctor_style_item {
  289. overflow: hidden;
  290. text-overflow: ellipsis;
  291. display: -webkit-box;
  292. -webkit-line-clamp: 2;
  293. -webkit-box-orient: vertical;
  294. }
  295. .jisu {
  296. color: rgb(238, 170, 63);
  297. }
  298. .follow_style {
  299. position: absolute;
  300. bottom: 52rpx;
  301. left: 35rpx;
  302. z-index: 1;
  303. width: 106rpx;
  304. height: 40rpx;
  305. padding: 4rpx 0;
  306. background-color: rgb(208, 105, 150);
  307. box-sizing: border-box;
  308. color: #fff;
  309. text-align: center;
  310. border-radius: 60rpx;
  311. font-size: 24rpx;
  312. display: flex;
  313. justify-content: center;
  314. align-items: center;
  315. }
  316. .base_item {
  317. // position: absolute;
  318. // top: 0;
  319. // left: 0;
  320. // right: 0;
  321. // z-index: 1;
  322. width: 100%;
  323. height: auto;
  324. box-sizing: border-box;
  325. }
  326. .base_item_zi {
  327. // padding-top: 20rpx;
  328. // margin: 20rpx 20rpx;
  329. position: relative;
  330. box-sizing: border-box;
  331. }
  332. .base_item_zi_items {
  333. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  334. background-color: #fff;
  335. position: relative;
  336. border-radius: 8rpx;
  337. box-sizing: border-box;
  338. }
  339. .base_item_zi_content {
  340. display: flex;
  341. justify-content: center;
  342. padding: 30rpx 30rpx;
  343. overflow: hidden;
  344. position: relative;
  345. width: 100%;
  346. box-sizing: border-box;
  347. }
  348. .text_style {
  349. font-size: 24rpx;
  350. color: rgba(0, 0, 0, .54);
  351. display: block;
  352. margin-left: 10rpx;
  353. }
  354. .m_gray_small {
  355. white-space: nowrap;
  356. overflow: hidden;
  357. text-overflow: ellipsis;
  358. color: rgba(0, 0, 0, 0.54);
  359. margin-top: 20rpx;
  360. font-size: 28rpx;
  361. }
  362. .content_right {
  363. flex: 1;
  364. margin-left: 20rpx;
  365. overflow: hidden;
  366. position: relative;
  367. box-sizing: border-box;
  368. }
  369. .foot_item {
  370. background-color: #F7F7F7;
  371. box-sizing: border-box;
  372. }
  373. .grid-text {
  374. font-size: 28rpx;
  375. margin-top: 4rpx;
  376. color: $u-type-info;
  377. }
  378. .tltleStyle {
  379. padding: 30rpx 30rpx 15rpx 15rpx;
  380. // font-weight: bold;
  381. // font-size: 40rpx;
  382. }
  383. </style>