index.vue 23 KB

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