cardDetail.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161
  1. <template>
  2. <view>
  3. <ujp-navbar title="会员卡详情" :isBack="isMe">
  4. <view slot="right" style="margin-right: 10px;">
  5. <view class="iconfont qr-code" @click="openModalBl=true">
  6. &#xe60d;
  7. </view>
  8. </view>
  9. </ujp-navbar>
  10. <u-mask :show="show" @click="show = false">
  11. <u-image width="100%" :mode="'widthFix'" src="@/assets/static/img/guide_point2.png"></u-image>
  12. </u-mask>
  13. <u-modal v-model="show2" :content="content2" @confirm="confirmShow2" :show-cancel-button="true"
  14. confirm-color="#00b962"></u-modal>
  15. <u-modal v-model="show3" :content="content3" @confirm="confirmShow3" :show-cancel-button="true"
  16. confirm-color="#00b962"></u-modal>
  17. <u-modal v-model="openModalBl" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
  18. :show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="content"
  19. :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
  20. <!-- 头部 -->
  21. <view class="header4" v-if="item.type==4">
  22. <view class="discount-card-4" >
  23. <img v-if="regUserCard.status==2" class="corner-mark" src="@/assets/img/nonactivated.png" alt="">
  24. <view class="top" >
  25. <view class="right-corner">
  26. <img class="rightCorner" src="@/assets/img/rightCorner.png" alt="">
  27. </view>
  28. </view>
  29. <view class="img">
  30. {{item.name}}
  31. </view>
  32. <view class="card-number2" v-if="regUserCard.status==2" >
  33. 湖北省内平台自营站点充电通用
  34. </view>
  35. <view class="card-number" v-if="regUserCard.status==2">
  36. 卡号:{{regUserCard.cardNo}}
  37. </view>
  38. <view class="progress" v-if="regUserCard.status==1">
  39. <view class="time">
  40. {{thisendTime(regUserCard.endTime)}}到期 剩余{{setValidity(thisdaysDistance(regUserCard.endTime))}}
  41. </view>
  42. <view class="electric-quantity" v-if="regUserCard.classify==2&&(regUserCard.chargeDegreeLimit!=0)">
  43. 已用{{regUserCard.chargedDegree}}度 / 共{{regUserCard.chargeDegreeLimit}}度
  44. </view>
  45. </view>
  46. <ujp-line-progress v-if="regUserCard.status==1" active-color="#2979ff"
  47. :percent="thispercent(regUserCard)"></ujp-line-progress>
  48. </view>
  49. <img class="cardCover" src="@/assets/img/cardCover.png" alt="">
  50. </view>
  51. <view :class="{
  52. header:regUserCard.status==1,
  53. header2:regUserCard.status==2
  54. }" v-else >
  55. <view class="discount-card" >
  56. <img v-if="regUserCard.status==2" class="corner-mark" src="@/assets/img/nonactivated.png" alt="">
  57. <view class="top" v-if="regUserCard.status==2">
  58. <view class="right-corner">
  59. <img class="rightCorner" src="@/assets/img/rightCorner.png" alt="">
  60. <img class="icon" v-if="item.type==3" src="@/assets/img/mb-times@3x.png" alt="">
  61. <img class="picc" v-if="item.type==3" src="@/assets/img/picc.png" alt="">
  62. </view>
  63. </view>
  64. <view class="img icon_crown">
  65. <!-- <img v-if="item.classify==1" src="@/assets/img/monthCard.png" alt="">
  66. <img v-else-if="item.classify==2&&item.serviceFeeDiscountRate==60" src="@/assets/img/0.6off.png"
  67. alt="">
  68. <img v-else-if="item.classify==2&&item.serviceFeeDiscountRate==50" src="@/assets/img/halfoff.png"
  69. alt="">
  70. <img v-else src="@/assets/img/monthCard.png" alt=""> -->
  71. <img src="@/assets/img/icon_crown.png" alt="">
  72. {{item.name}}
  73. </view>
  74. <view class="card-number" v-if="regUserCard.status==2">
  75. 卡号:{{regUserCard.cardNo}}
  76. </view>
  77. <view class="progress" v-if="regUserCard.status==1">
  78. <view class="time">
  79. {{thisendTime(regUserCard.endTime)}}到期 剩余{{setValidity(thisdaysDistance(regUserCard.endTime))}}
  80. </view>
  81. <view class="electric-quantity" v-if="regUserCard.classify==2&&(regUserCard.chargeDegreeLimit!=0)">
  82. 已用{{regUserCard.chargedDegree}}度 / 共{{regUserCard.chargeDegreeLimit}}度
  83. </view>
  84. <view class="electric-quantity" v-if="item.classify==2&&(regUserCard.chargeDegreeLimit==0)&&regUserCard.saveInformation">
  85. 已用{{regUserCard.saveInformation.num}}次 /
  86. 共省{{regUserCard.saveInformation.saveMoney}}元
  87. </view>
  88. </view>
  89. <ujp-line-progress v-if="regUserCard.status==1" active-color="#2979ff"
  90. :percent="thispercent(regUserCard)"></ujp-line-progress>
  91. <view class="bottom" v-if="regUserCard.status==1">
  92. <view class="right-corner">
  93. <img class="rightCorner" src="@/assets/img/rightCorner.png" alt="">
  94. <img v-if="item.type==3" class="icon" src="@/assets/img/mb-times@3x.png" alt="">
  95. <img v-if="item.type==3" class="picc" src="@/assets/img/picc.png" alt="">
  96. </view>
  97. </view>
  98. </view>
  99. <img class="cardCover" src="@/assets/img/cardCover.png" alt="">
  100. </view>
  101. <!-- 卡片信息 -->
  102. <view class="main" v-if="regUserCard.status==2">
  103. <view class="details">
  104. <view class="headline">
  105. <view class="title">
  106. 卡片信息
  107. </view>
  108. <view class="show" v-if="!this.showHide" @click="showHide=true">
  109. 显示<u-icon name="eye"></u-icon>
  110. </view>
  111. <view class="hide" v-if="this.showHide" @click="showHide=false">
  112. 隐藏<u-icon name="eye-off"></u-icon>
  113. </view>
  114. </view>
  115. <view class="content" v-if="this.showHide">
  116. <view class="item">
  117. <view class="item-title">
  118. 卡名
  119. </view>
  120. <view class="item-value">
  121. {{item.name}}
  122. </view>
  123. </view>
  124. <view class="item" v-if="item.type==4">
  125. <view class="item-title">
  126. 折扣率
  127. </view>
  128. <view class="item-value" style="
  129. ">
  130. {{item.remark}}
  131. </view>
  132. </view>
  133. <view class="item" v-else >
  134. <view class="item-title">
  135. 折扣率
  136. </view>
  137. <view class="item-value">
  138. {{regUserCard.classify==1?"服务费全免":""}}
  139. {{regUserCard.classify==2?"服务费"+(item.serviceFeeDiscountRate/10)+"折":""}}
  140. </view>
  141. </view>
  142. <view class="item">
  143. <view class="item-title">
  144. 规格
  145. </view>
  146. <view class="item-value" v-if="regUserCard.classify==1">
  147. 服务费全免 (有效期{{setValidity(item.periodOfValidity)}})
  148. </view>
  149. <view class="item-value" v-if="regUserCard.classify==2">
  150. 可用{{item.chargeDegreeLimit}}度(有效期{{setValidity(item.periodOfValidity)}})
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <!-- 按钮 -->
  156. <view class="btn" v-if="isMe">
  157. <button class="share" @click="show=true">转赠分享<img class="icon"
  158. src="@/assets/img/riLine-gift-2-line@3x.png" alt=""></button>
  159. <button class="activate" @click="show2Btn">立即激活</button>
  160. </view>
  161. <view class="btn2" v-else>
  162. <button class="get" @click="show2Btn">领用会员卡</button>
  163. </view>
  164. </view>
  165. <!-- 卡片信息 -->
  166. <view class="main" v-if="regUserCard.status==1">
  167. <view class="title">
  168. 会员信息
  169. </view>
  170. <view class="details">
  171. <view class="item">
  172. <view class="item-title">
  173. 会员昵称
  174. </view>
  175. <view class="item-value">
  176. {{userInfo.nickName}}
  177. </view>
  178. </view>
  179. <view class="item">
  180. <view class="item-title">
  181. 绑定账号
  182. </view>
  183. <view class="item-value">
  184. {{getphone(userInfo.phone)}}
  185. </view>
  186. </view>
  187. <view class="item">
  188. <view class="item-title">
  189. 绑定车辆
  190. </view>
  191. <view class="item-value">
  192. {{userInfo.carNum}}
  193. </view>
  194. </view>
  195. </view>
  196. <view class="title">
  197. 卡片信息
  198. </view>
  199. <view class="details">
  200. <view class="item">
  201. <view class="item-title">
  202. 卡状态
  203. </view>
  204. <view class="item-value">
  205. 已激活
  206. </view>
  207. </view>
  208. <view class="item">
  209. <view class="item-title">
  210. 卡名
  211. </view>
  212. <view class="item-value">
  213. {{item.name}}
  214. </view>
  215. </view>
  216. <view class="item" v-if="item.type==4">
  217. <view class="item-title">
  218. 折扣率
  219. </view>
  220. <view class="item-value" style="
  221. ">
  222. {{item.remark}}
  223. </view>
  224. </view>
  225. <view class="item" v-else>
  226. <view class="item-title">
  227. 折扣率
  228. </view>
  229. <view class="item-value" v-if="item.classify==1">
  230. 服务费全免
  231. </view>
  232. <view class="item-value" v-if="item.classify==2">
  233. {{item.serviceFeeDiscountRate/10}}折
  234. </view>
  235. </view>
  236. <view class="item" >
  237. <view class="item-title">
  238. 规格
  239. </view>
  240. <view class="item-value" v-if="regUserCard.classify==1">
  241. 服务费全免 (有效期{{setValidity(item.periodOfValidity)}})
  242. </view>
  243. <view class="item-value" v-if="regUserCard.classify==2&&regUserCard.chargeDegreeLimit">
  244. 可用{{item.chargeDegreeLimit}}度(有效期{{setValidity(item.periodOfValidity)}})
  245. </view>
  246. <view class="item-value" v-if="regUserCard.classify==2&&!regUserCard.chargeDegreeLimit">
  247. 不限充电度数(有效期{{setValidity(item.periodOfValidity)}})
  248. </view>
  249. </view>
  250. <view class="item">
  251. <view class="item-title">
  252. 有效期
  253. </view>
  254. <view class="item-value">
  255. {{regUserCard.startTime.substring(0,10)}}至{{regUserCard.endTime.substring(0,10)}}
  256. </view>
  257. </view>
  258. <view class="item" v-if="regUserCard.classify==2&&regUserCard.chargeDegreeLimit">
  259. <view class="item-title">
  260. 剩余度数
  261. </view>
  262. <view class="item-value">
  263. {{(regUserCard.chargeDegreeLimit-regUserCard.chargedDegree).toFixed(0)}}度
  264. </view>
  265. </view>
  266. <view class="item">
  267. <view class="item-title">
  268. 卡号
  269. </view>
  270. <view class="item-value">
  271. {{regUserCard.cardNo}}
  272. </view>
  273. </view>
  274. </view>
  275. <!-- 按钮 -->
  276. <button class="check" @click="gotoUrl('pages/article/details?code=FWF6ZK')">查看使用规则</button>
  277. </view>
  278. </view>
  279. </template>
  280. <script>
  281. // import * as API from '@/apis/index.js'
  282. import * as API from '@/apis/order.js'
  283. import * as API_weixin from '@/apis/weixin.js'
  284. import wx from 'weixin-js-sdk'
  285. import {
  286. newDate,
  287. daysDistance
  288. } from '@/utils'
  289. export default {
  290. data() {
  291. return {
  292. id: "",
  293. item: {},
  294. regUserCard: {},
  295. orderInfo: {},
  296. content: "400-8899-619",
  297. openModalBl: false,
  298. expireUserCardList: [],
  299. showHide: false,
  300. show2: false,
  301. show: false,
  302. content2: '确认激活此会员卡吗?',
  303. content3: '领用会员卡需要注册成为会员,点击前往',
  304. show3: false,
  305. //userCard: {},
  306. isMe: false,
  307. projectName: "",
  308. userInfo: {},
  309. carNum: ""
  310. }
  311. },
  312. onLoad(op) {
  313. this.id = op.id
  314. this.get_wx_config();
  315. //this.userInfo=this.carhelp.getPersonInfo()
  316. this.projectName = process.car.ProjectName;
  317. var info = this.carhelp.getPersonInfo()
  318. if (info.id && info.userType == 2) {
  319. } else {
  320. this.show3 = true
  321. }
  322. this.getChargeList();
  323. },
  324. onReady() {
  325. var consumerPhone = "400-8899-619"
  326. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  327. if (consumerPhone) {
  328. this.content = consumerPhone
  329. }
  330. },
  331. methods: {
  332. getphone(phone) {
  333. var phoneget = ""
  334. if (phone) {
  335. var phone1 = phone.slice(0, 3);
  336. var phone2 = phone.slice(-4);
  337. phoneget = phone1 + '****' + phone2;
  338. }
  339. return phoneget;
  340. },
  341. show2Btn() {
  342. var info = this.carhelp.getPersonInfo()
  343. if (info.id && info.userType == 2) {
  344. this.show2 = true
  345. } else {
  346. this.show3 = true
  347. }
  348. },
  349. confirmShow3() {
  350. uni.navigateTo({
  351. url: "/pages/login/login?jpcode2=card&codeId=" + this.id
  352. })
  353. },
  354. confirmShow2() {
  355. uni.showLoading({
  356. title: "加载中",
  357. mask: true,
  358. })
  359. API.activateCard({
  360. id: this.id
  361. }).then((res) => {
  362. uni.hideLoading();
  363. uni.showToast({
  364. title: "领取成功"
  365. })
  366. this.getChargeList();
  367. //console.log(obj)
  368. //this.recordsTotal = res.data.recordsTotal;
  369. }).catch(error => {
  370. uni.showToast({
  371. title: error,
  372. icon: "none"
  373. })
  374. })
  375. },
  376. //获取微信jssdk配置信息
  377. get_wx_config() {
  378. //("get_wx_configget_wx_configget_wx_configget_wx_config")
  379. var _this = this
  380. API_weixin.getConfig().then(response => {
  381. var wxconfig = response.data.wxConfig;
  382. console.log(222)
  383. wx.config({
  384. debug: false, // 开启调试模式,
  385. appId: wxconfig.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
  386. timestamp: wxconfig.timestamp, // 必填,生成签名的时间戳
  387. nonceStr: wxconfig.nonceStr, // 必填,生成签名的随机串
  388. signature: wxconfig.signature, // 必填,签名,见附录1
  389. jsApiList: ['updateAppMessageShareData',
  390. 'updateTimelineShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage',
  391. 'onMenuShareQQ', 'onMenuShareQZone'
  392. ], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
  393. });
  394. console.log(222)
  395. _this.wxShare()
  396. wx.error(function(res) {
  397. console.log('微信api配置出错');
  398. });
  399. }).catch(error => {
  400. //(error);
  401. })
  402. },
  403. //微信分享自定义
  404. wxShare() {
  405. console.log(111)
  406. var img =
  407. "http://oss.xiaoxinda.com/charging/chargingconfigure/2022/6/6/ec228c56-487a-4ae1-ac6f-37284060fbba/hongbao.jpg"
  408. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  409. // if (indexLogo) {
  410. // this.indexLogo = indexLogo;
  411. // }
  412. var info = this.carhelp.getPersonInfo()
  413. //var img=require("@/static/img/aboutus.png")
  414. ////(this.nowItem);
  415. var ProjectName = process.car.ProjectName; //info.nickName+
  416. var nickName = info.nickName ? info.nickName : '好友';
  417. var title = nickName + "赠送您一张"
  418. if(this.item.type==4){
  419. title += "'"+this.projectName+this.item.name+"'"
  420. }else if (this.item.classify == 1) {
  421. title += "'服务费月卡'"
  422. } else if (this.item.classify == 2 && this.item.serviceFeeDiscountRate == 60) {
  423. title += "'服务费6折卡'"
  424. } else if (this.item.classify == 2 && this.item.serviceFeeDiscountRate == 50 && this.item
  425. .periodOfValidity == 365) {
  426. title += "'充电5折卡年卡'"
  427. } else if (this.item.classify == 2 && this.item.serviceFeeDiscountRate == 50) {
  428. title += "'服务费5折卡'"
  429. }
  430. var desc = ProjectName
  431. let joinUrl = window.location.href.split("/team51/")[0] + "/team51/#/pages/cardBag/cardDetail?id=" + this
  432. .id
  433. //this.joinUrl=joinUrl;
  434. var _this = this;
  435. wx.ready(function() {
  436. wx.onMenuShareAppMessage({
  437. title: title,
  438. desc: desc,
  439. link: joinUrl,
  440. imgUrl: img,
  441. success: function() {
  442. // 设置成功
  443. _this.$emit("wxShare", null);
  444. }
  445. })
  446. wx.onMenuShareTimeline({
  447. title: title,
  448. desc: desc,
  449. link: joinUrl,
  450. imgUrl: img,
  451. success: function() {
  452. // 设置成功
  453. _this.$emit("wxShare", null);
  454. }
  455. })
  456. wx.updateAppMessageShareData({
  457. title: title,
  458. desc: desc,
  459. link: joinUrl,
  460. imgUrl: img,
  461. success: function() {
  462. //("updateAppMessageShareData")
  463. // 设置成功
  464. _this.$emit("wxShare", null);
  465. }
  466. })
  467. wx.updateTimelineShareData({
  468. title: title,
  469. desc: desc,
  470. link: joinUrl,
  471. imgUrl: img,
  472. success: function() {
  473. //("updateTimelineShareData")
  474. // 设置成功
  475. _this.$emit("wxShare", null);
  476. }
  477. })
  478. console.log("readyreadyreadyreadyready")
  479. });
  480. },
  481. thisendTime(endTime) {
  482. if (endTime) {
  483. var reg = new RegExp('-', 'gi')
  484. var str = endTime.substring(0, 10).replace(reg, '.')
  485. return str
  486. }
  487. return ''
  488. },
  489. thispercent(userCard) {
  490. if (userCard.classify == 1||(userCard.classify==2&&userCard.chargeDegreeLimit==0)) {
  491. var k1 = daysDistance(userCard.startTime, userCard.endTime)
  492. var k2 = this.thisdaysDistance(userCard.endTime)
  493. var p = (k1 - k2) / k2 * 100
  494. if (p > 100) {
  495. p = 100
  496. }
  497. return p.toFixed(0)
  498. } else if (userCard.classify == 2) {
  499. var p = 0
  500. if (userCard && userCard.chargeDegreeLimit) {
  501. p = userCard.chargedDegree / userCard.chargeDegreeLimit * 100
  502. }
  503. if (p > 100) {
  504. p = 100
  505. }
  506. return p.toFixed(0)
  507. } else {
  508. return 0
  509. }
  510. },
  511. thisdaysDistance(endTime) {
  512. var date = new Date()
  513. var date2 = newDate(endTime);
  514. return daysDistance(date, date2)
  515. },
  516. thisdaysDistance2() {
  517. if (this.item.endTime) {
  518. var date = newDate(this.item.startTime)
  519. var date2 = newDate(this.item.endTime);
  520. return daysDistance(date, date2)
  521. }
  522. return 0
  523. },
  524. regUserCarList() {
  525. uni.showLoading({
  526. title: "加载中",
  527. mask: true,
  528. })
  529. API.regUserCarList({
  530. id: this.id
  531. }).then((res) => {
  532. uni.hideLoading();
  533. if (res.data && res.data.length) {
  534. this.carNum = res.data[0].carNum
  535. }
  536. //this.recordsTotal = res.data.recordsTotal;
  537. }).catch(error => {
  538. uni.showToast({
  539. title: error,
  540. icon: "none"
  541. })
  542. })
  543. },
  544. getChargeList() {
  545. uni.showLoading({
  546. title: "加载中",
  547. mask: true,
  548. })
  549. API.buyCardDetail({
  550. id: this.id
  551. }).then((res) => {
  552. uni.hideLoading();
  553. this.item = res.data.monthlyRentCard;
  554. this.regUserCard = res.data.regUserCard;
  555. // if(this.regUserCard.status==1){
  556. // this.regUserCarList()
  557. // }
  558. this.userInfo = res.data.buyUser;
  559. var info = this.carhelp.getPersonInfo()
  560. if (info && info.id && info.id == this.regUserCard.regUserId) {
  561. this.isMe = true
  562. }
  563. this.orderInfo = res.data.orderInfo;
  564. //console.log(obj)
  565. //this.recordsTotal = res.data.recordsTotal;
  566. }).catch(error => {
  567. uni.showToast({
  568. title: error,
  569. icon: "none"
  570. })
  571. })
  572. },
  573. confirmPhone() {
  574. this.openModalBl = false;
  575. uni.makePhoneCall({
  576. phoneNumber: this.content //仅为示例
  577. });
  578. },
  579. }
  580. }
  581. </script>
  582. <style lang="scss" scoped>
  583. page {
  584. background-color: #fff;
  585. }
  586. // 头部
  587. .header4 {
  588. padding: 24rpx 32rpx 0;
  589. opacity: 0.9;
  590. background: linear-gradient(30deg, rgba(59, 182, 254, 1) 13.4%, rgba(0, 185, 98, 1) 85.87%);
  591. position: relative;
  592. .discount-card-4 {
  593. background: url(@/assets/img/card/lovecn.jpg);
  594. background-size: 686rpx 400rpx;
  595. border-radius: 8px 8px 0 0;
  596. // background-color: #1D1F2A;
  597. padding: 40rpx;
  598. margin-top: 24rpx;
  599. height: 400rpx;
  600. position: relative;
  601. .corner-mark {
  602. width: 128rpx;
  603. height: 128rpx;
  604. position: absolute;
  605. top: 0;
  606. right: 0;
  607. }
  608. .img {
  609. margin-top: 120rpx;
  610. color: rgba(255, 214, 149, 1);
  611. font-size: 48rpx;
  612. font-family: "SimSun", Arial, sans-serif;
  613. font-weight: 400;
  614. text-shadow: 2px 1px 0px #800400 ;
  615. }
  616. .u-progress {
  617. //height: 20rpx !important;
  618. background-color: rgb(207, 76, 66) !important;
  619. color: #fff;
  620. }
  621. .progress {
  622. display: flex;
  623. justify-content: space-between;
  624. color: #FFF;
  625. font-size: 24rpx;
  626. margin-bottom: 16rpx;
  627. //margin-top: 24rpx;
  628. }
  629. ::v-deep .u-active {
  630. background: linear-gradient(84.49deg, rgba(59, 182, 254, 1) 4.25%, rgba(0, 185, 98, 1) 95.02%);
  631. }
  632. .top {
  633. .right-corner {
  634. display: flex;
  635. align-items: center;
  636. height: 36rpx;
  637. .rightCorner {
  638. width: 168rpx;
  639. margin-left: 8rpx;
  640. }
  641. .icon {
  642. width: 24rpx;
  643. height: 24rpx;
  644. margin-left: 8rpx;
  645. }
  646. .picc {
  647. width: 124rpx;
  648. height: 32rpx;
  649. margin-left: 8rpx;
  650. }
  651. }
  652. }
  653. // 右下角角标
  654. .bottom {
  655. position: absolute;
  656. bottom: 48rpx;
  657. right: 40rpx;
  658. .right-corner {
  659. display: flex;
  660. align-items: center;
  661. justify-content: flex-end;
  662. height: 32rpx;
  663. .rightCorner {
  664. width: 148rpx;
  665. }
  666. .icon {
  667. width: 24rpx;
  668. height: 24rpx;
  669. margin-left: 8rpx;
  670. }
  671. .picc {
  672. width: 124rpx;
  673. margin-left: 8rpx;
  674. }
  675. }
  676. }
  677. }
  678. .cardCover {
  679. width: 100%;
  680. height: 70rpx;
  681. position: absolute;
  682. left: 0;
  683. right: 0;
  684. bottom: 0rpx;
  685. z-index: 999;
  686. }
  687. .card-number2{
  688. font-size: 24rpx;
  689. color: rgba(255, 255, 255, 1);
  690. }
  691. .card-number{
  692. font-size: 28rpx;
  693. color: rgba(255, 255, 255, 1);
  694. }
  695. }
  696. // 头部
  697. .header {
  698. padding: 24rpx 32rpx 0;
  699. opacity: 0.9;
  700. background: linear-gradient(30deg, rgba(59, 182, 254, 1) 13.4%, rgba(0, 185, 98, 1) 85.87%);
  701. position: relative;
  702. .discount-card {
  703. background: url(@/assets/img/cardDetail.png);
  704. background-size: 686rpx 400rpx;
  705. border-radius: 8px 8px 0 0;
  706. background-color: #1D1F2A;
  707. padding: 24rpx;
  708. margin-top: 24rpx;
  709. height: 400rpx;
  710. position: relative;
  711. .corner-mark {
  712. width: 128rpx;
  713. height: 128rpx;
  714. position: absolute;
  715. top: 0;
  716. right: 0;
  717. }
  718. .img {
  719. //width: 262rpx;
  720. height: 56rpx;
  721. img {
  722. //width: 100%;
  723. height: 56rpx;
  724. }
  725. }
  726. .icon_crown{
  727. display: flex;
  728. align-items: center;
  729. color: rgba(225, 192, 130, 1);
  730. }
  731. .u-progress {
  732. height: 20rpx !important;
  733. }
  734. .progress {
  735. display: flex;
  736. justify-content: space-between;
  737. color: rgba(219, 219, 219, 1);
  738. font-size: 24rpx;
  739. margin-bottom: 16rpx;
  740. margin-top: 24rpx;
  741. }
  742. ::v-deep .u-active {
  743. background: linear-gradient(84.49deg, rgba(59, 182, 254, 1) 4.25%, rgba(0, 185, 98, 1) 95.02%);
  744. }
  745. .top {
  746. .right-corner {
  747. display: flex;
  748. align-items: center;
  749. height: 36rpx;
  750. .rightCorner {
  751. width: 148rpx;
  752. margin-left: 8rpx;
  753. }
  754. .icon {
  755. width: 24rpx;
  756. height: 24rpx;
  757. margin-left: 8rpx;
  758. }
  759. .picc {
  760. width: 124rpx;
  761. height: 32rpx;
  762. margin-left: 8rpx;
  763. }
  764. }
  765. }
  766. // 右下角角标
  767. .bottom {
  768. position: absolute;
  769. bottom: 48rpx;
  770. right: 40rpx;
  771. .right-corner {
  772. display: flex;
  773. align-items: center;
  774. justify-content: flex-end;
  775. height: 32rpx;
  776. .rightCorner {
  777. width: 148rpx;
  778. }
  779. .icon {
  780. width: 24rpx;
  781. height: 24rpx;
  782. margin-left: 8rpx;
  783. }
  784. .picc {
  785. width: 124rpx;
  786. margin-left: 8rpx;
  787. }
  788. }
  789. }
  790. }
  791. .cardCover {
  792. width: 100%;
  793. height: 70rpx;
  794. position: absolute;
  795. left: 0;
  796. right: 0;
  797. bottom: 0rpx;
  798. z-index: 999;
  799. }
  800. }
  801. .header2 {
  802. padding: 24rpx 32rpx 0;
  803. opacity: 0.9;
  804. background: linear-gradient(30deg, rgba(59, 182, 254, 1) 13.4%, rgba(0, 185, 98, 1) 85.87%);
  805. position: relative;
  806. .discount-card {
  807. background: url(@/assets/img/cardDetail.png);
  808. background-size: 686rpx 400rpx;
  809. border-radius: 8px 8px 0 0;
  810. background-color: #1D1F2A;
  811. padding: 24rpx;
  812. margin-top: 24rpx;
  813. height: 400rpx;
  814. position: relative;
  815. .corner-mark {
  816. width: 128rpx;
  817. height: 128rpx;
  818. position: absolute;
  819. top: 0;
  820. right: 0;
  821. }
  822. .img {
  823. margin: 82rpx auto 0;
  824. width: 486rpx;
  825. height: 104rpx;
  826. img {
  827. width: 100%;
  828. }
  829. }
  830. .top {
  831. .right-corner {
  832. display: flex;
  833. align-items: center;
  834. height: 36rpx;
  835. .rightCorner {
  836. width: 148rpx;
  837. margin-left: 8rpx;
  838. }
  839. .icon {
  840. width: 24rpx;
  841. height: 24rpx;
  842. margin-left: 8rpx;
  843. }
  844. .picc {
  845. width: 124rpx;
  846. height: 32rpx;
  847. margin-left: 8rpx;
  848. }
  849. }
  850. }
  851. }
  852. .cardCover {
  853. width: 100%;
  854. height: 70rpx;
  855. position: absolute;
  856. left: 0;
  857. right: 0;
  858. bottom: 0rpx;
  859. z-index: 999;
  860. }
  861. .card-number {
  862. color: rgba(209, 178, 121, 1);
  863. text-align: center;
  864. margin-top: 8rpx;
  865. }
  866. }
  867. // 卡片信息
  868. .main {
  869. background-color: #fff;
  870. padding: 32rpx;
  871. padding-bottom: 60px;
  872. .headline {
  873. display: flex;
  874. justify-content: space-between;
  875. align-items: center;
  876. font-size: 32rpx;
  877. .title {
  878. color: rgba(16, 16, 16, 1);
  879. }
  880. .show,
  881. .hide {
  882. color: rgba(119, 119, 119, 1);
  883. }
  884. }
  885. .title {
  886. color: rgba(16, 16, 16, 1);
  887. font-size: 32rpx;
  888. }
  889. .details {
  890. margin-top: 16rpx;
  891. border-radius: 12px;
  892. padding: 32rpx 24rpx;
  893. background-color: rgba(255, 255, 255, 1);
  894. text-align: center;
  895. border: 1px solid rgba(226, 226, 226, 1);
  896. margin-bottom: 40rpx;
  897. .item {
  898. display: flex;
  899. margin-top: 24rpx;
  900. .item-title {
  901. min-width: 128rpx;
  902. color: #777777;
  903. text-align: left;
  904. }
  905. .item-value {
  906. margin-left: 16rpx;
  907. color: #101010;
  908. text-align: start;
  909. }
  910. }
  911. }
  912. .btn2 {
  913. margin-top: 32rpx;
  914. .get {
  915. border-radius: 50px;
  916. background: linear-gradient(90deg, rgba(0, 171, 91, 1) 0%, rgba(0, 209, 66, 1) 100%);
  917. color: rgba(255, 255, 255, 1);
  918. font-size: 16px;
  919. text-align: center;
  920. }
  921. }
  922. //按钮
  923. .btn {
  924. margin-top: 32rpx;
  925. display: flex;
  926. justify-content: space-between;
  927. .share {
  928. width: 328rpx;
  929. height: 88rpx;
  930. line-height: 88rpx;
  931. border-radius: 50px;
  932. background-color: rgba(255, 255, 255, 1);
  933. text-align: center;
  934. border: 1px solid rgba(255, 150, 0, 1);
  935. color: rgba(255, 150, 0, 1);
  936. font-size: 32rpx;
  937. display: flex;
  938. align-items: center;
  939. justify-content: center;
  940. .icon {
  941. width: 36rpx;
  942. height: 36rpx;
  943. }
  944. }
  945. .activate {
  946. width: 328rpx;
  947. height: 88rpx;
  948. line-height: 88rpx;
  949. border-radius: 50px;
  950. background: linear-gradient(90deg, rgba(0, 171, 91, 1) 0%, rgba(0, 209, 66, 1) 100%);
  951. color: rgba(255, 255, 255, 1);
  952. font-size: 32rpx
  953. }
  954. }
  955. }
  956. // 查看
  957. .check {
  958. position: fixed;
  959. bottom: 32rpx;
  960. left: 32rpx;
  961. right: 32rpx;
  962. font-size: 32rpx;
  963. border-radius: 50px;
  964. background-color: rgba(255, 255, 255, 1);
  965. color: rgba(0, 185, 98, 1);
  966. border: 1px solid rgba(0, 185, 98, 1);
  967. }
  968. </style>