index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. <template>
  2. <view class="activity-container">
  3. <!-- Nav bar with title "活动中心" -->
  4. <view class="nav-bar">
  5. <text class="nav-title">活动中心</text>
  6. </view>
  7. <!-- Tab bar (3 tabs) -->
  8. <view class="tab-bar">
  9. <view
  10. class="tab-item"
  11. :class="{ active: currentTab === tab.key }"
  12. v-for="tab in tabs"
  13. :key="tab.key"
  14. @click="onTabChange(tab.key)"
  15. >
  16. <text class="tab-label">{{ tab.label }}</text>
  17. </view>
  18. </view>
  19. <!-- ScrollView content area -->
  20. <scroll-view
  21. class="content-scroll"
  22. scroll-y
  23. :refresher-enabled="true"
  24. :refresher-triggered="isRefreshing"
  25. @refresherrefresh="onRefresh"
  26. @scrolltolower="onLoadMore"
  27. >
  28. <!-- Tab 1: mine -->
  29. <view v-if="currentTab === 'mine'">
  30. <!-- Filter chips -->
  31. <scroll-view class="filter-scroll" scroll-x enable-flex>
  32. <view class="filter-chips">
  33. <view
  34. class="filter-chip"
  35. :class="{ active: currentMineFilter === filter.value }"
  36. v-for="filter in mineFilters"
  37. :key="filter.value"
  38. @click="onMineFilterChange(filter.value)"
  39. >
  40. <text class="filter-label">{{ filter.label }}</text>
  41. </view>
  42. </view>
  43. </scroll-view>
  44. <!-- Activity cards -->
  45. <view class="card-list" v-if="myActivities.length > 0">
  46. <view
  47. class="activity-card"
  48. v-for="act in myActivities"
  49. :key="act.id"
  50. @click="goDetail(act)"
  51. >
  52. <image
  53. class="card-cover"
  54. :src="act.coverImage || '/static/default-activity.png'"
  55. mode="aspectFill"
  56. />
  57. <view class="card-info">
  58. <text class="card-title">{{ act.title }}</text>
  59. <text class="card-meta">{{ act.startTime }}</text>
  60. <text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
  61. <view class="card-bottom">
  62. <text class="card-status" :class="getStatusClass(act)">
  63. {{ getStatusText(act) }}
  64. </text>
  65. <text class="card-price" v-if="act.price > 0">¥{{ formatPrice(act.price) }}</text>
  66. <text class="card-price free" v-else>免费</text>
  67. </view>
  68. <!-- Action buttons for approved status -->
  69. <view
  70. v-if="act.status === 'approved'"
  71. class="card-actions"
  72. >
  73. <button class="btn-cancel" @click.stop="onCancel(act)">取消报名</button>
  74. <button class="btn-checkin" @click.stop="onCheckin(act)">签到</button>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- Empty state for mine -->
  80. <view class="empty-state" v-else-if="!mineLoading">
  81. <text class="empty-icon">📋</text>
  82. <text class="empty-title">暂无报名的活动</text>
  83. <text class="empty-desc">去发现页探索精彩活动吧</text>
  84. <button class="empty-btn" @click="switchToDiscover">去发现活动</button>
  85. </view>
  86. <!-- Loading state -->
  87. <view class="loading-state" v-if="mineLoading">
  88. <view class="loading-spinner"></view>
  89. <text class="loading-text">加载中...</text>
  90. </view>
  91. <!-- Load more tip -->
  92. <view class="load-more-tip" v-if="myActivities.length > 0 && !hasMore && currentTab === 'mine'">
  93. <text class="load-more-text">没有更多了</text>
  94. </view>
  95. </view>
  96. <!-- Tab 2: discover -->
  97. <view v-if="currentTab === 'discover'">
  98. <!-- Filter chips (dimension) -->
  99. <scroll-view class="filter-scroll" scroll-x enable-flex>
  100. <view class="filter-chips">
  101. <view
  102. class="filter-chip"
  103. :class="{ active: currentDimension === filter.value }"
  104. v-for="filter in dimensionFilters"
  105. :key="filter.value"
  106. @click="onDimensionChange(filter.value)"
  107. >
  108. <text class="filter-label">{{ filter.label }}</text>
  109. </view>
  110. </view>
  111. </scroll-view>
  112. <!-- Activity cards -->
  113. <view class="card-list" v-if="discoverActivities.length > 0">
  114. <view
  115. class="activity-card"
  116. v-for="act in discoverActivities"
  117. :key="act.id"
  118. @click="goDetail(act)"
  119. >
  120. <image
  121. class="card-cover"
  122. :src="act.coverImage || '/static/default-activity.png'"
  123. mode="aspectFill"
  124. />
  125. <view class="card-info">
  126. <text class="card-title">{{ act.title }}</text>
  127. <text class="card-meta">{{ act.startTime }}</text>
  128. <text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
  129. <view class="card-bottom">
  130. <text class="card-status status-published">进行中</text>
  131. <text class="card-price" v-if="act.price > 0">¥{{ formatPrice(act.price) }}</text>
  132. <text class="card-price free" v-else>免费</text>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. <!-- Empty state for discover -->
  138. <view class="empty-state" v-else-if="!discoverLoading">
  139. <text class="empty-icon">🔍</text>
  140. <text class="empty-title">暂无活动</text>
  141. <text class="empty-desc">稍后再来看看吧</text>
  142. </view>
  143. <!-- Loading state -->
  144. <view class="loading-state" v-if="discoverLoading">
  145. <view class="loading-spinner"></view>
  146. <text class="loading-text">加载中...</text>
  147. </view>
  148. <!-- Load more tip -->
  149. <view class="load-more-tip" v-if="discoverActivities.length > 0 && !hasMore && currentTab === 'discover'">
  150. <text class="load-more-text">没有更多了</text>
  151. </view>
  152. </view>
  153. <!-- Tab 3: history -->
  154. <view v-if="currentTab === 'history'">
  155. <!-- Filter chips (same as mine) -->
  156. <scroll-view class="filter-scroll" scroll-x enable-flex>
  157. <view class="filter-chips">
  158. <view
  159. class="filter-chip"
  160. :class="{ active: currentMineFilter === filter.value }"
  161. v-for="filter in mineFilters"
  162. :key="filter.value"
  163. @click="onMineFilterChange(filter.value)"
  164. >
  165. <text class="filter-label">{{ filter.label }}</text>
  166. </view>
  167. </view>
  168. </scroll-view>
  169. <!-- Activity cards -->
  170. <view class="card-list" v-if="historyActivities.length > 0">
  171. <view
  172. class="activity-card"
  173. v-for="act in historyActivities"
  174. :key="act.id"
  175. @click="goDetail(act)"
  176. >
  177. <image
  178. class="card-cover"
  179. :src="act.coverImage || '/static/default-activity.png'"
  180. mode="aspectFill"
  181. />
  182. <view class="card-info">
  183. <text class="card-title">{{ act.title }}</text>
  184. <text class="card-meta">{{ act.startTime }}</text>
  185. <text class="card-meta" v-if="act.location">📍 {{ act.location }}</text>
  186. <view class="card-bottom">
  187. <text class="card-status status-ended">已结束</text>
  188. <text class="card-price" v-if="act.price > 0">¥{{ formatPrice(act.price) }}</text>
  189. <text class="card-price free" v-else>免费</text>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. <!-- Empty state for history -->
  195. <view class="empty-state" v-else-if="!historyLoading">
  196. <text class="empty-icon">📜</text>
  197. <text class="empty-title">暂无历史活动</text>
  198. <text class="empty-desc">参加过的活动会显示在这里</text>
  199. </view>
  200. <!-- Loading state -->
  201. <view class="loading-state" v-if="historyLoading">
  202. <view class="loading-spinner"></view>
  203. <text class="loading-text">加载中...</text>
  204. </view>
  205. <!-- Load more tip -->
  206. <view class="load-more-tip" v-if="historyActivities.length > 0 && !hasMore && currentTab === 'history'">
  207. <text class="load-more-text">没有更多了</text>
  208. </view>
  209. </view>
  210. </scroll-view>
  211. </view>
  212. </template>
  213. <script>
  214. import { getActivityList, getMyActivityRegistrations, activityCheckin, cancelActivityRegistration } from '@/utils/api.js'
  215. export default {
  216. data() {
  217. return {
  218. tabs: [
  219. { key: 'mine', label: '我的活动' },
  220. { key: 'discover', label: '发现活动' },
  221. { key: 'history', label: '历史记录' }
  222. ],
  223. currentTab: 'mine',
  224. mineFilters: [
  225. { label: '全部', value: '' },
  226. { label: '待开始', value: 'upcoming' },
  227. { label: '待审核', value: 'pending' },
  228. { label: '已签到', value: 'checked_in' }
  229. ],
  230. dimensionFilters: [
  231. { label: '全部', value: '' },
  232. { label: '身', value: 'body' },
  233. { label: '心', value: 'mind' },
  234. { label: '智', value: 'wisdom' },
  235. { label: '行', value: 'action' },
  236. { label: '富', value: 'wealth' }
  237. ],
  238. currentMineFilter: '',
  239. currentDimension: '',
  240. myActivities: [],
  241. discoverActivities: [],
  242. historyActivities: [],
  243. mineLoading: false,
  244. discoverLoading: false,
  245. historyLoading: false,
  246. minePage: 1,
  247. discoverPage: 1,
  248. historyPage: 1,
  249. pageSize: 10,
  250. hasMore: true,
  251. isRefreshing: false
  252. }
  253. },
  254. onLoad: function(options) {
  255. if (options && options.tab) {
  256. this.currentTab = options.tab
  257. this.loadData()
  258. }
  259. },
  260. onShow: function() {
  261. if (this.currentTab === 'mine') {
  262. this.loadMyActivities(true)
  263. }
  264. },
  265. methods: {
  266. onTabChange: function(key) {
  267. this.currentTab = key
  268. this.hasMore = true
  269. if (key === 'mine') {
  270. this.minePage = 1
  271. this.myActivities = []
  272. } else if (key === 'discover') {
  273. this.discoverPage = 1
  274. this.discoverActivities = []
  275. } else if (key === 'history') {
  276. this.historyPage = 1
  277. this.historyActivities = []
  278. }
  279. this.loadData()
  280. },
  281. loadData: function() {
  282. if (this.currentTab === 'mine') {
  283. this.loadMyActivities()
  284. } else if (this.currentTab === 'discover') {
  285. this.loadDiscoverActivities()
  286. } else if (this.currentTab === 'history') {
  287. this.loadHistoryActivities()
  288. }
  289. },
  290. loadMyActivities: function(refresh) {
  291. var self = this
  292. if (refresh) {
  293. this.minePage = 1
  294. this.myActivities = []
  295. }
  296. this.mineLoading = true
  297. var childId = uni.getStorageSync('currentChildId')
  298. if (!childId) {
  299. this.mineLoading = false
  300. return
  301. }
  302. var params = {
  303. childId: childId,
  304. page: this.minePage,
  305. size: this.pageSize
  306. }
  307. if (this.currentMineFilter && this.currentMineFilter !== 'upcoming') {
  308. params.status = this.currentMineFilter
  309. }
  310. getMyActivityRegistrations(params).then(function(res) {
  311. self.mineLoading = false
  312. if (res && res.code === 200 && res.data) {
  313. var records = res.data.records || []
  314. if (self.currentMineFilter === 'upcoming') {
  315. var now = new Date()
  316. var filtered = []
  317. for (var i = 0; i < records.length; i++) {
  318. var act = records[i]
  319. if (act.startTime) {
  320. var startTime = new Date(act.startTime.replace(/-/g, '/'))
  321. if (startTime > now && act.status === 'approved') {
  322. filtered.push(act)
  323. }
  324. }
  325. }
  326. records = filtered
  327. }
  328. if (refresh) {
  329. self.myActivities = records
  330. } else {
  331. self.myActivities = self.myActivities.concat(records)
  332. }
  333. self.hasMore = records.length >= self.pageSize
  334. }
  335. }).catch(function() {
  336. self.mineLoading = false
  337. })
  338. },
  339. loadDiscoverActivities: function(refresh) {
  340. var self = this
  341. if (refresh) {
  342. this.discoverPage = 1
  343. this.discoverActivities = []
  344. }
  345. this.discoverLoading = true
  346. var params = {
  347. page: this.discoverPage,
  348. size: this.pageSize
  349. }
  350. if (this.currentDimension) {
  351. params.dimensionCode = this.currentDimension
  352. }
  353. getActivityList(params).then(function(res) {
  354. self.discoverLoading = false
  355. if (res && res.code === 200 && res.data) {
  356. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  357. if (refresh) {
  358. self.discoverActivities = list
  359. } else {
  360. self.discoverActivities = self.discoverActivities.concat(list)
  361. }
  362. self.hasMore = list.length >= self.pageSize
  363. }
  364. }).catch(function() {
  365. self.discoverLoading = false
  366. })
  367. },
  368. loadHistoryActivities: function(refresh) {
  369. var self = this
  370. if (refresh) {
  371. this.historyPage = 1
  372. this.historyActivities = []
  373. }
  374. this.historyLoading = true
  375. var childId = uni.getStorageSync('currentChildId')
  376. if (!childId) {
  377. this.historyLoading = false
  378. return
  379. }
  380. var params = {
  381. childId: childId,
  382. page: this.historyPage,
  383. size: this.pageSize
  384. }
  385. getMyActivityRegistrations(params).then(function(res) {
  386. self.historyLoading = false
  387. if (res && res.code === 200 && res.data) {
  388. var records = res.data.records || []
  389. var now = new Date()
  390. var ended = []
  391. for (var i = 0; i < records.length; i++) {
  392. var act = records[i]
  393. if (act.endTime) {
  394. var endTime = new Date(act.endTime.replace(/-/g, '/'))
  395. if (endTime < now || act.status === 'cancelled' || act.status === 'rejected') {
  396. ended.push(act)
  397. }
  398. } else {
  399. ended.push(act)
  400. }
  401. }
  402. if (refresh) {
  403. self.historyActivities = ended
  404. } else {
  405. self.historyActivities = self.historyActivities.concat(ended)
  406. }
  407. self.hasMore = records.length >= self.pageSize
  408. }
  409. }).catch(function() {
  410. self.historyLoading = false
  411. })
  412. },
  413. onMineFilterChange: function(value) {
  414. this.currentMineFilter = value
  415. this.minePage = 1
  416. this.myActivities = []
  417. this.hasMore = true
  418. if (this.currentTab === 'mine') {
  419. this.loadMyActivities()
  420. } else if (this.currentTab === 'history') {
  421. this.loadHistoryActivities()
  422. }
  423. },
  424. onDimensionChange: function(value) {
  425. this.currentDimension = value
  426. this.discoverPage = 1
  427. this.discoverActivities = []
  428. this.hasMore = true
  429. this.loadDiscoverActivities()
  430. },
  431. onLoadMore: function() {
  432. if (!this.hasMore) return
  433. if (this.currentTab === 'mine' && !this.mineLoading) {
  434. this.minePage++
  435. this.loadMyActivities()
  436. } else if (this.currentTab === 'discover' && !this.discoverLoading) {
  437. this.discoverPage++
  438. this.loadDiscoverActivities()
  439. } else if (this.currentTab === 'history' && !this.historyLoading) {
  440. this.historyPage++
  441. this.loadHistoryActivities()
  442. }
  443. },
  444. onRefresh: function() {
  445. var self = this
  446. this.isRefreshing = true
  447. if (this.currentTab === 'mine') {
  448. this.loadMyActivities(true).finally(function() {
  449. self.isRefreshing = false
  450. })
  451. } else if (this.currentTab === 'discover') {
  452. this.loadDiscoverActivities(true).finally(function() {
  453. self.isRefreshing = false
  454. })
  455. } else if (this.currentTab === 'history') {
  456. this.loadHistoryActivities(true).finally(function() {
  457. self.isRefreshing = false
  458. })
  459. } else {
  460. this.isRefreshing = false
  461. }
  462. },
  463. goDetail: function(act) {
  464. uni.navigateTo({ url: '/pages/discover-detail/activity-detail/activity-detail?id=' + act.id })
  465. },
  466. switchToDiscover: function() {
  467. this.currentTab = 'discover'
  468. this.loadData()
  469. },
  470. getStatusClass: function(act) {
  471. if (!act.status) {
  472. if (act.endTime) {
  473. var endTime = new Date(act.endTime.replace(/-/g, '/'))
  474. if (endTime < new Date()) {
  475. return 'status-ended'
  476. }
  477. }
  478. return 'status-upcoming'
  479. }
  480. return 'status-' + act.status
  481. },
  482. getStatusText: function(act) {
  483. var statusMap = {
  484. pending: '待审核',
  485. approved: '报名成功',
  486. rejected: '已拒绝',
  487. cancelled: '已取消',
  488. checked_in: '已签到'
  489. }
  490. if (!act.status) {
  491. if (act.endTime) {
  492. var endTime = new Date(act.endTime.replace(/-/g, '/'))
  493. if (endTime < new Date()) {
  494. return '已结束'
  495. }
  496. }
  497. return '待开始'
  498. }
  499. return statusMap[act.status] || act.status
  500. },
  501. formatPrice: function(price) {
  502. return (price / 100).toFixed(2)
  503. },
  504. onCheckin: function(act) {
  505. var self = this
  506. var childId = uni.getStorageSync('currentChildId')
  507. if (!childId) {
  508. uni.showToast({ title: '请先选择孩子身份', icon: 'none' })
  509. return
  510. }
  511. activityCheckin({ id: act.activityId || act.id, childId: childId }).then(function(res) {
  512. if (res && res.code === 200) {
  513. uni.showToast({ title: '签到成功', icon: 'success' })
  514. self.loadMyActivities(true)
  515. } else {
  516. uni.showToast({ title: (res && res.message) || '签到失败', icon: 'none' })
  517. }
  518. }).catch(function() {
  519. uni.showToast({ title: '网络异常', icon: 'none' })
  520. })
  521. },
  522. onCancel: function(act) {
  523. var self = this
  524. uni.showModal({
  525. title: '提示',
  526. content: '确定要取消报名吗?',
  527. success: function(res) {
  528. if (res.confirm) {
  529. var childId = uni.getStorageSync('currentChildId')
  530. if (!childId) {
  531. uni.showToast({ title: '请先选择孩子身份', icon: 'none' })
  532. return
  533. }
  534. cancelActivityRegistration({ id: act.activityId || act.id, childId: childId }).then(function(res) {
  535. if (res && res.code === 200) {
  536. uni.showToast({ title: '已取消报名', icon: 'success' })
  537. self.loadMyActivities(true)
  538. } else {
  539. uni.showToast({ title: (res && res.message) || '取消失败', icon: 'none' })
  540. }
  541. }).catch(function() {
  542. uni.showToast({ title: '网络异常', icon: 'none' })
  543. })
  544. }
  545. }
  546. })
  547. }
  548. }
  549. }
  550. </script>
  551. <style scoped>
  552. .activity-container {
  553. min-height: 100vh;
  554. background: #F5F5F5;
  555. display: flex;
  556. flex-direction: column;
  557. }
  558. .nav-bar {
  559. background: #1A0F00;
  560. padding: 20rpx 0;
  561. text-align: center;
  562. }
  563. .nav-title {
  564. color: #fff;
  565. font-size: 32rpx;
  566. font-weight: 600;
  567. }
  568. .tab-bar {
  569. background: #fff;
  570. display: flex;
  571. flex-direction: row;
  572. border-bottom: 1rpx solid #eee;
  573. }
  574. .tab-item {
  575. flex: 1;
  576. padding: 24rpx 0;
  577. text-align: center;
  578. border-bottom: 4rpx solid transparent;
  579. }
  580. .tab-item.active {
  581. border-bottom-color: #F97316;
  582. }
  583. .tab-label {
  584. font-size: 28rpx;
  585. color: #666;
  586. }
  587. .tab-item.active .tab-label {
  588. color: #F97316;
  589. font-weight: 600;
  590. }
  591. .content-scroll {
  592. flex: 1;
  593. height: calc(100vh - 200rpx);
  594. }
  595. .filter-scroll {
  596. padding: 20rpx 24rpx;
  597. background: #fff;
  598. }
  599. .filter-chips {
  600. display: flex;
  601. flex-direction: row;
  602. gap: 16rpx;
  603. }
  604. .filter-chip {
  605. padding: 12rpx 24rpx;
  606. border-radius: 16px;
  607. background: #fff;
  608. border: 1rpx solid #ddd;
  609. flex-shrink: 0;
  610. }
  611. .filter-chip.active {
  612. background: #FFF7ED;
  613. border-color: #F97316;
  614. }
  615. .filter-label {
  616. font-size: 24rpx;
  617. color: #666;
  618. }
  619. .filter-chip.active .filter-label {
  620. color: #F97316;
  621. font-weight: 500;
  622. }
  623. .card-list {
  624. padding: 0 24rpx 24rpx;
  625. display: flex;
  626. flex-direction: column;
  627. gap: 20rpx;
  628. }
  629. .activity-card {
  630. background: #fff;
  631. border-radius: 12rpx;
  632. padding: 20rpx;
  633. display: flex;
  634. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
  635. }
  636. .card-cover {
  637. width: 144rpx;
  638. height: 144rpx;
  639. border-radius: 8rpx;
  640. flex-shrink: 0;
  641. background: #f0f0f0;
  642. }
  643. .card-info {
  644. flex: 1;
  645. margin-left: 20rpx;
  646. display: flex;
  647. flex-direction: column;
  648. }
  649. .card-title {
  650. font-size: 28rpx;
  651. font-weight: 600;
  652. color: #333;
  653. line-height: 1.4;
  654. overflow: hidden;
  655. text-overflow: ellipsis;
  656. white-space: nowrap;
  657. }
  658. .card-meta {
  659. font-size: 24rpx;
  660. color: #999;
  661. margin-top: 8rpx;
  662. }
  663. .card-bottom {
  664. display: flex;
  665. flex-direction: row;
  666. align-items: center;
  667. justify-content: space-between;
  668. margin-top: auto;
  669. padding-top: 12rpx;
  670. }
  671. .card-status {
  672. font-size: 22rpx;
  673. padding: 4rpx 12rpx;
  674. border-radius: 6rpx;
  675. }
  676. .status-pending {
  677. background: #FFF7ED;
  678. color: #F97316;
  679. }
  680. .status-approved {
  681. background: #F0FDF4;
  682. color: #22C55E;
  683. }
  684. .status-rejected {
  685. background: #FEF2F2;
  686. color: #EF4444;
  687. }
  688. .status-cancelled {
  689. background: #F5F5F5;
  690. color: #999;
  691. }
  692. .status-checked_in {
  693. background: #DBEAFE;
  694. color: #3B82F6;
  695. }
  696. .status-upcoming {
  697. background: #FFF7ED;
  698. color: #F97316;
  699. }
  700. .status-ended {
  701. background: #F5F5F5;
  702. color: #999;
  703. }
  704. .status-published {
  705. background: #F0FDF4;
  706. color: #22C55E;
  707. }
  708. .card-price {
  709. font-size: 28rpx;
  710. color: #F97316;
  711. font-weight: 600;
  712. }
  713. .card-price.free {
  714. color: #22C55E;
  715. }
  716. .card-actions {
  717. display: flex;
  718. flex-direction: row;
  719. gap: 12rpx;
  720. margin-top: 12rpx;
  721. }
  722. .btn-cancel {
  723. padding: 8rpx 20rpx;
  724. font-size: 22rpx;
  725. color: #999;
  726. background: #fff;
  727. border: 1rpx solid #ddd;
  728. border-radius: 20rpx;
  729. line-height: 1.5;
  730. }
  731. .btn-checkin {
  732. padding: 8rpx 20rpx;
  733. font-size: 22rpx;
  734. color: #fff;
  735. background: linear-gradient(135deg, #F97316, #FB923C);
  736. border: none;
  737. border-radius: 20rpx;
  738. line-height: 1.5;
  739. }
  740. .empty-state {
  741. display: flex;
  742. flex-direction: column;
  743. align-items: center;
  744. justify-content: center;
  745. padding: 120rpx 40rpx;
  746. }
  747. .empty-icon {
  748. font-size: 80rpx;
  749. margin-bottom: 20rpx;
  750. }
  751. .empty-title {
  752. font-size: 32rpx;
  753. font-weight: 600;
  754. color: #333;
  755. margin-bottom: 12rpx;
  756. }
  757. .empty-desc {
  758. font-size: 26rpx;
  759. color: #999;
  760. margin-bottom: 40rpx;
  761. }
  762. .empty-btn {
  763. padding: 16rpx 48rpx;
  764. font-size: 28rpx;
  765. color: #fff;
  766. background: linear-gradient(135deg, #F97316, #FB923C);
  767. border: none;
  768. border-radius: 40rpx;
  769. }
  770. .loading-state {
  771. display: flex;
  772. flex-direction: column;
  773. align-items: center;
  774. justify-content: center;
  775. padding: 80rpx 40rpx;
  776. }
  777. .loading-spinner {
  778. width: 60rpx;
  779. height: 60rpx;
  780. border: 4rpx solid #FDE68A;
  781. border-top-color: #F97316;
  782. border-radius: 50%;
  783. animation: spin 0.8s linear infinite;
  784. margin-bottom: 20rpx;
  785. }
  786. @keyframes spin {
  787. to { transform: rotate(360deg); }
  788. }
  789. .loading-text {
  790. font-size: 26rpx;
  791. color: #999;
  792. }
  793. .load-more-tip {
  794. text-align: center;
  795. padding: 30rpx;
  796. }
  797. .load-more-text {
  798. font-size: 24rpx;
  799. color: #999;
  800. }
  801. </style>