upgrade.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. <template>
  2. <view class="upgrade-page-wrapper">
  3. <scroll-view class="page" scroll-y>
  4. <!-- 当前会员状态条 -->
  5. <view class="status-card">
  6. <view class="status-top">
  7. <view class="status-badge" :class="isFree ? 'badge-free' : 'badge-family'">
  8. <text class="badge-icon">{{ isFree ? '○' : '●' }}</text>
  9. <text class="badge-text">{{ currentLevelName }}</text>
  10. </view>
  11. <text class="free-hint" v-if="isFree">开通会员解锁全部特权</text>
  12. <text class="expiry-value" v-else-if="membership && membership.memberLevel !== 'FREE'">
  13. {{ formatDate(membership.endDate) }} 到期
  14. </text>
  15. </view>
  16. <view class="status-body" v-if="membership && membership.memberLevel !== 'FREE'">
  17. <view class="days-remaining" v-if="membership.isActive">
  18. <text class="days-num">{{ membership.daysRemaining || 0 }}</text>
  19. <text class="days-unit">天剩余</text>
  20. </view>
  21. <view class="expired-msg" v-else>
  22. <text class="expired-text">会员已过期,续费恢复权益</text>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- 等级切换 tabs -->
  27. <view class="level-tabs" v-if="buyableLevels.length > 0">
  28. <view class="level-tab" v-for="lv in buyableLevels" :key="lv.levelCode"
  29. :class="selectedLevel === lv.levelCode ? 'level-tab-active' : ''"
  30. @click="selectLevel(lv.levelCode)">
  31. <text class="level-tab-name">{{ lv.levelName }}</text>
  32. </view>
  33. </view>
  34. <!-- 开通/升级/续费卡片(标题统一为所选等级名) -->
  35. <view class="upgrade-card">
  36. <view class="upgrade-header">
  37. <text class="upgrade-title">{{ getSelectedLevelName() }}</text>
  38. </view>
  39. <!-- 档位选择 -->
  40. <view class="period-tabs">
  41. <view
  42. class="period-tab"
  43. v-for="p in visiblePeriods"
  44. :key="p.key"
  45. :class="selectedPeriod === p.key ? 'period-tab-active' : ''"
  46. @click="selectPeriod(p.key)"
  47. >
  48. <text class="period-tab-label">{{ p.label }}</text>
  49. <text class="period-tab-price">¥{{ getPriceForPeriod(p.key) }}</text>
  50. <text class="period-original" v-if="showOriginalPrice(p.key)">¥{{ getOriginalPriceForPeriod(p.key) / 100 }}</text>
  51. </view>
  52. </view>
  53. <button class="btn-upgrade" @click="goNext">下一步</button>
  54. </view>
  55. <!-- 权益对比表 -->
  56. <view class="compare-section">
  57. <text class="section-title">权益对比</text>
  58. <view class="compare-table">
  59. <view class="compare-row header-row">
  60. <text class="compare-cell cell-feature">权益项</text>
  61. <text class="compare-cell cell-free">免费</text>
  62. <text class="compare-cell cell-family" :class="selectedLevel === 'FAMILY' ? 'active' : ''">家庭会员</text>
  63. <text class="compare-cell cell-premium" :class="selectedLevel === 'PREMIUM' ? 'active' : ''">高级会员</text>
  64. </view>
  65. <view class="compare-row" v-for="(item, idx) in compareData" :key="idx">
  66. <text class="compare-cell cell-feature">{{ item.name }}</text>
  67. <text class="compare-cell cell-free">{{ item.free }}</text>
  68. <text class="compare-cell cell-family" :class="selectedLevel === 'FAMILY' ? 'active' : ''">{{ item.family }}</text>
  69. <text class="compare-cell cell-premium" :class="selectedLevel === 'PREMIUM' ? 'active' : ''">{{ item.premium }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 开通赠券规则 -->
  74. <view class="join-rules-section" v-if="joinRules.length > 0">
  75. <text class="section-title">开通赠券</text>
  76. <view class="join-rule-item" v-for="(rule, idx) in joinRules" :key="getJoinRuleKey(rule, idx)">
  77. <text class="join-rule-text">加入{{ getLevelName(rule.grantLevelCode) }}会员,赠送{{ rule.grantQuantity || 1 }}张「{{ rule.name }}」</text>
  78. <text class="join-rule-desc">{{ getCouponDesc(rule) }}</text>
  79. </view>
  80. </view>
  81. <!-- 升级记录 -->
  82. <view class="records-section" v-if="records.length > 0">
  83. <text class="section-title">升级记录</text>
  84. <view class="record-item" v-for="record in records" :key="record.id">
  85. <view class="record-left">
  86. <text class="record-level">{{ record.levelName }}</text>
  87. <text class="record-time">{{ formatDate(record.createdAt) }}</text>
  88. </view>
  89. <text class="record-amount">{{ formatPriceWithSymbol(record.amount) }}</text>
  90. </view>
  91. </view>
  92. </scroll-view>
  93. </view>
  94. </template>
  95. <script>
  96. import { getMyMembership, getMembershipPlans, getUpgradeRecords, getJoinCouponRules } from '../../utils/api.js'
  97. import { parseDate } from '../../utils/format.js'
  98. export default {
  99. data() {
  100. return {
  101. membership: null,
  102. levels: [],
  103. records: [],
  104. isFree: true,
  105. currentLevelName: '免费用户',
  106. compareData: [
  107. { name: '商品折扣', free: '普通价格', family: '会员折扣', premium: '会员折扣', lifetime: '会员折扣' },
  108. { name: '家庭管理', free: '基础功能', family: '全部功能', premium: '全部功能+优先响应', lifetime: '全部功能+专属管家' },
  109. { name: '管家服务', free: '—', family: '—', premium: '每周一次', lifetime: '专属管家7×24h' },
  110. { name: '推荐佣金', free: '不可参与', family: '可参与', premium: '可参与', lifetime: '可参与' },
  111. { name: '专属活动', free: '部分参与', family: '全部参与', premium: '优先参与', lifetime: 'VIP专属+定制活动' },
  112. { name: '成长报告', free: '月度', family: '每周+深度', premium: '每日+深度+专家解读', lifetime: '实时+AI专家深度解读' },
  113. { name: '任务配额', free: '每日5个', family: '不限量', premium: '不限量+优先审核', lifetime: '不限量+专属通道' }
  114. ],
  115. periods: [
  116. { key: 'monthly', label: '月度', unit: '/月' },
  117. { key: 'quarterly', label: '季度', unit: '/季' },
  118. { key: 'yearly', label: '年度', unit: '/年' }
  119. ],
  120. selectedPeriod: 'yearly',
  121. selectedLevel: 'FAMILY',
  122. joinRules: [],
  123. }
  124. },
  125. computed: {
  126. buyableLevels() {
  127. var self = this
  128. return this.levels.filter(function(lv) {
  129. return lv.levelCode !== 'FREE' && lv.levelCode !== 'LIFETIME' && lv.levelCode !== 'PROVIDER'
  130. })
  131. },
  132. visiblePeriods() {
  133. var self = this
  134. return this.periods.filter(function(p) {
  135. if (self.selectedLevel === 'FAMILY') {
  136. return p.key === 'yearly'
  137. }
  138. if (self.selectedLevel === 'PREMIUM') {
  139. return p.key === 'monthly' || p.key === 'yearly'
  140. }
  141. return true
  142. })
  143. }
  144. },
  145. onLoad() {
  146. this.loadData()
  147. this.loadJoinRules()
  148. },
  149. methods: {
  150. loadJoinRules() {
  151. var that = this
  152. getJoinCouponRules().then(function(res) {
  153. if (res.code === 200) {
  154. that.joinRules = res.data || []
  155. }
  156. }).catch(function(e) {
  157. console.error('加载开通赠券规则失败', e)
  158. })
  159. },
  160. getLevelName(code) {
  161. var map = {
  162. FREE: '免费版',
  163. FAMILY: '家庭会员',
  164. PREMIUM: '高级会员'
  165. }
  166. return map[code] || code || ''
  167. },
  168. getSelectedLevelName() {
  169. var name = ''
  170. for (var i = 0; i < this.levels.length; i++) {
  171. if (this.levels[i].levelCode === this.selectedLevel) {
  172. name = this.levels[i].levelName
  173. break
  174. }
  175. }
  176. return name || this.getLevelName(this.selectedLevel)
  177. },
  178. getJoinRuleKey(rule, idx) {
  179. return rule.id + '-' + idx
  180. },
  181. getCouponDesc(item) {
  182. if (!item) return ''
  183. if (item.type === 'DISCOUNT') {
  184. return '折扣券 ' + (item.discountRate / 100).toFixed(1) + '折'
  185. }
  186. return '立减 ' + (item.value / 100).toFixed(2) + '元'
  187. },
  188. async loadData() {
  189. try {
  190. const membershipRes = await getMyMembership()
  191. this.membership = membershipRes.data
  192. if (this.membership && this.membership.memberLevel && this.membership.memberLevel !== 'FREE') {
  193. this.isFree = false
  194. this.currentLevelName = this.membership.levelName || '家庭会员'
  195. this.selectedLevel = this.membership.memberLevel
  196. } else {
  197. this.isFree = true
  198. this.currentLevelName = '免费用户'
  199. this.selectedLevel = 'FAMILY'
  200. }
  201. } catch (e) {
  202. console.error('加载会员信息失败', e)
  203. }
  204. try {
  205. const levelsRes = await getMembershipPlans()
  206. this.levels = levelsRes.data || []
  207. } catch (e) {
  208. console.error('加载会员等级失败', e)
  209. }
  210. try {
  211. const recordsRes = await getUpgradeRecords()
  212. if (recordsRes.data && recordsRes.data.records) {
  213. this.records = recordsRes.data.records
  214. }
  215. } catch (e) {
  216. console.error('加载升级记录失败', e)
  217. }
  218. },
  219. selectLevel: function(code) {
  220. this.selectedLevel = code
  221. this.selectedPeriod = 'yearly'
  222. },
  223. selectPeriod: function(key) {
  224. this.selectedPeriod = key
  225. },
  226. getPriceForPeriod: function(periodKey) {
  227. var plan = null
  228. for (var i = 0; i < this.levels.length; i++) {
  229. if (this.levels[i].levelCode === this.selectedLevel) {
  230. plan = this.levels[i]
  231. break
  232. }
  233. }
  234. if (!plan) return '0'
  235. if (periodKey === 'monthly') return plan.monthly ? (plan.monthly / 100).toFixed(0) : '0'
  236. if (periodKey === 'quarterly') return plan.quarterly ? (plan.quarterly / 100).toFixed(0) : '0'
  237. if (periodKey === 'yearly') return plan.yearly ? (plan.yearly / 100).toFixed(0) : '0'
  238. return '0'
  239. },
  240. goNext: function() {
  241. var levelCode = this.selectedLevel
  242. var period = this.selectedPeriod
  243. uni.navigateTo({ url: '/pages/membership/pay?levelCode=' + levelCode + '&period=' + period })
  244. },
  245. getOriginalPriceForPeriod: function(periodKey) {
  246. var plan = null
  247. for (var i = 0; i < this.levels.length; i++) {
  248. if (this.levels[i].levelCode === this.selectedLevel) {
  249. plan = this.levels[i]
  250. break
  251. }
  252. }
  253. if (!plan) return null
  254. if (periodKey === 'monthly') return plan.originalMonthly || null
  255. if (periodKey === 'quarterly') return plan.originalQuarterly || null
  256. if (periodKey === 'yearly') return plan.originalYearly || null
  257. return null
  258. },
  259. showOriginalPrice: function(periodKey) {
  260. var original = this.getOriginalPriceForPeriod(periodKey)
  261. var current = this.getPriceForPeriod(periodKey)
  262. if (!original || !current) return false
  263. return original > current * 100
  264. },
  265. formatDate(date) {
  266. if (!date) return ''
  267. var d = parseDate(date)
  268. if (!d) return ''
  269. return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0')
  270. }
  271. }
  272. }
  273. </script>
  274. <style scoped>
  275. .page {
  276. min-height: 100vh;
  277. background: #FFF7ED;
  278. padding: 30rpx;
  279. box-sizing: border-box;
  280. }
  281. /* ===== 状态卡片 ===== */
  282. .status-card {
  283. background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  284. border-radius: 20rpx;
  285. padding: 26rpx 30rpx;
  286. margin-bottom: 24rpx;
  287. }
  288. .status-top {
  289. display: flex;
  290. align-items: center;
  291. justify-content: space-between;
  292. }
  293. .status-badge {
  294. display: inline-flex;
  295. align-items: center;
  296. padding: 10rpx 24rpx;
  297. border-radius: 9999rpx;
  298. font-size: 24rpx;
  299. }
  300. .badge-free {
  301. background: rgba(255,255,255,0.2);
  302. color: #fff;
  303. }
  304. .badge-family {
  305. background: rgba(255,255,255,0.3);
  306. color: #fff;
  307. }
  308. .badge-lifetime {
  309. background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
  310. color: #fff;
  311. }
  312. .badge-icon {
  313. font-size: 20rpx;
  314. margin-right: 8rpx;
  315. }
  316. .badge-text {
  317. font-weight: 600;
  318. }
  319. .status-body {
  320. margin-top: 18rpx;
  321. }
  322. .expiry-value {
  323. font-size: 26rpx;
  324. color: #fff;
  325. font-weight: 500;
  326. flex-shrink: 0;
  327. }
  328. .days-remaining {
  329. display: flex;
  330. align-items: baseline;
  331. justify-content: center;
  332. margin-top: 14rpx;
  333. }
  334. .days-num {
  335. font-size: 44rpx;
  336. font-weight: bold;
  337. color: #FEF3C7;
  338. }
  339. .days-unit {
  340. font-size: 24rpx;
  341. color: rgba(255,255,255,0.7);
  342. margin-left: 8rpx;
  343. }
  344. .expired-msg {
  345. text-align: center;
  346. margin-top: 12rpx;
  347. }
  348. .expired-text {
  349. font-size: 24rpx;
  350. color: #FEF3C7;
  351. }
  352. .free-hint {
  353. font-size: 24rpx;
  354. color: rgba(255,255,255,0.85);
  355. flex-shrink: 0;
  356. }
  357. .lifetime-hint {
  358. font-size: 26rpx;
  359. color: #FEF3C7;
  360. text-align: center;
  361. display: block;
  362. font-weight: 500;
  363. }
  364. /* ===== 升级/续费卡片 ===== */
  365. .upgrade-card {
  366. background: #FFFFFF;
  367. border-radius: 20rpx;
  368. padding: 40rpx;
  369. margin-bottom: 30rpx;
  370. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  371. }
  372. .upgrade-header {
  373. text-align: center;
  374. margin-bottom: 20rpx;
  375. }
  376. .upgrade-title {
  377. font-size: 36rpx;
  378. font-weight: bold;
  379. color: #1E293B;
  380. display: block;
  381. }
  382. .btn-upgrade {
  383. width: 100%;
  384. height: 88rpx;
  385. line-height: 88rpx;
  386. background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  387. color: #fff;
  388. font-size: 32rpx;
  389. font-weight: 600;
  390. border-radius: 44rpx;
  391. margin-top: 20rpx;
  392. border: none;
  393. }
  394. .btn-upgrade::after {
  395. border: none;
  396. }
  397. .btn-upgrade:active {
  398. opacity: 0.9;
  399. }
  400. /* ===== 权益对比 ===== */
  401. .compare-section {
  402. background: #FFFFFF;
  403. border-radius: 20rpx;
  404. padding: 30rpx;
  405. margin-bottom: 30rpx;
  406. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  407. }
  408. .section-title {
  409. font-size: 32rpx;
  410. font-weight: bold;
  411. color: #1E293B;
  412. display: block;
  413. margin-bottom: 24rpx;
  414. }
  415. .compare-table {
  416. border-radius: 16rpx;
  417. overflow: hidden;
  418. border: 1rpx solid #FED7AA;
  419. }
  420. .compare-row {
  421. display: flex;
  422. border-bottom: 1rpx solid #FED7AA;
  423. }
  424. .compare-row:last-child {
  425. border-bottom: none;
  426. }
  427. .header-row {
  428. background: #FFF7ED;
  429. }
  430. .compare-cell {
  431. flex: 1;
  432. padding: 20rpx 16rpx;
  433. font-size: 26rpx;
  434. text-align: center;
  435. display: flex;
  436. align-items: center;
  437. justify-content: center;
  438. }
  439. .cell-feature {
  440. flex: 1.5;
  441. color: #1E293B;
  442. font-weight: 500;
  443. justify-content: flex-start;
  444. }
  445. .cell-free {
  446. color: #94A3B8;
  447. }
  448. .cell-family.active {
  449. background: #FFEDD5;
  450. color: #F97316;
  451. font-weight: 600;
  452. }
  453. .cell-premium.active {
  454. background: #EDE9FE;
  455. color: #8B5CF6;
  456. font-weight: 600;
  457. }
  458. .cell-lifetime {
  459. background: #F5F5F5;
  460. color: #999;
  461. }
  462. .cell-lifetime.disabled {
  463. color: #999;
  464. }
  465. .header-row .cell-lifetime {
  466. background: #F5F5F5;
  467. color: #999;
  468. font-weight: 600;
  469. }
  470. .header-row .compare-cell {
  471. font-size: 24rpx;
  472. font-weight: 600;
  473. color: #64748B;
  474. }
  475. .header-row .cell-family.active {
  476. background: #FFEDD5;
  477. color: #F97316;
  478. }
  479. .header-row .cell-premium.active {
  480. background: #EDE9FE;
  481. color: #8B5CF6;
  482. }
  483. /* ===== 等级切换 Tabs ===== */
  484. .level-tabs {
  485. display: flex;
  486. margin-bottom: 30rpx;
  487. border-radius: 16rpx;
  488. overflow: hidden;
  489. border: 2rpx solid #FED7AA;
  490. }
  491. .level-tab {
  492. flex: 1;
  493. padding: 24rpx;
  494. text-align: center;
  495. background: #FFF7ED;
  496. cursor: pointer;
  497. }
  498. .level-tab-active {
  499. background: #fff;
  500. border-bottom: 4rpx solid #F97316;
  501. }
  502. .level-tab-name {
  503. font-size: 28rpx;
  504. font-weight: 600;
  505. color: #1E293B;
  506. display: block;
  507. }
  508. .level-tab-active .level-tab-name {
  509. color: #F97316;
  510. }
  511. /* ===== 开通赠券 ===== */
  512. .join-rules-section {
  513. background: #FFFFFF;
  514. border-radius: 20rpx;
  515. padding: 30rpx;
  516. margin-bottom: 30rpx;
  517. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  518. }
  519. .join-rule-item {
  520. display: flex;
  521. align-items: center;
  522. padding: 16rpx 0;
  523. border-bottom: 1rpx solid #FED7AA;
  524. }
  525. .join-rule-item:last-child {
  526. border-bottom: none;
  527. }
  528. .join-rule-text {
  529. flex: 1;
  530. font-size: 26rpx;
  531. color: #1E293B;
  532. }
  533. .join-rule-desc {
  534. font-size: 24rpx;
  535. color: #F97316;
  536. font-weight: 600;
  537. }
  538. /* ===== 升级记录 ===== */
  539. .records-section {
  540. background: #FFFFFF;
  541. border-radius: 20rpx;
  542. padding: 30rpx;
  543. margin-bottom: 30rpx;
  544. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  545. }
  546. .record-item {
  547. display: flex;
  548. justify-content: space-between;
  549. align-items: center;
  550. padding: 20rpx 0;
  551. border-bottom: 1rpx solid #FED7AA;
  552. }
  553. .record-item:last-child {
  554. border-bottom: none;
  555. }
  556. .record-left {
  557. flex: 1;
  558. }
  559. .record-level {
  560. font-size: 28rpx;
  561. color: #1E293B;
  562. display: block;
  563. }
  564. .record-time {
  565. font-size: 22rpx;
  566. color: #94A3B8;
  567. margin-top: 4rpx;
  568. display: block;
  569. }
  570. .record-amount {
  571. font-size: 30rpx;
  572. font-weight: bold;
  573. color: #F97316;
  574. }
  575. /* ===== Coupon Row ===== */
  576. .coupon-row {
  577. display: flex;
  578. align-items: center;
  579. padding: 24rpx 0;
  580. border-top: 1rpx solid #f5f5f5;
  581. margin-top: 16rpx;
  582. }
  583. .coupon-row:active {
  584. opacity: 0.7;
  585. }
  586. .coupon-row-label {
  587. font-size: 26rpx;
  588. color: #666;
  589. margin-right: 16rpx;
  590. }
  591. .coupon-row-discount {
  592. flex: 1;
  593. font-size: 26rpx;
  594. color: #F97316;
  595. font-weight: 600;
  596. text-align: right;
  597. }
  598. .coupon-row-placeholder {
  599. flex: 1;
  600. font-size: 26rpx;
  601. color: #ccc;
  602. text-align: right;
  603. }
  604. .coupon-row-arrow {
  605. font-size: 32rpx;
  606. color: #ccc;
  607. margin-left: 8rpx;
  608. }
  609. /* ===== Coupon Picker Modal ===== */
  610. .modal-mask {
  611. position: fixed;
  612. top: 0;
  613. left: 0;
  614. right: 0;
  615. bottom: 0;
  616. background: rgba(0,0,0,0.5);
  617. z-index: 999;
  618. display: flex;
  619. align-items: flex-end;
  620. }
  621. .coupon-picker {
  622. background: #fff;
  623. border-radius: 24rpx 24rpx 0 0;
  624. width: 100%;
  625. max-height: 70vh;
  626. display: flex;
  627. flex-direction: column;
  628. }
  629. .picker-header {
  630. display: flex;
  631. justify-content: space-between;
  632. align-items: center;
  633. padding: 30rpx;
  634. border-bottom: 1rpx solid #eee;
  635. }
  636. .picker-title {
  637. font-size: 30rpx;
  638. font-weight: 600;
  639. color: #333;
  640. }
  641. .picker-close {
  642. font-size: 26rpx;
  643. color: #999;
  644. }
  645. .picker-list {
  646. max-height: 50vh;
  647. padding: 0 20rpx;
  648. }
  649. .picker-item {
  650. display: flex;
  651. align-items: center;
  652. padding: 24rpx 16rpx;
  653. border-bottom: 1rpx solid #f5f5f5;
  654. }
  655. .picker-item:active {
  656. background: #fafafa;
  657. }
  658. .picker-item-active {
  659. background: #FFF7ED;
  660. }
  661. .picker-item-left {
  662. width: 120rpx;
  663. text-align: center;
  664. flex-shrink: 0;
  665. }
  666. .picker-item-value {
  667. font-size: 32rpx;
  668. font-weight: bold;
  669. color: #F97316;
  670. }
  671. .picker-item-right {
  672. flex: 1;
  673. margin: 0 16rpx;
  674. }
  675. .picker-item-name {
  676. font-size: 26rpx;
  677. color: #333;
  678. display: block;
  679. margin-bottom: 4rpx;
  680. }
  681. .picker-item-condition {
  682. font-size: 22rpx;
  683. color: #999;
  684. }
  685. .picker-item-check {
  686. width: 40rpx;
  687. height: 40rpx;
  688. background: #F97316;
  689. border-radius: 50%;
  690. display: flex;
  691. align-items: center;
  692. justify-content: center;
  693. flex-shrink: 0;
  694. color: #fff;
  695. font-size: 24rpx;
  696. font-weight: bold;
  697. }
  698. .picker-empty {
  699. text-align: center;
  700. padding: 60rpx 0;
  701. font-size: 26rpx;
  702. color: #999;
  703. }
  704. .picker-footer {
  705. padding: 20rpx;
  706. border-top: 1rpx solid #eee;
  707. }
  708. .picker-btn-remove {
  709. background: #f5f5f5;
  710. color: #666;
  711. font-size: 26rpx;
  712. border-radius: 12rpx;
  713. border: none;
  714. }
  715. .picker-btn-remove::after {
  716. border: none;
  717. }
  718. /* ===== 档位选择 ===== */
  719. .period-tabs {
  720. display: flex;
  721. justify-content: space-between;
  722. margin: 24rpx 0;
  723. gap: 16rpx;
  724. }
  725. .period-tab {
  726. flex: 1;
  727. display: flex;
  728. flex-direction: column;
  729. align-items: center;
  730. padding: 20rpx 0;
  731. border: 2rpx solid #FED7AA;
  732. border-radius: 16rpx;
  733. background: #FFFBF5;
  734. }
  735. .period-tab-active {
  736. border-color: #F97316;
  737. background: #FFF7ED;
  738. }
  739. .period-tab-label {
  740. font-size: 26rpx;
  741. color: #64748B;
  742. font-weight: 500;
  743. }
  744. .period-tab-active .period-tab-label {
  745. color: #F97316;
  746. font-weight: 600;
  747. }
  748. .period-tab-price {
  749. font-size: 28rpx;
  750. font-weight: bold;
  751. color: #F97316;
  752. margin-top: 8rpx;
  753. }
  754. /* ===== 划线原价 ===== */
  755. .period-original {
  756. font-size: 20rpx;
  757. color: #94A3B8;
  758. text-decoration: line-through;
  759. margin-top: 2rpx;
  760. }
  761. </style>