confirm.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  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>¥{{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>¥{{discountAmt}}</text>
  45. </view>
  46. <!-- #ifdef MP-WEIXIN -->
  47. <view class="dispose coupon"
  48. :class="[selectedCoupon.couponType=='1'?'direct':'', selectedCoupon.couponType=='2'?'rate':'']"
  49. @click="goSelectCoupon" v-if="couponEnabledFlag=='1'">
  50. <!-- <view class="coupon_bg">
  51. 你好
  52. </view> -->
  53. <view class="title">
  54. <text>优惠券</text>
  55. <text v-if="!!selectedCoupon.id">{{creditNameplate}}</text>
  56. </view>
  57. <view class="tip">
  58. <text class="icon"></text>
  59. <text>{{couponTip}}</text>
  60. </view>
  61. <view class="extra" :class="couponsList.length==0 ? 'disable':'' ">
  62. {{couponMore}}
  63. </view>
  64. </view>
  65. <!-- #endif -->
  66. <!-- #ifdef MP-WEIXIN -->
  67. <view class="dispose dzk" @click="selectPayType" v-if="orderInfo.oilsCardFlag == 1">
  68. <view class="title">
  69. <text>电子卡</text>
  70. <text> {{availableCouponToCredit?"电子卡支付更优惠":"不可用"}}</text>
  71. </view>
  72. <view class="tip">
  73. <text class="icon"></text>
  74. <template v-if="availableCouponToCredit">
  75. <text
  76. v-show="availableCredit">您的{{ cardTypeTranslate[orderInfo.cardOilsType]}}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,可用来支付此订单</text>
  77. <text
  78. v-show="!availableCredit">{{ cardTypeTranslate[orderInfo.cardOilsType] }}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,<text>不足以</text>完成此笔订单</text>
  79. </template>
  80. <template v-else>
  81. <text>您目前选中的优惠券不可使用电子卡</text>
  82. </template>
  83. </view>
  84. <view class="extra icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></view>
  85. </view>
  86. <!-- #endif -->
  87. <!--
  88. <view>
  89. <view>
  90. <view class="icon vip"></view>油站会员
  91. </view>
  92. <text>立刻开通</text>
  93. </view>
  94. -->
  95. </view>
  96. <view class="submit">
  97. <view class="area">
  98. <!-- #ifdef MP-WEIXIN -->
  99. <text class="type" v-if="orderInfo.oilsCardFlag == 0" @click="selectPayType">实付款</text>
  100. <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==2" @click="selectPayType">微信付款</text>
  101. <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==1" @click="selectPayType">电子卡付款</text>
  102. <text class="icon" v-if="orderInfo.oilsCardFlag == 1 && availableCredit" @click="selectPayType"></text>
  103. <text class="amount">¥{{amt}}</text>
  104. <button class="btn" @click="goPay" :loading="wxPayLoading" :disabled="wxPayLoading">
  105. 提交订单
  106. </button>
  107. <!-- #endif -->
  108. <!-- #ifdef MP-ALIPAY -->
  109. <text class="type" @click="aliPay">实付款</text>
  110. <text class="amount">¥{{amt}}</text>
  111. <button class="btn" @click="aliPay" :loading="wxPayLoading" :disabled="wxPayLoading">
  112. 提交订单
  113. </button>
  114. <!-- #endif -->
  115. </view>
  116. </view>
  117. <uni-popup ref="pay" class="pay" type="bottom" maskClick="false">
  118. <view class="cont">
  119. <view class="close" @click="backToSelectPayType">
  120. </view>
  121. <view class="amount">
  122. <text>¥</text>
  123. {{ amt }}
  124. </view>
  125. <view class="type" @click="selectPayType">
  126. <text>付款方式</text>
  127. <text> {{ payType==2 ? '微信支付' : '电子卡支付'}}</text>
  128. <text></text>
  129. </view>
  130. <button type="default" class="pay" @click="creditPay" :loading="creditPayLoading">
  131. 立即付款
  132. </button>
  133. </view>
  134. </uni-popup>
  135. <!--
  136. <uni-popup ref="selectPayType" class="selectPayType" type="bottom" maskClick="false">
  137. <view class="cont">
  138. <view class="close" @click="closeSelectPayType">
  139. </view>
  140. <view class="credit">
  141. <view class="credit-con" @click="selectPayType(1)">
  142. <text class="text">电子卡支付(剩余:{{ orderInfo.balance }})</text>
  143. <text class="icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></text>
  144. </view>
  145. <text class="tip">
  146. {{tip}}
  147. </text>
  148. </view>
  149. <view class="wx" @click="selectPayType(2)">
  150. <text class="text">微信支付</text>
  151. <text class="icon" :class="[payType === 2 ? 'selected':'']"></text>
  152. </view>
  153. <button type="default" :class="[payType !== '' ? 'available' : '']" @click="goPay"
  154. :disabled="payType === '' ? true : false" :loading="wxPayLoading">
  155. 确认
  156. </button>
  157. </view>
  158. </uni-popup>
  159. -->
  160. <uni-popup ref="coupon" class="coupon" type="bottom" maskClick="false">
  161. <view class="coupon-container">
  162. <view class="close" @click="closeCoupon">
  163. </view>
  164. <view class="title">
  165. 优惠券
  166. </view>
  167. <scroll-view scroll-y="true" class="coupon-scroll">
  168. <template v-for="ele in couponsList">
  169. <view class="coupon" :class="[ele.couponType == 1 ? 'direct':'', ele.couponType == 2 ? 'rate':'' ]"
  170. @click="selectCoupon(ele)">
  171. <view class="left">
  172. <view class="amount">
  173. {{ ele.couponType == 1 ? '¥':''}}{{ele.couponType == 2 ? '% ':''}}
  174. <text class="value">{{ ele.couponAmt }}</text>
  175. </view>
  176. <view class="condition">{{
  177. ele.couponThresholdAmt == 0
  178. ? "无门槛"
  179. : "满" + ele.couponThresholdAmt + "元可用"
  180. }}</view>
  181. </view>
  182. <view class="right">
  183. <view class="title">
  184. <text class="type">{{ele.couponType == 1 ? '立减劵':''}}{{ele.couponType == 2 ? '折扣劵':''}}</text>
  185. </view>
  186. <view class="content">
  187. <view class="items">
  188. <view class="item scope">适用:<text>{{
  189. (ele.oilName || []).toString()
  190. }}</text></view>
  191. <view class="item valid">截止:<text>{{ele.couponEffectiveTime}}</text></view>
  192. </view>
  193. <view class="btn">
  194. <!-- <button>已领</button> -->
  195. <view class="extra icon" :class="[selectedCoupon.id === ele.id ? 'selected':'']"></view>
  196. </view>
  197. </view>
  198. <!-- <view class="tip">凭借此劵可以减少支付的金额,欢迎来加油~</view> -->
  199. </view>
  200. </view>
  201. </template>
  202. <!--
  203. <template v-for="ele in couponsList">
  204. <view class="item cash" :class="[ele.couponType == 1 ? 'cash':'', ele.couponType == 2 ? 'discount':'' ]"
  205. v-if="ele.couponType == 1 || ele.couponType == 2">
  206. <view class="left">
  207. <text class="amount">
  208. {{ ele.couponType == 1 ? '¥':''}}{{ele.couponType == 2 ? '% ':''}}
  209. <text class="big">{{ ele.couponAmt }}</text>
  210. </text>
  211. <text>{{
  212. ele.couponThresholdAmt == 0
  213. ? "无门槛"
  214. : "满" + ele.couponThresholdAmt + "元可用"
  215. }}</text>
  216. </view>
  217. <view class="right">
  218. <text class="title">{{ele.couponType == 1 ? '立减劵':''}}{{ele.couponType == 2 ? '折扣劵':''}}</text>
  219. <text class="scope">范围:{{
  220. (ele.oilName || []).toString()
  221. }}</text>
  222. <text class="valid">有效至 {{ele.couponEffectiveTime}}</text>
  223. <text class="use"></text>
  224. </view>
  225. </view>
  226. </template>
  227. -->
  228. </scroll-view>
  229. </view>
  230. </uni-popup>
  231. </view>
  232. </template>
  233. <script>
  234. import {
  235. mapState,
  236. mapMutations
  237. } from "vuex";
  238. export default {
  239. data() {
  240. return {
  241. payType: 2, // 1电子卡 2微信
  242. wxPayLoading: false,
  243. creditPayLoading: false,
  244. cardTypeTranslate: ['', '汽油卡', '柴油卡', '非油品卡', 'LNG', 'CNG'],
  245. selectedCoupon: {},
  246. };
  247. },
  248. computed: {
  249. // ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
  250. ...mapState({
  251. couponEnabledFlag: state => state.coupon.couponEnabledFlag,
  252. couponsList: state => state.coupon.couponList,
  253. // orderInfo: state => state.order.orderInfo,
  254. // openId: state => state.user.openId,
  255. // stationId: state => state.station.stationId,
  256. // selectedGas: state => state.station.selectedGas,
  257. }),
  258. availableCredit() {
  259. if (this.orderInfo.oilsCardFlag == 0) {
  260. return false
  261. }
  262. if ((+this.orderInfo.balance) < (+this.orderInfo.amt_dzk)) {
  263. return false
  264. }
  265. // 优惠劵
  266. if (!this.availableCouponToCredit) {
  267. return false
  268. }
  269. return true
  270. },
  271. availableCouponToCredit() { // 当前选择的优惠券是否可用电子卡
  272. return !(this.couponEnabledFlag == 1 && this.selectedCoupon.isCardFlag == 0)
  273. },
  274. creditFlag() {
  275. return this.orderInfo.oilsCardFlag == '1' ? true : false
  276. },
  277. creditNameplate() {
  278. if (!!this.selectedCoupon.id) {
  279. let amt = +this.orderInfo.receivableAmt
  280. let derate
  281. if (this.selectedCoupon.couponType == '1') {
  282. derate = +this.selectedCoupon.couponAmt
  283. derate = derate.toFixed(2)
  284. return '直降立减' + derate + "元"
  285. } else if (this.selectedCoupon.couponType == '2') {
  286. derate = (+amt) * (100 - (this.selectedCoupon.couponAmt)) / 100
  287. derate = derate.toFixed(2)
  288. return '折扣立减' + derate + "元"
  289. }
  290. } else {
  291. return "关注公众号获取优惠券"
  292. }
  293. },
  294. couponTip() {
  295. if (!!this.selectedCoupon.id) {
  296. if (this.selectedCoupon.couponType == '1') {
  297. return "您已经使用面值为" + this.selectedCoupon.couponAmt + "元的直降优惠券"
  298. } else if (this.selectedCoupon.couponType == '2') {
  299. return "您已经使用折扣为" + this.selectedCoupon.couponAmt + "%的优惠券"
  300. }
  301. }
  302. return "关注公众号获取更多优惠券"
  303. },
  304. couponMore() {
  305. console.log(this.couponEnabledFlag)
  306. if (this.couponEnabledFlag == '0') {
  307. return '未开启优惠券'
  308. }
  309. if (!!this.selectedCoupon.id) {
  310. return '重选优惠券 >>>'
  311. }
  312. if (this.couponsList.length == 0) {
  313. return '暂无可用优惠劵 >>>'
  314. }
  315. return '有可用的优惠券 >>>'
  316. },
  317. discountPrice() {
  318. if (!!this.selectedCoupon.id) {
  319. if (this.payType == 2) {
  320. return this.selectedCoupon.couponReckonAmt.discountPrice
  321. } else if (this.payType == 1) {
  322. return this.selectedCoupon.couponReckonAmt.dzkDiscountPrice
  323. }
  324. } else {
  325. if (this.payType == 2) {
  326. return this.orderInfo.discountPrice
  327. } else if (this.payType == 1) {
  328. return this.orderInfo.dzkDiscountPrice
  329. }
  330. }
  331. },
  332. discountAmt() {
  333. let discountAmt
  334. if (!!this.selectedCoupon.id) {
  335. if (this.payType == 2) { // 微信
  336. discountAmt = this.selectedCoupon.couponReckonAmt.discountAmt
  337. } else if (this.payType == 1) {
  338. discountAmt = this.selectedCoupon.couponReckonAmt.dzkDiscountAmt
  339. }
  340. } else {
  341. if (this.payType == 2) { // 微信
  342. discountAmt = this.orderInfo.discountAmt
  343. } else if (this.payType == 1) {
  344. discountAmt = this.orderInfo.discountAmt_dzk
  345. }
  346. }
  347. return (+discountAmt).toFixed(2)
  348. },
  349. amt() {
  350. if (!!this.selectedCoupon.id) {
  351. if (this.payType == 2) {
  352. return this.selectedCoupon.couponReckonAmt.amt
  353. } else if (this.payType == 1) {
  354. return this.selectedCoupon.couponReckonAmt.dzkAmt
  355. }
  356. } else {
  357. if (this.payType == 2) {
  358. return this.orderInfo.amt
  359. } else if (this.payType == 1) {
  360. return this.orderInfo.amt_dzk
  361. }
  362. }
  363. }
  364. },
  365. created() {
  366. this.initPayType()
  367. },
  368. mounted() {},
  369. methods: {
  370. ...mapMutations(["clearLabelId", "updateVoucherInfo"]),
  371. initPayType() {
  372. if (this.orderInfo.oilsCardFlag == 1 && this.availableCredit) {
  373. this.payType = 1
  374. }
  375. },
  376. closeCoupon() {
  377. this.$refs.coupon.close();
  378. },
  379. goSelectCoupon() {
  380. if (this.couponsList.length == 0) {
  381. return
  382. }
  383. this.$refs.coupon.open();
  384. },
  385. selectCoupon(ele) {
  386. // 未开启优惠券功能
  387. if (this.couponEnabledFlag == '0') {
  388. return
  389. }
  390. // 取消选中
  391. if (this.selectedCoupon.id == ele.id) {
  392. this.selectedCoupon = {}
  393. this.$refs.coupon.close();
  394. return
  395. }
  396. // 选中
  397. this.selectedCoupon = ele
  398. if (!this.availableCouponToCredit) {
  399. this.payType = 2
  400. }
  401. this.$refs.coupon.close();
  402. const index = this.couponsList.findIndex(item => ele.id == item.id)
  403. setTimeout(() => {
  404. this.couponsList.splice(0, 0, this.couponsList.splice(index, 1)[0])
  405. }, 500)
  406. },
  407. async aliPay() {
  408. this.wxPayLoading = true;
  409. uni.showLoading({
  410. title: '拉取支付...',
  411. mask: true
  412. });
  413. try {
  414. const aliPayData = await this.$Request({
  415. url: "/aliPayAmtToSxf",
  416. method: "POST",
  417. data: {
  418. "ordNo": this.orderInfo.ordNo,
  419. "openId": this.openId,
  420. "stationId": this.stationId,
  421. },
  422. })
  423. const [payErr, payData] = await uni.requestPayment({
  424. orderInfo: aliPayData.data.respData.source
  425. })
  426. console.log('支付', payErr, payData)
  427. if (!!payData && payData.errMsg === "requestPayment:ok" && payData.resultCode == "9000") {
  428. // this.wxPayLoading = false;
  429. uni.hideLoading();
  430. this.updateVoucherInfo({
  431. receivableAmt: this.orderInfo.receivableAmt,
  432. amt: this.amt,
  433. oilName: this.selectedGas.oilName
  434. })
  435. this.wxPayLoading = false;
  436. this.clearLabelId();
  437. uni.hideLoading();
  438. uni.redirectTo({
  439. url: "/pages/succeed/succeed"
  440. })
  441. return;
  442. }
  443. throw new Error(payData.memo);
  444. } catch (e) {
  445. this.wxPayLoading = false;
  446. uni.hideLoading();
  447. this.showToastAndGoback(e.message)
  448. }
  449. },
  450. async creditPay() {
  451. this.creditPayLoading = true;
  452. if (this.payType === 2) {
  453. this.wxPay()
  454. return
  455. }
  456. uni.showLoading({
  457. title: '支付中...',
  458. mask: true
  459. });
  460. try {
  461. const creditPayData = await this.$Request({
  462. url: "/dzkPaySet",
  463. data: {
  464. "ordNo": this.orderInfo.ordNo,
  465. "id": this.selectedCoupon.id // 优惠券的id
  466. },
  467. })
  468. console.log(creditPayData)
  469. if (creditPayData.retCode !== 0) {
  470. throw new Error(creditPayData.message)
  471. }
  472. this.creditPayLoading = false;
  473. uni.hideLoading();
  474. this.updateVoucherInfo({
  475. receivableAmt: this.orderInfo.receivableAmt,
  476. amt: this.amt,
  477. oilName: this.selectedGas.oilName
  478. })
  479. console.log('我要跳了~')
  480. uni.redirectTo({
  481. url: "/pages/succeed/succeed"
  482. })
  483. } catch (e) {
  484. this.creditPayLoading = false;
  485. uni.hideLoading();
  486. this.showToastAndGoback(e.toString())
  487. }
  488. },
  489. async wxPay() {
  490. this.wxPayLoading = true;
  491. uni.showLoading({
  492. title: '拉取支付...',
  493. mask: true
  494. });
  495. try {
  496. const JhPayData = await this.$Request({
  497. url: "/getJhPayInfo",
  498. method: "POST",
  499. data: {
  500. "ordNo": this.orderInfo.ordNo,
  501. "openId": this.openId,
  502. "stationId": this.stationId,
  503. "userType": "1",
  504. "id": this.selectedCoupon.id // 优惠劵id
  505. },
  506. })
  507. console.log(JhPayData)
  508. if (JhPayData.retCode !== 0) {
  509. throw new Error("请求信息失败")
  510. }
  511. if (JhPayData.data.code !== '0000') {
  512. throw new Error(JhPayData.data.msg)
  513. }
  514. let timeStamp = JhPayData.data.respData.payTimeStamp;
  515. let nonceStr = JhPayData.data.respData.paynonceStr;
  516. let payPackage = JhPayData.data.respData.payPackage;
  517. let signType = JhPayData.data.signType;
  518. let paySign = JhPayData.data.respData.paySign;
  519. // 填写随行付的信息,启动支付
  520. const [payErr, payData] = await uni.requestPayment({
  521. 'timeStamp': timeStamp,
  522. 'nonceStr': nonceStr,
  523. 'package': payPackage,
  524. 'signType': signType,
  525. 'paySign': paySign,
  526. })
  527. if (!!payData && payData.errMsg === "requestPayment:ok") {
  528. this.wxPayLoading = false;
  529. this.clearLabelId();
  530. uni.hideLoading();
  531. // console.log({
  532. // receivableAmt: this.orderInfo.receivableAmt,
  533. // amt: this.payType == 2 ? this.orderInfo.amt : this.orderInfo.amt_dzk,
  534. // oilName: this.selectedGas.oilName
  535. // })
  536. this.updateVoucherInfo({
  537. receivableAmt: this.orderInfo.receivableAmt,
  538. amt: this.amt,
  539. oilName: this.selectedGas.oilName
  540. })
  541. console.log('我要跳了~')
  542. uni.redirectTo({
  543. url: "/pages/succeed/succeed"
  544. })
  545. return;
  546. }
  547. this.wxPayLoading = false;
  548. uni.hideLoading();
  549. if (payErr.errMsg === "requestPayment:fail cancel") {
  550. this.showToastAndGoback("取消了支付")
  551. return;
  552. }
  553. this.showToastAndGoback("支付失败")
  554. } catch (e) {
  555. this.wxPayLoading = false;
  556. uni.hideLoading();
  557. this.showToastAndGoback(e.message)
  558. }
  559. },
  560. showToastAndGoback(title) {
  561. uni.showToast({
  562. title,
  563. mask: true
  564. })
  565. setTimeout(() => {
  566. uni.navigateBack({
  567. delta: 1
  568. })
  569. }, 1500)
  570. },
  571. // selectPayType(type) {
  572. // if (!this.availableCredit && type == 1) {
  573. // return
  574. // }
  575. // if (type === this.payType) {
  576. // this.payType = ""
  577. // return
  578. // }
  579. // this.payType = type
  580. // },
  581. selectPayType() {
  582. if (!this.availableCredit) {
  583. return
  584. }
  585. if (this.payType === 1) {
  586. this.payType = 2
  587. return
  588. }
  589. this.payType = 1
  590. },
  591. creditAndCouponConflics(trigger, coupon) { // 处理电子卡和优惠券的互斥矛盾
  592. //trigger 触发的事件
  593. // trigger 1电子卡触发 2优惠券触发
  594. // coupon 当trigger为2时需要传选中的优惠券
  595. if (trigger == 1) {
  596. this.selectedCoupon
  597. }
  598. },
  599. goPay() {
  600. if (this.payType === 2) {
  601. this.wxPay()
  602. return
  603. }
  604. if (this.payType === 1) {
  605. // this.$refs.selectPayType.close();
  606. this.$refs.pay.open()
  607. }
  608. },
  609. backToSelectPayType() {
  610. this.$refs.pay.close()
  611. // this.$refs.selectPayType.open();
  612. },
  613. // closeSelectPayType() {
  614. // this.$refs.selectPayType.close();
  615. // }
  616. }
  617. }
  618. </script>
  619. <style lang="scss">
  620. page {
  621. width: 750rpx;
  622. background: #F2F2F2;
  623. .confirm {
  624. .bg {
  625. width: 750rpx;
  626. height: 352rpx;
  627. background: #0EA374;
  628. }
  629. .container {
  630. width: 690rpx;
  631. margin: 0 auto;
  632. margin-top: -239rpx;
  633. .station {
  634. width: 690rpx;
  635. height: 340rpx;
  636. background: #FFFFFF;
  637. border-radius: 14rpx;
  638. box-sizing: border-box;
  639. padding: 21rpx;
  640. display: flex;
  641. justify-content: space-between;
  642. align-items: center;
  643. image {
  644. width: 200rpx;
  645. height: 240rpx;
  646. }
  647. .info {
  648. width: 400rpx;
  649. height: 240rpx;
  650. display: flex;
  651. flex-direction: column;
  652. justify-content: space-between;
  653. align-items: flex-start;
  654. .content {
  655. height: 180rpx;
  656. display: flex;
  657. flex-direction: column;
  658. justify-content: space-between;
  659. font-size: 28rpx;
  660. font-weight: 400;
  661. color: #666666;
  662. line-height: 40rpx;
  663. view {
  664. display: flex;
  665. justify-content: space-between;
  666. text:nth-child(1) {
  667. width: 200rpx;
  668. display: inline-block;
  669. }
  670. }
  671. }
  672. .name {
  673. height: 45rpx;
  674. font-size: 32rpx;
  675. font-weight: 600;
  676. color: #111111;
  677. line-height: 45rpx;
  678. }
  679. }
  680. }
  681. >view:not(.station) {
  682. width: 690rpx;
  683. height: 110rpx;
  684. background: #FFFFFF;
  685. box-shadow: 0px 2rpx 6rpx 5rpx rgba(237, 237, 237, 0.5);
  686. border-radius: 10rpx;
  687. margin-top: 20rpx;
  688. display: flex;
  689. justify-content: space-between;
  690. align-items: center;
  691. box-sizing: border-box;
  692. padding: 20rpx;
  693. font-size: 28rpx;
  694. font-weight: 500;
  695. color: #111111;
  696. line-height: 40rpx;
  697. >view {
  698. display: flex;
  699. justify-content: space-between;
  700. align-items: center;
  701. .icon {
  702. display: inline-block;
  703. width: 35rpx;
  704. height: 30rpx;
  705. // border: 2rpx solid #666666;
  706. margin-right: 14rpx;
  707. }
  708. .price {
  709. background: url(../../static/icon/dingdan.2x.png) no-repeat 0px 0px;
  710. background-size: 100% 100%;
  711. }
  712. .oil {
  713. background: url(../../static/icon/sheng.2x.png) no-repeat 0px 0px;
  714. background-size: 100% 100%;
  715. }
  716. .discount {
  717. background: url(../../static/icon/youhuiquan-2.2x.png) no-repeat 0px 0px;
  718. background-size: 100% 100%;
  719. }
  720. .vip {
  721. background: url(../../static/icon/huiyuan-.2x.png) no-repeat 0px 0px;
  722. background-size: 100% 100%;
  723. }
  724. }
  725. text.price {
  726. color: #F3B235;
  727. line-height: 33rpx;
  728. }
  729. text.vip {
  730. font-size: 24rpx;
  731. color: #A76825;
  732. line-height: 33rpx;
  733. }
  734. }
  735. view.dispose {
  736. width: 690rpx;
  737. height: 150rpx;
  738. position: relative;
  739. display: inline-block;
  740. .coupon_bg {
  741. display: none;
  742. }
  743. .title {
  744. position: absolute;
  745. top: 36rpx;
  746. left: 20rpx;
  747. text:nth-child(1) {
  748. height: 40rpx;
  749. font-size: 28rpx;
  750. font-weight: 400;
  751. color: #000000;
  752. line-height: 40rpx;
  753. margin-right: 20rpx;
  754. margin-left: 5rpx;
  755. }
  756. text:nth-child(2) {
  757. height: 28rpx;
  758. font-size: 20rpx;
  759. font-family: PingFangSC-Regular, PingFang SC;
  760. font-weight: 400;
  761. color: #F0B849;
  762. line-height: 28rpx;
  763. box-sizing: border-box;
  764. border: 1px solid #F0B849;
  765. }
  766. }
  767. .tip {
  768. position: absolute;
  769. top: 90rpx;
  770. left: 20rpx;
  771. .icon {
  772. width: 22rpx;
  773. height: 22rpx;
  774. background: url(../../static/icon/tipicon1.png) no-repeat 0px 0px;
  775. background-size: 100% 100%;
  776. }
  777. text:nth-child(2),
  778. text:nth-child(3) {
  779. height: 28rpx;
  780. font-size: 20rpx;
  781. font-family: PingFangSC-Regular, PingFang SC;
  782. font-weight: 400;
  783. color: rgba(0, 0, 0, 0.4);
  784. line-height: 28rpx;
  785. text {
  786. font-size: 27rpx;
  787. font-weight: 800rpx;
  788. // color: #007AFF;
  789. color: #838383;
  790. }
  791. }
  792. }
  793. }
  794. view.coupon {
  795. .extra {
  796. position: absolute;
  797. right: 0rpx;
  798. top: 0rpx;
  799. height: 150rpx;
  800. width: 250rpx;
  801. font-size: 24rpx;
  802. color: #6D6D6D;
  803. line-height: 150rpx;
  804. color: #249bdd;
  805. font-weight: bold;
  806. text-align: center;
  807. }
  808. .disable {
  809. color: #6D6D6D;
  810. }
  811. }
  812. view.coupon.direct {
  813. background: url("../../static/icon/quan1.2x.png") no-repeat;
  814. background-size: 100% 100%;
  815. >.title {
  816. text:nth-child(2) {
  817. color: #FF2;
  818. }
  819. }
  820. }
  821. view.coupon.rate {
  822. background: url("../../static/icon/quan2.2x.png") no-repeat;
  823. background-size: 100% 100%;
  824. >.title {
  825. text:nth-child(2) {
  826. color: #FD2;
  827. }
  828. }
  829. }
  830. // view.coupon.direct{
  831. // .coupon_bg{
  832. // display: block;
  833. // }
  834. // .title,
  835. // .tip{
  836. // left: 300rpx;
  837. // }
  838. // .extra{
  839. // display: none;
  840. // }
  841. // }
  842. view.dzk {
  843. .extra {
  844. position: absolute;
  845. right: 20rpx;
  846. top: 54rpx;
  847. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  848. background-size: 100% 100%;
  849. width: 40rpx;
  850. height: 40rpx;
  851. margin-right: 20rpx;
  852. }
  853. .selected {
  854. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  855. background-size: 100% 100%;
  856. }
  857. .forbid {
  858. background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
  859. background-size: 100% 100%;
  860. }
  861. }
  862. }
  863. .submit {
  864. width: 750rpx;
  865. height: 180rpx;
  866. // background: #FFFFFF;
  867. // margin-top: 30rpx;
  868. .area {
  869. width: 750rpx;
  870. height: 150rpx;
  871. background: #FFFFFF;
  872. position: fixed;
  873. bottom: 0;
  874. left: 0;
  875. right: 0;
  876. display: flex;
  877. justify-content: flex-end;
  878. align-items: center;
  879. >.type {
  880. font-size: 28rpx;
  881. font-weight: 400;
  882. color: #111111;
  883. line-height: 40rpx;
  884. }
  885. >.amount {
  886. font-size: 30rpx;
  887. font-weight: 600;
  888. color: #f3b338;
  889. line-height: 40rpx;
  890. }
  891. >.icon {
  892. background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
  893. background-size: 100% 100%;
  894. display: inline-block;
  895. width: 13rpx;
  896. height: 8rpx;
  897. line-height: 40rpx;
  898. margin-left: 10rpx;
  899. margin-right: 15rpx;
  900. }
  901. // text:nth-child(2) {
  902. // font-size: 30rpx;
  903. // font-weight: 600;
  904. // color: #f3b338;
  905. // line-height: 40rpx;
  906. // }
  907. .btn {
  908. margin-left: 20rpx;
  909. margin-right: 30rpx;
  910. background-color: #0ea374;
  911. border-radius: 40rpx;
  912. width: 250rpx;
  913. height: 80rpx;
  914. font-size: 28rpx;
  915. font-family: PingFangSC-Regular, PingFang SC;
  916. font-weight: 500;
  917. color: #FFFFFF;
  918. line-height: 80rpx;
  919. text-align: center;
  920. }
  921. }
  922. }
  923. uni-popup.pay {
  924. .cont {
  925. width: 750rpx;
  926. height: 682rpx;
  927. background: #FFFFFF;
  928. border-radius: 30rpx 30rpx 0 0;
  929. position: relative;
  930. .close {
  931. background: url(../../static/icon/left.png) no-repeat 0px 0px;
  932. background-size: 100% 100%;
  933. width: 18rpx;
  934. height: 30rpx;
  935. position: absolute;
  936. top: 46rpx;
  937. left: 34rpx;
  938. }
  939. .amount {
  940. width: 100%;
  941. height: 100rpx;
  942. font-size: 80rpx;
  943. font-weight: 400;
  944. color: #000000;
  945. position: absolute;
  946. top: 112rpx;
  947. display: flex;
  948. justify-content: center;
  949. align-items: center;
  950. text {
  951. font-size: 40rpx;
  952. }
  953. }
  954. .type {
  955. width: 100%;
  956. height: 34rpx;
  957. position: absolute;
  958. top: 310rpx;
  959. text:nth-child(1) {
  960. height: 34rpx;
  961. font-size: 24rpx;
  962. font-weight: 400;
  963. color: #aaaaaa;
  964. line-height: 34rpx;
  965. position: absolute;
  966. left: 58rpx;
  967. }
  968. text:nth-child(2) {
  969. height: 34rpx;
  970. font-size: 24rpx;
  971. font-weight: 500;
  972. color: #000000;
  973. line-height: 34rpx;
  974. position: absolute;
  975. right: 144rpx;
  976. }
  977. text:nth-child(3) {
  978. background: url(../../static/icon/right.png) no-repeat 0px 0px;
  979. background-size: 100% 100%;
  980. display: inline-block;
  981. width: 12rpx;
  982. height: 22rpx;
  983. position: absolute;
  984. right: 66rpx;
  985. top: 7rpx;
  986. }
  987. }
  988. .pay {
  989. width: 590rpx;
  990. height: 76rpx;
  991. background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
  992. border-radius: 38rpx;
  993. font-size: 28rpx;
  994. font-family: PingFangSC-Regular, PingFang SC;
  995. font-weight: 400;
  996. color: #FFFFFF;
  997. line-height: 76rpx;
  998. letter-spacing: 1rpx;
  999. position: absolute;
  1000. bottom: 114rpx;
  1001. left: 80rpx;
  1002. }
  1003. }
  1004. }
  1005. uni-popup.selectPayType {
  1006. .cont {
  1007. width: 750rpx;
  1008. // width: 100%;
  1009. height: 680rpx;
  1010. background: #FFFFFF;
  1011. border-radius: 30rpx 30rpx 0 0;
  1012. position: relative;
  1013. padding: 0 25rpx;
  1014. box-sizing: border-box;
  1015. .close {
  1016. width: 38rpx;
  1017. height: 38rpx;
  1018. position: absolute;
  1019. top: 24rpx;
  1020. left: 24rpx;
  1021. background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
  1022. background-size: 100% 100%;
  1023. }
  1024. .credit {
  1025. position: absolute;
  1026. width: 700rpx;
  1027. top: 138rpx;
  1028. height: 130rpx;
  1029. box-sizing: border-box;
  1030. border-bottom: 2rpx solid #D8D8D8;
  1031. color: #000 solid #D8D8D8;
  1032. padding: 0 30rpx;
  1033. .credit-con {
  1034. height: 60rpx;
  1035. display: flex;
  1036. justify-content: space-between;
  1037. .text {
  1038. font-size: 28rpx;
  1039. height: 40rpx;
  1040. line-height: 60rpx;
  1041. font-weight: 600;
  1042. }
  1043. .icon {
  1044. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  1045. background-size: 100% 100%;
  1046. width: 40rpx;
  1047. height: 40rpx;
  1048. }
  1049. .selected {
  1050. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  1051. background-size: 100% 100%;
  1052. }
  1053. .forbid {
  1054. background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
  1055. background-size: 100% 100%;
  1056. }
  1057. }
  1058. .tip {
  1059. margin-top: 16rpx;
  1060. height: 44rpx;
  1061. font-size: 24rpx;
  1062. font-weight: 400;
  1063. color: rgba(0, 0, 0, 0.29);
  1064. line-height: 44rpx;
  1065. }
  1066. }
  1067. .wx {
  1068. position: absolute;
  1069. width: 700rpx;
  1070. top: 305rpx;
  1071. padding: 0 30rpx;
  1072. height: 40rpx;
  1073. display: flex;
  1074. box-sizing: border-box;
  1075. justify-content: space-between;
  1076. .text {
  1077. font-size: 28rpx;
  1078. height: 40rpx;
  1079. line-height: 40rpx;
  1080. font-weight: 600;
  1081. }
  1082. .icon {
  1083. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  1084. background-size: 100% 100%;
  1085. width: 40rpx;
  1086. height: 40rpx;
  1087. }
  1088. .selected {
  1089. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  1090. background-size: 100% 100%;
  1091. }
  1092. }
  1093. >button {
  1094. width: 590rpx;
  1095. height: 76rpx;
  1096. background-color: #cccccc;
  1097. border-radius: 38rpx;
  1098. font-size: 28rpx;
  1099. font-weight: 400;
  1100. color: #FFFFFF;
  1101. line-height: 76rpx;
  1102. letter-spacing: 1rpx;
  1103. position: absolute;
  1104. box-sizing: border-box;
  1105. bottom: 114rpx;
  1106. left: 80rpx;
  1107. }
  1108. >button.available {
  1109. background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
  1110. }
  1111. }
  1112. }
  1113. uni-popup.coupon {
  1114. .coupon-container {
  1115. width: 100%;
  1116. border-radius: 42rpx 42rpx 0px 0px;
  1117. background: #F2F2F2;
  1118. padding: 0 30rpx;
  1119. box-sizing: border-box;
  1120. position: relative;
  1121. .close {
  1122. width: 38rpx;
  1123. height: 38rpx;
  1124. position: absolute;
  1125. top: 24rpx;
  1126. right: 24rpx;
  1127. background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
  1128. background-size: 100% 100%;
  1129. }
  1130. >.title {
  1131. height: 105rpx;
  1132. font-size: 32rpx;
  1133. font-weight: 400;
  1134. color: #111111;
  1135. line-height: 105rpx;
  1136. font-weight: 600;
  1137. color: #111111;
  1138. text-align: center;
  1139. }
  1140. .coupon-scroll {
  1141. max-height: 600rpx;
  1142. overflow: scroll;
  1143. .coupon {
  1144. display: flex;
  1145. justify-content: space-between;
  1146. width: 690rpx;
  1147. height: 160rpx;
  1148. margin-bottom: 50rpx;
  1149. box-shadow: 0 0 10rpx 4rpx rgba(233, 223, 223, 0.5);
  1150. >.left {
  1151. display: flex;
  1152. flex-direction: column;
  1153. justify-content: center;
  1154. text-align: center;
  1155. width: 220rpx;
  1156. height: 160rpx;
  1157. text-align: center;
  1158. .amount {
  1159. display: block;
  1160. font-size: 40rpx;
  1161. font-weight: 500;
  1162. color: #ffffff;
  1163. line-height: 56rpx;
  1164. text-align: center;
  1165. margin-top: 0;
  1166. .value {
  1167. font-size: 50rpx;
  1168. }
  1169. }
  1170. .condition {
  1171. font-size: 24rpx;
  1172. font-weight: 400;
  1173. color: #ffffff;
  1174. line-height: 33rpx;
  1175. text-align: center;
  1176. margin-top: 25rpx;
  1177. }
  1178. .exchangeName {
  1179. display: none;
  1180. font-size: 35rpx;
  1181. font-weight: 500;
  1182. color: #ffffff;
  1183. line-height: 56rpx;
  1184. }
  1185. }
  1186. >.right {
  1187. width: 456rpx;
  1188. height: 160rpx;
  1189. display: flex;
  1190. flex-direction: column;
  1191. justify-content: space-between;
  1192. margin: 8rpx 0 5rpx 0;
  1193. .title {
  1194. height: 30rpx;
  1195. font-size: 24rpx;
  1196. font-weight: 600;
  1197. line-height: 33rpx;
  1198. .type {
  1199. width: 113rpx;
  1200. height: 30rpx;
  1201. line-height: 30rpx;
  1202. display: inline-block;
  1203. background: #f8c;
  1204. border-radius: 19rpx;
  1205. font-size: 24rpx;
  1206. font-weight: 600;
  1207. color: #ffffff;
  1208. text-align: center;
  1209. }
  1210. }
  1211. .content {
  1212. display: flex;
  1213. justify-content: space-between;
  1214. margin: 5rpx 0 5rpx 0;
  1215. height: 120rpx;
  1216. >.items {
  1217. width: 360rpx;
  1218. height: 100%;
  1219. display: flex;
  1220. justify-content: space-around;
  1221. flex-direction: column;
  1222. .item {
  1223. color: #272626;
  1224. font-size: 21rpx;
  1225. >text {
  1226. width: 230rpx;
  1227. display: inline-block;
  1228. color: #272626;
  1229. font-size: 22rpx;
  1230. font-weight: bold;
  1231. overflow: scroll;
  1232. /* 超出部分隐藏 */
  1233. white-space: nowrap;
  1234. /* 文本不换行 */
  1235. }
  1236. }
  1237. .from {
  1238. display: block;
  1239. }
  1240. }
  1241. >.btn {
  1242. display: flex;
  1243. flex-direction: column;
  1244. justify-content: center;
  1245. margin-right: 10rpx;
  1246. width: 70rpx;
  1247. .extra {
  1248. background: url(../../static/icon/select.png) no-repeat 0px 0px;
  1249. background-size: 100% 100%;
  1250. width: 55rpx;
  1251. height: 55rpx;
  1252. margin-right: 20rpx;
  1253. margin-top: -10rpx;
  1254. }
  1255. .selected {
  1256. background: url(../../static/icon/selected.png) no-repeat 0px 0px;
  1257. background-size: 100% 100%;
  1258. }
  1259. // >button {
  1260. // height: 60rpx;
  1261. // background: linear-gradient(143deg, #fad965 0%, #f3b235 100%);
  1262. // border-radius: 20rpx;
  1263. // border: none;
  1264. // outline: none;
  1265. // color: #ffffff;
  1266. // line-height: 60rpx;
  1267. // font-size: 30rpx;
  1268. // font-weight: 400;
  1269. // overflow: hidden;
  1270. // /* 超出部分隐藏 */
  1271. // white-space: nowrap;
  1272. // /* 文本不换行 */
  1273. // display: block;
  1274. // }
  1275. }
  1276. }
  1277. }
  1278. }
  1279. .direct {
  1280. >.left {
  1281. background: url("../../static/icon/quan1.2x.png") no-repeat;
  1282. background-size: 100% 100%;
  1283. }
  1284. >.right {
  1285. >.title>.type {
  1286. background: #f8ce57;
  1287. }
  1288. >.content>.btn button {
  1289. background: linear-gradient(143deg, #fad965 0%, #f3b235 100%);
  1290. }
  1291. }
  1292. }
  1293. .rate {
  1294. >.left {
  1295. background: url("../../static/icon/quan2.2x.png") no-repeat;
  1296. background-size: 100% 100%;
  1297. }
  1298. >.right {
  1299. >.title>.type {
  1300. background: #eb8573;
  1301. }
  1302. >.content>.btn button {
  1303. background: linear-gradient(143deg, #f4a796 0%, #e67462 100%);
  1304. }
  1305. }
  1306. }
  1307. // >.item {
  1308. // width: 690rpx;
  1309. // height: 160rpx;
  1310. // font-size: 24rpx;
  1311. // font-weight: 500;
  1312. // color: #FFFFFF;
  1313. // line-height: 40rpx;
  1314. // display: flex;
  1315. // justify-content: space-between;
  1316. // margin-bottom: 20rpx;
  1317. // .left {
  1318. // width: 150rpx;
  1319. // height: 160rpx;
  1320. // display: flex;
  1321. // flex-direction: column;
  1322. // justify-content: center;
  1323. // text-align: center;
  1324. // .amount {
  1325. // font-size: 20rpx;
  1326. // .big {
  1327. // font-size: 33rpx;
  1328. // }
  1329. // }
  1330. // }
  1331. // .right {
  1332. // width: 540rpx;
  1333. // height: 160rpx;
  1334. // color: #111111;
  1335. // position: relative;
  1336. // .title {
  1337. // position: absolute;
  1338. // top: 22rpx;
  1339. // left: 20rpx;
  1340. // height: 40rpx;
  1341. // font-size: 28rpx;
  1342. // font-weight: 500;
  1343. // line-height: 40rpx;
  1344. // }
  1345. // .scope {
  1346. // position: absolute;
  1347. // top: 72rpx;
  1348. // left: 20rpx;
  1349. // height: 28rpx;
  1350. // font-size: 20rpx;
  1351. // color: #666666;
  1352. // line-height: 28rpx;
  1353. // }
  1354. // .valid {
  1355. // position: absolute;
  1356. // top: 110rpx;
  1357. // left: 20rpx;
  1358. // height: 28rpx;
  1359. // font-size: 20rpx;
  1360. // color: #666666;
  1361. // line-height: 28rpx;
  1362. // }
  1363. // .use {
  1364. // position: absolute;
  1365. // top: 54rpx;
  1366. // right: 20rpx;
  1367. // display: inline-block;
  1368. // width: 160rpx;
  1369. // height: 55rpx;
  1370. // }
  1371. // }
  1372. // }
  1373. .cash {
  1374. background: url(../../static/icon/youhuiquan1.2x.png) no-repeat 0px 0px;
  1375. background-size: 100% 100%;
  1376. }
  1377. .exchange {
  1378. background: url(../../static/icon/youhuiquan2.2x.png) no-repeat 0px 0px;
  1379. background-size: 100% 100%;
  1380. }
  1381. .discount {
  1382. background: url(../../static/icon/youhuiquan3.2x.png) no-repeat 0px 0px;
  1383. background-size: 100% 100%;
  1384. }
  1385. }
  1386. }
  1387. }
  1388. }
  1389. }
  1390. </style>