star-list.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <div class="page">
  3. <van-list
  4. v-model="isLoadingMore"
  5. :finished="finished"
  6. :immediate-check="false"
  7. :finished-text="total ? '没有更多了' : ''"
  8. @load="onLoadMore"
  9. >
  10. <div class="page-content">
  11. <!-- 标题 -->
  12. <div class="title flex justify-between px-4 pt-8 pb-8 md:px-0">
  13. <div>明星机构</div>
  14. <div>共<span v-text="total"></span>家明星机构</div>
  15. </div>
  16. <!-- 列表 -->
  17. <div class="list">
  18. <template v-for="item in list">
  19. <div
  20. class="section flex justify-between mb-4"
  21. :key="item.authId"
  22. @click="toDetail(item)"
  23. >
  24. <img class="cover" :src="item.logo || drawLogo(item.clubName)" />
  25. <div class="info">
  26. <div class="name" v-text="item.clubName"></div>
  27. <div class="mobile">{{ item.mobile || '暂无' }}</div>
  28. <div class="address">
  29. {{ formatAddress(item.area, item.address) }}
  30. </div>
  31. </div>
  32. </div>
  33. </template>
  34. <div class="empty" v-for="i in emptyList" :key="'empty-' + i"></div>
  35. </div>
  36. <!-- 列表为空 -->
  37. <SimpleEmpty
  38. v-if="!total && !isRequest"
  39. name="icon-empty-club.png"
  40. description="敬请期待~"
  41. ></SimpleEmpty>
  42. </div>
  43. </van-list>
  44. </div>
  45. </template>
  46. <script>
  47. import clubStarListMixin from '@/mixins/clubStarList'
  48. export default {
  49. layout: 'app-ross',
  50. mixins: [clubStarListMixin],
  51. }
  52. </script>
  53. <style scoped lang="scss">
  54. // pc 端
  55. @media screen and (min-width: 768px) {
  56. .page {
  57. position: relative;
  58. min-height: calc(100vh - 80px - 80px);
  59. background-color: #fff;
  60. }
  61. .page-top {
  62. height: 420px;
  63. @include themify($themes) {
  64. background: themed('pc-banner-club');
  65. }
  66. background-size: auto 420px;
  67. .logo {
  68. display: block;
  69. width: 120px;
  70. height: 120px;
  71. border-radius: 50%;
  72. background: #fff;
  73. }
  74. .name {
  75. font-size: 30px;
  76. color: #fff;
  77. }
  78. .logo,
  79. .name {
  80. transform: translateY(-60px);
  81. }
  82. }
  83. .page-content {
  84. width: 1200px;
  85. margin: 0 auto;
  86. .search {
  87. position: absolute;
  88. left: 50%;
  89. top: 260px;
  90. transform: translateX(-50%);
  91. }
  92. .city {
  93. position: absolute;
  94. left: 50%;
  95. top: 320px;
  96. transform: translateX(-50%);
  97. z-index: 9;
  98. }
  99. .title {
  100. font-size: 16px;
  101. color: #404040;
  102. span {
  103. @include themify($themes) {
  104. color: themed('color');
  105. }
  106. }
  107. }
  108. .list {
  109. display: flex;
  110. align-items: center;
  111. justify-content: space-between;
  112. flex-wrap: wrap;
  113. .empty {
  114. width: 390px;
  115. }
  116. .section {
  117. width: 390px;
  118. height: 108px;
  119. background-color: #f3f5f6;
  120. border-radius: 4px;
  121. box-sizing: border-box;
  122. padding: 12px;
  123. cursor: pointer;
  124. transition: all 0.4s;
  125. &:hover {
  126. box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  127. }
  128. .cover {
  129. display: block;
  130. width: 84px;
  131. height: 84px;
  132. }
  133. .info {
  134. position: relative;
  135. margin-left: 12px;
  136. .name {
  137. width: 200px;
  138. font-size: 16px;
  139. color: #101010;
  140. font-weight: bold;
  141. margin-bottom: 16px;
  142. text-overflow: ellipsis;
  143. white-space: nowrap;
  144. overflow: hidden;
  145. }
  146. .mobile,
  147. .address {
  148. width: 268px;
  149. position: relative;
  150. font-size: 14px;
  151. color: #404040;
  152. padding-left: 24px;
  153. line-height: 24px;
  154. text-overflow: ellipsis;
  155. white-space: nowrap;
  156. overflow: hidden;
  157. &::after {
  158. content: '';
  159. display: block;
  160. width: 16px;
  161. height: 16px;
  162. position: absolute;
  163. left: 0;
  164. top: 50%;
  165. transform: translateY(-50%);
  166. background-size: 16px;
  167. background-repeat: no-repeat;
  168. }
  169. }
  170. .mobile {
  171. &::after {
  172. background-image: url(~assets/theme-images/common/pc-icon-mobile.png);
  173. }
  174. }
  175. .address {
  176. &::after {
  177. background-image: url(~assets/theme-images/common/pc-icon-address.png);
  178. }
  179. }
  180. .distance {
  181. position: absolute;
  182. font-size: 12px;
  183. color: #404040;
  184. top: 2px;
  185. right: 0;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. // 移动 端
  193. @media screen and (max-width: 768px) {
  194. .page-top {
  195. height: 46vw;
  196. @include themify($themes) {
  197. background: themed('h5-banner-club');
  198. }
  199. background-size: auto 46vw;
  200. .logo {
  201. display: block;
  202. width: 14.8vw;
  203. height: 14.8vw;
  204. border-radius: 50%;
  205. background: #fff;
  206. }
  207. .name {
  208. font-size: 4vw;
  209. color: #fff;
  210. }
  211. }
  212. .page-content {
  213. position: relative;
  214. .search {
  215. position: absolute;
  216. left: 50%;
  217. top: 0;
  218. transform: translate(-50%, -50%);
  219. }
  220. .city {
  221. position: relative;
  222. z-index: 9;
  223. padding-top: 12vw;
  224. }
  225. .title {
  226. font-size: 3.4vw;
  227. color: #404040;
  228. span {
  229. @include themify($themes) {
  230. color: themed('color');
  231. }
  232. }
  233. }
  234. .list {
  235. display: flex;
  236. align-items: center;
  237. flex-direction: column;
  238. .section {
  239. width: 93.6vw;
  240. height: 26vw;
  241. background-color: #f3f5f6;
  242. border-radius: 4px;
  243. box-sizing: border-box;
  244. padding: 3.2vw;
  245. .cover {
  246. display: block;
  247. width: 19.6vw;
  248. height: 19.6vw;
  249. }
  250. .info {
  251. position: relative;
  252. margin-left: 3.2vw;
  253. .name {
  254. width: 48vw;
  255. font-size: 4vw;
  256. color: #101010;
  257. font-weight: bold;
  258. margin-bottom: 4vw;
  259. text-overflow: ellipsis;
  260. white-space: nowrap;
  261. overflow: hidden;
  262. }
  263. .mobile,
  264. .address {
  265. width: 66vw;
  266. position: relative;
  267. font-size: 3vw;
  268. color: #404040;
  269. padding-left: 5vw;
  270. line-height: 5vw;
  271. text-overflow: ellipsis;
  272. white-space: nowrap;
  273. overflow: hidden;
  274. &::after {
  275. content: '';
  276. display: block;
  277. width: 4vw;
  278. height: 4vw;
  279. position: absolute;
  280. left: 0;
  281. top: 50%;
  282. transform: translateY(-50%);
  283. background-size: 4vw 4vw;
  284. background-repeat: no-repeat;
  285. }
  286. }
  287. .mobile {
  288. &::after {
  289. background-image: url(~assets/theme-images/common/h5-icon-mobile.png);
  290. }
  291. }
  292. .address {
  293. &::after {
  294. background-image: url(~assets/theme-images/common/h5-icon-address.png);
  295. }
  296. }
  297. .distance {
  298. position: absolute;
  299. font-size: 3vw;
  300. color: #404040;
  301. top: 0.8vw;
  302. right: 0;
  303. }
  304. }
  305. }
  306. }
  307. }
  308. }
  309. </style>