index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. <template>
  2. <view class="collect-page">
  3. <!-- 搜索栏 -->
  4. <view class="search-section">
  5. <view class="search-container">
  6. <u-search v-model="searchKeyword" placeholder="搜索收藏的商品" :showAction="true" actionText="搜索"
  7. @search="handleSearch" @custom="handleSearch" :clearabled="true" @clear="handleClear"></u-search>
  8. </view>
  9. <!-- 批量操作栏 -->
  10. <view v-if="collectList.length > 0" class="batch-actions">
  11. <view class="batch-info">
  12. <text class="batch-text">共 {{ collectList.length }} 件收藏商品</text>
  13. </view>
  14. <view class="batch-buttons">
  15. <view class="batch-btn" @click="selectAll">
  16. <text class="batch-btn-text">{{ isAllSelected ? '取消全选' : '全选' }}</text>
  17. </view>
  18. <view v-if="selectedItems.length > 0" class="batch-btn delete-btn" @click="batchCancelCollect">
  19. <text class="batch-btn-text">取消收藏({{ selectedItems.length }})</text>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 商品列表 -->
  25. <scroll-view class="product-list" scroll-y @scrolltolower="loadMore" :refresher-enabled="true"
  26. :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh">
  27. <!-- 商品卡片 -->
  28. <view v-if="collectList.length > 0" class="product-container">
  29. <view v-for="(item, index) in collectList" :key="item.id" class="product-card"
  30. @click="goToDetail(item.id)">
  31. <!-- 选择框 -->
  32. <view class="select-checkbox" :class="{ 'selected': selectedItems.includes(item.id) }"
  33. @click.stop="toggleSelect(item.id)">
  34. <view v-if="selectedItems.includes(item.id)" class="checkmark">✓</view>
  35. </view>
  36. <!-- 商品图片 -->
  37. <view class="product-image-container">
  38. <image :src="item.images" mode="aspectFill" class="product-image" @error="handleImageError">
  39. </image>
  40. <!-- 取消收藏按钮 -->
  41. <view class="collect-btn" @click.stop="cancelCollect(item, index)">
  42. <u-icon name="heart-fill" size="24" color="#FF4B4B"></u-icon>
  43. </view>
  44. </view>
  45. <!-- 商品信息 -->
  46. <view class="product-info">
  47. <view class="product-name">{{ item.name }}</view>
  48. <view class="product-desc" v-if="item.description">{{ item.description }}</view>
  49. <!-- 商品评分和销量 -->
  50. <view class="product-meta">
  51. <view class="rating-section" v-if="item.productAvg">
  52. <u-rate :value="item.productAvg" readonly allowHalf size="12"
  53. activeColor="#FFD700"></u-rate>
  54. <text class="rating-text">{{ item.productAvg }}</text>
  55. </view>
  56. <view class="sales-info">
  57. <text class="sales-text">已售{{ item.salesTotal || 0 }}件</text>
  58. </view>
  59. </view>
  60. <!-- 价格区域 -->
  61. <view class="price-section">
  62. <view class="price-info">
  63. <text class="price-symbol">¥</text>
  64. <text class="price-value">{{ item.price }}</text>
  65. <text class="original-price"
  66. v-if="item.originalPrice && item.originalPrice > item.price">
  67. ¥{{ item.originalPrice }}
  68. </text>
  69. </view>
  70. <view class="action-buttons">
  71. <view class="buy-btn" @click.stop="goToDetail(item.id)">
  72. <text class="buy-text">立即购买</text>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 空状态 -->
  80. <view v-else-if="!isLoading" class="empty-state">
  81. <u-empty mode="favor" icon="/static/images/empty.png" text="暂无收藏商品">
  82. <view class="empty-tips">
  83. <text class="tips-text">快去收藏喜欢的商品吧</text>
  84. <view class="go-shop-btn" @click="goToShop">
  85. <text class="btn-text">去逛逛</text>
  86. </view>
  87. </view>
  88. </u-empty>
  89. </view>
  90. <!-- 网络错误状态 -->
  91. <view v-else-if="networkError" class="error-state">
  92. <u-empty mode="wifi" icon="/static/images/empty.png" text="网络连接失败">
  93. <view class="error-tips">
  94. <text class="error-text">请检查网络连接后重试</text>
  95. <view class="retry-btn" @click="retryLoad">
  96. <text class="retry-text">重新加载</text>
  97. </view>
  98. </view>
  99. </u-empty>
  100. </view>
  101. <!-- 加载状态 -->
  102. <view v-if="isLoading && collectList.length === 0" class="loading-state">
  103. <u-loading-icon mode="spinner" size="28"></u-loading-icon>
  104. <text class="loading-text">加载中...</text>
  105. </view>
  106. <!-- 加载更多状态 -->
  107. <view v-if="collectList.length > 0" class="load-more-state">
  108. <view v-if="isLoading" class="loading-more">
  109. <u-loading-icon mode="spinner" size="20"></u-loading-icon>
  110. <text class="loading-more-text">加载中...</text>
  111. </view>
  112. <view v-else-if="!hasMore" class="no-more">
  113. <text class="no-more-text">—— 已加载全部收藏 ——</text>
  114. </view>
  115. </view>
  116. </scroll-view>
  117. </view>
  118. </template>
  119. <script>
  120. import {
  121. productCollectList,
  122. productClearCollect
  123. } from '@/config/api.js';
  124. export default {
  125. data() {
  126. return {
  127. bgColor: '#ffffff',
  128. collectList: [], // 收藏商品列表
  129. searchKeyword: '', // 搜索关键词
  130. isLoading: false, // 是否正在加载
  131. isRefreshing: false, // 是否正在刷新
  132. hasMore: true, // 是否还有更多数据
  133. selectedItems: [], // 选中的商品ID列表
  134. networkError: false, // 网络错误状态
  135. params: {
  136. current: 1, // 当前页码
  137. size: 10, // 每页数量
  138. name: '' // 商品名称搜索
  139. }
  140. }
  141. },
  142. onLoad() {
  143. uni.showLoading({
  144. title: '加载中...'
  145. })
  146. this.getCollectList().finally(() => {
  147. uni.hideLoading()
  148. })
  149. },
  150. onShow() {
  151. // 页面显示时刷新数据
  152. this.refreshData()
  153. },
  154. onShareAppMessage() {
  155. return {
  156. title: '我的收藏',
  157. path: '/packageUser/pages/collect/index'
  158. }
  159. },
  160. onShareTimeline() {
  161. return {
  162. title: '我的收藏'
  163. }
  164. },
  165. computed: {
  166. // 是否全选
  167. isAllSelected() {
  168. return this.collectList.length > 0 && this.selectedItems.length === this.collectList.length
  169. }
  170. },
  171. methods: {
  172. // 获取收藏列表
  173. async getCollectList(isLoadMore = false) {
  174. if (this.isLoading) return
  175. this.isLoading = true
  176. this.networkError = false
  177. try {
  178. // 根据API定义,productCollectList是POST请求,需要传递参数
  179. const params = {
  180. current: this.params.current,
  181. size: this.params.size,
  182. name: this.params.name
  183. }
  184. const res = await productCollectList(params)
  185. if (res.code === 200) {
  186. // 处理返回的数据结构
  187. let newList = []
  188. if (res.data && res.data.records) {
  189. // 分页数据结构
  190. newList = res.data.records
  191. } else if (Array.isArray(res.data)) {
  192. // 直接数组结构
  193. newList = res.data
  194. } else if (res.data && Array.isArray(res.data.list)) {
  195. // 其他可能的数据结构
  196. newList = res.data.list
  197. }
  198. // 确保newList是数组
  199. if (!Array.isArray(newList)) {
  200. newList = []
  201. }
  202. if (isLoadMore) {
  203. this.collectList = [...this.collectList, ...newList]
  204. } else {
  205. this.collectList = newList
  206. }
  207. // 判断是否还有更多数据
  208. this.hasMore = newList.length === this.params.size
  209. } else {
  210. uni.showToast({
  211. title: res.msg || '获取收藏列表失败',
  212. icon: 'none'
  213. })
  214. }
  215. } catch (error) {
  216. console.error('获取收藏列表失败:', error)
  217. this.networkError = true
  218. uni.showToast({
  219. title: '网络错误,请重试',
  220. icon: 'none'
  221. })
  222. } finally {
  223. this.isLoading = false
  224. this.isRefreshing = false
  225. }
  226. },
  227. // 搜索处理
  228. handleSearch() {
  229. this.params.name = this.searchKeyword
  230. this.params.current = 1
  231. this.hasMore = true
  232. this.selectedItems = [] // 清空选中状态
  233. this.getCollectList()
  234. },
  235. // 清除搜索
  236. handleClear() {
  237. this.searchKeyword = ''
  238. this.params.name = ''
  239. this.params.current = 1
  240. this.hasMore = true
  241. this.selectedItems = [] // 清空选中状态
  242. this.getCollectList()
  243. },
  244. // 取消收藏
  245. async cancelCollect(item, index) {
  246. uni.showModal({
  247. title: '提示',
  248. content: '确定要取消收藏这个商品吗?',
  249. success: async (res) => {
  250. if (res.confirm) {
  251. try {
  252. const params = {
  253. productId: item.id
  254. }
  255. const result = await productClearCollect(params)
  256. if (result.code === 200) {
  257. // 从列表中移除
  258. this.collectList.splice(index, 1)
  259. uni.showToast({
  260. title: '已取消收藏',
  261. icon: 'success'
  262. })
  263. // 如果列表为空,刷新数据
  264. if (this.collectList.length === 0) {
  265. this.refreshData()
  266. }
  267. } else {
  268. uni.showToast({
  269. title: result.msg || '取消收藏失败',
  270. icon: 'none'
  271. })
  272. }
  273. } catch (error) {
  274. console.error('取消收藏失败:', error)
  275. uni.showToast({
  276. title: '网络错误,请重试',
  277. icon: 'none'
  278. })
  279. }
  280. }
  281. }
  282. })
  283. },
  284. // 加载更多
  285. loadMore() {
  286. if (this.isLoading || !this.hasMore) return
  287. this.params.current++
  288. this.getCollectList(true)
  289. },
  290. // 下拉刷新
  291. async onRefresh() {
  292. this.isRefreshing = true
  293. this.params.current = 1
  294. this.hasMore = true
  295. await this.getCollectList()
  296. },
  297. // 刷新数据
  298. refreshData() {
  299. this.params.current = 1
  300. this.hasMore = true
  301. this.selectedItems = [] // 清空选中状态
  302. this.getCollectList()
  303. },
  304. // 跳转到商品详情
  305. goToDetail(productId) {
  306. uni.navigateTo({
  307. url: `/packageShop/pages/detail/index?id=${productId}`
  308. })
  309. },
  310. // 跳转到商城
  311. goToShop() {
  312. uni.switchTab({
  313. url: '/pages/shop/product-type-list'
  314. })
  315. },
  316. // 图片加载错误处理
  317. handleImageError() {
  318. // 可以设置默认图片
  319. console.log('图片加载失败')
  320. },
  321. // 重试加载
  322. retryLoad() {
  323. this.networkError = false
  324. this.refreshData()
  325. },
  326. // 切换选择状态
  327. toggleSelect(productId) {
  328. const index = this.selectedItems.indexOf(productId)
  329. if (index > -1) {
  330. this.selectedItems.splice(index, 1)
  331. } else {
  332. this.selectedItems.push(productId)
  333. }
  334. },
  335. // 全选/取消全选
  336. selectAll() {
  337. if (this.isAllSelected) {
  338. this.selectedItems = []
  339. } else {
  340. this.selectedItems = this.collectList.map(item => item.id)
  341. }
  342. },
  343. // 批量取消收藏
  344. async batchCancelCollect() {
  345. if (this.selectedItems.length === 0) {
  346. uni.showToast({
  347. title: '请选择要取消收藏的商品',
  348. icon: 'none'
  349. })
  350. return
  351. }
  352. uni.showModal({
  353. title: '提示',
  354. content: `确定要取消收藏选中的 ${this.selectedItems.length} 件商品吗?`,
  355. success: async (res) => {
  356. if (res.confirm) {
  357. try {
  358. uni.showLoading({
  359. title: '处理中...'
  360. })
  361. // 逐个取消收藏
  362. const promises = this.selectedItems.map(productId => {
  363. return productClearCollect({
  364. productId
  365. })
  366. })
  367. await Promise.all(promises)
  368. // 从列表中移除选中的商品
  369. this.collectList = this.collectList.filter(item =>
  370. !this.selectedItems.includes(item.id)
  371. )
  372. // 清空选中列表
  373. this.selectedItems = []
  374. uni.hideLoading()
  375. uni.showToast({
  376. title: '批量取消收藏成功',
  377. icon: 'success'
  378. })
  379. // 如果列表为空,刷新数据
  380. if (this.collectList.length === 0) {
  381. this.refreshData()
  382. }
  383. } catch (error) {
  384. uni.hideLoading()
  385. console.error('批量取消收藏失败:', error)
  386. uni.showToast({
  387. title: '批量操作失败,请重试',
  388. icon: 'none'
  389. })
  390. }
  391. }
  392. }
  393. })
  394. }
  395. }
  396. }
  397. </script>
  398. <style lang="scss" scoped>
  399. .collect-page {
  400. min-height: 100vh;
  401. background-color: #f5f5f5;
  402. }
  403. .search-section {
  404. padding: 20rpx;
  405. background-color: #fff;
  406. border-bottom: 1rpx solid #eee;
  407. }
  408. .search-container {
  409. background-color: #f8f8f8;
  410. border-radius: 20rpx;
  411. overflow: hidden;
  412. }
  413. .batch-actions {
  414. display: flex;
  415. justify-content: space-between;
  416. align-items: center;
  417. padding: 20rpx 0;
  418. border-top: 1rpx solid #eee;
  419. margin-top: 20rpx;
  420. }
  421. .batch-info {
  422. flex: 1;
  423. }
  424. .batch-text {
  425. font-size: 26rpx;
  426. color: #666;
  427. }
  428. .batch-buttons {
  429. display: flex;
  430. gap: 20rpx;
  431. }
  432. .batch-btn {
  433. padding: 12rpx 24rpx;
  434. border-radius: 20rpx;
  435. background-color: #f0f0f0;
  436. transition: all 0.3s ease;
  437. }
  438. .batch-btn:active {
  439. transform: scale(0.95);
  440. }
  441. .batch-btn-text {
  442. font-size: 24rpx;
  443. color: #333;
  444. }
  445. .delete-btn {
  446. background-color: #FFE6E6;
  447. }
  448. .delete-btn .batch-btn-text {
  449. color: #FF4B4B;
  450. }
  451. .product-list {
  452. flex: 1;
  453. height: calc(100vh - 200rpx);
  454. }
  455. .product-container {
  456. padding: 20rpx;
  457. }
  458. .product-card {
  459. background-color: #fff;
  460. border-radius: 16rpx;
  461. margin-bottom: 20rpx;
  462. overflow: hidden;
  463. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
  464. transition: all 0.3s ease;
  465. position: relative;
  466. }
  467. /* 移除商品卡片的选中状态样式,只保留选择框的选中状态 */
  468. .select-checkbox {
  469. position: absolute;
  470. top: 20rpx;
  471. left: 20rpx;
  472. z-index: 10;
  473. width: 40rpx;
  474. height: 40rpx;
  475. background-color: rgba(255, 255, 255, 0.9);
  476. border-radius: 50%;
  477. display: flex;
  478. align-items: center;
  479. justify-content: center;
  480. backdrop-filter: blur(10rpx);
  481. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  482. transition: all 0.3s ease;
  483. border: 2rpx solid #ccc;
  484. }
  485. .select-checkbox:active {
  486. transform: scale(0.9);
  487. }
  488. .select-checkbox.selected {
  489. border-color: #FF4B4B;
  490. background-color: #FF4B4B;
  491. }
  492. .checkmark {
  493. color: #fff;
  494. font-size: 20rpx;
  495. font-weight: bold;
  496. line-height: 1;
  497. }
  498. .product-card:active {
  499. transform: scale(0.98);
  500. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  501. }
  502. .product-image-container {
  503. position: relative;
  504. width: 100%;
  505. height: 400rpx;
  506. overflow: hidden;
  507. }
  508. .product-image {
  509. width: 100%;
  510. height: 100%;
  511. transition: transform 0.3s ease;
  512. }
  513. .product-card:active .product-image {
  514. transform: scale(1.05);
  515. }
  516. .collect-btn {
  517. position: absolute;
  518. top: 20rpx;
  519. right: 20rpx;
  520. width: 60rpx;
  521. height: 60rpx;
  522. background-color: rgba(255, 255, 255, 0.9);
  523. border-radius: 50%;
  524. display: flex;
  525. align-items: center;
  526. justify-content: center;
  527. backdrop-filter: blur(10rpx);
  528. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  529. transition: all 0.3s ease;
  530. }
  531. .collect-btn:active {
  532. transform: scale(0.9);
  533. background-color: rgba(255, 255, 255, 1);
  534. }
  535. .product-info {
  536. padding: 24rpx;
  537. }
  538. .product-name {
  539. font-size: 30rpx;
  540. color: #333;
  541. font-weight: 600;
  542. line-height: 1.4;
  543. margin-bottom: 12rpx;
  544. display: -webkit-box;
  545. -webkit-line-clamp: 2;
  546. -webkit-box-orient: vertical;
  547. overflow: hidden;
  548. writing-mode: horizontal-tb;
  549. text-orientation: mixed;
  550. }
  551. .product-desc {
  552. font-size: 24rpx;
  553. color: #666;
  554. margin-bottom: 16rpx;
  555. display: -webkit-box;
  556. -webkit-line-clamp: 2;
  557. -webkit-box-orient: vertical;
  558. overflow: hidden;
  559. line-height: 1.4;
  560. writing-mode: horizontal-tb;
  561. text-orientation: mixed;
  562. }
  563. .product-meta {
  564. display: flex;
  565. justify-content: space-between;
  566. align-items: center;
  567. margin-bottom: 20rpx;
  568. }
  569. .rating-section {
  570. display: flex;
  571. align-items: center;
  572. gap: 8rpx;
  573. }
  574. .rating-text {
  575. font-size: 22rpx;
  576. color: #666;
  577. writing-mode: horizontal-tb;
  578. text-orientation: mixed;
  579. }
  580. .sales-info {
  581. text-align: right;
  582. display: flex;
  583. align-items: center;
  584. justify-content: flex-end;
  585. }
  586. .sales-text {
  587. font-size: 22rpx;
  588. color: #999;
  589. white-space: nowrap;
  590. writing-mode: horizontal-tb;
  591. text-orientation: mixed;
  592. }
  593. .price-section {
  594. display: flex;
  595. justify-content: space-between;
  596. align-items: center;
  597. }
  598. .price-info {
  599. display: flex;
  600. align-items: baseline;
  601. gap: 4rpx;
  602. }
  603. .price-symbol {
  604. font-size: 24rpx;
  605. color: #FF4B4B;
  606. font-weight: 600;
  607. writing-mode: horizontal-tb;
  608. text-orientation: mixed;
  609. }
  610. .price-value {
  611. font-size: 36rpx;
  612. color: #FF4B4B;
  613. font-weight: 700;
  614. writing-mode: horizontal-tb;
  615. text-orientation: mixed;
  616. }
  617. .original-price {
  618. font-size: 24rpx;
  619. color: #999;
  620. text-decoration: line-through;
  621. margin-left: 8rpx;
  622. writing-mode: horizontal-tb;
  623. text-orientation: mixed;
  624. }
  625. .action-buttons {
  626. display: flex;
  627. gap: 12rpx;
  628. }
  629. .buy-btn {
  630. background: linear-gradient(135deg, #FF4B4B 0%, #FF6B6B 100%);
  631. border-radius: 20rpx;
  632. padding: 12rpx 24rpx;
  633. transition: all 0.3s ease;
  634. display: flex;
  635. align-items: center;
  636. justify-content: center;
  637. min-width: 80rpx;
  638. height: 60rpx;
  639. }
  640. .buy-btn:active {
  641. transform: scale(0.95);
  642. background: linear-gradient(135deg, #E63939 0%, #E65959 100%);
  643. }
  644. .buy-text {
  645. color: #fff;
  646. font-size: 24rpx;
  647. font-weight: 600;
  648. white-space: nowrap;
  649. writing-mode: horizontal-tb;
  650. text-orientation: mixed;
  651. }
  652. .empty-state {
  653. padding: 100rpx 40rpx;
  654. text-align: center;
  655. }
  656. .empty-tips {
  657. margin-top: 30rpx;
  658. }
  659. .tips-text {
  660. font-size: 28rpx;
  661. color: #999;
  662. display: block;
  663. margin-bottom: 30rpx;
  664. }
  665. .go-shop-btn {
  666. background: linear-gradient(135deg, #FF4B4B 0%, #FF6B6B 100%);
  667. border-radius: 25rpx;
  668. padding: 16rpx 40rpx;
  669. display: inline-block;
  670. transition: all 0.3s ease;
  671. }
  672. .go-shop-btn:active {
  673. transform: scale(0.95);
  674. }
  675. .btn-text {
  676. color: #fff;
  677. font-size: 28rpx;
  678. font-weight: 600;
  679. }
  680. .error-state {
  681. padding: 100rpx 40rpx;
  682. text-align: center;
  683. }
  684. .error-tips {
  685. margin-top: 30rpx;
  686. }
  687. .error-text {
  688. font-size: 28rpx;
  689. color: #999;
  690. display: block;
  691. margin-bottom: 30rpx;
  692. }
  693. .retry-btn {
  694. background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
  695. border-radius: 25rpx;
  696. padding: 16rpx 40rpx;
  697. display: inline-block;
  698. transition: all 0.3s ease;
  699. }
  700. .retry-btn:active {
  701. transform: scale(0.95);
  702. }
  703. .retry-text {
  704. color: #fff;
  705. font-size: 28rpx;
  706. font-weight: 600;
  707. }
  708. .loading-state {
  709. padding: 100rpx 40rpx;
  710. text-align: center;
  711. display: flex;
  712. flex-direction: column;
  713. align-items: center;
  714. gap: 20rpx;
  715. }
  716. .loading-text {
  717. font-size: 28rpx;
  718. color: #999;
  719. }
  720. .load-more-state {
  721. padding: 40rpx 20rpx;
  722. text-align: center;
  723. }
  724. .loading-more {
  725. display: flex;
  726. align-items: center;
  727. justify-content: center;
  728. gap: 12rpx;
  729. }
  730. .loading-more-text {
  731. font-size: 24rpx;
  732. color: #999;
  733. }
  734. .no-more {
  735. text-align: center;
  736. }
  737. .no-more-text {
  738. font-size: 24rpx;
  739. color: #999;
  740. position: relative;
  741. }
  742. .no-more-text::before,
  743. .no-more-text::after {
  744. content: '';
  745. position: absolute;
  746. top: 50%;
  747. width: 60rpx;
  748. height: 1rpx;
  749. background-color: #ddd;
  750. }
  751. .no-more-text::before {
  752. left: -80rpx;
  753. }
  754. .no-more-text::after {
  755. right: -80rpx;
  756. }
  757. </style>