confirm.vue 28 KB

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