爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

900 lines
20 KiB

1 month ago
2 weeks ago
1 month ago
2 weeks ago
1 month ago
2 weeks ago
1 month ago
2 weeks ago
2 weeks ago
1 month ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
1 month ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
  1. <template>
  2. <view class="order-manage-container">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar" :style="{
  5. paddingTop: statusBarHeight + 'px',
  6. height: (statusBarHeight + navBarContentHeight) + 'px'
  7. }">
  8. <uni-icons type="left" @tap="goBack" size="24" color="#222" />
  9. <text class="nav-title">{{ historyOrderMode ? '历史订单' : '订单管理' }}</text>
  10. </view>
  11. <!-- Tab栏 -->
  12. <scroll-view v-if="!historyOrderMode" class="order-tabs-scroll" scroll-x :style="{
  13. top: navBarRealHeight + 'px',
  14. height: tabBarHeight + 'px',
  15. position: 'fixed',
  16. left: 0,
  17. width: '100%',
  18. zIndex: 99
  19. }">
  20. <view class="order-tabs" :style="{width: (tabs.length * 20) + '%'}">
  21. <view v-for="(tab, idx) in tabs" :key="tab.value" :class="['tab-item', {active: currentTab === idx}]"
  22. @tap="onTabChange(idx)">
  23. <view class="tab-label-wrap">
  24. {{ tab.label }}
  25. <view v-if="tab.count > 0" class="tab-badge">{{ tab.count }}</view>
  26. </view>
  27. </view>
  28. </view>
  29. </scroll-view>
  30. <!-- 搜索与筛选 -->
  31. <view v-if="!historyOrderMode" class="search-bar" :style="{
  32. position: 'fixed',
  33. zIndex: 10,
  34. top: (navBarRealHeight + tabBarHeight) + 'px',
  35. left: 0,
  36. width: '100vw',
  37. height: '40px'
  38. }">
  39. <view class="search-bar-inner">
  40. <template v-if="!searchMode">
  41. <uni-icons class="search-icon" type="search" size="22" color="#999" @tap="onSearchIconClick" />
  42. <uni-icons class="scan-icon" type="scan" size="22" color="#999" @tap="scanCode" />
  43. </template>
  44. <template v-else>
  45. <view class="search-input-wrap">
  46. <uni-icons type="search" size="22" color="#999" />
  47. <input ref="searchInput" class="search-input" v-model="searchText" placeholder="请输入要查询的内容"
  48. placeholder-style="color:#ccc" />
  49. <uni-icons v-if="searchText" type="close" size="22" color="#ccc" @tap="onClearSearch" />
  50. </view>
  51. <text class="search-cancel" @tap="onCancelSearch">取消</text>
  52. </template>
  53. </view>
  54. </view>
  55. <!-- 订单卡片列表 -->
  56. <view class="order-list"
  57. :style="{paddingTop: (navBarRealHeight + (historyOrderMode ? 0 : (tabBarHeight + 16 + 40))) + 'px'}">
  58. <view class="order-card" v-for="order in filteredOrders" :key="order.id" @tap="goToOrderDetail(order)">
  59. <view class="order-card-header">
  60. <text class="order-id">{{ order.orderNo }}</text>
  61. <view v-if="order.statusText === '不包邮'" class="order-status-tag red">{{ order.statusText }}</view>
  62. <view v-if="!order.readFlag" class="unread-dot"></view>
  63. </view>
  64. <view class="order-info-wrapper">
  65. <view class="order-info">
  66. <view>
  67. <text class="info-label">用户名</text>
  68. <text class="info-value">{{ order.userName }}</text>
  69. </view>
  70. <view>
  71. <text class="info-label">电话</text>
  72. <text class="info-value">{{ order.phone }}</text>
  73. </view>
  74. <view v-if="order.appointTime">
  75. <text class="info-label">预约时间</text>
  76. <text class="info-value">{{ order.appointTime }}</text>
  77. </view>
  78. <view v-if="order.cancelTime">
  79. <text class="info-label">取消时间</text>
  80. <text class="info-value">{{ order.cancelTime }}</text>
  81. </view>
  82. <view v-if="order.qualityTime">
  83. <text class="info-label">质检时间</text>
  84. <text class="info-value">{{ order.qualityTime }}</text>
  85. </view>
  86. </view>
  87. <view class="order-status-label-bar order-info-status" :class="order.statusClass">
  88. {{ order.statusLabel }}</view>
  89. </view>
  90. <view class="order-card-footer" v-if="order.actions && order.actions.length && !historyOrderMode">
  91. <view class="order-actions-bar">
  92. <view class="action-btn-bar" v-for="action in order.actions" :key="action.text"
  93. @tap="action.text === '审批' ? goToOrderDetail(order) : null">
  94. <uni-icons :type="action.icon" size="28" color="#666" />
  95. <text>{{ action.text }}</text>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 加载状态 -->
  101. <view v-if="isLoading && orderList.length === 0" class="loading-container">
  102. <uni-icons type="spinner-cycle" size="24" color="#999" class="loading-icon" />
  103. <text class="loading-text">加载中...</text>
  104. </view>
  105. <!-- 加载更多状态 -->
  106. <view v-if="loadingMore" class="load-more-container">
  107. <uni-icons type="spinner-cycle" size="20" color="#999" class="loading-icon" />
  108. <text class="load-more-text">加载更多...</text>
  109. </view>
  110. <!-- 到底提示 -->
  111. <view v-if="!hasMore && orderList.length > 0" class="no-more-container">
  112. <text class="no-more-text">已加载全部订单</text>
  113. </view>
  114. <!-- 空状态 -->
  115. <view v-if="!isLoading && orderList.length === 0" class="empty-container">
  116. <text class="empty-text">暂无订单数据</text>
  117. </view>
  118. </view>
  119. </view>
  120. </template>
  121. <script>
  122. import pullRefreshMixin from '../mixins/pullRefreshMixin.js'
  123. export default {
  124. mixins: [pullRefreshMixin],
  125. data() {
  126. return {
  127. statusBarHeight: 0,
  128. navBarContentHeight: 44,
  129. tabBarHeight: 48,
  130. navBarHeight: 44,
  131. navBarRealHeight: 44,
  132. tabs: [{
  133. label: '全部',
  134. value: '',
  135. count: 0
  136. },
  137. {
  138. label: '待审核',
  139. value: 0,
  140. count: 0
  141. },
  142. {
  143. label: '已预约',
  144. value: 1,
  145. count: 0
  146. },
  147. {
  148. label: '待质检',
  149. value: 2,
  150. count: 0
  151. },
  152. {
  153. label: '已结款',
  154. value: 3,
  155. count: 0
  156. },
  157. {
  158. label: '已驳回',
  159. value: 4,
  160. count: 0
  161. },
  162. {
  163. label: '已取消',
  164. value: 5,
  165. count: 0
  166. },
  167. ],
  168. currentTab: 0,
  169. orderList: [],
  170. searchMode: false,
  171. searchText: '',
  172. historyOrderMode: false,
  173. pageNo: 1,
  174. pageSize: 10,
  175. hasMore: true,
  176. isLoading: false,
  177. loadingMore: false,
  178. userId: '',
  179. reachBottomTimer: null
  180. }
  181. },
  182. onLoad(options) {
  183. const sys = uni.getSystemInfoSync();
  184. this.statusBarHeight = sys.statusBarHeight;
  185. this.$nextTick(() => {
  186. uni.createSelectorQuery().select('.nav-bar').boundingClientRect(rect => {
  187. if (rect) {
  188. this.navBarRealHeight = rect.height;
  189. }
  190. }).exec();
  191. });
  192. if (options && options.historyOrder) {
  193. this.historyOrderMode = true;
  194. }
  195. if (options && options.userId) {
  196. this.userId = options.userId;
  197. }
  198. this.fetchOrderList()
  199. this.fetchOrderStatusStatistics()
  200. },
  201. onShow() {
  202. this.fetchOrderStatusStatistics()
  203. },
  204. computed: {
  205. filteredOrders() {
  206. if (this.searchText) {
  207. const text = this.searchText.toLowerCase();
  208. return this.orderList.filter(order =>
  209. (order.orderNo && order.orderNo.toLowerCase().includes(text)) ||
  210. (order.userName && order.userName.toLowerCase().includes(text)) ||
  211. (order.phone && order.phone.toLowerCase().includes(text))
  212. );
  213. }
  214. // 现在通过接口参数获取对应Tab的数据,不需要客户端过滤
  215. return this.orderList;
  216. }
  217. },
  218. methods: {
  219. goBack() {
  220. uni.navigateBack()
  221. },
  222. onTabChange(idx) {
  223. this.currentTab = idx
  224. this.pageNo = 1
  225. this.hasMore = true
  226. this.orderList = []
  227. this.isLoading = false
  228. this.loadingMore = false
  229. this.fetchOrderList()
  230. },
  231. onSearchIconClick() {
  232. this.searchMode = true;
  233. this.$nextTick(() => {
  234. this.$refs.searchInput && this.$refs.searchInput.focus();
  235. });
  236. },
  237. onClearSearch() {
  238. this.searchText = '';
  239. },
  240. onCancelSearch() {
  241. this.searchText = '';
  242. this.searchMode = false;
  243. },
  244. goToOrderDetail(order) {
  245. // 新增:记录浏览记录
  246. this.$api && this.$api('adminOrderBrowseRecord', {
  247. orderIds: order.id
  248. }, res => {
  249. // 可选:处理返回结果或错误,但不影响后续跳转
  250. })
  251. uni.navigateTo({
  252. url: '/pages/manager/order-detail?id=' + order.id
  253. })
  254. },
  255. refreshData() {
  256. // TODO: 实现订单列表刷新逻辑,如重新请求接口
  257. },
  258. async onRefresh() {
  259. await this.refreshData && this.refreshData()
  260. },
  261. fetchOrderList(isLoadMore) {
  262. if (this.isLoading) return
  263. if (isLoadMore && !this.hasMore) return
  264. console.log(isLoadMore, 'isLoadMore')
  265. if (isLoadMore) {
  266. this.loadingMore = true
  267. } else {
  268. this.isLoading = true
  269. }
  270. // 根据当前Tab获取对应的status参数
  271. const tabValue = this.tabs[this.currentTab].value
  272. let statusParam = tabValue // 直接用tabValue作为status参数
  273. const params = {
  274. pageNo: isLoadMore ? this.pageNo + 1 : 1,
  275. pageSize: this.pageSize,
  276. status: statusParam
  277. }
  278. console.log(params, 'params')
  279. if (this.userId) {
  280. params.userId = this.userId;
  281. }
  282. this.$api && this.$api('getOrderList', params, res => {
  283. if (res && res.code === 200 && res.result && res.result.records) {
  284. console.log(res.result, 'res.result.records')
  285. const newOrders = res.result.records.map(order => {
  286. const statusInfo = this.getOrderStatusInfo(order.status, order.state)
  287. return {
  288. id: order.id,
  289. orderNo: order.ordeNo,
  290. userName: order.name,
  291. phone: order.phone,
  292. appointTime: order.goTime,
  293. cancelTime: order.state === 3 ? order.updateTime : '',
  294. qualityTime: order.testingTime,
  295. statusText: order.isBy === 'Y' ? statusInfo.label : '不包邮',
  296. statusClass: statusInfo.class,
  297. statusLabel: statusInfo.label,
  298. actions: this.getOrderActions(order.status, order.state),
  299. status: this.getOrderStatus(order.status, order.state),
  300. readFlag: order.readFlag
  301. }
  302. })
  303. if (isLoadMore) {
  304. // 数据去重处理
  305. const existingIds = new Set(this.orderList.map(order => order.id))
  306. const uniqueNewOrders = newOrders.filter(order => !existingIds.has(order.id))
  307. this.orderList = [...this.orderList, ...uniqueNewOrders]
  308. this.pageNo = params.pageNo + 1
  309. } else {
  310. this.orderList = newOrders
  311. this.pageNo = 1
  312. }
  313. // 判断是否还有更多数据
  314. this.hasMore = newOrders.length === this.pageSize
  315. } else {
  316. this.hasMore = false
  317. }
  318. this.isLoading = false
  319. this.loadingMore = false
  320. }, err => {
  321. console.error('获取订单列表失败:', err)
  322. this.isLoading = false
  323. this.loadingMore = false
  324. this.hasMore = false
  325. uni.showToast({
  326. title: '加载失败,请重试',
  327. icon: 'none'
  328. })
  329. })
  330. },
  331. getOrderStatusInfo(status, state) {
  332. // if (state === 3) {
  333. // return { label: '已取消', class: 'gray' }
  334. // }
  335. if ((status === 1 && state === 0) && state != 3 && state != 4) {
  336. return {
  337. label: '已预约',
  338. class: 'green'
  339. }
  340. } else if (state === 1 && status === 2) {
  341. return {
  342. label: '待质检',
  343. class: 'orange'
  344. }
  345. } else if (status === 3 && state === 2) {
  346. return {
  347. label: '已结款',
  348. class: 'blue'
  349. }
  350. } else if (state === 4) {
  351. return {
  352. label: '已驳回',
  353. class: 'red'
  354. }
  355. } else if (state === 3) {
  356. return {
  357. label: '已取消',
  358. class: 'Turquoise2'
  359. }
  360. } else if (state === 0 && status === 0) {
  361. return {
  362. label: '待审核',
  363. class: 'blue'
  364. }
  365. }
  366. return {
  367. label: '未知状态',
  368. class: 'gray'
  369. }
  370. },
  371. getOrderStatus(status, state) {
  372. // // 已取消状态
  373. // if (state === 3) return 4
  374. // 已预约状态 - 快递上门
  375. if (status === 1) return 1
  376. // 待质检状态 - 已取件
  377. if (state === 1) return 2
  378. // 已结款状态 - 现金打款
  379. if (status === 3) return 3
  380. // 已驳回状态 - 快递上门终止
  381. if (state === 4) return 4
  382. return -1
  383. },
  384. getOrderActions(status, state) {
  385. const actions = []
  386. // 只有待审核状态显示操作按钮
  387. if (status == 0 && state == 0) {
  388. actions.push({
  389. icon: 'undo',
  390. text: '驳回'
  391. })
  392. actions.push({
  393. icon: 'person',
  394. text: '审批'
  395. })
  396. }
  397. return actions
  398. },
  399. onLoadMore() {
  400. if (this.hasMore && !this.isLoading && !this.loadingMore) {
  401. this.fetchOrderList(true)
  402. }
  403. },
  404. scanCode() {
  405. uni.scanCode({
  406. scanType: ['qrCode', 'barCode'], // 支持二维码和一维码
  407. success: (res) => {
  408. console.log('扫描结果:', res.result);
  409. console.log('扫描类型:', res.scanType);
  410. // 这里可以根据扫码结果进行相应处理
  411. // 比如跳转到订单详情页
  412. if (res.result) {
  413. this.$api('getOrderIdBywliuNo', {
  414. wliuNo : res.result
  415. }).then(e => {
  416. if(e.code == 200){
  417. uni.navigateTo({
  418. url: '/pages/manager/order-detail?id=' + e.result
  419. })
  420. }
  421. })
  422. }
  423. },
  424. fail: (err) => {
  425. console.error('扫描失败:', err);
  426. uni.showToast({
  427. title: '扫码失败',
  428. icon: 'none'
  429. })
  430. }
  431. })
  432. },
  433. fetchOrderStatusStatistics() {
  434. const token = uni.getStorageSync('token') || '';
  435. this.$api && this.$api('orderStatusStatistics', {
  436. token
  437. }, res => {
  438. if (res.code === 200 && res.result) {
  439. const stat = res.result;
  440. this.tabs[1].count = stat.pendingAudit || 0; // 待审核
  441. this.tabs[2].count = stat.appointed || 0; // 已预约
  442. this.tabs[3].count = stat.waitingInspection || 0; // 待质检
  443. this.tabs[4].count = stat.completed || 0; // 已结款
  444. this.tabs[5].count = stat.rejected || 0; // 已驳回
  445. this.tabs[6].count = stat.cancelled || 0; // 已取消
  446. this.tabs[0].count = (stat.pendingAudit || 0) + (stat.appointed || 0) + (stat
  447. .waitingInspection || 0) + (stat.completed || 0) + (stat.rejected || 0) + (stat
  448. .cancelled || 0);
  449. }
  450. });
  451. },
  452. },
  453. onPullDownRefresh() {
  454. this.pageNo = 1;
  455. this.hasMore = true;
  456. this.orderList = [];
  457. this.isLoading = false;
  458. this.loadingMore = false;
  459. this.fetchOrderList();
  460. uni.stopPullDownRefresh();
  461. },
  462. onReachBottom() {
  463. // 防抖处理,避免频繁触发
  464. if (this.reachBottomTimer) {
  465. clearTimeout(this.reachBottomTimer)
  466. }
  467. this.reachBottomTimer = setTimeout(() => {
  468. this.onLoadMore()
  469. }, 100)
  470. }
  471. }
  472. </script>
  473. <style lang="scss" scoped>
  474. .order-manage-container {
  475. background: #f8f8f8;
  476. min-height: 100vh;
  477. padding-bottom: 24px;
  478. }
  479. .nav-bar {
  480. display: flex;
  481. align-items: center;
  482. justify-content: space-between;
  483. position: fixed;
  484. top: 0;
  485. left: 0;
  486. right: 0;
  487. z-index: 100;
  488. background: #fff;
  489. padding: 0 32rpx;
  490. box-sizing: border-box;
  491. .nav-title {
  492. flex: 1;
  493. text-align: center;
  494. font-size: 36rpx;
  495. font-weight: bold;
  496. color: #222;
  497. }
  498. .nav-icons {
  499. display: flex;
  500. align-items: center;
  501. gap: 32rpx;
  502. }
  503. }
  504. .order-tabs-scroll {
  505. position: fixed;
  506. left: 0;
  507. width: 100%;
  508. z-index: 99;
  509. background: #fff;
  510. border-bottom: 1px solid #f0f0f0;
  511. height: 96rpx;
  512. overflow-x: auto;
  513. white-space: nowrap;
  514. -webkit-overflow-scrolling: touch;
  515. &::-webkit-scrollbar {
  516. display: none;
  517. }
  518. }
  519. .order-tabs {
  520. display: flex;
  521. width: 100%;
  522. }
  523. .tab-item {
  524. flex: 1 0 0%;
  525. text-align: center;
  526. font-size: 34rpx;
  527. color: #bfbfbf;
  528. height: 96rpx;
  529. line-height: 96rpx;
  530. position: relative;
  531. font-weight: 500;
  532. transition: color 0.2s;
  533. letter-spacing: 0.5px;
  534. }
  535. .tab-item.active {
  536. color: #ffb400;
  537. font-weight: bold;
  538. }
  539. .tab-item.active::after {
  540. content: '';
  541. display: block;
  542. margin: 0 auto;
  543. margin-top: 2px;
  544. width: 22px;
  545. height: 3px;
  546. border-radius: 2px;
  547. background: #ffb400;
  548. }
  549. .search-bar {
  550. width: 100vw;
  551. height: 40px;
  552. position: fixed;
  553. z-index: 10;
  554. left: 0;
  555. top: 0;
  556. display: flex;
  557. align-items: center;
  558. }
  559. .search-bar-inner {
  560. margin: 0 16px;
  561. background: #fff;
  562. border-radius: 20px;
  563. height: 40px;
  564. flex: 1;
  565. display: flex;
  566. align-items: center;
  567. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  568. padding: 0 12px;
  569. justify-content: space-around;
  570. .search-icon {
  571. margin-right: 8px;
  572. }
  573. .scan-icon {
  574. margin-left: 8px;
  575. }
  576. }
  577. .search-input-wrap {
  578. display: flex;
  579. align-items: center;
  580. flex: 1;
  581. background: #f5f5f5;
  582. border-radius: 20px;
  583. height: 32px;
  584. margin: 0 0;
  585. padding: 0 8px;
  586. .search-input {
  587. flex: 1;
  588. border: none;
  589. outline: none;
  590. background: transparent;
  591. font-size: 15px;
  592. color: #222;
  593. margin-left: 8px;
  594. }
  595. }
  596. .search-cancel {
  597. margin-left: 8px;
  598. color: #999;
  599. font-size: 15px;
  600. line-height: 40px;
  601. }
  602. .order-list {
  603. margin: 0;
  604. padding-top: calc(var(--status-bar-height, 0px) + 44px + 44px + 16px);
  605. }
  606. .order-card {
  607. background: #fff;
  608. border-radius: 20px;
  609. margin: 0 16px 16px 16px;
  610. padding: 20px;
  611. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  612. }
  613. .order-card-header {
  614. display: flex;
  615. justify-content: space-between;
  616. align-items: flex-start;
  617. margin-bottom: 12px;
  618. position: relative;
  619. .order-id {
  620. font-size: 16px;
  621. font-weight: bold;
  622. color: #222;
  623. }
  624. .order-status-tag {
  625. font-size: 14px;
  626. border-radius: 12px;
  627. padding: 2px 12px;
  628. &.green {
  629. background: #e6f9e6;
  630. color: #1ecb1e;
  631. }
  632. &.red {
  633. background: #ffeaea;
  634. color: #ff4d4f;
  635. }
  636. &.orange {
  637. background: #fff7e6;
  638. color: #ffb400;
  639. }
  640. &.blue {
  641. background: #e6f0ff;
  642. color: #409eff;
  643. }
  644. &.gray {
  645. background: #f5f5f5;
  646. color: #999;
  647. }
  648. &.Turquoise2 {
  649. background: #e0f7fa;
  650. color: #009fa8;
  651. }
  652. /* 新增已取消 */
  653. }
  654. .unread-dot {
  655. position: absolute;
  656. top: -4px;
  657. left: -4px;
  658. width: 12px;
  659. height: 12px;
  660. background: #ff4d4f;
  661. border-radius: 50%;
  662. border: 2px solid #fff;
  663. box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3);
  664. }
  665. }
  666. .order-info-wrapper {
  667. position: relative;
  668. .order-info-status {
  669. position: absolute;
  670. right: 0;
  671. bottom: 0;
  672. font-size: 14px;
  673. border-radius: 12px;
  674. padding: 2px 12px;
  675. &.green {
  676. background: #e6f9e6;
  677. color: #1ecb1e;
  678. }
  679. &.red {
  680. background: #ffeaea;
  681. color: #ff4d4f;
  682. }
  683. &.orange {
  684. background: #fff7e6;
  685. color: #ffb400;
  686. }
  687. &.blue {
  688. background: #e6f0ff;
  689. color: #409eff;
  690. }
  691. &.gray {
  692. background: #f5f5f5;
  693. color: #999;
  694. }
  695. &.Turquoise2 {
  696. background: #e0f7fa;
  697. color: #009fa8;
  698. }
  699. /* 新增已取消 */
  700. }
  701. }
  702. .order-info {
  703. font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  704. font-weight: 400;
  705. font-size: 14px;
  706. line-height: 1.4;
  707. letter-spacing: 0;
  708. vertical-align: middle;
  709. color: #666;
  710. margin-bottom: 12px;
  711. view {
  712. margin-bottom: 4px;
  713. display: flex;
  714. align-items: center;
  715. }
  716. .info-label {
  717. color: #999;
  718. font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  719. font-weight: 400;
  720. font-size: 14px;
  721. line-height: 1.4;
  722. margin-right: 4px;
  723. }
  724. .info-value {
  725. color: #222;
  726. font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  727. font-weight: 400;
  728. font-size: 14px;
  729. line-height: 1.4;
  730. }
  731. }
  732. .order-card-footer {
  733. display: flex;
  734. align-items: center;
  735. justify-content: center;
  736. margin: 0 -20px -20px -20px;
  737. padding: 0 20px;
  738. border-bottom-left-radius: 20px;
  739. border-bottom-right-radius: 20px;
  740. background: #fafbfc;
  741. min-height: 60px;
  742. position: relative;
  743. .order-actions-bar {
  744. display: flex;
  745. flex: 1;
  746. justify-content: center;
  747. align-items: center;
  748. gap: 48px;
  749. .action-btn-bar {
  750. display: flex;
  751. flex-direction: column;
  752. align-items: center;
  753. font-size: 14px;
  754. color: #666;
  755. margin-top: 8px;
  756. margin-bottom: 8px;
  757. uni-icons {
  758. margin-bottom: 2px;
  759. }
  760. }
  761. }
  762. }
  763. /* 加载状态样式 */
  764. .loading-container,
  765. .load-more-container,
  766. .no-more-container,
  767. .empty-container {
  768. display: flex;
  769. flex-direction: column;
  770. align-items: center;
  771. justify-content: center;
  772. padding: 40rpx 0;
  773. color: #999;
  774. }
  775. .loading-icon {
  776. animation: spin 1s linear infinite;
  777. margin-bottom: 16rpx;
  778. }
  779. @keyframes spin {
  780. 0% {
  781. transform: rotate(0deg);
  782. }
  783. 100% {
  784. transform: rotate(360deg);
  785. }
  786. }
  787. .loading-text,
  788. .load-more-text {
  789. font-size: 28rpx;
  790. color: #999;
  791. }
  792. .no-more-text {
  793. font-size: 26rpx;
  794. color: #ccc;
  795. }
  796. .empty-container {
  797. padding: 120rpx 0;
  798. }
  799. .empty-text {
  800. font-size: 30rpx;
  801. color: #ccc;
  802. }
  803. .tab-label-wrap {
  804. position: relative;
  805. display: inline-block;
  806. }
  807. .tab-badge {
  808. position: absolute;
  809. top: 5px;
  810. right: -14px;
  811. display: flex;
  812. align-items: center;
  813. justify-content: center;
  814. background: #ff4d4f;
  815. color: #fff;
  816. font-size: 12px;
  817. border-radius: 50%;
  818. min-width: 18px;
  819. height: 18px;
  820. padding: 0 5px;
  821. font-weight: bold;
  822. box-sizing: border-box;
  823. z-index: 1;
  824. }
  825. </style>