benefits.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <view class="benefits-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar">
  5. <view class="nav-content">
  6. <view class="nav-left" @click="goBack">
  7. <u-icon name="arrow-leftward" color="rgba(255, 255, 255, 1)" size="42"></u-icon>
  8. </view>
  9. <view class="nav-title">我的权益</view>
  10. <view class="nav-right"></view>
  11. </view>
  12. </view>
  13. <!-- 当前会员状态卡片 -->
  14. <view class="membership-card">
  15. <view class="card-content">
  16. <view class="card-left">
  17. <view class="card-title">我的权益</view>
  18. <view class="card-subtitle">常规版 剩余5天到期</view>
  19. </view>
  20. <view class="card-right">
  21. <view class="benefit-item">
  22. <view class="benefit-label">查看权益</view>
  23. <view class="benefit-count">10/50</view>
  24. </view>
  25. <view class="benefit-item">
  26. <view class="benefit-label">沟通权益</view>
  27. <view class="benefit-count">10/50</view>
  28. </view>
  29. <view class="benefit-item">
  30. <view class="benefit-label">普通职位</view>
  31. <view class="benefit-count">10/50</view>
  32. </view>
  33. <view class="benefit-item">
  34. <view class="benefit-label">急聘职位</view>
  35. <view class="benefit-count">10/50</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 购买VIP享受更多权益 -->
  41. <view class="benefits-section">
  42. <!-- 权益对比表格 -->
  43. <view class="benefits-table">
  44. <view class="section-title">购买VIP, 享受更多权益</view>
  45. <!-- 表头 -->
  46. <view class="table-header">
  47. <view class="header-cell benefit-type">权益类型</view>
  48. <view class="header-cell basic">基础权益</view>
  49. <view class="header-cell regular active">
  50. <!-- <view class="plan-tag">生效中</view> -->
  51. <view class="plan-name">常规版</view>
  52. <view class="plan-expire">剩余5天到期</view>
  53. </view>
  54. <view class="header-cell vip">VIP版</view>
  55. <view class="header-cell flagship recommended">
  56. <!-- <view class="plan-tag">推荐</view> -->
  57. <view class="plan-name">旗舰版</view>
  58. </view>
  59. </view>
  60. <!-- 表格内容 -->
  61. <view class="table-row">
  62. <view class="row-cell benefit-type">在线普通职位</view>
  63. <view class="row-cell basic">10个</view>
  64. <view class="row-cell regular">35个</view>
  65. <view class="row-cell vip">45个</view>
  66. <view class="row-cell flagship">不限</view>
  67. </view>
  68. <view class="table-row">
  69. <view class="row-cell benefit-type">在线急聘职位</view>
  70. <view class="row-cell basic">0个</view>
  71. <view class="row-cell regular">5个</view>
  72. <view class="row-cell vip">15个</view>
  73. <view class="row-cell flagship">50个</view>
  74. </view>
  75. <view class="table-row">
  76. <view class="row-cell benefit-type">每日查看总数</view>
  77. <view class="row-cell basic">20个</view>
  78. <view class="row-cell regular">50个</view>
  79. <view class="row-cell vip">不限</view>
  80. <view class="row-cell flagship">不限</view>
  81. </view>
  82. <view class="table-row">
  83. <view class="row-cell benefit-type">每日沟通总数</view>
  84. <view class="row-cell basic">5个</view>
  85. <view class="row-cell regular">20个</view>
  86. <view class="row-cell vip">50个</view>
  87. <view class="row-cell flagship">100个</view>
  88. </view>
  89. <view class="table-row">
  90. <view class="row-cell benefit-type">查看沟通范围</view>
  91. <view class="row-cell basic">仅普通职位</view>
  92. <view class="row-cell regular">仅普通职位</view>
  93. <view class="row-cell vip">不限</view>
  94. <view class="row-cell flagship">不限</view>
  95. </view>
  96. <view class="table-row price-row">
  97. <view class="row-cell benefit-type">价格</view>
  98. <view class="row-cell basic">免费</view>
  99. <view class="row-cell regular">¥599/年</view>
  100. <view class="row-cell vip">¥1599/年</view>
  101. <view class="row-cell flagship">¥2599/年</view>
  102. </view>
  103. </view>
  104. <!-- 说明文字 -->
  105. <view class="notes">
  106. <view class="note-item">
  107. <text class="note-number">1.</text>
  108. <text class="note-text">基础&常规权益中,查看和开聊权限仅限普通职位使用</text>
  109. </view>
  110. <view class="note-item">
  111. <text class="note-number">2.</text>
  112. <text class="note-text">在常规版本体验期中购买VIP及以上版本体验卡将会立即失效</text>
  113. </view>
  114. <view class="note-item">
  115. <text class="note-number">3.</text>
  116. <text class="note-text">你可以直接购买VIP,也可以</text>
  117. <text class="note-link" @click="viewAllBenefits">查看全部权益包</text>
  118. <text class="note-text">进行购买</text>
  119. </view>
  120. <view class="note-item">
  121. <text class="note-number">4.</text>
  122. <text class="note-text">如有问题,请联系我的客服</text>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 升级VIP按钮 -->
  127. <view class="upgrade-button" @click="showPaymentModal">
  128. 升级VIP
  129. </view>
  130. <!-- 支付弹窗 -->
  131. <u-popup v-model="showPayment" mode="bottom" border-radius="42" height="auto" :safe-area-inset-bottom="true">
  132. <view class="payment-picker">
  133. <view class="picker-header">
  134. <text class="picker-title">选择会员版本</text>
  135. </view>
  136. <view class="picker-content">
  137. <view
  138. class="plan-option"
  139. :class="{ active: selectedPlan === 'regular' }"
  140. @click="selectPlan('regular')"
  141. >
  142. <view class="option-left">
  143. <view class="radio-btn" :class="{ checked: selectedPlan === 'regular' }">
  144. <u-icon v-if="selectedPlan === 'regular'" name="checkmark" color="#ffffff" size="28"></u-icon>
  145. </view>
  146. <text class="option-text">常规版</text>
  147. <view class="price-tag">
  148. <text>¥599</text>
  149. </view>
  150. </view>
  151. </view>
  152. <view
  153. class="plan-option"
  154. :class="{ active: selectedPlan === 'vip' }"
  155. @click="selectPlan('vip')"
  156. >
  157. <view class="option-left">
  158. <view class="radio-btn" :class="{ checked: selectedPlan === 'vip' }">
  159. <u-icon v-if="selectedPlan === 'vip'" name="checkmark" color="#ffffff" size="28"></u-icon>
  160. </view>
  161. <text class="option-text">VIP版</text>
  162. <view class="price-tag">
  163. <text>¥1599</text>
  164. </view>
  165. </view>
  166. </view>
  167. <view
  168. class="plan-option"
  169. :class="{ active: selectedPlan === 'flagship' }"
  170. @click="selectPlan('flagship')"
  171. >
  172. <view class="option-left">
  173. <view class="radio-btn" :class="{ checked: selectedPlan === 'flagship' }">
  174. <u-icon v-if="selectedPlan === 'flagship'" name="checkmark" color="#ffffff" size="28"></u-icon>
  175. </view>
  176. <text class="option-text">旗舰版</text>
  177. <view class="price-tag">
  178. <text>¥2599</text>
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. <!-- 支付按钮 -->
  184. <view class="payment-button" @click="confirmPayment">
  185. <text>确认支付 ¥{{ getSelectedPrice() }}</text>
  186. </view>
  187. </view>
  188. </u-popup>
  189. </view>
  190. </template>
  191. <script>
  192. export default {
  193. data() {
  194. return {
  195. // 当前会员信息
  196. currentPlan: 'regular',
  197. remainingDays: 5,
  198. // 权益使用情况
  199. benefits: {
  200. view: { used: 10, total: 50 },
  201. communicate: { used: 10, total: 50 },
  202. regularJobs: { used: 10, total: 50 },
  203. urgentJobs: { used: 10, total: 50 }
  204. },
  205. // 支付弹窗
  206. showPayment: false,
  207. selectedPlan: 'regular',
  208. planPrices: {
  209. regular: 599,
  210. vip: 1599,
  211. flagship: 2599
  212. }
  213. }
  214. },
  215. methods: {
  216. // 返回上一页
  217. goBack() {
  218. uni.navigateBack()
  219. },
  220. // 查看全部权益包
  221. viewAllBenefits() {
  222. uni.showToast({
  223. title: '查看全部权益包',
  224. icon: 'none'
  225. })
  226. },
  227. // 显示支付弹窗
  228. showPaymentModal() {
  229. this.showPayment = true
  230. },
  231. // 选择会员计划
  232. selectPlan(plan) {
  233. this.selectedPlan = plan
  234. },
  235. // 获取选中计划的价格
  236. getSelectedPrice() {
  237. return this.planPrices[this.selectedPlan]
  238. },
  239. // 确认支付
  240. confirmPayment() {
  241. uni.showToast({
  242. title: `支付¥${this.getSelectedPrice()}成功`,
  243. icon: 'success'
  244. })
  245. this.showPayment = false
  246. }
  247. }
  248. }
  249. </script>
  250. <style lang="scss" scoped>
  251. .benefits-page {
  252. min-height: 100vh;
  253. background: var(--线性渐变, linear-gradient(90.00deg, rgba(13, 39, 247, 1),rgba(19, 193, 234, 1) 80%));
  254. background-size: 100% 40%;
  255. background-repeat: no-repeat;
  256. padding-top: 148rpx;
  257. }
  258. // 顶部导航栏
  259. .nav-bar {
  260. position: fixed;
  261. top: 0;
  262. left: 0;
  263. right: 0;
  264. z-index: 1000;
  265. .nav-content {
  266. display: flex;
  267. align-items: center;
  268. justify-content: space-between;
  269. height: 88rpx;
  270. padding: 0 32rpx;
  271. margin-top: 44rpx; // 状态栏高度
  272. .nav-left, .nav-right {
  273. width: 60rpx;
  274. height: 60rpx;
  275. display: flex;
  276. align-items: center;
  277. justify-content: center;
  278. }
  279. .nav-title {
  280. font-size: 36rpx;
  281. font-weight: 600;
  282. color: rgba(255, 255, 255, 1);
  283. }
  284. }
  285. }
  286. // 当前会员状态卡片
  287. .membership-card {
  288. background: linear-gradient(66.73deg, rgba(255, 160, 162, 1),rgba(255, 203, 204.5, 0.3) 49%,rgba(255, 181.5, 183.25, 0.56) 100%);
  289. border-radius: 20rpx;
  290. padding: 32rpx;
  291. margin: 0 40rpx;
  292. box-shadow: 0 8rpx 24rpx rgba(255, 182, 193, 0.3);
  293. .card-content {
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: flex-start;
  297. .card-left {
  298. flex: 1;
  299. .card-title {
  300. color: rgba(255, 255, 255, 1);
  301. font-family: DM Sans;
  302. font-size: 48rpx;
  303. font-weight: 700;
  304. line-height: 60rpx;
  305. letter-spacing: 0px;
  306. text-align: left;
  307. margin-bottom: 8rpx;
  308. }
  309. .card-subtitle {
  310. color: rgba(255, 255, 255, 1);
  311. font-family: DM Sans;
  312. font-size: 26rpx;
  313. font-weight: 400;
  314. line-height: 32rpx;
  315. letter-spacing: 0%;
  316. text-align: left;
  317. }
  318. }
  319. .card-right {
  320. display: grid;
  321. grid-template-columns: 1fr 1fr;
  322. border-radius: 12rpx;
  323. background: radial-gradient(184.79% 115.97% at 92% 113.99999999999999%,rgba(255, 102, 0, 0.35),rgba(255, 65, 86, 1) 100%);
  324. gap: 16rpx;
  325. padding: 14rpx 38rpx;
  326. .benefit-item {
  327. text-align: center;
  328. .benefit-label {
  329. color: rgba(255, 255, 255, 1);
  330. font-family: DM Sans;
  331. font-size: 24rpx;
  332. font-weight: 400;
  333. line-height: 32rpx;
  334. letter-spacing: 0%;
  335. text-align: left;
  336. margin-bottom: 8rpx;
  337. }
  338. .benefit-count {
  339. color: rgba(255, 255, 255, 1);
  340. font-family: DM Sans;
  341. font-size: 24rpx;
  342. font-weight: 700;
  343. line-height: 32rpx;
  344. letter-spacing: 0%;
  345. text-align: left;
  346. }
  347. }
  348. }
  349. }
  350. }
  351. // 权益对比区域
  352. .benefits-section {
  353. margin: 20rpx 40rpx;
  354. .section-title {
  355. color: rgba(23, 23, 37, 1);
  356. font-family: DM Sans;
  357. font-size: 28rpx;
  358. font-weight: 400;
  359. line-height: 44rpx;
  360. letter-spacing: 0.5%;
  361. text-align: left;
  362. margin-bottom: 20rpx;
  363. }
  364. }
  365. // 权益对比表格
  366. .benefits-table {
  367. background: #fff;
  368. border-radius: 16rpx;
  369. padding: 26rpx;
  370. overflow: hidden;
  371. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  372. .table-header {
  373. display: grid;
  374. grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  375. background: #f8f9fa;
  376. .header-cell {
  377. padding: 24rpx 12rpx;
  378. color: rgba(23, 23, 37, 1);
  379. font-family: DM Sans;
  380. font-size: 24rpx;
  381. font-weight: 500;
  382. line-height: 26rpx;
  383. letter-spacing: 0.5%;
  384. text-align: center;
  385. position: relative;
  386. border-right: 1rpx solid #e9ecef;
  387. display: flex;
  388. flex-direction: column;
  389. align-items: center;
  390. justify-content: center;
  391. &:last-child {
  392. border-right: none;
  393. }
  394. &.benefit-type {
  395. color: rgba(23, 23, 37, 1);
  396. font-family: DM Sans;
  397. font-size: 24rpx;
  398. font-weight: 500;
  399. line-height: 26rpx;
  400. letter-spacing: 0.5%;
  401. text-align: center;
  402. }
  403. &.basic {
  404. background: rgba(246, 246, 246, 1);
  405. }
  406. &.active {
  407. background: rgba(246, 246, 246, 1);
  408. color: #1976d2;
  409. }
  410. &.vip {
  411. background: rgba(255, 235, 235, 1);
  412. }
  413. &.recommended {
  414. background: rgba(254, 238, 209, 1);
  415. color: #f57c00;
  416. }
  417. .plan-tag {
  418. position: absolute;
  419. top: 8rpx;
  420. right: 8rpx;
  421. background: #ff4444;
  422. color: #fff;
  423. font-size: 20rpx;
  424. padding: 4rpx 8rpx;
  425. border-radius: 8rpx;
  426. }
  427. .plan-name {
  428. font-size: 24rpx;
  429. font-weight: 600;
  430. margin-bottom: 4rpx;
  431. }
  432. .plan-expire {
  433. font-size: 16rpx;
  434. color: #666;
  435. }
  436. }
  437. }
  438. .table-row {
  439. display: grid;
  440. grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  441. border-bottom: 1rpx solid #e9ecef;
  442. &:last-child {
  443. border-bottom: none;
  444. }
  445. &.price-row {
  446. background: #f8f9fa;
  447. font-weight: 600;
  448. }
  449. .row-cell {
  450. padding: 24rpx 12rpx;
  451. font-size: 16rpx;
  452. text-align: center;
  453. border-right: 1rpx solid #e9ecef;
  454. display: flex;
  455. align-items: center;
  456. justify-content: center;
  457. &:last-child {
  458. border-right: none;
  459. }
  460. &.benefit-type {
  461. text-align: center;
  462. color: rgba(23, 23, 37, 1);
  463. font-weight: 500;
  464. align-items: center;
  465. justify-content: center;
  466. background: rgba(246, 246, 246, 1);
  467. }
  468. &.basic {
  469. color: #666;
  470. background: rgba(246, 246, 246, 1);
  471. }
  472. &.regular {
  473. color: #1976d2;
  474. font-weight: 600;
  475. background: rgba(246, 246, 246, 1);
  476. }
  477. &.vip {
  478. color: #7b1fa2;
  479. font-weight: 600;
  480. background: rgba(255, 235, 235, 1);
  481. }
  482. &.flagship {
  483. color: #f57c00;
  484. font-weight: 600;
  485. background: rgba(254, 238, 209, 1);
  486. }
  487. }
  488. }
  489. }
  490. // 说明文字
  491. .notes {
  492. margin-top: 32rpx;
  493. .note-item {
  494. display: flex;
  495. align-items: flex-start;
  496. margin-bottom: 16rpx;
  497. font-size: 26rpx;
  498. line-height: 1.5;
  499. gap: 8rpx;
  500. .note-number , .note-text {
  501. color: rgba(102, 102, 102, 1);
  502. font-family: DM Sans;
  503. font-size: 24rpx;
  504. font-weight: 400;
  505. line-height: 26rpx;
  506. letter-spacing: 0.5%;
  507. text-align: left;
  508. }
  509. .note-link {
  510. color: #1976d2;
  511. font-family: DM Sans;
  512. font-size: 24rpx;
  513. font-weight: 400;
  514. line-height: 26rpx;
  515. letter-spacing: 0.5%;
  516. text-decoration: underline;
  517. }
  518. }
  519. }
  520. // 升级VIP按钮
  521. .upgrade-button {
  522. position: fixed;
  523. bottom: 32rpx;
  524. left: 32rpx;
  525. right: 32rpx;
  526. height: 88rpx;
  527. background: var(--线性渐变, linear-gradient(90.00deg, rgba(13, 39, 247, 1),rgba(19, 193, 234, 1) 100%));
  528. border-radius: 44rpx;
  529. display: flex;
  530. align-items: center;
  531. justify-content: center;
  532. color: #fff;
  533. font-size: 32rpx;
  534. font-weight: 600;
  535. box-shadow: 0 8rpx 24rpx rgba(25, 118, 210, 0.3);
  536. }
  537. // 支付弹窗样式 - 仿照 tagManage 页面
  538. .payment-picker {
  539. background: #fff;
  540. border-radius: 20rpx 20rpx 0 0;
  541. overflow: hidden;
  542. }
  543. .picker-header {
  544. display: flex;
  545. justify-content: center;
  546. align-items: center;
  547. padding: 30rpx 40rpx 20rpx;
  548. border-bottom: 1rpx solid #F2F2F2;
  549. position: relative;
  550. .picker-title {
  551. color: rgba(34, 37, 42, 1);
  552. font-family: DM Sans;
  553. font-size: 36rpx;
  554. font-weight: 500;
  555. line-height: 23px;
  556. letter-spacing: 0px;
  557. text-align: center;
  558. }
  559. }
  560. .picker-content {
  561. padding: 32rpx;
  562. }
  563. .plan-option {
  564. display: flex;
  565. flex-direction: row;
  566. justify-content: flex-start;
  567. align-items: center;
  568. padding: 16rpx 28rpx;
  569. box-sizing: border-box;
  570. border: 1px solid rgba(227, 231, 236, 1);
  571. border-radius: 24px;
  572. background: rgba(255, 255, 255, 1);
  573. margin-bottom: 32rpx;
  574. &:active {
  575. background-color: #F9F9F9;
  576. }
  577. &.active {
  578. border-color: #007AFF;
  579. background: #F0F9FF;
  580. }
  581. .option-left {
  582. display: flex;
  583. align-items: center;
  584. flex: 1;
  585. .radio-btn {
  586. width: 40rpx;
  587. height: 40rpx;
  588. border: 2rpx solid #E5E5EA;
  589. border-radius: 50%;
  590. display: flex;
  591. align-items: center;
  592. justify-content: center;
  593. margin-right: 24rpx;
  594. background: #fff;
  595. transition: all 0.2s;
  596. &.checked {
  597. border-color: #007AFF;
  598. background: #007AFF;
  599. }
  600. }
  601. .option-text {
  602. font-size: 28rpx;
  603. color: rgba(29, 33, 41, 1);
  604. font-weight: 400;
  605. flex: 1;
  606. }
  607. .price-tag {
  608. background: rgba(153, 196, 250, 0.4);
  609. border-radius: 8rpx;
  610. padding: 4rpx 12rpx;
  611. text {
  612. font-size: 24rpx;
  613. line-height: 24rpx;
  614. color: rgba(1, 107, 246, 1);
  615. font-weight: 500;
  616. }
  617. }
  618. }
  619. }
  620. .picker-content :last-child {
  621. margin-bottom: 0rpx;
  622. }
  623. .payment-button {
  624. width: 90%;
  625. height: 88rpx;
  626. background: linear-gradient(90deg, #007AFF 0%, #42a5f5 100%);
  627. border-radius: 44rpx;
  628. display: flex;
  629. align-items: center;
  630. justify-content: center;
  631. margin: 32rpx;
  632. box-shadow: 0 8rpx 24rpx rgba(0, 122, 255, 0.3);
  633. text {
  634. color: #fff;
  635. font-size: 32rpx;
  636. font-weight: 600;
  637. }
  638. }
  639. </style>