Browse Source

修改免费时长

杨再金 3 years ago
parent
commit
336333892b

+ 1 - 1
common/http.interceptor.js

@@ -35,7 +35,7 @@ const install = (Vue, vm) => {
 					showCancel: false,
 					success: function(res) {
 						if (res.confirm) {
-							uni.navigateTo({
+							uni.redirectTo({
 								url: "/pages/center/phoneLogin/phoneLogin"
 							})
 						}

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

@@ -67,8 +67,10 @@
 										免费时长:{{ orderItem.freeDuration || 0 }}</view> -->
 									<view class="order-center-item" v-if="orderItem.deviceType == 1">
 										免费时长:{{ orderItem.freeDuration || 0 }}</view>
+									<!-- <view class="order-center-item" v-if="orderItem.deviceType == 2">
+										免费时长:0天0时15分0秒</view> -->
 									<view class="order-center-item" v-if="orderItem.deviceType == 2">
-										免费时长:0天0时15分0秒</view>
+										免费时长:{{ (orderItem.freeDuration || 1) | freeDuration }}</view>
 									<!-- <view class="order-center-item" v-if="orderItem.orderStatus !== 1">
 										计费时长:{{ orderItem.calcDuration || 0 }}</view> -->
 									<view class="order-center-item">

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

@@ -81,7 +81,7 @@
 				  :border-top="false"
 				  :value="orderInfo.freeDuration"
         />-->
-        <template v-if="orderInfo.deviceType == 1">
+        <template v-if="orderInfo.deviceType !== 2">
           <u-cell-item
             title="免费时长 "
             :arrow="false"
@@ -96,7 +96,7 @@
             :arrow="false"
             :border-bottom="false"
             :border-top="false"
-            value="0天0时15分0秒"
+            :value="(orderInfo.freeDuration || 1) | freeDuration"
           />
         </template>
         <u-cell-item
@@ -208,7 +208,7 @@
             :arrow="false"
             :border-bottom="false"
             :border-top="false"
-            value="0天0时15分0秒"
+            :value="orderInfo.freeDuration | freeDuration"
           />
         </template>
         <u-cell-item

+ 1 - 1
pages/geomagnetismLock/geomagnetismLock.vue

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

+ 1 - 1
pages/parkingLock/parkingLock.vue

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

+ 6 - 0
utils/filter.js

@@ -100,3 +100,9 @@ Vue.filter("energyTpye", function(value) {
 	}
 
 });
+
+// 免费时长 
+Vue.filter("freeDuration", function(value) {
+	return '0天0时30分0秒';
+
+});