index.vue 6.2 KB

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