|
@@ -164,7 +164,28 @@
|
|
|
<u-button size="default" shape="circle" @click="gotoMain(0)">返回首页</u-button>
|
|
|
<u-button size="default" shape="circle" @click="gotoMain(1)">查看订单详情</u-button>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+ <view class="useFreeCoupon" v-if="chargingStation.useFreeCoupon">
|
|
|
+ <view class="title " >温馨提示:车辆出场时可出示该券</view>
|
|
|
+ <view class="details showCoupon" @click="gotoUrl('pages/record/coupon?id='+id)" >
|
|
|
+ <view class="showCoupon1 ">
|
|
|
+ <view class="showCoupon11">
|
|
|
+ <span class="showCoupon111" >免费停车优惠卷</span>
|
|
|
+ </view>
|
|
|
+ <view class="showCoupon12 padding1" v-if="chargingStation.useFreeCoupon==1" >{{ getPercentshowCoupon(chargingRecord,chargingStation.couponFreeMinute,true)}}</view>
|
|
|
+ <view class="showCoupon12 padding1" v-if="chargingStation.useFreeCoupon==2" >2小时</view>
|
|
|
+
|
|
|
+ <view class="showCoupon13 padding1">充电时间 {{ getPercentshowCoupon(chargingRecord)}}<span v-if="chargingStation.useFreeCoupon==1">(+{{chargingStation.couponFreeMinute}}分钟)</span></view>
|
|
|
+ </view>
|
|
|
+ <view class="showCoupon2 padding2">
|
|
|
+ <u-icon name="coupon-fill" size="48" color="#FF3D00"></u-icon>
|
|
|
+ <view class="showCoupon22">
|
|
|
+ 出示
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="piccBanner" v-for="(itemJNT,index ) in bannerListJNTend" @click="gotoUrl2(itemJNT.linkUrl)"
|
|
|
v-show="index==0" :key="index" style="
|
|
|
text-align: center;
|
|
@@ -432,10 +453,16 @@
|
|
|
<view class="item" v-if="chargingStation.parkingSimpleDescription">
|
|
|
|
|
|
<view class="title" style="
|
|
|
- width: 100%;
|
|
|
+ width: 100%; display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
" @click="parkingTips=true">
|
|
|
- 停车费说明 <u-icon name="arrow-right" style="
|
|
|
- float: right;margin-top: 6px;" size="28"></u-icon>
|
|
|
+ <view>停车费说明 </view>
|
|
|
+ <view style=" font-size: 32rpx;
|
|
|
+ font-weight: 400;">
|
|
|
+ {{chargingStation.parkingDescription}}
|
|
|
+ <u-icon name="arrow-right" style="margin-top: 6px;" size="28"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -827,7 +854,49 @@
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ getPercentshowCoupon(chargingRecord,time,str) {
|
|
|
+ if (!chargingRecord.startTime) {
|
|
|
+ return '00:00:00'
|
|
|
+ }
|
|
|
+ var Hour = 0;
|
|
|
+ var Fen = 0;
|
|
|
+ var S = 0;
|
|
|
+
|
|
|
+ var now = newDate(chargingRecord.startTime).getTime();
|
|
|
+ var date = newDate(chargingRecord.endTime).getTime();
|
|
|
+ if(time){
|
|
|
+ date=date+time*1000*60
|
|
|
+ }
|
|
|
+ var seconds = parseInt(( date-now ) / 1000);
|
|
|
+
|
|
|
+ var ms = seconds;
|
|
|
+
|
|
|
+ Hour = parseInt(Math.floor(ms / (60 * 60)));
|
|
|
+ Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
|
|
|
+ S = parseInt(Math.floor(ms % (60)));
|
|
|
+
|
|
|
+ if(str){
|
|
|
+ var obj = "";
|
|
|
+ if(Hour){
|
|
|
+ obj+=Hour+"小时"
|
|
|
+ }
|
|
|
+ if(Fen){
|
|
|
+ obj+=Fen+"分"
|
|
|
+ }
|
|
|
+ if(S){
|
|
|
+ obj+=S+"秒"
|
|
|
+ }
|
|
|
+
|
|
|
+ return obj;
|
|
|
+ }else{
|
|
|
+ var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen + ":" + (S > 9 ? "" : "0") + S
|
|
|
+
|
|
|
+
|
|
|
+ return obj;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
getPie() {
|
|
|
|
|
|
|
|
@@ -2211,5 +2280,57 @@
|
|
|
border-radius: 50px;
|
|
|
font-size: 32rpx;
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ .showCoupon{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 ;
|
|
|
+ .padding1{
|
|
|
+ padding-left: 32rpx;
|
|
|
+ }
|
|
|
+ .padding2{
|
|
|
+ padding-right: 32rpx;
|
|
|
+ }
|
|
|
+ .showCoupon1{
|
|
|
+ .showCoupon111{
|
|
|
+ padding: 2rpx 24rpx;
|
|
|
+ border-radius: 8px 0px 8px 0px;
|
|
|
+ background-color: rgba(255, 61, 0, 1);
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ }
|
|
|
+ .showCoupon13{
|
|
|
+ padding-bottom: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .showCoupon12{
|
|
|
+ color: red;
|
|
|
+ font-size: 48rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 16rpx 0 4rpx 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .showCoupon2{
|
|
|
+ border-left: 1px solid #CFCFCF;
|
|
|
+ padding-left: 32rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .useFreeCoupon{
|
|
|
+ padding: 40rpx 72rpx;
|
|
|
+ .title{
|
|
|
+ color: rgba(255, 61, 0, 1);
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+ }
|
|
|
+ .showCoupon{
|
|
|
+ background-color: #e4e4e4;
|
|
|
+ border-radius: 8px;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
</style>
|