index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <view class="index">
  3. <view class="head">
  4. </view>
  5. <view class="swiper">
  6. <template>
  7. <u-swiper :list="list" class="custom-swiper"></u-swiper>
  8. </template>
  9. </view>
  10. <view class="tag">
  11. <view class="item" v-for="item in tagList">
  12. <img src="../../static/index/Frame.png" alt="" />
  13. {{item.value}}
  14. </view>
  15. </view>
  16. <view class="recommend">
  17. <view class="tuijian_img">
  18. <img src="../../static/index/tuijian.png" alt="" />
  19. </view>
  20. <view class="recommend_js" v-for="(item,index) in rankingList" :key="index" @click="jumpDetail(item)">
  21. <view class="js_img">
  22. <!-- <image src="../../static/index/ranking.png" mode=""></image> -->
  23. <view class="border">
  24. <image :src="iamgeTitle+item.cPortrait" mode="" ></image>
  25. </view>
  26. </view>
  27. {{item.cNickName}}
  28. </view>
  29. </view>
  30. <view class="content">
  31. <view class="selcet_box">
  32. <view class="options" :class="currentIndex == index?'hover':''" v-for="(item,index) in selectList" :key="index"
  33. @click="selectOptions(item,index)">
  34. {{item.cdescribe}}
  35. </view>
  36. </view>
  37. <view class="menu">
  38. <view class="project" v-for="(item,index) in pojectList" :key="index" @click="goDetails(item.cId)">
  39. <view class="img">
  40. <image :src="$globalData.publicUrl + item.cCover"></image>
  41. <!-- <view class="time">
  42. {{item.nMinute}}分钟
  43. </view> -->
  44. </view>
  45. <view class="describe">
  46. <view class="name">
  47. {{item.cTitle}}
  48. </view>
  49. <view class="num">
  50. <view class="time">
  51. <img src="../../static/index/time.png" alt="" />
  52. {{item.nMinute}}分钟
  53. </view>
  54. <view class="time">
  55. <img src="../../static/index/people.png" alt="" />
  56. {{item.nSaleNumber}}人选择
  57. </view>
  58. </view>
  59. <view class="num">
  60. {{item.cLdList}}
  61. </view>
  62. <!-- <view class="num">
  63. 超{{item.nSaleNumber}}人选择
  64. </view> -->
  65. <view class="price_box">
  66. <view class="price">
  67. ¥<text>{{item.dPrice}}</text>
  68. </view>
  69. <view class="make" @click.stop="choose(item.cId)">
  70. 预约
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="container" v-if="showCoupon">
  78. <view class="coupon-box show">
  79. <view class="bgi">
  80. <image src="../../static/index/popup_bgi.png" mode=""></image>
  81. <view class="border">
  82. <image src="../../static/index/border.png" mode=""></image>
  83. </view>
  84. <view class="cut" @click="cut">
  85. <image src="../../static/other/cut.png" mode=""></image>
  86. </view>
  87. <view class="btn" @click="collection">
  88. <image src="../../static/index/collection.png" mode=""></image>
  89. </view>
  90. <view class="coupon">
  91. <view class="item" v-for="(item,index) in couponList">
  92. <view class="left">
  93. <text v-if="item.discountType == 3">¥{{item.discountValue}}<br /></text>
  94. <text v-else>{{item.rebValue}}折券<br /></text>
  95. <!-- ¥{{item.discountValue}}<br/> -->
  96. 有效期{{item.termDays}}天
  97. </view>
  98. <view class="right" v-if="item.discountType == 3">
  99. 满{{item.thresholdAmount}}减{{item.discountValue}}
  100. </view>
  101. <view class="right" v-else>
  102. 满{{item.thresholdAmount}}可用
  103. </view>
  104. <view class="one_btn" @click.stop="oneCollection(item)">
  105. <image src="../../static/index/one.png" mode=""></image>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- <view class="coupon-header">恭喜您获得优惠券</view>
  111. <view class="coupon-amount">{{ couponAmount }}</view>
  112. <view class="coupon-desc">{{ couponDesc }}</view>
  113. <button class="coupon-btn" @click="receiveCoupon">立即领取</button> -->
  114. </view>
  115. <view class="mask show" @click="hideCoupon"></view>
  116. </view>
  117. </view>
  118. </template>
  119. <script>
  120. // import { log } from 'util'
  121. import {
  122. slideshow,
  123. project,
  124. getwxQrCode,
  125. brightSpot,
  126. getAccessToken,
  127. windows,
  128. couponReceive,
  129. ranking
  130. } from '../../api/index'
  131. export default {
  132. data() {
  133. return {
  134. iamgeTitle:this.$globalData.publicUrl,
  135. showCoupon: false,
  136. selectList: [{
  137. cdescribe: "热门"
  138. }],
  139. list: [],
  140. indicatorDots: true,
  141. autoplay: true,
  142. pojectList: [],
  143. currentIndex: 0,
  144. cLdList: '',
  145. code: '',
  146. couponList: [],
  147. tagList: [{
  148. value: '实名认证'
  149. },
  150. {
  151. value: '爽约包赔'
  152. },
  153. {
  154. value: '超时秒退'
  155. },
  156. {
  157. value: '资质证书'
  158. }
  159. ],
  160. rankingList: [{
  161. name: 'sss',
  162. img: '../..//static/identify/logo.png'
  163. },
  164. {
  165. name: 'sss',
  166. img: '../..//static/identify/logo.png'
  167. },
  168. {
  169. name: 'sss',
  170. img: '../..//static/identify/logo.png'
  171. },
  172. {
  173. name: 'sss',
  174. img: '../..//static/identify/logo.png'
  175. }
  176. ]
  177. }
  178. },
  179. onShow() {
  180. console.log(this.$globalData.publicUrl)
  181. uni.request({
  182. url: 'https://restapi.amap.com/v3/ip?parameters',
  183. data: {
  184. key: '5457092e6c62b83c1b2e45dbe973d858'
  185. },
  186. success(res) {
  187. uni.setStorageSync('selectCity', res.data.city.slice(0, 2))
  188. // this.$router.go(0)
  189. }
  190. })
  191. this.getList()
  192. this.getProject()
  193. this.getbrightSpot()
  194. this.getlocaltion()
  195. this.getPopup()
  196. this.getranking()
  197. },
  198. onHide() {
  199. this.list = []
  200. this.selectList = [{
  201. cdescribe: "热门"
  202. }]
  203. },
  204. onLoad(parm) {
  205. let that = this
  206. that.cont()
  207. // if (!options == '') {
  208. // uni.setStorageSync('wx_copenid', options.openid)
  209. // uni.setStorageSync('access-token', options.token)
  210. // }else{
  211. // }
  212. // uni.setStorageSync('wx_copenid', 'o-HEJ6VP2YNi0HPeLaIHCQsQD69s')
  213. // uni.setStorageSync('access-token', 'eyJhbGciOiJIUzUxMiJ9.eyJ0ZjoiOiJlNGNiNjY0ZS05Y2Q5LTRlOWItODU1Yy0zN2RlNjRiOGI3ZDIifQ.xj0ZBULLc7wYOaUgDQd_zbeynbJ8M3M-UQM6JPUKcV9rIWVlax8dJnU247om39nialcKnklKFZ8m8oerc-NY0A')
  214. },
  215. methods: {
  216. getranking() {
  217. let data = {
  218. deptName:uni.getStorageSync('selectCity')
  219. }
  220. ranking(data).then(res => {
  221. console.log(res)
  222. this.rankingList = res.data.slice(0, 4)
  223. })
  224. },
  225. cut() {
  226. this.showCoupon = false
  227. },
  228. oneCollection(item) {
  229. let data = {
  230. couponIds: [],
  231. openId: uni.getStorageSync('wx_copenid')
  232. }
  233. data.couponIds.push(item.id)
  234. couponReceive(data).then(res => {
  235. this.showCoupon = false
  236. uni.showToast({
  237. title: '已领取',
  238. icon: 'none'
  239. })
  240. })
  241. },
  242. collection() {
  243. let data = {
  244. couponIds: [],
  245. openId: uni.getStorageSync('wx_copenid')
  246. }
  247. this.couponList.forEach(item => {
  248. data.couponIds.push(item.id)
  249. })
  250. couponReceive(data).then(res => {
  251. this.showCoupon = false
  252. uni.showToast({
  253. title: '已领取',
  254. icon: 'none'
  255. })
  256. })
  257. },
  258. getPopup() {
  259. let data = {}
  260. data.openid = uni.getStorageSync('wx_copenid')
  261. data.deptName = uni.getStorageSync('selectCity')
  262. windows(data).then(res => {
  263. if (res.data.data.length > 0) {
  264. this.showCoupon = true
  265. this.couponList = res.data.data
  266. } else {
  267. return
  268. }
  269. })
  270. },
  271. // showCouponBox() {
  272. // this.showCoupon = true;
  273. // setTimeout(() => {
  274. // this.$refs.couponBox.style.transform = 'translateY(0)';
  275. // this.$refs.couponBox.style.opacity = 1;
  276. // }, 100);
  277. // },
  278. // hideCoupon() {
  279. // this.$refs.couponBox.style.transform = 'translateY(-100%)';
  280. // this.$refs.couponBox.style.opacity = 0;
  281. // setTimeout(() => {
  282. // this.showCoupon = false;
  283. // }, 300);
  284. // },
  285. receiveCoupon() {
  286. // TODO: 领取优惠券的业务逻辑
  287. },
  288. // 正则匹配请求地址中的参数函数
  289. getUrlCode(name) {
  290. return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [,
  291. ''
  292. ])[1].replace(/\+/g, '%20')) || null
  293. },
  294. cont() {
  295. let wxCode = this.getUrlCode('code'); // 截取路径中的code,如果没有就去微信授权,如果已经获取到了就直接传code给后台获取openId
  296. let data = {
  297. code: wxCode
  298. }
  299. if (wxCode !== '') {
  300. getAccessToken(data).then(res => {
  301. if (res.data.code == 200) {
  302. uni.setStorageSync('wx_copenid', res.data.data.copenid)
  303. uni.setStorageSync('access-token', res.data.data.token)
  304. }
  305. })
  306. }
  307. },
  308. getlocaltion() {
  309. // uni.request({
  310. // url:'https://restapi.amap.com/v3/ip?parameter',
  311. // data:{
  312. // key:'5457092e6c62b83c1b2e45dbe973d858'
  313. // },
  314. // success(res) {
  315. // console.log(res.data.city)
  316. // this.city = '555'
  317. // console.log(this.city)
  318. // // this.$router.go(0)
  319. // }
  320. // })
  321. uni.getLocation({
  322. type: 'wgs84', // 默认为 wgs84 返回 gps 坐标,可以设置为 gcj02 返回可用于 `uni.openLocation` 的坐标
  323. success: function(res) {
  324. uni.setStorageSync('latitude', res.latitude)
  325. uni.setStorageSync('longitude', res.longitude)
  326. },
  327. });
  328. },
  329. getbrightSpot() {
  330. brightSpot().then(res => {
  331. // this.selectList = res.data.data
  332. this.selectList.push(...res.data.data)
  333. })
  334. },
  335. selectOptions(item, index) {
  336. this.currentIndex = index
  337. if (item.cdescribe == '热门') {
  338. this.cLdList = ''
  339. } else {
  340. this.cLdList = item.cdescribe
  341. }
  342. this.getProject()
  343. },
  344. getList() {
  345. this.list = []
  346. slideshow({
  347. current: 1,
  348. size: 10,
  349. }).then(res => {
  350. res.data.data.forEach(item => {
  351. this.list.push(this.$globalData.publicUrl + item.cImgUrl)
  352. })
  353. })
  354. },
  355. getProject() {
  356. project({
  357. current: 1,
  358. size: 10,
  359. cLdList: this.cLdList
  360. }).then(res => {
  361. this.pojectList = res.data.data
  362. })
  363. },
  364. choose(cId) {
  365. uni.setStorageSync('projectId', cId)
  366. uni.switchTab({
  367. url: '/pages/identify/identify',
  368. })
  369. },
  370. goDetails(cid) {
  371. let deptName = uni.getStorageSync('selectCity')
  372. uni.navigateTo({
  373. url: '/pages/index/details?cid=' + cid + '&deptName=' + deptName
  374. })
  375. },
  376. cancel() {
  377. this.closeModal();
  378. },
  379. confirm() {
  380. this.closeModal();
  381. },
  382. closeModal() {
  383. // uni.navigateBack();
  384. this.show = false
  385. },
  386. jumpDetail(item){
  387. if (!uni.getStorageSync('access-token')) {
  388. uni.showModal({
  389. title: '请先登录!',
  390. success: (res) => {
  391. if (res.confirm) {
  392. this.list = []
  393. uni.switchTab({
  394. url: '/pages/my/my'
  395. })
  396. } else if (res.cancel) {
  397. return
  398. }
  399. }
  400. })
  401. return
  402. } else {
  403. uni.navigateTo({
  404. url: '/pages/identify/details?id=' + item.id
  405. })
  406. }
  407. }
  408. }
  409. }
  410. </script>
  411. <style lang="scss" scoped>
  412. body::-webkit-scrollbar {
  413. display: none;
  414. }
  415. .u-full-content {
  416. // background-color: #00C777;
  417. background: rgba(237, 237, 237, 0.9);
  418. }
  419. .u-update-content {
  420. font-size: 26rpx;
  421. color: $u-content-color;
  422. line-height: 1.7;
  423. padding: 30rpx;
  424. }
  425. .index {
  426. width: 100vw;
  427. height: 100%;
  428. // display: flex;
  429. // flex-direction: column;
  430. background: linear-gradient(to bottom right, rgb(246, 249, 242), rgb(210, 241, 243));
  431. // padding: 0 10px;
  432. box-sizing: border-box;
  433. overflow-y: auto;
  434. // .head {
  435. // padding: 0px 32rpx;
  436. // // margin-top: 32rpx;
  437. // // margin-bottom: 28rpx;
  438. // // width: 100%;
  439. // height: 36rpx;
  440. // display: flex;
  441. // align-items: center;
  442. // font-weight: 500;
  443. // font-size: 38rpx;
  444. // color: #313233;
  445. // }
  446. .swiper {
  447. padding: 16rpx 32rpx;
  448. ::v-deepuni-swiper {
  449. height: 320rpx !important;
  450. }
  451. }
  452. .tag {
  453. width: 100%;
  454. padding: 0px 32rpx;
  455. margin: 28rpx 0px;
  456. box-sizing: border-box;
  457. display: flex;
  458. justify-content: space-around;
  459. .item {
  460. width: 160rpx;
  461. height: 44rpx;
  462. background: rgba(0, 184, 151, 0.06);
  463. border-radius: 8rpx 8rpx 8rpx 8rpx;
  464. font-size: 24rpx;
  465. color: #0FB4AC;
  466. display: flex;
  467. align-items: center;
  468. justify-content: center;
  469. img {
  470. margin-right: 8rpx;
  471. }
  472. }
  473. }
  474. .recommend {
  475. display: flex;
  476. align-items: center;
  477. justify-content: space-between;
  478. width: calc(100% - 64rpx);
  479. margin: 12rpx auto 16rpx;
  480. height: 218rpx;
  481. padding: 40rpx 30rpx;
  482. position: relative;
  483. background: #FFFFFF;
  484. box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.15);
  485. border-radius: 24rpx;
  486. box-sizing: border-box;
  487. .tuijian_img {
  488. position: absolute;
  489. top: 0;
  490. left: 0;
  491. width: 75rpx;
  492. height: 40rpx;
  493. img {
  494. width: 100%;
  495. height: 100%;
  496. }
  497. }
  498. .recommend_js {
  499. text-align: center;
  500. flex: 1;
  501. display: flex;
  502. flex-direction: column;
  503. justify-content: center;
  504. align-items: center;
  505. font-size: 24rpx;
  506. color: #333333;
  507. .js_img{
  508. width: 120rpx;
  509. height: 120rpx;
  510. position: relative;
  511. border-radius: 50%;
  512. // overflow: hidden;
  513. image {
  514. width: 100%;
  515. height: 100%;
  516. margin-bottom: 12rpx;
  517. // z-index: 9;
  518. z-index: 999;
  519. }
  520. .border{
  521. position: absolute;
  522. top: 0;
  523. left: 0;
  524. width: 120rpx;
  525. height: 120rpx;
  526. image{
  527. width: 100%;
  528. height: 100%;
  529. z-index: 99;
  530. margin: 0;
  531. }
  532. // background-image: url(../../static/index/ranking.png);
  533. // background-size: 130rpx ;
  534. // image{
  535. // width: 120rpx;
  536. // height: 120rpx;
  537. // }
  538. }
  539. }
  540. }
  541. }
  542. .content {
  543. width: 100%;
  544. display: flex;
  545. flex-direction: column;
  546. background-color: #fff;
  547. border-radius: 40rpx 40rpx 0px 0px;
  548. margin-top: 28rpx;
  549. // padding: 32rpx;
  550. box-sizing: border-box;
  551. .selcet_box {
  552. width: 100%;
  553. overflow-x: auto;
  554. box-sizing: border-box;
  555. white-space: nowrap;
  556. padding: 20rpx 32rpx;
  557. .options {
  558. display: inline-block;
  559. // width: 100px;
  560. font-size: 30rpx;
  561. margin-right: 24rpx;
  562. }
  563. .hover {
  564. color: #03C8BE;
  565. font-weight: 700;
  566. border-bottom: 4rpx solid #03C8BE;
  567. }
  568. }
  569. .menu {
  570. flex: 1;
  571. width: 100%;
  572. .project {
  573. width: 100%;
  574. height: 208rpx;
  575. background: linear-gradient(180deg, #F7FFFF 0%, #E9FFFB 100%);
  576. box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.2);
  577. border-radius: 24px 24px 24px 24px;
  578. margin: 32rpx 0px;
  579. padding: 16rpx 32rpx;
  580. box-sizing: border-box;
  581. overflow: hidden;
  582. display: flex;
  583. justify-content: space-between;
  584. .img {
  585. width: 168rpx;
  586. height: 168rpx;
  587. border-radius: 8rpx;
  588. overflow: hidden;
  589. margin-right: 34rpx;
  590. image {
  591. width: 100%;
  592. height: 100%;
  593. }
  594. // .time {
  595. // position: absolute;
  596. // top: 0;
  597. // right: 0;
  598. // padding: 0px 10px;
  599. // background-color: #333;
  600. // opacity: .7;
  601. // border-radius: 0px 0px 0px 10px;
  602. // color: #fff;
  603. // }
  604. }
  605. .describe {
  606. flex: 1;
  607. height: 100%;
  608. // width: 50%;
  609. // text-align: right;
  610. display: flex;
  611. flex-direction: column;
  612. // justify-content: space-between;
  613. // width: 100%;
  614. // margin-top: 10px;
  615. .name {
  616. width: 100%;
  617. font-size: 32rpx;
  618. line-height: 24rpx;
  619. font-weight: 500;
  620. }
  621. .num {
  622. font-size: 24rpx;
  623. color: #808080;
  624. display: flex;
  625. margin-top: 16rpx;
  626. .time {
  627. font-size: 24rpx;
  628. color: #666666;
  629. display: flex;
  630. align-items: center;
  631. margin-right: 26rpx;
  632. img {
  633. width: 24rpx;
  634. height: 24rpx;
  635. margin-right: 4rpx;
  636. }
  637. }
  638. }
  639. .price_box {
  640. width: 100%;
  641. // height: 56rpx;
  642. // background-color: rgb(241, 245, 244);
  643. // border-radius: 10px;
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. // margin-top: 52rpx;
  648. // color: rgb(80, 171, 162);
  649. // font-size: 28rpx;
  650. // padding-left: 20px;
  651. .price {
  652. font-size: 24rpx;
  653. color: #f53e54;
  654. display: flex;
  655. align-items: center;
  656. text {
  657. font-size: 48rpx
  658. }
  659. }
  660. .make {
  661. width: 124rpx;
  662. height: 56rpx;
  663. font-size: 30rpx;
  664. color: #fff;
  665. background: linear-gradient(135deg, #1AD8CF 0%, #21C8C0 100%);
  666. border-radius: 8rpx 8rpx 8rpx 8rpx;
  667. padding: 0px 20rpx;
  668. display: flex;
  669. align-items: center;
  670. justify-content: center;
  671. }
  672. }
  673. }
  674. }
  675. }
  676. }
  677. .container {
  678. // position: fixed;
  679. // top: 0;
  680. // left: 0;
  681. height: 100vh;
  682. display: flex;
  683. justify-content: center;
  684. align-items: center;
  685. }
  686. .coupon-box {
  687. position: fixed;
  688. top: 0;
  689. left: 0;
  690. width: 100%;
  691. height: 300rpx;
  692. transform: translateY(100%);
  693. // background-color: #fff;
  694. border-radius: 20rpx 20rpx 0 0;
  695. box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
  696. opacity: 1;
  697. transition: all 0.3s;
  698. z-index: 9999;
  699. .bgi {
  700. width: 350px;
  701. height: 500px;
  702. margin: 0 auto;
  703. position: relative;
  704. image {
  705. width: 350px;
  706. height: 500px;
  707. }
  708. .cut {
  709. width: 80rpx;
  710. height: 80rpx;
  711. position: absolute;
  712. bottom: 0;
  713. left: 50%;
  714. transform: translateX(-50%);
  715. z-index: 99999;
  716. image {
  717. width: 100%;
  718. height: 100%;
  719. }
  720. }
  721. .border {
  722. position: absolute;
  723. top: 0;
  724. left: 0;
  725. }
  726. .btn {
  727. position: absolute;
  728. bottom: 0;
  729. left: 0;
  730. }
  731. .coupon {
  732. width: 230px;
  733. height: 230px;
  734. position: absolute;
  735. // padding: 5px;
  736. top: 50%;
  737. left: 50%;
  738. transform: translate(-50%, -50%);
  739. overflow-y: auto;
  740. box-sizing: border-box;
  741. .item {
  742. width: 85%;
  743. height: 70px;
  744. background-image: url(../../static/index/item.png);
  745. // background-repeat: no-repeat;
  746. background-size: cover;
  747. /* 背景图宽度自适应 */
  748. background-position: center;
  749. /* 背景图居中 */
  750. padding: 10rpx 25rpx;
  751. display: flex;
  752. align-items: center;
  753. position: relative;
  754. margin-bottom: 10rpx;
  755. .left {
  756. color: #ff0000;
  757. }
  758. .right {
  759. height: 100%;
  760. padding-top: 30px;
  761. margin-left: 20rpx;
  762. font-size: 28rpx;
  763. }
  764. .one_btn {
  765. position: absolute;
  766. top: 10%;
  767. right: 2%;
  768. width: 30px;
  769. height: 60px;
  770. image {
  771. width: 100%;
  772. height: 100%;
  773. }
  774. }
  775. }
  776. }
  777. }
  778. }
  779. .coupon-header {
  780. font-size: 36rpx;
  781. font-weight: bold;
  782. color: #333;
  783. margin: 40rpx 0 20rpx 0;
  784. text-align: center;
  785. }
  786. .coupon-amount {
  787. font-size: 80rpx;
  788. font-weight: bold;
  789. color: #ff0000;
  790. text-align: center;
  791. }
  792. .coupon-desc {
  793. font-size: 28rpx;
  794. color: #666;
  795. margin: 30rpx 0;
  796. text-align: center;
  797. }
  798. .coupon-btn {
  799. margin: 20rpx auto 0 auto;
  800. width: 500rpx;
  801. height: 80rpx;
  802. border: none;
  803. border-radius: 40rpx;
  804. background-color: #ff0000;
  805. color: #fff;
  806. font-size: 36rpx;
  807. display: block;
  808. text-align: center;
  809. line-height: 80rpx;
  810. }
  811. .mask {
  812. position: fixed;
  813. background-color: rgba(0, 0, 0, 0.5);
  814. top: 0;
  815. left: 0;
  816. width: 100%;
  817. height: 100%;
  818. z-index: 999;
  819. opacity: 0;
  820. transition: all 0.3s;
  821. }
  822. .show {
  823. opacity: 1;
  824. }
  825. }
  826. </style>