index.vue 26 KB

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