cardDetail.vue 26 KB

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