index.vue 28 KB

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