index.vue 6.2 KB

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