1
0

index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="main">
  3. <image src="https://chenglantimes.com/prod-api/profile/upload/2024/07/27/1722074138272.jpg" mode="widthFix" class="banner"></image>
  4. <!--通知公告-->
  5. <view class="notice">
  6. <u-notice-bar color="#545555" :text="noticeList" :step="true" direction="column" mode="link" bgColor="white" speed="300" url="/pages/notice/index"></u-notice-bar>
  7. </view>
  8. <!--卡片菜单-->
  9. <view class="flow">
  10. <view class="item" @click="go('/pages/doctor/index')">
  11. <view class="out">
  12. <view class="int" style="height: 217px; background-color: #d9e8fd">
  13. <view class="icon" style="color: #4687ed">&#xe62d;</view>
  14. <view class="title">
  15. <view>医生团队</view>
  16. <view class="desc">权威团队服务</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="item">
  22. <view class="out" @click="go('/pages/department/index')">
  23. <view class="int" style="height: 87px; background-color: #ddf8f3">
  24. <view class="icon" style="color: #22b789">&#xe606;</view>
  25. <view class="title">
  26. <view>科室介绍</view>
  27. <view class="desc">众多先进设备</view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="out" @click="go('/pages/introduction/index')">
  32. <view class="int" style="height: 90px; background-color: #fff3e3">
  33. <view class="icon" style="color: #fe9b01">&#xe636;</view>
  34. <view class="title"></view>
  35. <view class="title">
  36. <view>医院指南</view>
  37. <view class="desc">医院简介</view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <!--健康知识-->
  44. <view class="tg" @click="go('/pages/knowledge/index')">
  45. <image src="https://chenglantimes.com/prod-api/profile/upload/2024/07/27/1722076102395.jpg" mode="widthFix"></image>
  46. <view class="tit">
  47. <view>知识课堂</view>
  48. <view class="desc">每天一个健康小知识</view>
  49. </view>
  50. </view>
  51. <!--权威专家-->
  52. <view class="bos" style="margin-top: 8px" v-if="expertList.length > 0">
  53. <view class="gg">
  54. <view class="title">权威专家</view>
  55. <view class="bor"></view>
  56. <view class="more" @click="go('/pages/doctor/index')">
  57. <text>更多</text>
  58. <text class="icon">&#xe62b;</text>
  59. </view>
  60. </view>
  61. <u-scroll-list :indicator="true" indicatorColor="#e0e0e0">
  62. <view class="doctor">
  63. <view class="item" v-for="(item, index) in expertList" :key="index" @click="go('/pages/doctor/detail?id=' + item.userId)">
  64. <image :src="ip + item.avatar" mode="scaleToFill" class="avatar"></image>
  65. <view class="title">{{ item.nickName }}</view>
  66. </view>
  67. </view>
  68. </u-scroll-list>
  69. </view>
  70. <!--健康知识-->
  71. <view class="bos">
  72. <view class="gg">
  73. <view class="title">健康知识</view>
  74. <view class="bor"></view>
  75. <view class="more" @click="go('/pages/knowledge/index')">
  76. <text>更多</text>
  77. <text class="icon">&#xe62b;</text>
  78. </view>
  79. </view>
  80. <view class="knowledgeList">
  81. <view class="item" v-for="(item, index) in knowledgeList" :key="index" @click="go('/pages/knowledge/detail?id=' + item.id)">
  82. <view class="title omit">
  83. <text class="icon" v-if="item.top === 1">&#xe61f;</text>
  84. <text>{{ item.title }}</text>
  85. </view>
  86. <view class="desc">
  87. <text>{{ item.type }}</text>
  88. <text>{{ item.createTime.substring(5, 10) }}</text>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. <script>
  96. export default {
  97. data() {
  98. return {
  99. ip: this.http.ip,
  100. noticeList: ['医院开通线上小程序啦,快来体验吧', '首次使用如何绑定就诊卡'],
  101. expertList: [],
  102. knowledgeList: []
  103. };
  104. },
  105. onLoad() {
  106. this.getData();
  107. },
  108. methods: {
  109. getData() {
  110. this.http.request({
  111. url: '/app/home/index',
  112. success: (res) => {
  113. this.knowledgeList = res.data.data.knowledgeList;
  114. this.expertList = res.data.data.expertList;
  115. }
  116. });
  117. },
  118. go(url) {
  119. uni.navigateTo({ url: url });
  120. }
  121. }
  122. };
  123. </script>
  124. <style lang="scss">
  125. page {
  126. background-color: white;
  127. }
  128. .banner {
  129. width: 100%;
  130. border-radius: 7px;
  131. }
  132. .notice {
  133. margin-top: 5px;
  134. border-radius: 5px;
  135. overflow: hidden;
  136. }
  137. .flow {
  138. padding-top: 5px;
  139. margin-left: -5px;
  140. margin-right: -5px;
  141. overflow: hidden;
  142. .item {
  143. border-radius: 10px;
  144. float: left;
  145. width: 50%;
  146. .out {
  147. padding: 5px;
  148. .int {
  149. padding: 15px;
  150. background-color: white;
  151. overflow: hidden;
  152. border-radius: 9px;
  153. text-align: center;
  154. position: relative;
  155. .icon {
  156. margin: 0 auto;
  157. line-height: 39px;
  158. color: $main-color;
  159. font-size: 57px;
  160. position: absolute;
  161. right: 10px;
  162. bottom: 20px;
  163. }
  164. .title {
  165. padding-top: 8px;
  166. float: left;
  167. font-size: 18px;
  168. text-align: left;
  169. font-weight: bold;
  170. .desc {
  171. font-size: 14px;
  172. padding-top: 5px;
  173. color: $font-c;
  174. font-weight: normal;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. }
  181. .tg {
  182. margin-top: 5px;
  183. overflow: hidden;
  184. image {
  185. width: 100%;
  186. border-radius: 50px;
  187. }
  188. .tit {
  189. text-align: left;
  190. float: left;
  191. margin-top: -60px;
  192. left: 116px;
  193. position: relative;
  194. font-weight: bold;
  195. color: white;
  196. font-size: 18px;
  197. .desc {
  198. font-size: 14px;
  199. font-weight: normal;
  200. }
  201. }
  202. }
  203. .bos {
  204. background-color: white;
  205. border-radius: 7px;
  206. overflow: hidden;
  207. padding: 12px 0px 0px 0px;
  208. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
  209. padding: 12px;
  210. margin-top: 12px;
  211. .gg {
  212. font-weight: bold;
  213. margin-bottom: 5px;
  214. overflow: hidden;
  215. .title {
  216. margin-left: 10px;
  217. }
  218. .bor {
  219. width: 5px;
  220. height: 12px;
  221. background-color: $main-color;
  222. border-radius: 20px;
  223. float: left;
  224. margin-top: -16px;
  225. }
  226. .more {
  227. float: right;
  228. font-size: 14px;
  229. font-weight: normal;
  230. margin-top: -20px;
  231. }
  232. }
  233. .doctor {
  234. display: flex;
  235. .item {
  236. padding-top: 10px;
  237. font-size: 15px;
  238. width: 105px;
  239. text-align: center;
  240. image {
  241. width: 80px;
  242. height: 105px;
  243. border-radius: 5px;
  244. }
  245. .title {
  246. padding-top: 3px;
  247. font-size: 14px;
  248. }
  249. }
  250. }
  251. .knowledgeList {
  252. .item {
  253. padding: 10px 0px 10px 0px;
  254. border-bottom: 1px solid $line;
  255. &:last-child {
  256. border: 0px;
  257. }
  258. .title {
  259. font-size: 15px;
  260. }
  261. .desc {
  262. font-size: 14px;
  263. padding-top: 5px;
  264. color: #909090;
  265. text {
  266. padding-right: 25px;
  267. }
  268. }
  269. }
  270. }
  271. }
  272. </style>