confirm - 副本.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. <template>
  2. <view class="confirm">
  3. <view class="bg">
  4. </view>
  5. <view class="container">
  6. <view class="station">
  7. <image :src="orderInfo.stationPic" mode="scaleToFill"></image>
  8. <view class="info">
  9. <view class="name">
  10. {{orderInfo.stationName}}
  11. </view>
  12. <view class="content">
  13. <view>
  14. <text>油枪号:</text><text>{{selectedGas.oilGunNo}}号</text>
  15. </view>
  16. <view>
  17. <text>油品名:</text><text>{{selectedGas.oilName}}</text>
  18. </view>
  19. <view>
  20. <text>油站价:</text><text>¥{{selectedGas.oilPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
  21. </view>
  22. <view>
  23. <text>优惠价:</text><text>¥{{orderInfo.discountPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view>
  29. <view>
  30. <view class="icon price"></view>订单金额
  31. </view>
  32. <text class="price">¥{{orderInfo.receivableAmt}}</text>
  33. </view>
  34. <view>
  35. <view>
  36. <view class="icon oil"></view>加油升数
  37. </view>
  38. <text>{{orderInfo.oilLiters}}{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
  39. </view>
  40. <view>
  41. <view>
  42. <view class="icon discount"></view>优惠金额
  43. </view>
  44. <text>¥{{payType === 1 ? (+orderInfo.discountAmt_dzk).toFixed(2):(+orderInfo.discountAmt).toFixed(2)}}</text>
  45. </view>
  46. <!--
  47. <view class="dispose coupon">
  48. <view class="title">
  49. <text>优惠券</text>
  50. <text>立减10元</text>
  51. </view>
  52. <view class="tip">
  53. <text class="icon"></text>
  54. <text>优惠券和电子卡不可叠加</text>
  55. </view>
  56. <view class="extra">
  57. 有可用的优惠券 >>
  58. </view>
  59. </view>
  60. -->
  61. <view class="dispose dzk" @click="selectPayType" v-if="orderInfo.oilsCardFlag == 1">
  62. <view class="title">
  63. <text>电子卡</text>
  64. <text>电子卡支付更优惠</text>
  65. </view>
  66. <view class="tip">
  67. <text class="icon"></text>
  68. <text v-show="availableCredit">您的{{ cardTypeTranslate[orderInfo.cardOilsType]}}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,可用来支付此订单</text>
  69. <text v-show="!availableCredit">{{ cardTypeTranslate[orderInfo.cardOilsType] }}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,<text>不足以</text>完成此笔订单</text>
  70. </view>
  71. <view class="extra icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></view>
  72. </view>
  73. <!--
  74. <view>
  75. <view>
  76. <view class="icon vip"></view>油站会员
  77. </view>
  78. <text>立刻开通</text>
  79. </view>
  80. -->
  81. </view>
  82. <view class="submit">
  83. <view class="area">
  84. <text class="type" v-if="orderInfo.oilsCardFlag == 0" @click="selectPayType">实付款</text>
  85. <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==2" @click="selectPayType">微信付款</text>
  86. <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==1" @click="selectPayType">电子卡付款</text>
  87. <text class="icon" v-if="orderInfo.oilsCardFlag == 1 && availableCredit" @click="selectPayType"></text>
  88. <text class="amount" v-show="payType==2">¥{{orderInfo.amt}}</text>
  89. <text class="amount" v-show="payType==1">¥{{orderInfo.amt_dzk}}</text>
  90. <button class="btn" @click="goPay" :loading="wxPayLoading" :disabled="wxPayLoading">
  91. 提交订单
  92. </button>
  93. </view>
  94. </view>
  95. <uni-popup ref="pay" class="pay" type="bottom" maskClick="false">
  96. <view class="cont">
  97. <view class="close" @click="backToSelectPayType">
  98. </view>
  99. <view class="amount">
  100. <text>¥</text>
  101. {{ payType==2 ? orderInfo.amt : orderInfo.amt_dzk}}
  102. </view>
  103. <view class="type" @click="selectPayType">
  104. <text>付款方式</text>
  105. <text> {{ payType==2 ? '微信支付' : '电子卡支付'}}</text>
  106. <text></text>
  107. </view>
  108. <button type="default" class="pay" @click="creditPay" :loading="creditPayLoading">
  109. 立即付款
  110. </button>
  111. </view>
  112. </uni-popup>
  113. <uni-popup ref="selectPayType" class="selectPayType" type="bottom" maskClick="false">
  114. <view class="cont">
  115. <view class="close" @click="closeSelectPayType">
  116. </view>
  117. <view class="credit">
  118. <view class="credit-con" @click="selectPayType(1)">
  119. <text class="text">电子卡支付(剩余:{{ orderInfo.balance }})</text>
  120. <text class="icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></text>
  121. </view>
  122. <text class="tip">
  123. {{tip}}
  124. </text>
  125. </view>
  126. <view class="wx" @click="selectPayType(2)">
  127. <text class="text">微信支付</text>
  128. <text class="icon" :class="[payType === 2 ? 'selected':'']"></text>
  129. </view>
  130. <button type="default" :class="[payType !== '' ? 'available' : '']" @click="goPay"
  131. :disabled="payType === '' ? true : false" :loading="wxPayLoading">
  132. 确认
  133. </button>
  134. </view>
  135. </uni-popup>
  136. <uni-popup ref="coupon" class="coupon" type="bottom" maskClick="false">
  137. <view class="coupon-container">
  138. <view class="close" @click="closeCoupon">
  139. </view>
  140. <view class="title">
  141. 优惠券
  142. </view>
  143. <scroll-view scroll-y="true" class="coupon-scroll">
  144. <view class="item cash">
  145. <view class="left">
  146. <text class="amount">¥<text class="big">100</text></text>
  147. <text>无门槛</text>
  148. </view>
  149. <view class="right">
  150. <text class="title">立减劵</text>
  151. <text class="scope">范围:限汽油</text>
  152. <text class="valid">有效至 2021.03.01</text>
  153. <text class="use"></text>
  154. </view>
  155. </view>
  156. <view class="item discount">
  157. <view class="left">
  158. <text class="amount">¥<text class="big">100</text></text>
  159. <text>无门槛</text>
  160. </view>
  161. <view class="right">
  162. <text class="title">立减劵</text>
  163. <text class="scope">范围:限汽油</text>
  164. <text class="valid">有效至 2021.03.01</text>
  165. <text class="use"></text>
  166. </view>
  167. </view>
  168. <view class="item exchange">
  169. <view class="left">
  170. <text class="amount">¥<text class="big">100</text></text>
  171. <text>无门槛</text>
  172. </view>
  173. <view class="right">
  174. <text class="title">立减劵</text>
  175. <text class="scope">范围:限汽油</text>
  176. <text class="valid">有效至 2021.03.01</text>
  177. <text class="use"></text>
  178. </view>
  179. </view>
  180. </scroll-view>
  181. </view>
  182. </uni-popup>
  183. </view>
  184. </template>
  185. <script>
  186. import {
  187. mapState,
  188. mapMutations
  189. } from "vuex";
  190. export default {
  191. data() {
  192. return {
  193. payType: 2, // 1电子卡 2微信
  194. wxPayLoading: false,
  195. creditPayLoading: false,
  196. cardTypeTranslate:['','汽油卡','柴油卡','非油品卡','LNG','CNG']
  197. };
  198. },
  199. computed: {
  200. // ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
  201. // ...mapState({
  202. // orderInfo: state => state.order.orderInfo,
  203. // openId: state => state.user.openId,
  204. // stationId: state => state.station.stationId,
  205. // selectedGas: state => state.station.selectedGas,
  206. // }),
  207. availableCredit() {
  208. if(this.orderInfo.oilsCardFlag == 0){
  209. return false
  210. }
  211. if ((+this.orderInfo.balance) < (+this.orderInfo.amt_dzk)) {
  212. return false
  213. }
  214. return true
  215. },
  216. creditFlag(){
  217. return this.orderInfo.oilsCardFlag == '1' ? true : false
  218. }
  219. },
  220. created() {
  221. // console.log(this.orderInfo)
  222. this.initPayType()
  223. },
  224. mounted() {
  225. // this.$refs.pay.close();
  226. // this.$refs.coupon.open();
  227. },
  228. methods: {
  229. ...mapMutations(["clearLabelId","updateVoucherInfo"]),
  230. initPayType(){
  231. if(this.orderInfo.oilsCardFlag == 1 && this.availableCredit){
  232. this.payType = 1
  233. }
  234. },
  235. closeCoupon(){
  236. this.$refs.coupon.close();
  237. },
  238. async creditPay() {
  239. this.creditPayLoading = true;
  240. if (this.payType === 2) {
  241. this.wxPay()
  242. return
  243. }
  244. uni.showLoading({
  245. title: '支付中...',
  246. mask: true
  247. });
  248. try {
  249. const creditPayData = await this.$Request({
  250. url: "/dzkPaySet",
  251. data: {
  252. "ordNo": this.orderInfo.ordNo
  253. },
  254. })
  255. console.log(creditPayData)
  256. if (creditPayData.retCode !== 0) {
  257. throw new Error(creditPayData.message)
  258. }
  259. this.creditPayLoading = false;
  260. uni.hideLoading();
  261. this.updateVoucherInfo({
  262. receivableAmt: this.orderInfo.receivableAmt,
  263. amt:this.payType==2 ? this.orderInfo.amt : this.orderInfo.amt_dzk,
  264. oilName:this.selectedGas.oilName
  265. })
  266. console.log('我要跳了~')
  267. uni.redirectTo({
  268. url: "/pages/succeed/succeed"
  269. })
  270. } catch (e) {
  271. this.creditPayLoading = false;
  272. uni.hideLoading();
  273. this.showToastAndGoback(e.toString())
  274. }
  275. },
  276. async wxPay() {
  277. this.wxPayLoading = true;
  278. uni.showLoading({
  279. title: '拉取支付...',
  280. mask: true
  281. });
  282. // try {
  283. const JhPayData = await this.$Request({
  284. // url: "/getJhPayInfo",
  285. url:"/yunPay",
  286. method: "POST",
  287. data: {
  288. "ordNo": this.orderInfo.ordNo,
  289. "openId": this.openId,
  290. "stationId": this.stationId,
  291. "userType": "1"
  292. },
  293. })
  294. console.log(JhPayData)
  295. if (JhPayData.retCode !== 0) {
  296. throw new Error("请求信息失败")
  297. }
  298. // if (JhPayData.data.code !== '0000') {
  299. // throw new Error(JhPayData.data.msg)
  300. // }
  301. console.log(JhPayData.data.result_code)
  302. if (JhPayData.data.result_code !== '01') {
  303. throw new Error(JhPayData.data.msg)
  304. }
  305. // // let timeStamp = JhPayData.data.respData.payTimeStamp;
  306. // let timeStamp = JhPayData.data.respData.timeStamp;
  307. // let nonceStr = JhPayData.data.respData.paynonceStr;
  308. // // let payPackage = JhPayData.data.respData.payPackage;
  309. // let payPackage = JhPayData.data.respData.package_str;
  310. // let signType = JhPayData.data.signType;
  311. // let paySign = JhPayData.data.respData.paySign;
  312. // let timeStamp = JhPayData.data.respData.payTimeStamp;
  313. let timeStamp = JhPayData.data.timeStamp;
  314. let nonceStr = JhPayData.data.nonceStr;
  315. // let payPackage = JhPayData.data.respData.payPackage;
  316. let payPackage = JhPayData.data.package_str;
  317. let signType = JhPayData.data.signType;
  318. let paySign = JhPayData.data.paySign;
  319. // 填写随行付的信息,启动支付
  320. console.log({
  321. 'timeStamp': timeStamp,
  322. 'nonceStr': nonceStr,
  323. 'package': payPackage,
  324. 'signType': signType,
  325. 'paySign': paySign,
  326. })
  327. const [payErr, payData] = await uni.requestPayment({
  328. 'timeStamp': timeStamp,
  329. 'nonceStr': nonceStr,
  330. 'package': payPackage,
  331. 'signType': signType,
  332. 'paySign': paySign,
  333. })
  334. console.log('------------',payData)
  335. if (!!payData && payData.errMsg === "requestPayment:ok") {
  336. this.wxPayLoading = false;
  337. this.clearLabelId();
  338. uni.hideLoading();
  339. console.log({
  340. receivableAmt: this.orderInfo.receivableAmt,
  341. amt:this.payType==2 ? this.orderInfo.amt : this.orderInfo.amt_dzk,
  342. oilName:this.selectedGas.oilName
  343. })
  344. this.updateVoucherInfo({
  345. receivableAmt: this.orderInfo.receivableAmt,
  346. amt:this.payType==2 ? this.orderInfo.amt : this.orderInfo.amt_dzk,
  347. oilName:this.selectedGas.oilName
  348. })
  349. console.log('我要跳了~')
  350. uni.redirectTo({
  351. url: "/pages/succeed/succeed"
  352. })
  353. return;
  354. }
  355. this.wxPayLoading = false;
  356. uni.hideLoading();
  357. if (payErr.errMsg === "requestPayment:fail cancel") {
  358. this.showToastAndGoback("取消了支付")
  359. return;
  360. }
  361. this.showToastAndGoback("支付失败")
  362. // } catch (e) {
  363. // this.wxPayLoading = false;
  364. // uni.hideLoading();
  365. // this.showToastAndGoback(e.message)
  366. // }
  367. },
  368. showToastAndGoback(title) {
  369. uni.showToast({
  370. title,
  371. mask: true
  372. })
  373. setTimeout(() => {
  374. uni.navigateBack({
  375. delta: 1
  376. })
  377. }, 1500)
  378. },
  379. // selectPayType(type) {
  380. // if (!this.availableCredit && type == 1) {
  381. // return
  382. // }
  383. // if (type === this.payType) {
  384. // this.payType = ""
  385. // return
  386. // }
  387. // this.payType = type
  388. // },
  389. selectPayType() {
  390. if (!this.availableCredit) {
  391. return
  392. }
  393. if (this.payType === 1) {
  394. this.payType = 2
  395. return
  396. }
  397. this.payType = 1
  398. },
  399. goPay() {
  400. if (this.payType === 2) {
  401. this.wxPay()
  402. return
  403. }
  404. if (this.payType === 1) {
  405. // this.$refs.selectPayType.close();
  406. this.$refs.pay.open()
  407. }
  408. },
  409. backToSelectPayType() {
  410. this.$refs.pay.close()
  411. // this.$refs.selectPayType.open();
  412. },
  413. // closeSelectPayType() {
  414. // this.$refs.selectPayType.close();
  415. // }
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. page {
  421. width: 750rpx;
  422. background: #F2F2F2;
  423. .confirm {
  424. .bg {
  425. width: 750rpx;
  426. height: 352rpx;
  427. background: #0EA374;
  428. }
  429. .container {
  430. width: 690rpx;
  431. margin: 0 auto;
  432. margin-top: -239rpx;
  433. .station {
  434. width: 690rpx;
  435. height: 340rpx;
  436. background: #FFFFFF;
  437. border-radius: 14rpx;
  438. box-sizing: border-box;
  439. padding: 21rpx;
  440. display: flex;
  441. justify-content: space-between;
  442. align-items: center;
  443. image {
  444. width: 200rpx;
  445. height: 240rpx;
  446. }
  447. .info {
  448. width: 400rpx;
  449. height: 240rpx;
  450. display: flex;
  451. flex-direction: column;
  452. justify-content: space-between;
  453. align-items: flex-start;
  454. .content {
  455. height: 180rpx;
  456. display: flex;
  457. flex-direction: column;
  458. justify-content: space-between;
  459. font-size: 28rpx;
  460. font-weight: 400;
  461. color: #666666;
  462. line-height: 40rpx;
  463. view {
  464. display: flex;
  465. justify-content: space-between;
  466. text:nth-child(1) {
  467. width: 200rpx;
  468. display: inline-block;
  469. }
  470. }
  471. }
  472. .name {
  473. height: 45rpx;
  474. font-size: 32rpx;
  475. font-weight: 600;
  476. color: #111111;
  477. line-height: 45rpx;
  478. }
  479. }
  480. }
  481. >view:not(.station) {
  482. width: 690rpx;
  483. height: 110rpx;
  484. background: #FFFFFF;
  485. box-shadow: 0px 2rpx 6rpx 5rpx rgba(237, 237, 237, 0.5);
  486. border-radius: 10rpx;
  487. margin-top: 20rpx;
  488. display: flex;
  489. justify-content: space-between;
  490. align-items: center;
  491. box-sizing: border-box;
  492. padding: 20rpx;
  493. font-size: 28rpx;
  494. font-weight: 500;
  495. color: #111111;
  496. line-height: 40rpx;
  497. >view {
  498. display: flex;
  499. justify-content: space-between;
  500. align-items: center;
  501. .icon {
  502. display: inline-block;
  503. width: 35rpx;
  504. height: 30rpx;
  505. // border: 2rpx solid #666666;
  506. margin-right: 14rpx;
  507. }
  508. .price {
  509. background: url(../../static/icon/dingdan.2x.png) no-repeat 0px 0px;
  510. background-size: 100% 100%;
  511. }
  512. .oil {
  513. background: url(../../static/icon/sheng.2x.png) no-repeat 0px 0px;
  514. background-size: 100% 100%;
  515. }
  516. .discount {
  517. background: url(../../static/icon/youhuiquan-2.2x.png) no-repeat 0px 0px;
  518. background-size: 100% 100%;
  519. }
  520. .vip {
  521. background: url(../../static/icon/huiyuan-.2x.png) no-repeat 0px 0px;
  522. background-size: 100% 100%;
  523. }
  524. }
  525. text.price {
  526. color: #F3B235;
  527. line-height: 33rpx;
  528. }
  529. text.vip {
  530. font-size: 24rpx;
  531. color: #A76825;
  532. line-height: 33rpx;
  533. }
  534. }
  535. view.dispose{
  536. width: 690rpx;
  537. height: 150rpx;
  538. position: relative;
  539. display: inline-block;
  540. .title{
  541. position: absolute;
  542. top: 36rpx;
  543. left: 20rpx;
  544. text:nth-child(1){
  545. height: 40rpx;
  546. font-size: 28rpx;
  547. font-weight: 400;
  548. color: #000000;
  549. line-height: 40rpx;
  550. margin-right: 20rpx;
  551. }
  552. text:nth-child(2){
  553. height: 28rpx;
  554. font-size: 20rpx;
  555. font-family: PingFangSC-Regular, PingFang SC;
  556. font-weight: 400;
  557. color: #F0B849;
  558. line-height: 28rpx;
  559. box-sizing: border-box;
  560. border: 1px solid #F0B849;
  561. }
  562. }
  563. .tip{
  564. position: absolute;
  565. top: 90rpx;
  566. left: 20rpx;
  567. .icon{
  568. width: 22rpx;
  569. height: 22rpx;
  570. background: url(../../static/icon/tipicon1.png) no-repeat 0px 0px;
  571. background-size: 100% 100%;
  572. }
  573. text:nth-child(2),
  574. text:nth-child(3){
  575. height: 28rpx;
  576. font-size: 20rpx;
  577. font-family: PingFangSC-Regular, PingFang SC;
  578. font-weight: 400;
  579. color: rgba(0, 0, 0, 0.4);
  580. line-height: 28rpx;
  581. text{
  582. font-size: 27rpx;
  583. font-weight: 800rpx;
  584. // color: #007AFF;
  585. color: #838383;
  586. }
  587. }
  588. }
  589. }
  590. view.coupon{
  591. .extra{
  592. position: absolute;
  593. right: 20rpx;
  594. top: 54rpx;
  595. height: 34rpx;
  596. font-size: 24rpx;
  597. color: #6D6D6D;
  598. line-height: 34rpx;
  599. }
  600. }
  601. view.dzk{
  602. .extra{
  603. position: absolute;
  604. right: 20rpx;
  605. top: 54rpx;
  606. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  607. background-size: 100% 100%;
  608. width: 40rpx;
  609. height: 40rpx;
  610. margin-right: 20rpx;
  611. }
  612. .selected {
  613. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  614. background-size: 100% 100%;
  615. }
  616. .forbid {
  617. background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
  618. background-size: 100% 100%;
  619. }
  620. }
  621. }
  622. .submit {
  623. width: 750rpx;
  624. height: 180rpx;
  625. // background: #FFFFFF;
  626. // margin-top: 30rpx;
  627. .area {
  628. width: 750rpx;
  629. height: 150rpx;
  630. background: #FFFFFF;
  631. position: fixed;
  632. bottom: 0;
  633. left: 0;
  634. right: 0;
  635. display: flex;
  636. justify-content: flex-end;
  637. align-items: center;
  638. >.type{
  639. font-size: 28rpx;
  640. font-weight: 400;
  641. color: #111111;
  642. line-height: 40rpx;
  643. }
  644. >.amount{
  645. font-size: 30rpx;
  646. font-weight: 600;
  647. color: #f3b338;
  648. line-height: 40rpx;
  649. }
  650. >.icon{
  651. background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
  652. background-size: 100% 100%;
  653. display: inline-block;
  654. width: 13rpx;
  655. height: 8rpx;
  656. line-height: 40rpx;
  657. margin-left: 10rpx;
  658. margin-right: 15rpx;
  659. }
  660. // text:nth-child(2) {
  661. // font-size: 30rpx;
  662. // font-weight: 600;
  663. // color: #f3b338;
  664. // line-height: 40rpx;
  665. // }
  666. .btn {
  667. margin-left: 20rpx;
  668. margin-right: 30rpx;
  669. background-color: #0ea374;
  670. border-radius: 40rpx;
  671. width: 250rpx;
  672. height: 80rpx;
  673. font-size: 28rpx;
  674. font-family: PingFangSC-Regular, PingFang SC;
  675. font-weight: 500;
  676. color: #FFFFFF;
  677. line-height: 80rpx;
  678. text-align: center;
  679. }
  680. }
  681. }
  682. uni-popup.pay {
  683. .cont {
  684. width: 750rpx;
  685. height: 682rpx;
  686. background: #FFFFFF;
  687. border-radius: 30rpx 30rpx 0 0;
  688. position: relative;
  689. .close {
  690. background: url(../../static/icon/left.png) no-repeat 0px 0px;
  691. background-size: 100% 100%;
  692. width: 18rpx;
  693. height: 30rpx;
  694. position: absolute;
  695. top: 46rpx;
  696. left: 34rpx;
  697. }
  698. .amount {
  699. width: 100%;
  700. height: 100rpx;
  701. font-size: 80rpx;
  702. font-weight: 400;
  703. color: #000000;
  704. position: absolute;
  705. top: 112rpx;
  706. display: flex;
  707. justify-content: center;
  708. align-items: center;
  709. text {
  710. font-size: 40rpx;
  711. }
  712. }
  713. .type {
  714. width: 100%;
  715. height: 34rpx;
  716. position: absolute;
  717. top: 310rpx;
  718. text:nth-child(1) {
  719. height: 34rpx;
  720. font-size: 24rpx;
  721. font-weight: 400;
  722. color: #aaaaaa;
  723. line-height: 34rpx;
  724. position: absolute;
  725. left: 58rpx;
  726. }
  727. text:nth-child(2) {
  728. height: 34rpx;
  729. font-size: 24rpx;
  730. font-weight: 500;
  731. color: #000000;
  732. line-height: 34rpx;
  733. position: absolute;
  734. right: 144rpx;
  735. }
  736. text:nth-child(3) {
  737. background: url(../../static/icon/right.png) no-repeat 0px 0px;
  738. background-size: 100% 100%;
  739. display: inline-block;
  740. width: 12rpx;
  741. height: 22rpx;
  742. position: absolute;
  743. right: 66rpx;
  744. top: 7rpx;
  745. }
  746. }
  747. .pay {
  748. width: 590rpx;
  749. height: 76rpx;
  750. background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
  751. border-radius: 38rpx;
  752. font-size: 28rpx;
  753. font-family: PingFangSC-Regular, PingFang SC;
  754. font-weight: 400;
  755. color: #FFFFFF;
  756. line-height: 76rpx;
  757. letter-spacing: 1rpx;
  758. position: absolute;
  759. bottom: 114rpx;
  760. left: 80rpx;
  761. }
  762. }
  763. }
  764. uni-popup.selectPayType {
  765. .cont {
  766. width: 750rpx;
  767. // width: 100%;
  768. height: 680rpx;
  769. background: #FFFFFF;
  770. border-radius: 30rpx 30rpx 0 0;
  771. position: relative;
  772. padding: 0 25rpx;
  773. box-sizing: border-box;
  774. .close {
  775. width: 38rpx;
  776. height: 38rpx;
  777. position: absolute;
  778. top: 24rpx;
  779. left: 24rpx;
  780. background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
  781. background-size: 100% 100%;
  782. }
  783. .credit {
  784. position: absolute;
  785. width: 700rpx;
  786. top: 138rpx;
  787. height: 130rpx;
  788. box-sizing: border-box;
  789. border-bottom: 2rpx solid #D8D8D8;
  790. color: #000 solid #D8D8D8;
  791. padding: 0 30rpx;
  792. .credit-con {
  793. height: 60rpx;
  794. display: flex;
  795. justify-content: space-between;
  796. .text {
  797. font-size: 28rpx;
  798. height: 40rpx;
  799. line-height: 60rpx;
  800. font-weight: 600;
  801. }
  802. .icon {
  803. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  804. background-size: 100% 100%;
  805. width: 40rpx;
  806. height: 40rpx;
  807. }
  808. .selected {
  809. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  810. background-size: 100% 100%;
  811. }
  812. .forbid {
  813. background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
  814. background-size: 100% 100%;
  815. }
  816. }
  817. .tip {
  818. margin-top: 16rpx;
  819. height: 44rpx;
  820. font-size: 24rpx;
  821. font-weight: 400;
  822. color: rgba(0, 0, 0, 0.29);
  823. line-height: 44rpx;
  824. }
  825. }
  826. .wx {
  827. position: absolute;
  828. width: 700rpx;
  829. top: 305rpx;
  830. padding: 0 30rpx;
  831. height: 40rpx;
  832. display: flex;
  833. box-sizing: border-box;
  834. justify-content: space-between;
  835. .text {
  836. font-size: 28rpx;
  837. height: 40rpx;
  838. line-height: 40rpx;
  839. font-weight: 600;
  840. }
  841. .icon {
  842. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  843. background-size: 100% 100%;
  844. width: 40rpx;
  845. height: 40rpx;
  846. }
  847. .selected {
  848. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  849. background-size: 100% 100%;
  850. }
  851. }
  852. >button {
  853. width: 590rpx;
  854. height: 76rpx;
  855. background-color: #cccccc;
  856. border-radius: 38rpx;
  857. font-size: 28rpx;
  858. font-weight: 400;
  859. color: #FFFFFF;
  860. line-height: 76rpx;
  861. letter-spacing: 1rpx;
  862. position: absolute;
  863. box-sizing: border-box;
  864. bottom: 114rpx;
  865. left: 80rpx;
  866. }
  867. >button.available {
  868. background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
  869. }
  870. }
  871. }
  872. uni-popup.coupon {
  873. .coupon-container {
  874. width: 100%;
  875. border-radius: 42rpx 42rpx 0px 0px;
  876. background: #F2F2F2;
  877. padding: 0 30rpx;
  878. box-sizing: border-box;
  879. position: relative;
  880. .close{
  881. width: 38rpx;
  882. height: 38rpx;
  883. position: absolute;
  884. top: 24rpx;
  885. right: 24rpx;
  886. background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
  887. background-size: 100% 100%;
  888. }
  889. >.title {
  890. height: 105rpx;
  891. font-size: 32rpx;
  892. font-weight: 400;
  893. color: #111111;
  894. line-height: 105rpx;
  895. font-weight: 600;
  896. color: #111111;
  897. text-align: center;
  898. }
  899. .coupon-scroll {
  900. max-height: 500rpx;
  901. overflow: scroll;
  902. .item {
  903. width: 690rpx;
  904. height: 160rpx;
  905. font-size: 24rpx;
  906. font-weight: 500;
  907. color: #FFFFFF;
  908. line-height: 40rpx;
  909. display: flex;
  910. justify-content: space-between;
  911. margin-bottom: 20rpx;
  912. .left {
  913. width: 150rpx;
  914. height: 160rpx;
  915. display: flex;
  916. flex-direction: column;
  917. justify-content: center;
  918. text-align: center;
  919. .amount {
  920. font-size: 20rpx;
  921. .big {
  922. font-size: 33rpx;
  923. }
  924. }
  925. }
  926. .right {
  927. width: 540rpx;
  928. height: 160rpx;
  929. color: #111111;
  930. position: relative;
  931. .title {
  932. position: absolute;
  933. top: 22rpx;
  934. left: 20rpx;
  935. height: 40rpx;
  936. font-size: 28rpx;
  937. font-weight: 500;
  938. line-height: 40rpx;
  939. }
  940. .scope {
  941. position: absolute;
  942. top: 72rpx;
  943. left: 20rpx;
  944. height: 28rpx;
  945. font-size: 20rpx;
  946. color: #666666;
  947. line-height: 28rpx;
  948. }
  949. .valid {
  950. position: absolute;
  951. top: 110rpx;
  952. left: 20rpx;
  953. height: 28rpx;
  954. font-size: 20rpx;
  955. color: #666666;
  956. line-height: 28rpx;
  957. }
  958. .use {
  959. position: absolute;
  960. top: 54rpx;
  961. right: 20rpx;
  962. display: inline-block;
  963. width: 160rpx;
  964. height: 55rpx;
  965. }
  966. }
  967. }
  968. .cash{
  969. background: url(../../static/icon/youhuiquan1.2x.png) no-repeat 0px 0px;
  970. background-size: 100% 100%;
  971. }
  972. .discount{
  973. background: url(../../static/icon/youhuiquan2.2x.png) no-repeat 0px 0px;
  974. background-size: 100% 100%;
  975. }
  976. .exchange{
  977. background: url(../../static/icon/youhuiquan3.2x.png) no-repeat 0px 0px;
  978. background-size: 100% 100%;
  979. }
  980. }
  981. }
  982. }
  983. }
  984. }
  985. </style>