index.vue 26 KB

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