index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  1. <template>
  2. <view class="vip-container">
  3. <view class="heard-box" :class="`active${selectedPrice}`">
  4. <!-- 自定义头部 -->
  5. <PageHeader title="" class="PageHeader">
  6. <template slot="right">
  7. <view class="more-options" @tap="toggleDropdown">
  8. <text class="fa fa-ellipsis-h"></text>
  9. <view class="dropdown-menu" v-if="showDropdown">
  10. <view class="dropdown-item" @tap="handleOption('vipRecord')">VIP记录</view>
  11. <view class="dropdown-item" @tap="handleOption('contact')">联系客服</view>
  12. </view>
  13. </view>
  14. </template>
  15. </PageHeader>
  16. <view class="reserveASeat"></view>
  17. <view class="vip-card-box">
  18. <!-- 顶部会员信息 -->
  19. <view class="vip-header">
  20. <view class="vip-info">
  21. <CircleAvatar class="vip-info-left" v-if="userInfo.avator" :src="userInfo.avator">
  22. </CircleAvatar>
  23. <view class="vip-info-right">
  24. <view class="vip-nickname">{{ userInfo.nickname }}</view>
  25. <view class="vip-expire" v-if="userInfo.is_vip">VIP到期时间: {{ userInfo.vip_date }}</view>
  26. <view class="vip-expire" v-else>暂未开通</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="vip-content">
  33. <!-- 会员价格选择 -->
  34. <view class="vip-price-options">
  35. <view class="price-option" v-for="(item, index) in priceOptions" :key="index"
  36. :class="{ active: selectedPrice === index }" @tap="selectPrice(index)">
  37. <view class="price-left-img" v-if="item.limitedTimeGift">
  38. 限时优惠M币{{ item.limitedTimeGift }}
  39. </view>
  40. <view class="price-tag" v-if="item.tag">{{ item.tag }}</view>
  41. <view class="duration">{{ item.name }}</view>
  42. <view class="price"><text style="font-size: 40rpx;">¥</text>{{ item.price }}</view>
  43. <view class="originalPrice">¥{{ item.originalPrice }}</view>
  44. </view>
  45. </view>
  46. <uv-notice-bar speed="250" color="#333"
  47. :text="'uv-ui众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让您快速集成,开箱即用'"></uv-notice-bar>
  48. <!-- 会员特权列表 -->
  49. <view class="vip-privileges">
  50. <view class="privileges-title">尊享特权</view>
  51. <view class="privileges-list">
  52. <view class="privilege-item" v-for="(item, index) in privileges" :key="index">
  53. <image class="privilege-icon" v-if="item.icon" :src="item.icon" mode="aspectFit"></image>
  54. <view class="privilege-info">
  55. <view class="privilege-name">{{ item.name }}</view>
  56. <view class="privilege-desc">{{ item.desc }}</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="agree">
  62. <view class="agree2" @click="agreeChk()">
  63. <image mode="widthFix" src="../../static/icon/wd_icon_gouxuan04.png" v-if="is_agree == 0"></image>
  64. <image mode="widthFix" src="../../static/icon/wd_icon_gouxuan05.png" v-if="is_agree == 1"></image>
  65. </view>
  66. <view>
  67. 同意
  68. <text class="xy" @click="goPage('/pages/AboutUs/pay_xy')">
  69. 《充值服务协议》
  70. </text>,充值M币仅【萌创星球】使用点击查看
  71. <text class="xy" @click="goPage('yszc')">
  72. 充值记录
  73. </text>
  74. </view>
  75. </view>
  76. <view class="bottom-pay-btn-bottom"
  77. v-if="priceOptions && priceOptions[selectedPrice] && priceOptions[selectedPrice].price"
  78. @tap="showPaymentOptions">
  79. <text>¥{{ priceOptions[selectedPrice].price }}</text> 立即购买
  80. </view>
  81. </view>
  82. <!-- 支付方式选择弹窗 -->
  83. <uni-popup ref="paymentPopup" type="bottom">
  84. <view class="payment-popup">
  85. <view class="popup-header">
  86. <view class="popup-title">选择支付方式</view>
  87. <!-- <view class="popup-close" @tap="closePaymentPopup">×</view> -->
  88. </view>
  89. <view class="payment-options">
  90. <view class="payment-option" @tap="selectPayment('alipay')">
  91. <image class="payment-icon" src="../../static/icon/pay_ali.png" mode="aspectFit"></image>
  92. <view class="payment-name">支付宝支付</view>
  93. <image class="payment-select"
  94. :src="paymentMethod === 'alipay' ? '../../static/icon/wd_icon_gouxuan05.png' : '../../static/icon/wd_icon_gouxuan04.png'"
  95. mode="aspectFit"></image>
  96. </view>
  97. <view v-if="false" class="payment-option" @tap="selectPayment('wechat')">
  98. <image class="payment-icon" src="../../static/icon/pay_wx.png" mode="aspectFit"></image>
  99. <view class="payment-name">微信支付</view>
  100. <image class="payment-select"
  101. :src="paymentMethod === 'wechat' ? '../../static/icon/wd_icon_gouxuan05.png' : '../../static/icon/wd_icon_gouxuan04.png'"
  102. mode="aspectFit"></image>
  103. </view>
  104. </view>
  105. <view class="confirm-payment" @tap="confirmPayment">立即支付</view>
  106. </view>
  107. </uni-popup>
  108. <CustomerServicePopup ref="customerServicePopup"></CustomerServicePopup>
  109. </view>
  110. </template>
  111. <script>
  112. export default {
  113. data() {
  114. return {
  115. userInfo: {
  116. is_vip: false,
  117. vip_date: '2023-10-23'
  118. },
  119. priceOptions: [
  120. ],
  121. selectedPrice: 1, // 默认选中的价格选项索引
  122. privileges: [{
  123. name: 'VIP专属通道',
  124. icon: '../../static/vip/hy_icon_quanyi01.png',
  125. desc: '创作加速,更快生成'
  126. },
  127. {
  128. name: '专属星源礼包',
  129. icon: '../../static/vip/hy_icon_quanyi02.png',
  130. desc: '每日登录领更多星源'
  131. },
  132. {
  133. name: '记忆增强',
  134. icon: '../../static/vip/hy_icon_quanyi03.png',
  135. desc: '创作加速,更快生成'
  136. },
  137. {
  138. name: '升级语言模型',
  139. icon: '../../static/vip/hy_icon_quanyi04.png',
  140. desc: '深度思考,提升50%'
  141. },
  142. {
  143. name: 'VIP专属通道',
  144. icon: '../../static/vip/hy_icon_quanyi05.png',
  145. desc: '创作加速,更快生成'
  146. },
  147. {
  148. name: '免广告',
  149. icon: '../../static/vip/hy_icon_quanyi06.png',
  150. desc: '无广告免费体验'
  151. }
  152. ],
  153. paymentMethod: 'alipay', // 默认支付方式
  154. privilegesHeight: 0, // 添加存储特权区域高度的变量
  155. showDropdown: false, // 控制下拉菜单显示状态
  156. is_agree: 0,
  157. linkid: '',
  158. }
  159. },
  160. onLoad() {
  161. // 获取用户信息,检查是否为VIP
  162. this.getUserInfo();
  163. },
  164. onReady() {
  165. // 页面渲染完成后获取vip-privileges的高度
  166. this.getPrivilegesHeight();
  167. },
  168. methods: {
  169. // 获取用户信息
  170. getUserInfo() {
  171. // 这里添加获取用户信息的API调用
  172. uni.request({
  173. url: this.$apiHost + "/User/getinfo",
  174. data: {
  175. uuid: getApp().globalData.uuid,
  176. skey: getApp().globalData.skey,
  177. },
  178. header: {
  179. "content-type": "application/json",
  180. sign: getApp().globalData.headerSign,
  181. },
  182. success: (res) => {
  183. if (res) {
  184. console.log("获取到用户信息", res.data);
  185. this.userInfo = res.data
  186. }
  187. },
  188. complete: (com) => {
  189. },
  190. fail: (e) => {
  191. console.log("----e:", e);
  192. },
  193. });
  194. uni.request({
  195. url: this.$apiHost + "/Member/vipList",
  196. data: {
  197. uuid: getApp().globalData.uuid,
  198. skey: getApp().globalData.skey,
  199. },
  200. header: {
  201. "content-type": "application/json",
  202. sign: getApp().globalData.headerSign,
  203. },
  204. success: (res) => {
  205. console.log("作品列表数据:", res.data);
  206. // 确保在任何情况下都完成加载
  207. if (
  208. res.data.success == "yes" &&
  209. res.data.list &&
  210. res.data.list.length > 0
  211. ) {
  212. console.log(res.data.list, "会员列表数据");
  213. res.data.list.reverse()
  214. res.data.list.forEach(v => {
  215. this.priceOptions.push({
  216. id: v.id,
  217. limitedTimeGift: v.price_market - v.price,
  218. name: v.name,
  219. price: v.price,
  220. originalPrice: v.price_market,
  221. tag: v.tag,
  222. numDay: v.num_day,
  223. numSong: v.num_song,
  224. })
  225. });
  226. this.priceOptions[1].tag = "推荐"
  227. console.log(this.priceOptions, "会员列表数据");
  228. } else {
  229. // priceOptions: [{
  230. // name: '月度VIP',
  231. // price: '98',
  232. // originalPrice: '168',
  233. // tag: '',
  234. // limitedTimeGift: ""
  235. // },
  236. // {
  237. // name: '季度VIP',
  238. // price: '198',
  239. // originalPrice: '268',
  240. // tag: '推荐',
  241. // limitedTimeGift: "100"
  242. // },
  243. // {
  244. // name: '年度VIP',
  245. // price: '398',
  246. // originalPrice: '498',
  247. // tag: '',
  248. // limitedTimeGift: "1500"
  249. // }
  250. // ],
  251. }
  252. },
  253. complete: () => {
  254. },
  255. fail: (e) => {
  256. console.log("请求关注列表失败:", e);
  257. },
  258. });
  259. },
  260. // 选择价格选项
  261. selectPrice(index) {
  262. this.selectedPrice = index;
  263. },
  264. // 显示支付方式选择弹窗
  265. showPaymentOptions() {
  266. if (this.is_agree == 0) {
  267. uni.showToast({
  268. title: "请确认并选择协议",
  269. icon: "none",
  270. });
  271. return;
  272. }
  273. this.$refs.paymentPopup.open();
  274. },
  275. // 关闭支付方式选择弹窗
  276. closePaymentPopup() {
  277. this.$refs.paymentPopup.close();
  278. },
  279. // 选择支付方式
  280. selectPayment(method) {
  281. this.paymentMethod = method;
  282. },
  283. // 确认支付
  284. confirmPayment() {
  285. if (!this.priceOptions || !this.priceOptions[this.selectedPrice]) {
  286. uni.showToast({
  287. title: '请选择会员套餐',
  288. icon: 'none'
  289. });
  290. return;
  291. }
  292. if (this.is_agree == 0) {
  293. uni.showToast({
  294. title: "请确认并选择协议",
  295. icon: "none",
  296. });
  297. return;
  298. }
  299. this.submitPayment();
  300. },
  301. // 提交支付
  302. submitPayment() {
  303. let that = this;
  304. uni.showLoading({
  305. title: '创建订单中...'
  306. });
  307. uni.request({
  308. url: this.$apiHost + '/Order/submit',
  309. data: {
  310. uuid: getApp().globalData.uuid,
  311. skey: getApp().globalData.skey,
  312. product_id: this.priceOptions[this.selectedPrice].id,
  313. type: 'buyVip',
  314. payType: this.paymentMethod
  315. },
  316. header: {
  317. 'content-type': 'application/json',
  318. sign: getApp().globalData.headerSign
  319. },
  320. success: (res) => {
  321. console.log("支付订单创建结果:", res.data);
  322. if (res.data.success == 'yes') {
  323. this.linkid = res.data.linkid;
  324. this.$refs.paymentPopup.close();
  325. // 根据支付方式调用不同的支付接口
  326. if (this.paymentMethod === 'wechat') {
  327. uni.requestPayment({
  328. provider: "wxpay",
  329. orderInfo: {
  330. appid: res.data.wepay.appid,
  331. partnerid: res.data.wepay.partnerid,
  332. prepayid: res.data.wepay.prepayid,
  333. package: "Sign=WXPay",
  334. noncestr: res.data.wepay.noncestr,
  335. timestamp: res.data.wepay.timestamp,
  336. sign: res.data.wepay.sign
  337. },
  338. success: (payRes) => {
  339. console.log("微信支付成功:", payRes);
  340. that.checkPayStatus();
  341. },
  342. fail: (err) => {
  343. console.log("微信支付失败:", err);
  344. uni.hideLoading();
  345. uni.showToast({
  346. title: '支付取消',
  347. icon: 'none'
  348. });
  349. }
  350. });
  351. } else if (this.paymentMethod === 'alipay') {
  352. uni.requestPayment({
  353. provider: "alipay",
  354. orderInfo: res.data.ali_pay,
  355. success: (payRes) => {
  356. console.log("支付宝支付成功:", payRes);
  357. that.checkPayStatus();
  358. },
  359. fail: (err) => {
  360. console.log("支付宝支付失败:", err);
  361. uni.hideLoading();
  362. uni.showToast({
  363. title: '支付取消',
  364. icon: 'none'
  365. });
  366. }
  367. });
  368. }
  369. } else {
  370. uni.hideLoading();
  371. uni.showToast({
  372. title: res.data.msg || '创建订单失败',
  373. icon: "error"
  374. });
  375. }
  376. },
  377. fail: (err) => {
  378. console.log("创建订单失败:", err);
  379. uni.hideLoading();
  380. uni.showToast({
  381. title: '网络错误,请稍后重试',
  382. icon: "error"
  383. });
  384. }
  385. });
  386. },
  387. // 检查支付状态
  388. checkPayStatus() {
  389. let that = this;
  390. uni.request({
  391. url: this.$apiHost + "/Order/getstatus",
  392. data: {
  393. uuid: getApp().globalData.uuid,
  394. linkid: this.linkid,
  395. },
  396. header: {
  397. "content-type": "application/json",
  398. 'sign': getApp().globalData.headerSign
  399. },
  400. success: (res) => {
  401. if (res.data.success == "yes") {
  402. uni.hideLoading();
  403. uni.showToast({
  404. title: "充值成功",
  405. icon: "none",
  406. });
  407. // 支付成功后刷新用户信息
  408. this.getUserInfo();
  409. } else {
  410. setTimeout(function () {
  411. that.checkPayStatus();
  412. }, 1000);
  413. }
  414. },
  415. fail: (err) => {
  416. console.log("检查支付状态失败:", err);
  417. uni.hideLoading();
  418. uni.showToast({
  419. title: "网络错误,请重试",
  420. icon: "none"
  421. });
  422. }
  423. });
  424. },
  425. // 获取特权列表区域的高度
  426. getPrivilegesHeight() {
  427. const query = uni.createSelectorQuery().in(this);
  428. query.select('.vip-privileges').boundingClientRect(data => {
  429. if (data) {
  430. this.privilegesHeight = data.height;
  431. console.log('特权区域高度:', this.privilegesHeight);
  432. } else {
  433. console.log('未能获取到特权区域元素');
  434. // 如果首次获取失败,可以添加延迟重试
  435. setTimeout(() => {
  436. this.getPrivilegesHeight();
  437. }, 100);
  438. }
  439. }).exec();
  440. },
  441. // 如果需要在某些数据变化后重新获取高度
  442. updatePrivilegesHeight() {
  443. this.$nextTick(() => {
  444. this.getPrivilegesHeight();
  445. });
  446. },
  447. // 切换下拉菜单显示状态
  448. toggleDropdown() {
  449. this.showDropdown = !this.showDropdown;
  450. },
  451. // 处理下拉菜单选项点击
  452. handleOption(type) {
  453. this.showDropdown = false;
  454. switch (type) {
  455. case 'vipRecord':
  456. uni.navigateTo({
  457. url: '/pages/vip/record?type=vip'
  458. });
  459. break;
  460. case 'help':
  461. uni.navigateTo({
  462. url: '/pages/help/index'
  463. });
  464. break;
  465. case 'contact':
  466. this.openCustomPopup();
  467. break;
  468. }
  469. },
  470. openCustomPopup() {
  471. this.$refs.customerServicePopup.open();
  472. },
  473. goPage(page) {
  474. uni.navigateTo({
  475. url: page,
  476. })
  477. }, agreeChk() {
  478. if (this.is_agree == 0) {
  479. this.is_agree = 1;
  480. } else {
  481. this.is_agree = 0;
  482. }
  483. },
  484. }
  485. }
  486. </script>
  487. <style lang="scss">
  488. // 导入FontAwesome
  489. @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css");
  490. .vip-container {
  491. min-height: 100vh;
  492. padding-bottom: 100rpx;
  493. .heard-box {
  494. .PageHeader {
  495. background-image: url("@/static/vip/hy_bg_01.png");
  496. background-size: 100% auto;
  497. background-repeat: no-repeat;
  498. background-position-y: -var(--status-bar-height);
  499. ::v-deep .uni-icons {
  500. color: #fff !important;
  501. }
  502. .fa {
  503. color: #fff;
  504. }
  505. }
  506. .vip-card-box {
  507. width: 100%;
  508. padding: 0 36rpx;
  509. height: 300rpx;
  510. padding-top: 50rpx;
  511. .vip-header {
  512. width: 100%;
  513. height: 210rpx;
  514. padding-left: 28rpx;
  515. padding-top: 110rpx;
  516. .vip-info {
  517. display: flex;
  518. .vip-info-left {
  519. width: 60rpx;
  520. height: 60rpx;
  521. border: #fff solid 2rpx;
  522. margin-right: 10rpx;
  523. }
  524. .vip-info-right {
  525. .vip-nickname {
  526. font-size: 24rpx;
  527. font-weight: 400;
  528. font-family: 'PingFang SC-Bold';
  529. }
  530. .vip-expire {
  531. font-size: 20rpx;
  532. font-family: 'PingFang SC-Medium';
  533. }
  534. }
  535. }
  536. }
  537. }
  538. &.active0 {
  539. background: url("@/static/vip/hy_bg_01.png") center/100% 100% no-repeat;
  540. .PageHeader {
  541. background-image: url("@/static/vip/hy_bg_01.png");
  542. }
  543. .vip-card-box {
  544. .vip-header {
  545. background: url("@/static/vip/hy_card_01.png") top center/100% auto no-repeat;
  546. .vip-info {
  547. .vip-nickname {
  548. color: #1f1f1f;
  549. }
  550. .vip-expire {
  551. color: rgba(31, 31, 31, 0.7);
  552. }
  553. }
  554. }
  555. }
  556. }
  557. &.active1 {
  558. background: url("@/static/vip/hy_bg_02.png") center/100% 100% no-repeat;
  559. .PageHeader {
  560. background-image: url("@/static/vip/hy_bg_02.png");
  561. }
  562. .vip-card-box {
  563. .vip-header {
  564. background: url("@/static/vip/hy_card_02.png") top center/100% auto no-repeat;
  565. .vip-info {
  566. .vip-nickname {
  567. color: #FFE590;
  568. }
  569. .vip-expire {
  570. color: rgba(255, 229, 144, 0.35);
  571. }
  572. }
  573. }
  574. }
  575. }
  576. &.active2 {
  577. background: url("@/static/vip/hy_bg_03.png") center/100% 100% no-repeat;
  578. .PageHeader {
  579. background-image: url("@/static/vip/hy_bg_03.png");
  580. }
  581. .vip-card-box {
  582. .vip-header {
  583. background: url("@/static/vip/hy_card_03.png") top center/100% auto no-repeat;
  584. .vip-info {
  585. .vip-nickname {
  586. color: #FFFFFF;
  587. }
  588. .vip-expire {
  589. color: rgba(255, 255, 255, 0.35);
  590. }
  591. }
  592. }
  593. }
  594. }
  595. .reserveASeat {
  596. width: 100%;
  597. background: transparent;
  598. height: calc(var(--status-bar-height) + 90rpx);
  599. }
  600. }
  601. .vip-content {
  602. background: #fff;
  603. border-top-left-radius: 32rpx;
  604. border-top-right-radius: 32rpx;
  605. .vip-price-options {
  606. display: flex;
  607. justify-content: space-between;
  608. padding: 32rpx;
  609. margin-top: -60rpx;
  610. .price-option {
  611. width: 218rpx;
  612. height: 250rpx;
  613. background-color: #fff;
  614. border-radius: 20rpx;
  615. display: flex;
  616. flex-direction: column;
  617. justify-content: center;
  618. align-items: center;
  619. position: relative;
  620. transition: all 0.3s;
  621. border-radius: 20rpx;
  622. border: 4rpx solid #E9E9E9;
  623. padding-top: 48rpx;
  624. padding-bottom: 34rpx;
  625. .price-left-img {
  626. min-width: 160rpx;
  627. height: 48rpx;
  628. padding: 6rpx 12rpx 14rpx 12rpx;
  629. position: absolute;
  630. left: -6rpx;
  631. top: -4rpx;
  632. background: url("../../static/vip/hy_biaoqian_02.png") center/100% 100% no-repeat;
  633. font-weight: 400;
  634. font-size: 10px;
  635. color: #898888;
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. }
  640. .price-tag {
  641. position: absolute;
  642. bottom: -4rpx;
  643. right: -4rpx;
  644. font-family: 'PingFang SC-Bold';
  645. font-weight: 400;
  646. background-color: #4A4A4A;
  647. color: #ffffff;
  648. font-size: 24rpx;
  649. width: 86rpx;
  650. height: 36rpx;
  651. border-top-left-radius: 20rpx;
  652. border-bottom-right-radius: 20rpx;
  653. display: flex;
  654. align-items: center;
  655. justify-content: center;
  656. }
  657. .duration {
  658. font-family: 'PingFang SC-Bold';
  659. font-weight: 400;
  660. font-size: 32rpx;
  661. color: #1F1F1F;
  662. }
  663. .price {
  664. font-size: 68rpx;
  665. font-weight: bold;
  666. color: #4A4A4A;
  667. padding-top: 10rpx;
  668. padding-bottom: 5rpx;
  669. }
  670. .originalPrice {
  671. font-size: 28rpx;
  672. color: #999999;
  673. text-decoration: line-through;
  674. }
  675. &.active {
  676. background: linear-gradient(to bottom, #F0FFD9, rgba(0, 0, 0, 0));
  677. border-color: #1f1f1f;
  678. transform: scale(1.05);
  679. .price-left-img {
  680. background: url("../../static/vip/hy_biaoqian_01.png") center/100% no-repeat;
  681. color: #ACF934;
  682. }
  683. .price {
  684. color: #7CCB00;
  685. }
  686. }
  687. }
  688. }
  689. .vip-privileges {
  690. padding: 0 30rpx;
  691. .privileges-title {
  692. font-family: 'PingFang SC-Bold';
  693. font-weight: 400;
  694. font-size: 16px;
  695. color: #1F1F1F;
  696. padding-top: 36rpx;
  697. padding-bottom: 22rpx;
  698. }
  699. .privileges-list {
  700. display: flex;
  701. flex-wrap: wrap;
  702. justify-content: space-between;
  703. }
  704. .privilege-item {
  705. width: 330rpx;
  706. height: 136rpx;
  707. flex-grow: 0;
  708. background-color: #F7F7F7;
  709. border-radius: 16rpx;
  710. padding: 26rpx;
  711. padding-right: 0;
  712. // padding-left: 20rpx;
  713. margin-bottom: 26rpx;
  714. display: flex;
  715. align-items: center;
  716. }
  717. .privilege-icon {
  718. width: 84rpx;
  719. height: 84rpx;
  720. margin-right: 20rpx;
  721. }
  722. .privilege-name {
  723. font-size: 28rpx;
  724. font-weight: 400;
  725. color: #1C2C00;
  726. margin-bottom: 10rpx;
  727. }
  728. .privilege-desc {
  729. font-size: 20rpx;
  730. color: #999999;
  731. }
  732. }
  733. .bottom-pay-btn-bottom {
  734. width: 626rpx;
  735. height: 88rpx;
  736. background: linear-gradient(90deg, #1F1F1F 0%, #444444 100%);
  737. border-radius: 76rpx;
  738. margin: 0 auto;
  739. margin-top: 70rpx;
  740. color: #ACF934;
  741. display: flex;
  742. align-items: center;
  743. justify-content: center;
  744. font-size: 32rpx;
  745. line-height: 0;
  746. text {
  747. font-size: 44rpx;
  748. display: inline-block;
  749. margin-right: 10rpx;
  750. }
  751. }
  752. }
  753. .uv-notice-bar {
  754. background-color: #F2F6F2 !important;
  755. border-radius: 108rpx;
  756. width: calc(100% - 64rpx);
  757. margin: 0 auto;
  758. ::v-deep.uvicon-volume {
  759. color: #333 !important;
  760. }
  761. }
  762. .bottom-pay-btn {
  763. position: fixed;
  764. bottom: 0;
  765. left: 0;
  766. right: 0;
  767. display: flex;
  768. align-items: center;
  769. justify-content: space-between;
  770. background-color: #242424;
  771. padding: 30rpx 40rpx;
  772. box-sizing: border-box;
  773. .total-price {
  774. color: #cccccc;
  775. font-size: 28rpx;
  776. }
  777. .price-value {
  778. color: #ffffff;
  779. font-size: 40rpx;
  780. font-weight: bold;
  781. }
  782. .pay-button {
  783. background: linear-gradient(to right, #9758DE, #5F17DD);
  784. color: #ffffff;
  785. padding: 20rpx 60rpx;
  786. border-radius: 50rpx;
  787. font-size: 32rpx;
  788. }
  789. }
  790. /* 支付方式选择弹窗样式 */
  791. .payment-popup {
  792. background-color: #ffffff;
  793. border-radius: 24rpx 24rpx 0 0;
  794. padding: 40rpx;
  795. .popup-header {
  796. display: flex;
  797. justify-content: center;
  798. align-items: center;
  799. margin-bottom: 40rpx;
  800. position: relative;
  801. }
  802. .popup-title {
  803. font-size: 32rpx;
  804. color: #333;
  805. font-weight: 500;
  806. text-align: center;
  807. }
  808. .popup-close {
  809. position: absolute;
  810. right: 0;
  811. top: 50%;
  812. transform: translateY(-50%);
  813. font-size: 48rpx;
  814. color: #999999;
  815. line-height: 1;
  816. }
  817. .payment-options {
  818. margin-bottom: 40rpx;
  819. }
  820. .payment-option {
  821. display: flex;
  822. align-items: center;
  823. padding: 32rpx 0;
  824. border-bottom: 1rpx solid #EEEEEE;
  825. &:last-child {
  826. border-bottom: none;
  827. }
  828. }
  829. .payment-icon {
  830. width: 72rpx;
  831. height: 72rpx;
  832. margin-right: 24rpx;
  833. }
  834. .payment-name {
  835. flex: 1;
  836. color: #333;
  837. font-size: 32rpx;
  838. }
  839. .payment-select {
  840. width: 40rpx;
  841. height: 40rpx;
  842. }
  843. .confirm-payment {
  844. background: #333333;
  845. color: #ACF934;
  846. text-align: center;
  847. padding: 28rpx 0;
  848. border-radius: 76rpx;
  849. font-size: 32rpx;
  850. margin-top: 60rpx;
  851. font-weight: 500;
  852. }
  853. }
  854. ::v-deep .uni-popup .uni-popup__wrapper {
  855. border-radius: 24rpx 24rpx 0 0;
  856. }
  857. ::v-deep .uni-popup .uni-popup__wrapper-box {
  858. border-radius: 24rpx 24rpx 0 0;
  859. }
  860. .more-options {
  861. position: relative;
  862. display: inline-block;
  863. .fa {
  864. font-size: 40rpx;
  865. padding: 0 20rpx;
  866. }
  867. .dropdown-menu {
  868. position: absolute;
  869. top: calc(100% + 10rpx);
  870. right: 20rpx;
  871. background-color: #ffffff;
  872. border-radius: 20rpx;
  873. padding: 0;
  874. width: 200rpx;
  875. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  876. z-index: 100;
  877. transform-origin: top right;
  878. animation: dropdownAnimation 0.2s ease-out;
  879. .dropdown-item {
  880. padding: 24rpx 0;
  881. color: #333333;
  882. font-size: 28rpx;
  883. position: relative;
  884. text-align: center;
  885. &:not(:last-child)::after {
  886. content: '';
  887. position: absolute;
  888. left: 0;
  889. right: 0;
  890. bottom: 0;
  891. height: 1rpx;
  892. background-color: #EEEEEE;
  893. }
  894. &:active {
  895. background-color: #f8f8f8;
  896. }
  897. }
  898. }
  899. }
  900. @keyframes dropdownAnimation {
  901. 0% {
  902. opacity: 0;
  903. transform: scale(0.95) translateY(-5rpx);
  904. }
  905. 100% {
  906. opacity: 1;
  907. transform: scale(1) translateY(0);
  908. }
  909. }
  910. }
  911. .agree {
  912. width: 90%;
  913. margin: 0 auto;
  914. color: #666666;
  915. font-size: 24rpx;
  916. margin-top: 40rpx;
  917. display: flex;
  918. align-items: center;
  919. text-align: left;
  920. line-height: 32rpx;
  921. .agree2 {
  922. display: flex;
  923. flex-direction: row;
  924. justify-content: flex-start;
  925. align-items: center;
  926. padding-right: 8rpx;
  927. flex-shrink: 0;
  928. }
  929. .xy {
  930. color: #0084FF;
  931. display: inline;
  932. }
  933. image {
  934. width: 32rpx;
  935. height: 32rpx;
  936. }
  937. }
  938. </style>