Kaynağa Gözat

修改免费时长

CralYang 2 yıl önce
ebeveyn
işleme
69dfe16f67

+ 3 - 3
pages/center/order/order.vue

@@ -64,10 +64,10 @@
 										停车时长:{{ orderItem.duration || 0 }}</view> -->
 									<!-- <view class="order-center-item" v-if="orderItem.orderStatus !== 1">
 										免费时长:{{ orderItem.freeDuration || 0 }}</view> -->
-									<view class="order-center-item" v-if="orderItem.deviceType == 1">
+									<view class="order-center-item">
 										免费时长:{{ orderItem.freeDuration || 0 }}</view>
-									<view class="order-center-item" v-if="orderItem.deviceType == 2">
-										免费时长:0天0时30分0秒</view>
+									<!-- <view class="order-center-item" v-if="orderItem.deviceType == 2">
+										免费时长:{{ new Date(orderItem.createTime).valueOf() < new Date('2022-06-20 00:00:00').valueOf() ? '0天0时15分0秒' : '0天0时30分0秒' }}</view> -->
 									<!-- <view class="order-center-item" v-if="orderItem.orderStatus !== 1">
 										计费时长:{{ orderItem.calcDuration || 0 }}</view> -->
 									<view class="order-center-item">

+ 14 - 15
pages/center/order/orderDetails/orderDetails.vue

@@ -42,24 +42,23 @@
 				  :border-top="false"
 				  :value="orderInfo.freeDuration"
 				></u-cell-item> -->
-				<template v-if="orderInfo.deviceType == 1">
+				<template>
 					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
 						:value="orderInfo.freeDuration"></u-cell-item>
 				</template>
-				<template v-else>
-					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-						value="0天0时30分0秒"></u-cell-item>
-				</template>
-				<u-cell-item title="计费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.calcDuration"></u-cell-item>
-				<u-cell-item title="累计停车时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.duration"></u-cell-item>
-				<u-cell-item v-if="orderInfo.createTime" title="订单创建时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.createTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payTime" title="支付时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.payTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payStatus == 1" title="缴费方式 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.paySource | verifyPaySource"></u-cell-item>
+				<<!-- template v-else>
+					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false" :value="new Date(orderInfo.createTime).valueOf() < new Date('2022-06-20 00:00:00').valueOf() ? '0天0时15分0秒' : '0天0时30分0秒'"></u-cell-item>
+				</template> -->
+				<u-cell-item title=" 计费时长 " :arrow=" false" :border-bottom="false" :border-top="false"
+						:value="orderInfo.calcDuration"></u-cell-item>
+					<u-cell-item title="累计停车时长 " :arrow="false" :border-bottom="false" :border-top="false"
+						:value="orderInfo.duration"></u-cell-item>
+					<u-cell-item v-if="orderInfo.createTime" title="订单创建时间 " :arrow="false" :border-bottom="false"
+						:border-top="false" :value="orderInfo.createTime"></u-cell-item>
+					<u-cell-item v-if="orderInfo.payTime" title="支付时间 " :arrow="false" :border-bottom="false"
+						:border-top="false" :value="orderInfo.payTime"></u-cell-item>
+					<u-cell-item v-if="orderInfo.payStatus == 1" title="缴费方式 " :arrow="false" :border-bottom="false"
+						:border-top="false" :value="orderInfo.paySource | verifyPaySource"></u-cell-item>
 			</u-cell-group>
 		</view>
 		<!-- 地磁显示支付按钮条件  支付状态(0-未支付,2-支付中,3-支付失败)并且订单金额不能为0 -->

+ 2 - 2
pages/favourableActivity/favourableActivity.vue

@@ -7,7 +7,7 @@
 				<view>使用贵州银行支付可一分钱停车</view>
 				<view>从客户启用贵州银行行卡支付的第四个月开始,使用我行卡支付永久享受八折优惠(单日不限次数)。时间计算同上。三个月最后一天,假如车主跨天的话,拆分账单计算:三个月内一分钱或八折,三个月外时段八折。
 				</view>
