index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div class="page">
  3. <van-list
  4. v-model="loadingMore"
  5. :finished="finished"
  6. :immediate-check="false"
  7. :finished-text="total ? '没有更多了' : ''"
  8. @load="onLoadMore"
  9. >
  10. <div class="page-top"></div>
  11. <div class="page-content">
  12. <!-- 搜索区域 -->
  13. <div class="search">
  14. <SimpleSearch
  15. v-model="listQuery.doctorName"
  16. @search="onSearch"
  17. placeholder="搜索体疗师"
  18. />
  19. </div>
  20. <!-- 标题 -->
  21. <div class="title px-4 pt-12 pb-6">
  22. 共<span v-text="total"></span>位体疗师
  23. </div>
  24. <!-- 列表 -->
  25. <div class="list">
  26. <div
  27. class="section flex justify-between mb-4"
  28. v-for="item in list"
  29. :key="item.doctorId"
  30. @click="toDetail(item)"
  31. >
  32. <img class="cover" :src="item.doctorImage" />
  33. <div class="info">
  34. <div class="name" v-text="item.doctorName"></div>
  35. <div class="tag">{{ item.tagList.join(' | ') }}</div>
  36. <div class="code">
  37. 资格证编号:<span>{{ item.certificateNo }}</span>
  38. </div>
  39. <div class="club-name">
  40. 所在机构:<span>{{ item.clubName }}</span>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 列表为空 -->
  46. <SimpleEmpty
  47. v-if="!total && !isRequest"
  48. name="icon-empty-doctor.png"
  49. description="敬请期待~"
  50. ></SimpleEmpty>
  51. </div>
  52. </van-list>
  53. </div>
  54. </template>
  55. <script>
  56. import operatDoctorListMixin from '@/mixins/operatDoctorList'
  57. export default {
  58. layout: 'app-normal',
  59. mixins: [operatDoctorListMixin],
  60. }
  61. </script>
  62. <style scoped lang="scss">
  63. .page {
  64. position: relative;
  65. min-height: calc(100vh - 80px - 80px);
  66. background-color: #fff;
  67. }
  68. // pc 端
  69. @media screen and (min-width: 768px) {
  70. .page-top {
  71. height: 420px;
  72. background: url(~assets/theme-images/normal/pc/PC-operate-new.png) no-repeat
  73. center;
  74. background-size: auto 420px;
  75. .logo {
  76. display: block;
  77. width: 120px;
  78. height: 120px;
  79. border-radius: 50%;
  80. background: #fff;
  81. }
  82. .name {
  83. font-size: 30px;
  84. color: #fff;
  85. }
  86. .logo,
  87. .name {
  88. transform: translateY(-30px);
  89. }
  90. }
  91. .page-content {
  92. width: 1000px;
  93. margin: 0 auto;
  94. .search {
  95. position: absolute;
  96. left: 50%;
  97. top: 300px;
  98. transform: translateX(-50%);
  99. }
  100. .title {
  101. font-size: 16px;
  102. color: #404040;
  103. span {
  104. color: #bc1724;
  105. }
  106. }
  107. .list {
  108. display: flex;
  109. align-items: center;
  110. flex-wrap: wrap;
  111. justify-content: space-between;
  112. .empty {
  113. width: 390px;
  114. }
  115. .section {
  116. width: 490px;
  117. height: 136px;
  118. background-color: #f3f5f6;
  119. border-radius: 4px;
  120. box-sizing: border-box;
  121. padding: 16px;
  122. cursor: pointer;
  123. transition: all 0.4s;
  124. &:hover {
  125. box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  126. }
  127. .cover {
  128. display: block;
  129. width: 104px;
  130. height: 104px;
  131. }
  132. .info {
  133. width: 334px;
  134. position: relative;
  135. margin-left: 12px;
  136. .name {
  137. font-size: 18px;
  138. color: #101010;
  139. font-weight: bold;
  140. text-overflow: ellipsis;
  141. white-space: nowrap;
  142. overflow: hidden;
  143. font-weight: bold;
  144. margin-bottom: 8px;
  145. }
  146. .tag,
  147. .code,
  148. .club-name {
  149. height: 20px;
  150. position: relative;
  151. font-size: 14px;
  152. color: #999;
  153. line-height: 20px;
  154. text-overflow: ellipsis;
  155. white-space: nowrap;
  156. overflow: hidden;
  157. margin-top: 4px;
  158. span {
  159. color: #333333;
  160. }
  161. }
  162. .tag {
  163. color: #909399;
  164. }
  165. }
  166. }
  167. }
  168. }
  169. }
  170. // 移动 端
  171. @media screen and (max-width: 768px) {
  172. .page-top {
  173. height: 46vw;
  174. background: url(~assets/theme-images/normal/h5/H5-operate-new.png) no-repeat
  175. center;
  176. background-size: auto 46vw;
  177. .logo {
  178. display: block;
  179. width: 14.8vw;
  180. height: 14.8vw;
  181. border-radius: 50%;
  182. background: #fff;
  183. }
  184. .name {
  185. font-size: 4vw;
  186. color: #fff;
  187. }
  188. }
  189. .page-content {
  190. position: relative;
  191. .search {
  192. position: absolute;
  193. left: 50%;
  194. top: 0;
  195. transform: translate(-50%, -50%);
  196. }
  197. .city {
  198. padding-top: 12vw;
  199. }
  200. .title {
  201. font-size: 3.4vw;
  202. color: #404040;
  203. span {
  204. color: #bc1724;
  205. }
  206. }
  207. .list {
  208. display: flex;
  209. align-items: center;
  210. flex-direction: column;
  211. .section {
  212. width: 93.6vw;
  213. background-color: #f3f5f6;
  214. border-radius: 4px;
  215. box-sizing: border-box;
  216. padding: 3.2vw;
  217. .cover {
  218. display: block;
  219. width: 21.6vw;
  220. height: 21.6vw;
  221. }
  222. .info {
  223. position: relative;
  224. margin-left: 3.2vw;
  225. .name {
  226. font-size: 4vw;
  227. color: #101010;
  228. font-weight: bold;
  229. margin-bottom: 0.8vw;
  230. text-overflow: ellipsis;
  231. white-space: nowrap;
  232. overflow: hidden;
  233. }
  234. .tag,
  235. .code,
  236. .club-name {
  237. width: 62vw;
  238. height: 5vw;
  239. position: relative;
  240. font-size: 3vw;
  241. color: #999;
  242. line-height: 5vw;
  243. text-overflow: ellipsis;
  244. white-space: nowrap;
  245. overflow: hidden;
  246. span {
  247. color: #333;
  248. }
  249. }
  250. .tag {
  251. color: #909399;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. </style>