upgrade.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  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折', lifetime: '全场最低价' },
  156. { name: '家庭管理', free: '基础功能', family: '全部功能', premium: '全部功能+优先响应', lifetime: '全部功能+专属管家' },
  157. { name: '管家服务', free: '—', family: '—', premium: '每周一次', lifetime: '专属管家7×24h' },
  158. { name: '推荐佣金', free: '不可参与', family: '最高15%', premium: '最高20%', lifetime: '最高25%+团队分红' },
  159. { name: '专属活动', free: '部分参与', family: '全部参与', premium: '优先参与', lifetime: 'VIP专属+定制活动' },
  160. { name: '成长报告', free: '月度', family: '每周+深度', premium: '每日+深度+专家解读', lifetime: '实时+AI专家深度解读' },
  161. { name: '任务配额', free: '每日5个', family: '不限量', premium: '不限量+优先审核', lifetime: '不限量+专属通道' }
  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-lifetime {
  351. background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
  352. color: #fff;
  353. }
  354. .badge-icon {
  355. font-size: 20rpx;
  356. margin-right: 8rpx;
  357. }
  358. .badge-text {
  359. font-weight: 600;
  360. }
  361. .status-body {
  362. margin-top: 24rpx;
  363. }
  364. .expiry-row {
  365. display: flex;
  366. justify-content: space-between;
  367. align-items: center;
  368. }
  369. .expiry-label {
  370. font-size: 26rpx;
  371. color: rgba(255,255,255,0.8);
  372. }
  373. .expiry-value {
  374. font-size: 28rpx;
  375. color: #fff;
  376. font-weight: 500;
  377. }
  378. .days-remaining {
  379. display: flex;
  380. align-items: baseline;
  381. justify-content: center;
  382. margin-top: 20rpx;
  383. }
  384. .days-num {
  385. font-size: 56rpx;
  386. font-weight: bold;
  387. color: #FEF3C7;
  388. }
  389. .days-unit {
  390. font-size: 26rpx;
  391. color: rgba(255,255,255,0.7);
  392. margin-left: 8rpx;
  393. }
  394. .expired-msg {
  395. text-align: center;
  396. margin-top: 16rpx;
  397. }
  398. .expired-text {
  399. font-size: 26rpx;
  400. color: #FEF3C7;
  401. }
  402. .free-hint {
  403. font-size: 26rpx;
  404. color: rgba(255,255,255,0.85);
  405. text-align: center;
  406. display: block;
  407. }
  408. .lifetime-hint {
  409. font-size: 26rpx;
  410. color: #FEF3C7;
  411. text-align: center;
  412. display: block;
  413. font-weight: 500;
  414. }
  415. /* ===== 升级/续费卡片 ===== */
  416. .upgrade-card {
  417. background: #FFFFFF;
  418. border-radius: 20rpx;
  419. padding: 40rpx;
  420. margin-bottom: 30rpx;
  421. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  422. }
  423. .upgrade-header {
  424. text-align: center;
  425. margin-bottom: 20rpx;
  426. }
  427. .upgrade-title {
  428. font-size: 36rpx;
  429. font-weight: bold;
  430. color: #1E293B;
  431. display: block;
  432. }
  433. .upgrade-subtitle {
  434. font-size: 24rpx;
  435. color: #94A3B8;
  436. margin-top: 6rpx;
  437. display: block;
  438. }
  439. .upgrade-price {
  440. text-align: center;
  441. margin: 24rpx 0;
  442. }
  443. .price-symbol {
  444. font-size: 28rpx;
  445. color: #F97316;
  446. vertical-align: top;
  447. }
  448. .price-amount {
  449. font-size: 64rpx;
  450. font-weight: bold;
  451. color: #F97316;
  452. line-height: 1;
  453. }
  454. .price-unit {
  455. font-size: 26rpx;
  456. color: #94A3B8;
  457. margin-left: 6rpx;
  458. }
  459. .feature-list {
  460. margin: 24rpx 0;
  461. }
  462. .feature-item {
  463. display: flex;
  464. align-items: center;
  465. padding: 12rpx 0;
  466. }
  467. .feature-check {
  468. width: 40rpx;
  469. height: 40rpx;
  470. line-height: 40rpx;
  471. text-align: center;
  472. background: #F97316;
  473. color: #fff;
  474. border-radius: 50%;
  475. font-size: 22rpx;
  476. margin-right: 16rpx;
  477. flex-shrink: 0;
  478. }
  479. .feature-text {
  480. font-size: 28rpx;
  481. color: #1E293B;
  482. }
  483. .btn-upgrade {
  484. width: 100%;
  485. height: 88rpx;
  486. line-height: 88rpx;
  487. background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  488. color: #fff;
  489. font-size: 32rpx;
  490. font-weight: 600;
  491. border-radius: 44rpx;
  492. margin-top: 20rpx;
  493. border: none;
  494. }
  495. .btn-upgrade::after {
  496. border: none;
  497. }
  498. .btn-upgrade:active {
  499. opacity: 0.9;
  500. }
  501. .btn-renew {
  502. background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  503. }
  504. /* ===== 权益对比 ===== */
  505. .compare-section {
  506. background: #FFFFFF;
  507. border-radius: 20rpx;
  508. padding: 30rpx;
  509. margin-bottom: 30rpx;
  510. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  511. }
  512. .section-title {
  513. font-size: 32rpx;
  514. font-weight: bold;
  515. color: #1E293B;
  516. display: block;
  517. margin-bottom: 24rpx;
  518. }
  519. .compare-table {
  520. border-radius: 16rpx;
  521. overflow: hidden;
  522. border: 1rpx solid #FED7AA;
  523. }
  524. .compare-row {
  525. display: flex;
  526. border-bottom: 1rpx solid #FED7AA;
  527. }
  528. .compare-row:last-child {
  529. border-bottom: none;
  530. }
  531. .header-row {
  532. background: #FFF7ED;
  533. }
  534. .compare-cell {
  535. flex: 1;
  536. padding: 20rpx 16rpx;
  537. font-size: 26rpx;
  538. text-align: center;
  539. display: flex;
  540. align-items: center;
  541. justify-content: center;
  542. }
  543. .cell-feature {
  544. flex: 1.5;
  545. color: #1E293B;
  546. font-weight: 500;
  547. justify-content: flex-start;
  548. }
  549. .cell-free {
  550. color: #94A3B8;
  551. }
  552. .cell-family.active {
  553. color: #F97316;
  554. font-weight: 600;
  555. }
  556. .cell-premium.active {
  557. color: #8B5CF6;
  558. font-weight: 600;
  559. }
  560. .cell-lifetime {
  561. background: #F5F5F5;
  562. color: #999;
  563. }
  564. .cell-lifetime.disabled {
  565. color: #999;
  566. }
  567. .header-row .cell-lifetime {
  568. background: #F5F5F5;
  569. color: #999;
  570. font-weight: 600;
  571. }
  572. .header-row .compare-cell {
  573. font-size: 24rpx;
  574. font-weight: 600;
  575. color: #64748B;
  576. }
  577. .header-row .cell-family.active {
  578. color: #F97316;
  579. }
  580. .header-row .cell-premium.active {
  581. color: #8B5CF6;
  582. }
  583. /* ===== 等级切换 Tabs ===== */
  584. .level-tabs {
  585. display: flex;
  586. margin-bottom: 30rpx;
  587. border-radius: 16rpx;
  588. overflow: hidden;
  589. border: 2rpx solid #FED7AA;
  590. }
  591. .level-tab {
  592. flex: 1;
  593. padding: 24rpx;
  594. text-align: center;
  595. background: #FFF7ED;
  596. cursor: pointer;
  597. }
  598. .level-tab-active {
  599. background: #fff;
  600. border-bottom: 4rpx solid #F97316;
  601. }
  602. .level-tab-name {
  603. font-size: 28rpx;
  604. font-weight: 600;
  605. color: #1E293B;
  606. display: block;
  607. }
  608. .level-tab-price {
  609. font-size: 22rpx;
  610. color: #F97316;
  611. margin-top: 6rpx;
  612. display: block;
  613. }
  614. .level-tab-active .level-tab-name {
  615. color: #F97316;
  616. }
  617. /* ===== 开通赠券 ===== */
  618. .join-rules-section {
  619. background: #FFFFFF;
  620. border-radius: 20rpx;
  621. padding: 30rpx;
  622. margin-bottom: 30rpx;
  623. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  624. }
  625. .join-rule-item {
  626. display: flex;
  627. align-items: center;
  628. padding: 16rpx 0;
  629. border-bottom: 1rpx solid #FED7AA;
  630. }
  631. .join-rule-item:last-child {
  632. border-bottom: none;
  633. }
  634. .join-rule-text {
  635. flex: 1;
  636. font-size: 26rpx;
  637. color: #1E293B;
  638. }
  639. .join-rule-desc {
  640. font-size: 24rpx;
  641. color: #F97316;
  642. font-weight: 600;
  643. }
  644. /* ===== 升级记录 ===== */
  645. .records-section {
  646. background: #FFFFFF;
  647. border-radius: 20rpx;
  648. padding: 30rpx;
  649. margin-bottom: 30rpx;
  650. box-shadow: 0 4rpx 24rpx rgba(249, 115, 22, 0.08);
  651. }
  652. .record-item {
  653. display: flex;
  654. justify-content: space-between;
  655. align-items: center;
  656. padding: 20rpx 0;
  657. border-bottom: 1rpx solid #FED7AA;
  658. }
  659. .record-item:last-child {
  660. border-bottom: none;
  661. }
  662. .record-left {
  663. flex: 1;
  664. }
  665. .record-level {
  666. font-size: 28rpx;
  667. color: #1E293B;
  668. display: block;
  669. }
  670. .record-time {
  671. font-size: 22rpx;
  672. color: #94A3B8;
  673. margin-top: 4rpx;
  674. display: block;
  675. }
  676. .record-amount {
  677. font-size: 30rpx;
  678. font-weight: bold;
  679. color: #F97316;
  680. }
  681. /* ===== Coupon Row ===== */
  682. .coupon-row {
  683. display: flex;
  684. align-items: center;
  685. padding: 24rpx 0;
  686. border-top: 1rpx solid #f5f5f5;
  687. margin-top: 16rpx;
  688. }
  689. .coupon-row:active {
  690. opacity: 0.7;
  691. }
  692. .coupon-row-label {
  693. font-size: 26rpx;
  694. color: #666;
  695. margin-right: 16rpx;
  696. }
  697. .coupon-row-discount {
  698. flex: 1;
  699. font-size: 26rpx;
  700. color: #F97316;
  701. font-weight: 600;
  702. text-align: right;
  703. }
  704. .coupon-row-placeholder {
  705. flex: 1;
  706. font-size: 26rpx;
  707. color: #ccc;
  708. text-align: right;
  709. }
  710. .coupon-row-arrow {
  711. font-size: 32rpx;
  712. color: #ccc;
  713. margin-left: 8rpx;
  714. }
  715. /* ===== Coupon Picker Modal ===== */
  716. .modal-mask {
  717. position: fixed;
  718. top: 0;
  719. left: 0;
  720. right: 0;
  721. bottom: 0;
  722. background: rgba(0,0,0,0.5);
  723. z-index: 999;
  724. display: flex;
  725. align-items: flex-end;
  726. }
  727. .coupon-picker {
  728. background: #fff;
  729. border-radius: 24rpx 24rpx 0 0;
  730. width: 100%;
  731. max-height: 70vh;
  732. display: flex;
  733. flex-direction: column;
  734. }
  735. .picker-header {
  736. display: flex;
  737. justify-content: space-between;
  738. align-items: center;
  739. padding: 30rpx;
  740. border-bottom: 1rpx solid #eee;
  741. }
  742. .picker-title {
  743. font-size: 30rpx;
  744. font-weight: 600;
  745. color: #333;
  746. }
  747. .picker-close {
  748. font-size: 26rpx;
  749. color: #999;
  750. }
  751. .picker-list {
  752. max-height: 50vh;
  753. padding: 0 20rpx;
  754. }
  755. .picker-item {
  756. display: flex;
  757. align-items: center;
  758. padding: 24rpx 16rpx;
  759. border-bottom: 1rpx solid #f5f5f5;
  760. }
  761. .picker-item:active {
  762. background: #fafafa;
  763. }
  764. .picker-item-active {
  765. background: #FFF7ED;
  766. }
  767. .picker-item-left {
  768. width: 120rpx;
  769. text-align: center;
  770. flex-shrink: 0;
  771. }
  772. .picker-item-value {
  773. font-size: 32rpx;
  774. font-weight: bold;
  775. color: #F97316;
  776. }
  777. .picker-item-right {
  778. flex: 1;
  779. margin: 0 16rpx;
  780. }
  781. .picker-item-name {
  782. font-size: 26rpx;
  783. color: #333;
  784. display: block;
  785. margin-bottom: 4rpx;
  786. }
  787. .picker-item-condition {
  788. font-size: 22rpx;
  789. color: #999;
  790. }
  791. .picker-item-check {
  792. width: 40rpx;
  793. height: 40rpx;
  794. background: #F97316;
  795. border-radius: 50%;
  796. display: flex;
  797. align-items: center;
  798. justify-content: center;
  799. flex-shrink: 0;
  800. color: #fff;
  801. font-size: 24rpx;
  802. font-weight: bold;
  803. }
  804. .picker-empty {
  805. text-align: center;
  806. padding: 60rpx 0;
  807. font-size: 26rpx;
  808. color: #999;
  809. }
  810. .picker-footer {
  811. padding: 20rpx;
  812. border-top: 1rpx solid #eee;
  813. }
  814. .picker-btn-remove {
  815. background: #f5f5f5;
  816. color: #666;
  817. font-size: 26rpx;
  818. border-radius: 12rpx;
  819. border: none;
  820. }
  821. .picker-btn-remove::after {
  822. border: none;
  823. }
  824. /* ===== 档位选择 ===== */
  825. .period-tabs {
  826. display: flex;
  827. justify-content: space-between;
  828. margin: 24rpx 0;
  829. gap: 16rpx;
  830. }
  831. .period-tab {
  832. flex: 1;
  833. display: flex;
  834. flex-direction: column;
  835. align-items: center;
  836. padding: 20rpx 0;
  837. border: 2rpx solid #FED7AA;
  838. border-radius: 16rpx;
  839. background: #FFFBF5;
  840. }
  841. .period-tab-active {
  842. border-color: #F97316;
  843. background: #FFF7ED;
  844. }
  845. .period-tab-label {
  846. font-size: 26rpx;
  847. color: #64748B;
  848. font-weight: 500;
  849. }
  850. .period-tab-active .period-tab-label {
  851. color: #F97316;
  852. font-weight: 600;
  853. }
  854. .period-tab-price {
  855. font-size: 28rpx;
  856. font-weight: bold;
  857. color: #F97316;
  858. margin-top: 8rpx;
  859. }
  860. /* ===== 划线原价 ===== */
  861. .period-original {
  862. font-size: 20rpx;
  863. color: #94A3B8;
  864. text-decoration: line-through;
  865. margin-top: 2rpx;
  866. }
  867. .price-original-line {
  868. font-size: 26rpx;
  869. color: #94A3B8;
  870. text-decoration: line-through;
  871. margin-right: 12rpx;
  872. }
  873. </style>