index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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">
  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 doctorList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
  64. <image :src="item.avatar" mode="scaleToFill" class="avatar"></image>
  65. <view class="title">{{ item.name }}</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. doctorList: [
  102. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  103. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  104. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  105. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  106. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  107. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
  108. { name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' }
  109. ],
  110. knowledgeList: []
  111. };
  112. },
  113. onLoad() {
  114. this.getData();
  115. },
  116. methods: {
  117. getData() {
  118. this.http.request({
  119. url: '/app/home/index',
  120. success: (res) => {
  121. this.knowledgeList = res.data.data.knowledgeList;
  122. }
  123. });
  124. },
  125. go(url) {
  126. uni.navigateTo({ url: url });
  127. }
  128. }
  129. };
  130. </script>
  131. <style lang="scss">
  132. page {
  133. background-color: white;
  134. }
  135. .banner {
  136. width: 100%;
  137. border-radius: 7px;
  138. }
  139. .notice {
  140. margin-top: 5px;
  141. border-radius: 5px;
  142. overflow: hidden;
  143. }
  144. .flow {
  145. padding-top: 5px;
  146. margin-left: -5px;
  147. margin-right: -5px;
  148. overflow: hidden;
  149. .item {
  150. border-radius: 10px;
  151. float: left;
  152. width: 50%;
  153. .out {
  154. padding: 5px;
  155. .int {
  156. padding: 15px;
  157. background-color: white;
  158. overflow: hidden;
  159. border-radius: 9px;
  160. text-align: center;
  161. position: relative;
  162. .icon {
  163. margin: 0 auto;
  164. line-height: 39px;
  165. color: $main-color;
  166. font-size: 57px;
  167. position: absolute;
  168. right: 10px;
  169. bottom: 20px;
  170. }
  171. .title {
  172. padding-top: 8px;
  173. float: left;
  174. font-size: 18px;
  175. text-align: left;
  176. font-weight: bold;
  177. .desc {
  178. font-size: 14px;
  179. padding-top: 5px;
  180. color: $font-c;
  181. font-weight: normal;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. .tg {
  189. margin-top: 5px;
  190. overflow: hidden;
  191. image {
  192. width: 100%;
  193. border-radius: 50px;
  194. }
  195. .tit {
  196. text-align: left;
  197. float: left;
  198. margin-top: -60px;
  199. left: 116px;
  200. position: relative;
  201. font-weight: bold;
  202. color: white;
  203. font-size: 18px;
  204. .desc {
  205. font-size: 14px;
  206. font-weight: normal;
  207. }
  208. }
  209. }
  210. .bos {
  211. background-color: white;
  212. border-radius: 7px;
  213. overflow: hidden;
  214. padding: 12px 0px 0px 0px;
  215. .gg {
  216. font-weight: bold;
  217. margin-bottom: 5px;
  218. overflow: hidden;
  219. .title {
  220. margin-left: 10px;
  221. }
  222. .bor {
  223. width: 5px;
  224. height: 12px;
  225. background-color: $main-color;
  226. border-radius: 20px;
  227. float: left;
  228. margin-top: -16px;
  229. }
  230. .more {
  231. float: right;
  232. font-size: 14px;
  233. font-weight: normal;
  234. margin-top: -20px;
  235. }
  236. }
  237. .doctor {
  238. display: flex;
  239. .item {
  240. padding-top: 10px;
  241. font-size: 15px;
  242. width: 105px;
  243. text-align: center;
  244. image {
  245. width: 80px;
  246. height: 105px;
  247. border-radius: 5px;
  248. }
  249. .title {
  250. padding-top: 3px;
  251. font-size: 14px;
  252. }
  253. }
  254. }
  255. .knowledgeList {
  256. .item {
  257. padding: 10px 0px 10px 0px;
  258. border-bottom: 1px solid $line;
  259. &:last-child {
  260. border: 0px;
  261. }
  262. .title {
  263. font-size: 15px;
  264. }
  265. .desc {
  266. font-size: 14px;
  267. padding-top: 5px;
  268. color: #909090;
  269. text {
  270. padding-right: 25px;
  271. }
  272. }
  273. }
  274. }
  275. }
  276. </style>