upgrade.vue 22 KB

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