activity-detail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <view class="container">
  3. <!-- 加载状态 -->
  4. <view v-if="loading" class="loading-wrap">
  5. <view class="loading-spinner"></view>
  6. <text class="loading-text">加载中...</text>
  7. </view>
  8. <!-- 错误状态 -->
  9. <view v-else-if="error" class="error-wrap">
  10. <text class="error-icon">📋</text>
  11. <text class="error-text">{{ errorMsg }}</text>
  12. <button class="retry-btn" @click="loadDetail(activityId)">重新加载</button>
  13. </view>
  14. <!-- 活动内容 -->
  15. <scroll-view v-else-if="activity.id" scroll-y class="content">
  16. <!-- 封面图 -->
  17. <image
  18. v-if="activity.coverImage"
  19. class="cover"
  20. :src="activity.coverImage"
  21. mode="widthFix"
  22. />
  23. <image v-else class="cover placeholder-cover" src="/static/default-activity.png" mode="aspectFill" />
  24. <view class="info-section">
  25. <text class="activity-title">{{ activity.title }}</text>
  26. <!-- 活动状态标签 -->
  27. <view class="status-row">
  28. <text class="status-tag" :class="'status-' + (activity.status || 'upcoming')">{{ statusText(activity.status) }}</text>
  29. </view>
  30. <!-- 活动元信息 -->
  31. <view class="meta-list">
  32. <view class="meta-item" v-if="activity.startTime">
  33. <text class="meta-icon">🕐</text>
  34. <text class="meta-text">{{ formatDate(activity.startTime) }}{{ activity.endTime ? ' ~ ' + formatDate(activity.endTime) : '' }}</text>
  35. </view>
  36. <view class="meta-item" v-if="activity.endTime && activity.requireRegistration === 1">
  37. <text class="meta-icon">⏰</text>
  38. <text class="meta-text">报名截止: {{ formatDate(activity.endTime) }}</text>
  39. </view>
  40. <view class="meta-item" v-if="activity.location">
  41. <text class="meta-icon">📍</text>
  42. <text class="meta-text">{{ activity.location }}</text>
  43. </view>
  44. <view class="meta-item" v-if="activity.maxParticipants">
  45. <text class="meta-icon">👥</text>
  46. <text class="meta-text">{{ activity.currentParticipants || 0 }} / {{ activity.maxParticipants }} 人</text>
  47. </view>
  48. <view class="meta-item">
  49. <text class="meta-icon">💰</text>
  50. <view class="meta-text" v-if="activity.memberPrice && activity.memberPrice > 0 && activity.memberPrice < activity.price">
  51. <text>会员价 ¥{{ activity.memberPrice }} 普通价 ¥{{ activity.price }}</text>
  52. </view>
  53. <text class="meta-text" v-else>{{ activity.priceLabel || (activity.price > 0 ? '¥' + activity.price : '免费') }}</text>
  54. </view>
  55. </view>
  56. <!-- 活动简介 -->
  57. <view class="desc-section" v-if="activity.description">
  58. <text class="section-title">活动介绍</text>
  59. <mp-html :content="activity.description" />
  60. </view>
  61. <!-- 付费不退费说明 -->
  62. <view class="refund-notice" v-if="hasPrice">
  63. <text class="refund-notice-icon">⚠️</text>
  64. <text class="refund-notice-text">本活动为付费活动,报名成功后不支持退费</text>
  65. </view>
  66. </view>
  67. <!-- 底部操作栏 -->
  68. <view class="bottom-bar">
  69. <view class="price-info">
  70. <text class="bottom-type">活动</text>
  71. <text class="bottom-vendor" v-if="activity.vendorName">{{ activity.vendorName }}</text>
  72. </view>
  73. <view class="action-btns">
  74. <view class="poster-btn" @click="generatePoster">
  75. <text class="poster-btn-icon">🖼</text>
  76. <text class="poster-btn-text">海报</text>
  77. </view>
  78. <!-- 未报名 → 显示报名按钮 -->
  79. <button
  80. v-if="!registrationStatus && activity.requireRegistration !== 0"
  81. class="btn-register"
  82. :class="{ 'btn-register-loading': registrationLoading || paying }"
  83. :disabled="registrationLoading || paying"
  84. @click="onRegister"
  85. >
  86. <text v-if="registrationLoading">报名中...</text>
  87. <text v-else-if="paying">支付中...</text>
  88. <text v-else-if="hasPrice">¥{{ activity.price }} 立即报名</text>
  89. <text v-else>立即报名</text>
  90. </button>
  91. <!-- 已报名(pending 待审核) -->
  92. <button
  93. v-if="registrationStatus === 'pending'"
  94. class="btn-register-done"
  95. disabled
  96. >
  97. <text>审核中</text>
  98. </button>
  99. <!-- 已报名(approved)→ 显示"已报名" + "签到" -->
  100. <template v-if="registrationStatus === 'approved'">
  101. <button
  102. class="btn-registered"
  103. :disabled="registrationLoading"
  104. @click="onCancelRegistration"
  105. >
  106. <text>已报名</text>
  107. </button>
  108. <button
  109. class="btn-checkin"
  110. :class="{ 'btn-checkin-done': checkinDone, 'btn-checkin-loading': checkinLoading }"
  111. :disabled="checkinLoading || checkinDone"
  112. @click="onCheckin"
  113. >
  114. <text v-if="checkinLoading">签到中...</text>
  115. <text v-else-if="checkinDone && activity.requireCheckinReview === 1">已签到待审核</text>
  116. <text v-else-if="checkinDone">已签到 ✓</text>
  117. <text v-else>签到</text>
  118. </button>
  119. <text v-if="activity.requireCheckinReview === 1 && !checkinDone" class="checkin-review-hint">签到需要管理员审核</text>
  120. </template>
  121. <!-- 已签到(无报名流程的活动) -->
  122. <button
  123. v-if="registrationStatus === 'approved' && checkinDone"
  124. class="btn-checkin btn-checkin-done"
  125. disabled
  126. >
  127. <text>已签到 ✓</text>
  128. </button>
  129. </view>
  130. </view>
  131. </scroll-view>
  132. <!-- 空状态 -->
  133. <view v-else class="empty-wrap">
  134. <text class="empty-text">活动不存在或已下架</text>
  135. </view>
  136. <ContentSharePoster
  137. :show="showPoster"
  138. :title="activity.title"
  139. :coverImage="activity.coverImage"
  140. :qrCodeBase64="posterQrCode"
  141. typeLabel="活动推荐"
  142. @close="showPoster = false"
  143. />
  144. </view>
  145. </template>
  146. <script>
  147. import { getActivityDetail, activityCheckin, registerActivity, getMyActivityRegistrations, cancelActivityRegistration, getShareQrCode } from '@/utils/api.js'
  148. import ContentSharePoster from '@/components/ContentSharePoster.vue'
  149. import MpHtml from '@/components/mp-html/mp-html.vue'
  150. var WEEKDAYS = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
  151. export default {
  152. components: { ContentSharePoster, MpHtml },
  153. data() {
  154. return {
  155. activityId: null,
  156. activity: {},
  157. loading: false,
  158. error: false,
  159. errorMsg: '',
  160. checkinLoading: false,
  161. checkinDone: false,
  162. checkinPoints: 0,
  163. showPoster: false,
  164. posterQrCode: '',
  165. // 报名相关
  166. registrationStatus: '', // '' | 'pending' | 'approved'
  167. registrationLoading: false,
  168. registrationId: null,
  169. paying: false
  170. }
  171. },
  172. computed: {
  173. hasPrice: function() {
  174. return this.activity && this.activity.price > 0
  175. }
  176. },
  177. onLoad: function(options) {
  178. if (options && options.id) {
  179. this.activityId = options.id
  180. this.loadDetail(options.id)
  181. } else {
  182. this.error = true
  183. this.errorMsg = '缺少活动ID'
  184. }
  185. // 检查是否已经签到(从路由参数获取)
  186. if (options && options.checkinDone === '1') {
  187. this.checkinDone = true
  188. }
  189. },
  190. methods: {
  191. async generatePoster() {
  192. if (!this.activity.id) return
  193. uni.showLoading({ title: '生成海报中...' })
  194. try {
  195. var page = 'pages/discover/activity-detail/activity-detail'
  196. var scene = 'id=' + this.activity.id
  197. var res = await getShareQrCode(page, scene)
  198. if (res && res.data) {
  199. this.posterQrCode = res.data.qrCodeBase64 || ''
  200. this.showPoster = true
  201. }
  202. } catch (e) {
  203. uni.showToast({ title: '生成失败', icon: 'none' })
  204. } finally {
  205. uni.hideLoading()
  206. }
  207. },
  208. // ===== 工具方法 =====
  209. formatDate: function(dateStr) {
  210. if (!dateStr) return ''
  211. var d = new Date(dateStr.replace(/-/g, '/'))
  212. if (isNaN(d.getTime())) return dateStr
  213. var year = d.getFullYear()
  214. var month = d.getMonth() + 1
  215. var day = d.getDate()
  216. var hour = d.getHours()
  217. var minute = d.getMinutes()
  218. var ampm = hour < 12 ? '上午' : '下午'
  219. var h12 = hour % 12
  220. if (h12 === 0) h12 = 12
  221. var minStr = minute < 10 ? '0' + minute : minute
  222. return year + '年' + month + '月' + day + '日 ' + ampm + h12 + ':' + minStr
  223. },
  224. // ===== 数据加载 =====
  225. loadDetail: function(id) {
  226. var self = this
  227. self.loading = true
  228. self.error = false
  229. getActivityDetail(id).then(function(res) {
  230. self.loading = false
  231. if (res && res.code === 200 && res.data) {
  232. self.activity = res.data
  233. // 加载详情后检查报名状态
  234. self.loadRegistrationStatus(id)
  235. } else {
  236. self.error = true
  237. self.errorMsg = (res && res.message) || '加载失败'
  238. }
  239. }).catch(function(err) {
  240. self.loading = false
  241. self.error = true
  242. self.errorMsg = '网络异常,请稍后重试'
  243. })
  244. },
  245. statusText: function(status) {
  246. var map = { draft: '草稿', published: '进行中', ended: '已结束' }
  247. return map[status] || '未知'
  248. },
  249. // ===== 报名相关 =====
  250. loadRegistrationStatus: function(activityId) {
  251. var self = this
  252. var childId = uni.getStorageSync('currentChildId')
  253. if (!childId) return
  254. getMyActivityRegistrations({ id: activityId, childId: childId, page: 1, size: 10 }).then(function(res) {
  255. var records, i, reg
  256. if (res && res.code === 200 && res.data) {
  257. records = res.data.records || []
  258. for (i = 0; i < records.length; i++) {
  259. reg = records[i]
  260. if (String(reg.activityId) === String(activityId)) {
  261. self.registrationStatus = reg.status || 'pending'
  262. self.registrationId = reg.id
  263. if (reg.checkinTime) {
  264. self.checkinDone = true
  265. }
  266. return
  267. }
  268. }
  269. }
  270. }).catch(function(err) {
  271. // 静默失败,不阻塞页面
  272. })
  273. },
  274. onRegister: function() {
  275. var self = this
  276. if (self.registrationLoading || self.paying) return
  277. var childId = uni.getStorageSync('currentChildId')
  278. if (!childId) {
  279. uni.showToast({ title: '请选择孩子身份', icon: 'none' })
  280. return
  281. }
  282. // 付费活动 → 先确认支付
  283. if (self.hasPrice) {
  284. uni.showModal({
  285. title: '确认报名',
  286. content: '该活动需支付 ¥' + self.activity.price + ',报名成功后不支持退费。是否继续?',
  287. confirmText: '确认支付',
  288. cancelText: '再想想',
  289. success: function(confirmRes) {
  290. if (confirmRes.confirm) {
  291. self.doRegister(childId)
  292. }
  293. }
  294. })
  295. } else {
  296. // 免费活动 → 直接报名
  297. uni.showModal({
  298. title: '确认报名',
  299. content: '确认报名该活动?',
  300. confirmText: '立即报名',
  301. cancelText: '再想想',
  302. success: function(confirmRes) {
  303. if (confirmRes.confirm) {
  304. self.doRegister(childId)
  305. }
  306. }
  307. })
  308. }
  309. },
  310. doRegister: function(childId) {
  311. var self = this
  312. self.registrationLoading = true
  313. // 付费活动模拟支付等待
  314. if (self.hasPrice) {
  315. self.paying = true
  316. }
  317. registerActivity({ id: self.activity.id, childId: childId }).then(function(res) {
  318. var msg
  319. self.registrationLoading = false
  320. self.paying = false
  321. if (res && res.code === 200) {
  322. self.registrationStatus = 'pending'
  323. self.registrationId = res.data && res.data.id
  324. uni.showToast({ title: '报名成功', icon: 'success' })
  325. // 重新加载详情获取最新人数
  326. self.loadDetail(self.activityId)
  327. } else {
  328. msg = (res && res.message) || '报名失败'
  329. uni.showToast({ title: msg, icon: 'none' })
  330. }
  331. }).catch(function(err) {
  332. self.registrationLoading = false
  333. self.paying = false
  334. uni.showToast({ title: '网络异常', icon: 'none' })
  335. })
  336. },
  337. onCancelRegistration: function() {
  338. var self = this
  339. if (self.registrationLoading) return
  340. uni.showModal({
  341. title: '取消报名',
  342. content: '确定取消报名?',
  343. confirmText: '确认取消',
  344. confirmColor: '#EF4444',
  345. success: function(confirmRes) {
  346. if (confirmRes.confirm) {
  347. self.doCancelRegistration()
  348. }
  349. }
  350. })
  351. },
  352. doCancelRegistration: function() {
  353. var self = this
  354. self.registrationLoading = true
  355. cancelActivityRegistration({ id: self.activity.id, childId: uni.getStorageSync('currentChildId') }).then(function(res) {
  356. var msg
  357. self.registrationLoading = false
  358. if (res && res.code === 200) {
  359. self.registrationStatus = ''
  360. self.registrationId = null
  361. uni.showToast({ title: '已取消报名', icon: 'success' })
  362. // 重新加载详情
  363. self.loadDetail(self.activityId)
  364. } else {
  365. msg = (res && res.message) || '取消失败'
  366. uni.showToast({ title: msg, icon: 'none' })
  367. }
  368. }).catch(function(err) {
  369. self.registrationLoading = false
  370. uni.showToast({ title: '网络异常', icon: 'none' })
  371. })
  372. },
  373. // ===== 签到相关 =====
  374. onCheckin: function() {
  375. var self = this
  376. if (self.checkinLoading || self.checkinDone) return
  377. // 检查活动是否已开始(只有进行中状态才能签到)
  378. if (self.activity.status !== 'published') {
  379. uni.showToast({ title: '活动尚未开始,无法签到', icon: 'none' })
  380. return
  381. }
  382. var childId = uni.getStorageSync('currentChildId')
  383. if (!childId) {
  384. uni.showToast({ title: '请选择孩子身份', icon: 'none' })
  385. return
  386. }
  387. self.checkinLoading = true
  388. activityCheckin({ id: self.activity.id, childId: childId }).then(function(res) {
  389. var msg
  390. self.checkinLoading = false
  391. if (res && res.code === 200 && res.data) {
  392. if (res.data.alreadyCompleted) {
  393. self.checkinDone = true
  394. uni.showToast({ title: '已签到', icon: 'success' })
  395. } else if (res.data.pointsEarned && res.data.pointsEarned > 0) {
  396. self.checkinDone = true
  397. self.checkinPoints = res.data.pointsEarned
  398. uni.showToast({ title: '签到成功 +' + res.data.pointsEarned + '积分', icon: 'success' })
  399. } else {
  400. self.checkinDone = true
  401. uni.showToast({ title: '签到成功', icon: 'success' })
  402. }
  403. } else {
  404. msg = (res && res.message) || '签到失败'
  405. uni.showToast({ title: msg, icon: 'none' })
  406. }
  407. }).catch(function(err) {
  408. self.checkinLoading = false
  409. uni.showToast({ title: '网络异常', icon: 'none' })
  410. })
  411. }
  412. }
  413. }
  414. </script>
  415. <style scoped>
  416. .container {
  417. min-height: 100vh;
  418. background: #FFF7ED;
  419. }
  420. /* 加载 / 错误 / 空状态 */
  421. .loading-wrap,
  422. .error-wrap,
  423. .empty-wrap {
  424. display: flex;
  425. flex-direction: column;
  426. align-items: center;
  427. justify-content: center;
  428. padding: 120rpx 40rpx;
  429. }
  430. .loading-spinner {
  431. width: 60rpx;
  432. height: 60rpx;
  433. border: 4rpx solid #FDE68A;
  434. border-top-color: #F97316;
  435. border-radius: 50%;
  436. animation: spin 0.8s linear infinite;
  437. margin-bottom: 20rpx;
  438. }
  439. @keyframes spin {
  440. to { transform: rotate(360deg); }
  441. }
  442. .loading-text,
  443. .error-text,
  444. .empty-text {
  445. font-size: 28rpx;
  446. color: #999;
  447. margin-bottom: 20rpx;
  448. }
  449. .error-icon {
  450. font-size: 60rpx;
  451. margin-bottom: 16rpx;
  452. }
  453. .retry-btn {
  454. background: #F97316;
  455. color: #fff;
  456. border: none;
  457. border-radius: 40rpx;
  458. padding: 12rpx 40rpx;
  459. font-size: 26rpx;
  460. line-height: 1.5;
  461. }
  462. /* 内容区 */
  463. .content {
  464. height: 100vh;
  465. padding-bottom: 120rpx;
  466. }
  467. .cover {
  468. width: 100%;
  469. display: block;
  470. }
  471. .placeholder-cover {
  472. height: 400rpx;
  473. background: #f0f0f0;
  474. }
  475. /* 信息区 */
  476. .info-section {
  477. padding: 30rpx;
  478. }
  479. .activity-title {
  480. font-size: 36rpx;
  481. font-weight: bold;
  482. color: #1f2937;
  483. line-height: 1.4;
  484. }
  485. .status-row {
  486. margin-top: 16rpx;
  487. }
  488. .status-tag {
  489. display: inline-block;
  490. font-size: 22rpx;
  491. padding: 4rpx 16rpx;
  492. border-radius: 8rpx;
  493. }
  494. .status-draft { background: #F5F5F5; color: #999; }
  495. .status-published { background: #F0FDF4; color: #22C55E; }
  496. .status-ended { background: #F5F5F5; color: #999; }
  497. .status-upcoming { background: #FFF7ED; color: #F97316; }
  498. /* 元信息列表 */
  499. .meta-list {
  500. margin-top: 24rpx;
  501. background: #fff;
  502. border-radius: 16rpx;
  503. padding: 24rpx;
  504. }
  505. .meta-item {
  506. display: flex;
  507. flex-direction: row;
  508. align-items: center;
  509. margin-bottom: 16rpx;
  510. }
  511. .meta-item:last-child {
  512. margin-bottom: 0;
  513. }
  514. .meta-icon {
  515. font-size: 28rpx;
  516. margin-right: 12rpx;
  517. width: 32rpx;
  518. text-align: center;
  519. }
  520. .meta-text {
  521. font-size: 26rpx;
  522. color: #4b5563;
  523. flex: 1;
  524. line-height: 1.4;
  525. }
  526. /* 活动介绍 */
  527. .desc-section {
  528. margin-top: 30rpx;
  529. background: #fff;
  530. border-radius: 16rpx;
  531. padding: 24rpx;
  532. }
  533. .section-title {
  534. font-size: 28rpx;
  535. font-weight: 600;
  536. color: #1f2937;
  537. display: block;
  538. margin-bottom: 12rpx;
  539. }
  540. .desc-text {
  541. font-size: 26rpx;
  542. color: #4b5563;
  543. line-height: 1.6;
  544. }
  545. /* 付费不退费说明 */
  546. .refund-notice {
  547. margin-top: 20rpx;
  548. background: #FEF2F2;
  549. border: 2rpx solid #FECACA;
  550. border-radius: 12rpx;
  551. padding: 16rpx 20rpx;
  552. display: flex;
  553. flex-direction: row;
  554. align-items: center;
  555. }
  556. .refund-notice-icon {
  557. font-size: 24rpx;
  558. margin-right: 10rpx;
  559. flex-shrink: 0;
  560. }
  561. .refund-notice-text {
  562. font-size: 24rpx;
  563. color: #DC2626;
  564. line-height: 1.4;
  565. }
  566. /* 底部操作栏 */
  567. .bottom-bar {
  568. position: fixed;
  569. left: 0;
  570. right: 0;
  571. bottom: 0;
  572. background: #fff;
  573. padding: 20rpx 30rpx;
  574. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  575. display: flex;
  576. flex-direction: row;
  577. align-items: center;
  578. justify-content: space-between;
  579. box-shadow: 0 -2rpx 12rpx rgba(0,0,0,0.06);
  580. }
  581. .price-info {
  582. display: flex;
  583. flex-direction: column;
  584. }
  585. .bottom-type {
  586. font-size: 22rpx;
  587. color: #999;
  588. }
  589. .bottom-vendor {
  590. font-size: 22rpx;
  591. color: #999;
  592. margin-top: 4rpx;
  593. }
  594. .action-btns {
  595. display: flex;
  596. flex-direction: row;
  597. gap: 16rpx;
  598. align-items: center;
  599. }
  600. .poster-btn {
  601. display: flex;
  602. flex-direction: column;
  603. align-items: center;
  604. justify-content: center;
  605. padding: 8rpx 16rpx;
  606. }
  607. .poster-btn-icon { font-size: 36rpx; }
  608. .poster-btn-text { font-size: 20rpx; color: #64748B; }
  609. /* 报名按钮 */
  610. .btn-register {
  611. background: linear-gradient(135deg, #F97316, #FB923C);
  612. color: #fff;
  613. border: none;
  614. border-radius: 40rpx;
  615. padding: 16rpx 48rpx;
  616. font-size: 28rpx;
  617. font-weight: 600;
  618. line-height: 1.5;
  619. min-width: 160rpx;
  620. text-align: center;
  621. }
  622. .btn-register:active {
  623. opacity: 0.85;
  624. }
  625. .btn-register-loading {
  626. opacity: 0.7;
  627. }
  628. /* 已报名(待审核) */
  629. .btn-register-done {
  630. background: #9CA3AF;
  631. color: #fff;
  632. border: none;
  633. border-radius: 40rpx;
  634. padding: 16rpx 48rpx;
  635. font-size: 28rpx;
  636. font-weight: 600;
  637. line-height: 1.5;
  638. min-width: 160rpx;
  639. text-align: center;
  640. }
  641. /* 已报名(可取消) */
  642. .btn-registered {
  643. background: #F3F4F6;
  644. color: #4B5563;
  645. border: 2rpx solid #D1D5DB;
  646. border-radius: 40rpx;
  647. padding: 14rpx 36rpx;
  648. font-size: 26rpx;
  649. font-weight: 500;
  650. line-height: 1.5;
  651. min-width: 120rpx;
  652. text-align: center;
  653. }
  654. .btn-registered:active {
  655. opacity: 0.7;
  656. }
  657. /* 签到按钮 */
  658. .btn-checkin {
  659. background: linear-gradient(135deg, #F97316, #FB923C);
  660. color: #fff;
  661. border: none;
  662. border-radius: 40rpx;
  663. padding: 16rpx 48rpx;
  664. font-size: 28rpx;
  665. font-weight: 600;
  666. line-height: 1.5;
  667. min-width: 160rpx;
  668. text-align: center;
  669. }
  670. .btn-checkin:active {
  671. opacity: 0.85;
  672. }
  673. .btn-checkin-done {
  674. background: #22C55E;
  675. }
  676. .btn-checkin-loading {
  677. opacity: 0.7;
  678. }
  679. </style>