-				<view>如果停车场、路边停车位有15分钟内等免费政策的,我行客户自然享受后再按“一分钱停车”、“八折停车”执行。</view>
+				<view>如果停车场、路边停车位有30分钟内等免费政策的,我行客户自然享受后再按“一分钱停车”、“八折停车”执行。</view>
 				<view>
 					<button type="default" class="btn1" @click="openAcount">银行卡开户</button>
 				</view>
@@ -19,7 +19,7 @@
 				<view>使用贵州银行支付可享永久八折优惠</view>
 				<view>从客户启用贵州银行行卡支付的第四个月开始,使用我行卡支付永久享受八折优惠(单日不限次数)。时间计算同上。三个月最后一天,假如车主跨天的话,拆分账单计算:三个月内一分钱或八折,三个月外时段八折。
 				</view>
-				<view>如果停车场、路边停车位有15分钟内等免费政策的,我行客户自然享受后再按“一分钱停车”、“八折停车”执行。</view>
+				<view>如果停车场、路边停车位有30分钟内等免费政策的,我行客户自然享受后再按“一分钱停车”、“八折停车”执行。</view>
 				<view>
 					<button type="default" class="btn2" @click="openAcount">银行卡开户</button>
 				</view>

+ 1 - 2
pages/geomagnetismLock/geomagnetismLock.vue

@@ -34,8 +34,7 @@
 					</view>
 					<view class="parking-lock-info-item">
 						<view>免费时长</view>
-						<!-- <view>{{ orderInfo.freeDuration || '0天0时30分0秒' }}</view> -->
-						<view>{{ '0天0时30分0秒' }}</view>
+						<view>{{ orderInfo.freeDuration || '0天0时30分0秒' }}</view>
 					</view>
 					<view class="parking-lock-info-item">
 						<view>计费时长</view>

+ 2 - 2
pages/parkingLock/parkingLock.vue

@@ -47,8 +47,8 @@
 						</view>
 						<view class="parking-lock-info-item">
 							<view>免费时长</view>
-							<!-- <view>{{ orderInfo.freeDuration || '0天0时30分0秒' }}</view> -->
-							<view>{{ '0天0时30分0秒' }}</view>
+							<view>{{ orderInfo.freeDuration || '0天0时30分0秒' }}</view>
+							<!-- <view>{{ '0天0时30分0秒' }}</view> -->
 						</view>
 						<view class="parking-lock-info-item">
 							<view>计费时长</view>

+ 4 - 1
pages/payLists/payLists.vue

@@ -36,8 +36,11 @@
 							</view>
 							<view class="pay-center-item" v-if="payItem.orderStatus !== 1">停车时长:{{payItem.duration || 0}}
 							</view> -->
+							<!-- <view class="pay-center-item" v-if="payItem.orderStatus !== 1">
+								免费时长:{{ payItem.deviceType == 1 ? payItem.freeDuration : (new Date(payItem.createTime).valueOf() < new Date('2022-06-20 00:00:00').valueOf() ? '0天0时15分0秒' : '0天0时30分0秒') }}
+							</view> -->
 							<view class="pay-center-item" v-if="payItem.orderStatus !== 1">
-								免费时长:{{ payItem.deviceType == 1 ? payItem.freeDuration : '0天0时30分0秒' }}
+								免费时长:{{ payItem.freeDuration }}
 							</view>
 							<!-- 计费时长=停车时长-免费时长 -->
 							<view class="pay-center-item" v-if="payItem.orderStatus !== 1">

+ 11 - 1
utils/filter.js

@@ -126,5 +126,15 @@ Vue.filter("energyTpye",function(value){
 	
 });
 
-
+// 免费时长
+Vue.filter("freeDuration", function(value){
+	console.log(value);
+	let createTime = new Date(value).valueOf(),
+	freeTime = new Date('2022-06-20 00:00:00').valueOf(),
+	freeTxt = '0天0时15分0秒'
+	if (createTime > freeTime) {
+		freeTxt = '0天0时30分0秒'
+	}
+	return freeTxt
+});