12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517 |
- <template>
- <view class="confirm">
- <view class="bg">
- </view>
- <view class="container">
- <view class="station">
- <image :src="orderInfo.stationPic" mode="scaleToFill"></image>
- <view class="info">
- <view class="name">
- {{orderInfo.stationName}}
- </view>
- <view class="content">
- <view>
- <text>枪 号:</text><text>{{selectedGas.oilGunNo}}号</text>
- </view>
- <view>
- <text>品 名:</text><text>{{selectedGas.oilName}}</text>
- </view>
- <view>
- <text>枪标价:</text><text>¥{{selectedGas.oilPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
- </view>
- <view>
- <text>优惠价:</text><text>¥{{discountPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
- </view>
- </view>
- </view>
- </view>
- <view>
- <view>
- <view class="icon price"></view>订单金额
- </view>
- <text class="price">¥{{orderInfo.receivableAmt}}</text>
- </view>
- <view>
- <view>
- <view class="icon oil"></view>加油升数
- </view>
- <text>{{orderInfo.oilLiters}}{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
- </view>
- <view>
- <view>
- <view class="icon discount"></view>优惠金额
- </view>
- <text>¥{{discountAmt}}</text>
- </view>
- <!-- #ifdef MP-WEIXIN -->
- <view class="dispose coupon"
- :class="[selectedCoupon.couponType=='1'?'direct':'', selectedCoupon.couponType=='2'?'rate':'']"
- @click="goSelectCoupon" v-if="couponEnabledFlag=='1'">
- <!-- <view class="coupon_bg">
- 你好
- </view> -->
- <view class="title">
- <text>优惠券</text>
- <text v-if="!!selectedCoupon.id">{{creditNameplate}}</text>
- </view>
- <view class="tip">
- <text class="icon"></text>
- <text>{{couponTip}}</text>
- </view>
- <view class="extra" :class="couponsList.length==0 ? 'disable':'' ">
- {{couponMore}}
- </view>
- </view>
- <!-- #endif -->
- <!-- #ifdef MP-WEIXIN -->
- <view class="dispose dzk" @click="selectPayType" v-if="orderInfo.oilsCardFlag == 1">
- <view class="title">
- <text>电子卡</text>
- <text> {{availableCouponToCredit?"电子卡支付更优惠":"不可用"}}</text>
- </view>
- <view class="tip">
- <text class="icon"></text>
- <template v-if="availableCouponToCredit">
- <text
- v-show="availableCredit">您的{{ cardTypeTranslate[orderInfo.cardOilsType]}}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,可用来支付此订单</text>
- <text
- v-show="!availableCredit">{{ cardTypeTranslate[orderInfo.cardOilsType] }}余额<text>{{' ' + orderInfo.balance + ' '}}</text>元,<text>不足以</text>完成此笔订单</text>
- </template>
- <template v-else>
- <text>您目前选中的优惠券不可使用电子卡</text>
- </template>
- </view>
- <view class="extra icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></view>
- </view>
- <!-- #endif -->
- <!--
- <view>
- <view>
- <view class="icon vip"></view>油站会员
- </view>
- <text>立刻开通</text>
- </view>
- -->
- </view>
- <view class="submit">
- <view class="area">
- <!-- #ifdef MP-WEIXIN -->
- <text class="type" v-if="orderInfo.oilsCardFlag == 0" @click="selectPayType">实付款</text>
- <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==2" @click="selectPayType">微信付款</text>
- <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==1" @click="selectPayType">电子卡付款</text>
- <text class="icon" v-if="orderInfo.oilsCardFlag == 1 && availableCredit" @click="selectPayType"></text>
- <text class="amount">¥{{amt}}</text>
- <button class="btn" @click="goPay" :loading="wxPayLoading" :disabled="wxPayLoading">
- 提交订单
- </button>
- <!-- #endif -->
- <!-- #ifdef MP-ALIPAY -->
- <text class="type" @click="aliPay">实付款</text>
- <text class="amount">¥{{amt}}</text>
- <button class="btn" @click="aliPay" :loading="wxPayLoading" :disabled="wxPayLoading">
- 提交订单
- </button>
- <!-- #endif -->
- </view>
- </view>
- <uni-popup ref="pay" class="pay" type="bottom" maskClick="false">
- <view class="cont">
- <view class="close" @click="backToSelectPayType">
- </view>
- <view class="amount">
- <text>¥</text>
- {{ amt }}
- </view>
- <view class="type" @click="selectPayType">
- <text>付款方式</text>
- <text> {{ payType==2 ? '微信支付' : '电子卡支付'}}</text>
- <text></text>
- </view>
- <button type="default" class="pay" @click="creditPay" :loading="creditPayLoading">
- 立即付款
- </button>
- </view>
- </uni-popup>
- <!--
- <uni-popup ref="selectPayType" class="selectPayType" type="bottom" maskClick="false">
- <view class="cont">
- <view class="close" @click="closeSelectPayType">
- </view>
- <view class="credit">
- <view class="credit-con" @click="selectPayType(1)">
- <text class="text">电子卡支付(剩余:{{ orderInfo.balance }})</text>
- <text class="icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></text>
- </view>
- <text class="tip">
- {{tip}}
- </text>
- </view>
- <view class="wx" @click="selectPayType(2)">
- <text class="text">微信支付</text>
- <text class="icon" :class="[payType === 2 ? 'selected':'']"></text>
- </view>
- <button type="default" :class="[payType !== '' ? 'available' : '']" @click="goPay"
- :disabled="payType === '' ? true : false" :loading="wxPayLoading">
- 确认
- </button>
- </view>
- </uni-popup>
- -->
- <uni-popup ref="coupon" class="coupon" type="bottom" maskClick="false">
- <view class="coupon-container">
- <view class="close" @click="closeCoupon">
- </view>
- <view class="title">
- 优惠券
- </view>
- <scroll-view scroll-y="true" class="coupon-scroll">
- <template v-for="ele in couponsList">
- <view class="coupon" :class="[ele.couponType == 1 ? 'direct':'', ele.couponType == 2 ? 'rate':'' ]"
- @click="selectCoupon(ele)">
- <view class="left">
- <view class="amount">
- {{ ele.couponType == 1 ? '¥':''}}{{ele.couponType == 2 ? '% ':''}}
- <text class="value">{{ ele.couponAmt }}</text>
- </view>
- <view class="condition">{{
- ele.couponThresholdAmt == 0
- ? "无门槛"
- : "满" + ele.couponThresholdAmt + "元可用"
- }}</view>
- </view>
- <view class="right">
- <view class="title">
- <text class="type">{{ele.couponType == 1 ? '立减劵':''}}{{ele.couponType == 2 ? '折扣劵':''}}</text>
- </view>
- <view class="content">
- <view class="items">
- <view class="item scope">适用:<text>{{
- (ele.oilName || []).toString()
- }}</text></view>
- <view class="item valid">截止:<text>{{ele.couponEffectiveTime}}</text></view>
- </view>
- <view class="btn">
- <!-- <button>已领</button> -->
- <view class="extra icon" :class="[selectedCoupon.id === ele.id ? 'selected':'']"></view>
- </view>
- </view>
- <!-- <view class="tip">凭借此劵可以减少支付的金额,欢迎来加油~</view> -->
- </view>
- </view>
- </template>
- <!--
- <template v-for="ele in couponsList">
- <view class="item cash" :class="[ele.couponType == 1 ? 'cash':'', ele.couponType == 2 ? 'discount':'' ]"
- v-if="ele.couponType == 1 || ele.couponType == 2">
- <view class="left">
- <text class="amount">
- {{ ele.couponType == 1 ? '¥':''}}{{ele.couponType == 2 ? '% ':''}}
- <text class="big">{{ ele.couponAmt }}</text>
- </text>
- <text>{{
- ele.couponThresholdAmt == 0
- ? "无门槛"
- : "满" + ele.couponThresholdAmt + "元可用"
- }}</text>
- </view>
- <view class="right">
- <text class="title">{{ele.couponType == 1 ? '立减劵':''}}{{ele.couponType == 2 ? '折扣劵':''}}</text>
- <text class="scope">范围:{{
- (ele.oilName || []).toString()
- }}</text>
- <text class="valid">有效至 {{ele.couponEffectiveTime}}</text>
- <text class="use"></text>
- </view>
- </view>
- </template>
- -->
- </scroll-view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from "vuex";
- export default {
- data() {
- return {
- payType: 2, // 1电子卡 2微信
- wxPayLoading: false,
- creditPayLoading: false,
- cardTypeTranslate: ['', '汽油卡', '柴油卡', '非油品卡', 'LNG', 'CNG'],
- selectedCoupon: {},
- };
- },
- computed: {
- // ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
- ...mapState({
- couponEnabledFlag: state => state.coupon.couponEnabledFlag,
- couponsList: state => state.coupon.couponList,
- // orderInfo: state => state.order.orderInfo,
- // openId: state => state.user.openId,
- // stationId: state => state.station.stationId,
- // selectedGas: state => state.station.selectedGas,
- }),
- availableCredit() {
- if (this.orderInfo.oilsCardFlag == 0) {
- return false
- }
- if ((+this.orderInfo.balance) < (+this.orderInfo.amt_dzk)) {
- return false
- }
- // 优惠劵
- if (!this.availableCouponToCredit) {
- return false
- }
- return true
- },
- availableCouponToCredit() { // 当前选择的优惠券是否可用电子卡
- return !(this.couponEnabledFlag == 1 && this.selectedCoupon.isCardFlag == 0)
- },
- creditFlag() {
- return this.orderInfo.oilsCardFlag == '1' ? true : false
- },
- creditNameplate() {
- if (!!this.selectedCoupon.id) {
- let amt = +this.orderInfo.receivableAmt
- let derate
- if (this.selectedCoupon.couponType == '1') {
- derate = +this.selectedCoupon.couponAmt
- derate = derate.toFixed(2)
- return '直降立减' + derate + "元"
- } else if (this.selectedCoupon.couponType == '2') {
- derate = (+amt) * (100 - (this.selectedCoupon.couponAmt)) / 100
- derate = derate.toFixed(2)
- return '折扣立减' + derate + "元"
- }
- } else {
- return "关注公众号获取优惠券"
- }
- },
- couponTip() {
- if (!!this.selectedCoupon.id) {
- if (this.selectedCoupon.couponType == '1') {
- return "您已经使用面值为" + this.selectedCoupon.couponAmt + "元的直降优惠券"
- } else if (this.selectedCoupon.couponType == '2') {
- return "您已经使用折扣为" + this.selectedCoupon.couponAmt + "%的优惠券"
- }
- }
- return "关注公众号获取更多优惠券"
- },
- couponMore() {
- console.log(this.couponEnabledFlag)
- if (this.couponEnabledFlag == '0') {
- return '未开启优惠券'
- }
- if (!!this.selectedCoupon.id) {
- return '重选优惠券 >>>'
- }
- if (this.couponsList.length == 0) {
- return '暂无可用优惠劵 >>>'
- }
- return '有可用的优惠券 >>>'
- },
- discountPrice() {
- if (!!this.selectedCoupon.id) {
- if (this.payType == 2) {
- return this.selectedCoupon.couponReckonAmt.discountPrice
- } else if (this.payType == 1) {
- return this.selectedCoupon.couponReckonAmt.dzkDiscountPrice
- }
- } else {
- if (this.payType == 2) {
- return this.orderInfo.discountPrice
- } else if (this.payType == 1) {
- return this.orderInfo.dzkDiscountPrice
- }
- }
- },
- discountAmt() {
- let discountAmt
- if (!!this.selectedCoupon.id) {
- if (this.payType == 2) { // 微信
- discountAmt = this.selectedCoupon.couponReckonAmt.discountAmt
- } else if (this.payType == 1) {
- discountAmt = this.selectedCoupon.couponReckonAmt.dzkDiscountAmt
- }
- } else {
- if (this.payType == 2) { // 微信
- discountAmt = this.orderInfo.discountAmt
- } else if (this.payType == 1) {
- discountAmt = this.orderInfo.discountAmt_dzk
- }
- }
- return (+discountAmt).toFixed(2)
- },
- amt() {
- if (!!this.selectedCoupon.id) {
- if (this.payType == 2) {
- return this.selectedCoupon.couponReckonAmt.amt
- } else if (this.payType == 1) {
- return this.selectedCoupon.couponReckonAmt.dzkAmt
- }
- } else {
- if (this.payType == 2) {
- return this.orderInfo.amt
- } else if (this.payType == 1) {
- return this.orderInfo.amt_dzk
- }
- }
- }
- },
- created() {
- this.initPayType()
- },
- mounted() {},
- methods: {
- ...mapMutations(["clearLabelId", "updateVoucherInfo"]),
- initPayType() {
- if (this.orderInfo.oilsCardFlag == 1 && this.availableCredit) {
- this.payType = 1
- }
- },
- closeCoupon() {
- this.$refs.coupon.close();
- },
- goSelectCoupon() {
- if (this.couponsList.length == 0) {
- return
- }
- this.$refs.coupon.open();
- },
- selectCoupon(ele) {
- // 未开启优惠券功能
- if (this.couponEnabledFlag == '0') {
- return
- }
- // 取消选中
- if (this.selectedCoupon.id == ele.id) {
- this.selectedCoupon = {}
- this.$refs.coupon.close();
- return
- }
- // 选中
- this.selectedCoupon = ele
- if (!this.availableCouponToCredit) {
- this.payType = 2
- }
- this.$refs.coupon.close();
- const index = this.couponsList.findIndex(item => ele.id == item.id)
- setTimeout(() => {
- this.couponsList.splice(0, 0, this.couponsList.splice(index, 1)[0])
- }, 500)
- },
- async aliPay() {
- this.wxPayLoading = true;
- uni.showLoading({
- title: '拉取支付...',
- mask: true
- });
- try {
- const aliPayData = await this.$Request({
- url: "/aliPayAmtToSxf",
- method: "POST",
- data: {
- "ordNo": this.orderInfo.ordNo,
- "openId": this.openId,
- "stationId": this.stationId,
- },
- })
- const [payErr, payData] = await uni.requestPayment({
- orderInfo: aliPayData.data.respData.source
- })
- console.log('支付', payErr, payData)
- if (!!payData && payData.errMsg === "requestPayment:ok" && payData.resultCode == "9000") {
- // this.wxPayLoading = false;
- uni.hideLoading();
- this.updateVoucherInfo({
- receivableAmt: this.orderInfo.receivableAmt,
- amt: this.amt,
- oilName: this.selectedGas.oilName
- })
- this.wxPayLoading = false;
- this.clearLabelId();
- uni.hideLoading();
- uni.redirectTo({
- url: "/pages/succeed/succeed"
- })
- return;
- }
- throw new Error(payData.memo);
- } catch (e) {
- this.wxPayLoading = false;
- uni.hideLoading();
- this.showToastAndGoback(e.message)
- }
- },
- async creditPay() {
- this.creditPayLoading = true;
- if (this.payType === 2) {
- this.wxPay()
- return
- }
- uni.showLoading({
- title: '支付中...',
- mask: true
- });
- try {
- const creditPayData = await this.$Request({
- url: "/dzkPaySet",
- data: {
- "ordNo": this.orderInfo.ordNo,
- "id": this.selectedCoupon.id // 优惠券的id
- },
- })
- console.log(creditPayData)
- if (creditPayData.retCode !== 0) {
- throw new Error(creditPayData.message)
- }
- this.creditPayLoading = false;
- uni.hideLoading();
- this.updateVoucherInfo({
- receivableAmt: this.orderInfo.receivableAmt,
- amt: this.amt,
- oilName: this.selectedGas.oilName
- })
- console.log('我要跳了~')
- uni.redirectTo({
- url: "/pages/succeed/succeed"
- })
- } catch (e) {
- this.creditPayLoading = false;
- uni.hideLoading();
- this.showToastAndGoback(e.toString())
- }
- },
- async wxPay() {
- this.wxPayLoading = true;
- uni.showLoading({
- title: '拉取支付...',
- mask: true
- });
- try {
- const JhPayData = await this.$Request({
- url: "/getJhPayInfo",
- method: "POST",
- data: {
- "ordNo": this.orderInfo.ordNo,
- "openId": this.openId,
- "stationId": this.stationId,
- "userType": "1",
- "id": this.selectedCoupon.id // 优惠劵id
- },
- })
- console.log(JhPayData)
- if (JhPayData.retCode !== 0) {
- throw new Error("请求信息失败")
- }
- if (JhPayData.data.code !== '0000') {
- throw new Error(JhPayData.data.msg)
- }
- let timeStamp = JhPayData.data.respData.payTimeStamp;
- let nonceStr = JhPayData.data.respData.paynonceStr;
- let payPackage = JhPayData.data.respData.payPackage;
- let signType = JhPayData.data.signType;
- let paySign = JhPayData.data.respData.paySign;
- // 填写随行付的信息,启动支付
- const [payErr, payData] = await uni.requestPayment({
- 'timeStamp': timeStamp,
- 'nonceStr': nonceStr,
- 'package': payPackage,
- 'signType': signType,
- 'paySign': paySign,
- })
- if (!!payData && payData.errMsg === "requestPayment:ok") {
- this.wxPayLoading = false;
- this.clearLabelId();
- uni.hideLoading();
- // console.log({
- // receivableAmt: this.orderInfo.receivableAmt,
- // amt: this.payType == 2 ? this.orderInfo.amt : this.orderInfo.amt_dzk,
- // oilName: this.selectedGas.oilName
- // })
- this.updateVoucherInfo({
- receivableAmt: this.orderInfo.receivableAmt,
- amt: this.amt,
- oilName: this.selectedGas.oilName
- })
- console.log('我要跳了~')
- uni.redirectTo({
- url: "/pages/succeed/succeed"
- })
- return;
- }
- this.wxPayLoading = false;
- uni.hideLoading();
- if (payErr.errMsg === "requestPayment:fail cancel") {
- this.showToastAndGoback("取消了支付")
- return;
- }
- this.showToastAndGoback("支付失败")
- } catch (e) {
- this.wxPayLoading = false;
- uni.hideLoading();
- this.showToastAndGoback(e.message)
- }
- },
- showToastAndGoback(title) {
- uni.showToast({
- title,
- mask: true
- })
- setTimeout(() => {
- uni.navigateBack({
- delta: 1
- })
- }, 1500)
- },
- // selectPayType(type) {
- // if (!this.availableCredit && type == 1) {
- // return
- // }
- // if (type === this.payType) {
- // this.payType = ""
- // return
- // }
- // this.payType = type
- // },
- selectPayType() {
- if (!this.availableCredit) {
- return
- }
- if (this.payType === 1) {
- this.payType = 2
- return
- }
- this.payType = 1
- },
- creditAndCouponConflics(trigger, coupon) { // 处理电子卡和优惠券的互斥矛盾
- //trigger 触发的事件
- // trigger 1电子卡触发 2优惠券触发
- // coupon 当trigger为2时需要传选中的优惠券
- if (trigger == 1) {
- this.selectedCoupon
- }
- },
- goPay() {
- if (this.payType === 2) {
- this.wxPay()
- return
- }
- if (this.payType === 1) {
- // this.$refs.selectPayType.close();
- this.$refs.pay.open()
- }
- },
- backToSelectPayType() {
- this.$refs.pay.close()
- // this.$refs.selectPayType.open();
- },
- // closeSelectPayType() {
- // this.$refs.selectPayType.close();
- // }
- }
- }
- </script>
- <style lang="scss">
- page {
- width: 750rpx;
- background: #F2F2F2;
- .confirm {
- .bg {
- width: 750rpx;
- height: 352rpx;
- background: #0EA374;
- }
- .container {
- width: 690rpx;
- margin: 0 auto;
- margin-top: -239rpx;
- .station {
- width: 690rpx;
- height: 340rpx;
- background: #FFFFFF;
- border-radius: 14rpx;
- box-sizing: border-box;
- padding: 21rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- image {
- width: 200rpx;
- height: 240rpx;
- }
- .info {
- width: 400rpx;
- height: 240rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-start;
- .content {
- height: 180rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- font-size: 28rpx;
- font-weight: 400;
- color: #666666;
- line-height: 40rpx;
- view {
- display: flex;
- justify-content: space-between;
- text:nth-child(1) {
- width: 200rpx;
- display: inline-block;
- }
- }
- }
- .name {
- height: 45rpx;
- font-size: 32rpx;
- font-weight: 600;
- color: #111111;
- line-height: 45rpx;
- }
- }
- }
- >view:not(.station) {
- width: 690rpx;
- height: 110rpx;
- background: #FFFFFF;
- box-shadow: 0px 2rpx 6rpx 5rpx rgba(237, 237, 237, 0.5);
- border-radius: 10rpx;
- margin-top: 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- padding: 20rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #111111;
- line-height: 40rpx;
- >view {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .icon {
- display: inline-block;
- width: 35rpx;
- height: 30rpx;
- // border: 2rpx solid #666666;
- margin-right: 14rpx;
- }
- .price {
- background: url(../../static/icon/dingdan.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .oil {
- background: url(../../static/icon/sheng.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .discount {
- background: url(../../static/icon/youhuiquan-2.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .vip {
- background: url(../../static/icon/huiyuan-.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- }
- text.price {
- color: #F3B235;
- line-height: 33rpx;
- }
- text.vip {
- font-size: 24rpx;
- color: #A76825;
- line-height: 33rpx;
- }
- }
- view.dispose {
- width: 690rpx;
- height: 150rpx;
- position: relative;
- display: inline-block;
- .coupon_bg {
- display: none;
- }
- .title {
- position: absolute;
- top: 36rpx;
- left: 20rpx;
- text:nth-child(1) {
- height: 40rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #000000;
- line-height: 40rpx;
- margin-right: 20rpx;
- margin-left: 5rpx;
- }
- text:nth-child(2) {
- height: 28rpx;
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #F0B849;
- line-height: 28rpx;
- box-sizing: border-box;
- border: 1px solid #F0B849;
- }
- }
- .tip {
- position: absolute;
- top: 90rpx;
- left: 20rpx;
- .icon {
- width: 22rpx;
- height: 22rpx;
- background: url(../../static/icon/tipicon1.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- text:nth-child(2),
- text:nth-child(3) {
- height: 28rpx;
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.4);
- line-height: 28rpx;
- text {
- font-size: 27rpx;
- font-weight: 800rpx;
- // color: #007AFF;
- color: #838383;
- }
- }
- }
- }
- view.coupon {
- .extra {
- position: absolute;
- right: 0rpx;
- top: 0rpx;
- height: 150rpx;
- width: 250rpx;
- font-size: 24rpx;
- color: #6D6D6D;
- line-height: 150rpx;
- color: #249bdd;
- font-weight: bold;
- text-align: center;
- }
- .disable {
- color: #6D6D6D;
- }
- }
- view.coupon.direct {
- background: url("../../static/icon/quan1.2x.png") no-repeat;
- background-size: 100% 100%;
- >.title {
- text:nth-child(2) {
- color: #FF2;
- }
- }
- }
- view.coupon.rate {
- background: url("../../static/icon/quan2.2x.png") no-repeat;
- background-size: 100% 100%;
- >.title {
- text:nth-child(2) {
- color: #FD2;
- }
- }
- }
- // view.coupon.direct{
- // .coupon_bg{
- // display: block;
- // }
- // .title,
- // .tip{
- // left: 300rpx;
- // }
- // .extra{
- // display: none;
- // }
- // }
- view.dzk {
- .extra {
- position: absolute;
- right: 20rpx;
- top: 54rpx;
- background: url(../../static/icon/select.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- width: 40rpx;
- height: 40rpx;
- margin-right: 20rpx;
- }
- .selected {
- background: url(../../static/icon/selected.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .forbid {
- background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- }
- }
- .submit {
- width: 750rpx;
- height: 180rpx;
- // background: #FFFFFF;
- // margin-top: 30rpx;
- .area {
- width: 750rpx;
- height: 150rpx;
- background: #FFFFFF;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- >.type {
- font-size: 28rpx;
- font-weight: 400;
- color: #111111;
- line-height: 40rpx;
- }
- >.amount {
- font-size: 30rpx;
- font-weight: 600;
- color: #f3b338;
- line-height: 40rpx;
- }
- >.icon {
- background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- display: inline-block;
- width: 13rpx;
- height: 8rpx;
- line-height: 40rpx;
- margin-left: 10rpx;
- margin-right: 15rpx;
- }
- // text:nth-child(2) {
- // font-size: 30rpx;
- // font-weight: 600;
- // color: #f3b338;
- // line-height: 40rpx;
- // }
- .btn {
- margin-left: 20rpx;
- margin-right: 30rpx;
- background-color: #0ea374;
- border-radius: 40rpx;
- width: 250rpx;
- height: 80rpx;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 80rpx;
- text-align: center;
- }
- }
- }
- uni-popup.pay {
- .cont {
- width: 750rpx;
- height: 682rpx;
- background: #FFFFFF;
- border-radius: 30rpx 30rpx 0 0;
- position: relative;
- .close {
- background: url(../../static/icon/left.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- width: 18rpx;
- height: 30rpx;
- position: absolute;
- top: 46rpx;
- left: 34rpx;
- }
- .amount {
- width: 100%;
- height: 100rpx;
- font-size: 80rpx;
- font-weight: 400;
- color: #000000;
- position: absolute;
- top: 112rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- text {
- font-size: 40rpx;
- }
- }
- .type {
- width: 100%;
- height: 34rpx;
- position: absolute;
- top: 310rpx;
- text:nth-child(1) {
- height: 34rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #aaaaaa;
- line-height: 34rpx;
- position: absolute;
- left: 58rpx;
- }
- text:nth-child(2) {
- height: 34rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #000000;
- line-height: 34rpx;
- position: absolute;
- right: 144rpx;
- }
- text:nth-child(3) {
- background: url(../../static/icon/right.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- display: inline-block;
- width: 12rpx;
- height: 22rpx;
- position: absolute;
- right: 66rpx;
- top: 7rpx;
- }
- }
- .pay {
- width: 590rpx;
- height: 76rpx;
- background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
- border-radius: 38rpx;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 76rpx;
- letter-spacing: 1rpx;
- position: absolute;
- bottom: 114rpx;
- left: 80rpx;
- }
- }
- }
- uni-popup.selectPayType {
- .cont {
- width: 750rpx;
- // width: 100%;
- height: 680rpx;
- background: #FFFFFF;
- border-radius: 30rpx 30rpx 0 0;
- position: relative;
- padding: 0 25rpx;
- box-sizing: border-box;
- .close {
- width: 38rpx;
- height: 38rpx;
- position: absolute;
- top: 24rpx;
- left: 24rpx;
- background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .credit {
- position: absolute;
- width: 700rpx;
- top: 138rpx;
- height: 130rpx;
- box-sizing: border-box;
- border-bottom: 2rpx solid #D8D8D8;
- color: #000 solid #D8D8D8;
- padding: 0 30rpx;
- .credit-con {
- height: 60rpx;
- display: flex;
- justify-content: space-between;
- .text {
- font-size: 28rpx;
- height: 40rpx;
- line-height: 60rpx;
- font-weight: 600;
- }
- .icon {
- background: url(../../static/icon/select.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- width: 40rpx;
- height: 40rpx;
- }
- .selected {
- background: url(../../static/icon/selected.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .forbid {
- background: url(../../static/icon/forbid.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- }
- .tip {
- margin-top: 16rpx;
- height: 44rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.29);
- line-height: 44rpx;
- }
- }
- .wx {
- position: absolute;
- width: 700rpx;
- top: 305rpx;
- padding: 0 30rpx;
- height: 40rpx;
- display: flex;
- box-sizing: border-box;
- justify-content: space-between;
- .text {
- font-size: 28rpx;
- height: 40rpx;
- line-height: 40rpx;
- font-weight: 600;
- }
- .icon {
- background: url(../../static/icon/select.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- width: 40rpx;
- height: 40rpx;
- }
- .selected {
- background: url(../../static/icon/selected.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- }
- >button {
- width: 590rpx;
- height: 76rpx;
- background-color: #cccccc;
- border-radius: 38rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 76rpx;
- letter-spacing: 1rpx;
- position: absolute;
- box-sizing: border-box;
- bottom: 114rpx;
- left: 80rpx;
- }
- >button.available {
- background: linear-gradient(103deg, #12A273 0%, #25AA7E 100%);
- }
- }
- }
- uni-popup.coupon {
- .coupon-container {
- width: 100%;
- border-radius: 42rpx 42rpx 0px 0px;
- background: #F2F2F2;
- padding: 0 30rpx;
- box-sizing: border-box;
- position: relative;
- .close {
- width: 38rpx;
- height: 38rpx;
- position: absolute;
- top: 24rpx;
- right: 24rpx;
- background: url(../../static/icon/6_d05_close.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- >.title {
- height: 105rpx;
- font-size: 32rpx;
- font-weight: 400;
- color: #111111;
- line-height: 105rpx;
- font-weight: 600;
- color: #111111;
- text-align: center;
- }
- .coupon-scroll {
- max-height: 600rpx;
- overflow: scroll;
- .coupon {
- display: flex;
- justify-content: space-between;
- width: 690rpx;
- height: 160rpx;
- margin-bottom: 50rpx;
- box-shadow: 0 0 10rpx 4rpx rgba(233, 223, 223, 0.5);
- >.left {
- display: flex;
- flex-direction: column;
- justify-content: center;
- text-align: center;
- width: 220rpx;
- height: 160rpx;
- text-align: center;
- .amount {
- display: block;
- font-size: 40rpx;
- font-weight: 500;
- color: #ffffff;
- line-height: 56rpx;
- text-align: center;
- margin-top: 0;
- .value {
- font-size: 50rpx;
- }
- }
- .condition {
- font-size: 24rpx;
- font-weight: 400;
- color: #ffffff;
- line-height: 33rpx;
- text-align: center;
- margin-top: 25rpx;
- }
- .exchangeName {
- display: none;
- font-size: 35rpx;
- font-weight: 500;
- color: #ffffff;
- line-height: 56rpx;
- }
- }
- >.right {
- width: 456rpx;
- height: 160rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin: 8rpx 0 5rpx 0;
- .title {
- height: 30rpx;
- font-size: 24rpx;
- font-weight: 600;
- line-height: 33rpx;
- .type {
- width: 113rpx;
- height: 30rpx;
- line-height: 30rpx;
- display: inline-block;
- background: #f8c;
- border-radius: 19rpx;
- font-size: 24rpx;
- font-weight: 600;
- color: #ffffff;
- text-align: center;
- }
- }
- .content {
- display: flex;
- justify-content: space-between;
- margin: 5rpx 0 5rpx 0;
- height: 120rpx;
- >.items {
- width: 360rpx;
- height: 100%;
- display: flex;
- justify-content: space-around;
- flex-direction: column;
- .item {
- color: #272626;
- font-size: 21rpx;
- >text {
- width: 230rpx;
- display: inline-block;
- color: #272626;
- font-size: 22rpx;
- font-weight: bold;
- overflow: scroll;
- /* 超出部分隐藏 */
- white-space: nowrap;
- /* 文本不换行 */
- }
- }
- .from {
- display: block;
- }
- }
- >.btn {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-right: 10rpx;
- width: 70rpx;
- .extra {
- background: url(../../static/icon/select.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- width: 55rpx;
- height: 55rpx;
- margin-right: 20rpx;
- margin-top: -10rpx;
- }
- .selected {
- background: url(../../static/icon/selected.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- // >button {
- // height: 60rpx;
- // background: linear-gradient(143deg, #fad965 0%, #f3b235 100%);
- // border-radius: 20rpx;
- // border: none;
- // outline: none;
- // color: #ffffff;
- // line-height: 60rpx;
- // font-size: 30rpx;
- // font-weight: 400;
- // overflow: hidden;
- // /* 超出部分隐藏 */
- // white-space: nowrap;
- // /* 文本不换行 */
- // display: block;
- // }
- }
- }
- }
- }
- .direct {
- >.left {
- background: url("../../static/icon/quan1.2x.png") no-repeat;
- background-size: 100% 100%;
- }
- >.right {
- >.title>.type {
- background: #f8ce57;
- }
- >.content>.btn button {
- background: linear-gradient(143deg, #fad965 0%, #f3b235 100%);
- }
- }
- }
- .rate {
- >.left {
- background: url("../../static/icon/quan2.2x.png") no-repeat;
- background-size: 100% 100%;
- }
- >.right {
- >.title>.type {
- background: #eb8573;
- }
- >.content>.btn button {
- background: linear-gradient(143deg, #f4a796 0%, #e67462 100%);
- }
- }
- }
- // >.item {
- // width: 690rpx;
- // height: 160rpx;
- // font-size: 24rpx;
- // font-weight: 500;
- // color: #FFFFFF;
- // line-height: 40rpx;
- // display: flex;
- // justify-content: space-between;
- // margin-bottom: 20rpx;
- // .left {
- // width: 150rpx;
- // height: 160rpx;
- // display: flex;
- // flex-direction: column;
- // justify-content: center;
- // text-align: center;
- // .amount {
- // font-size: 20rpx;
- // .big {
- // font-size: 33rpx;
- // }
- // }
- // }
- // .right {
- // width: 540rpx;
- // height: 160rpx;
- // color: #111111;
- // position: relative;
- // .title {
- // position: absolute;
- // top: 22rpx;
- // left: 20rpx;
- // height: 40rpx;
- // font-size: 28rpx;
- // font-weight: 500;
- // line-height: 40rpx;
- // }
- // .scope {
- // position: absolute;
- // top: 72rpx;
- // left: 20rpx;
- // height: 28rpx;
- // font-size: 20rpx;
- // color: #666666;
- // line-height: 28rpx;
- // }
- // .valid {
- // position: absolute;
- // top: 110rpx;
- // left: 20rpx;
- // height: 28rpx;
- // font-size: 20rpx;
- // color: #666666;
- // line-height: 28rpx;
- // }
- // .use {
- // position: absolute;
- // top: 54rpx;
- // right: 20rpx;
- // display: inline-block;
- // width: 160rpx;
- // height: 55rpx;
- // }
- // }
- // }
- .cash {
- background: url(../../static/icon/youhuiquan1.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .exchange {
- background: url(../../static/icon/youhuiquan2.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- .discount {
- background: url(../../static/icon/youhuiquan3.2x.png) no-repeat 0px 0px;
- background-size: 100% 100%;
- }
- }
- }
- }
- }
- }
- </style>
|