zhengkaixin 2 年 前
コミット
3a8fd013c9

+ 6 - 0
assets/img/riFill-coupon-3-fill.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style="border-color: rgba(187,187,187,1);border-width: 0px;border-style: solid" filter="none">
+    
+    <g>
+    <path d="M14.667 28c0-1.105-0.895-2-2-2s-2 0.895-2 2v0h-6.667c-0.736 0-1.333-0.597-1.333-1.333v0-21.333c0-0.736 0.597-1.333 1.333-1.333v0h6.667c0 1.105 0.895 2 2 2s2-0.895 2-2v0h13.333c0.736 0 1.333 0.597 1.333 1.333v0 7.333c-1.841 0-3.333 1.492-3.333 3.333s1.492 3.333 3.333 3.333v0 7.333c0 0.736-0.597 1.333-1.333 1.333v0h-13.333zM12.667 14c1.105 0 2-0.895 2-2s-0.895-2-2-2v0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0zM12.667 22c1.105 0 2-0.895 2-2s-0.895-2-2-2v0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0z" fill="rgba(0,184.875,97.92,1)"></path>
+    </g>
+  </svg>

+ 6 - 0
assets/img/riLine-coupon-3-line.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style="border-color: rgba(187,187,187,1);border-width: 0px;border-style: solid" filter="none">
+    
+    <g>
+    <path d="M2.667 5.333c0-0.736 0.597-1.333 1.333-1.333v0h24c0.736 0 1.333 0.597 1.333 1.333v0 7.333c-1.841 0-3.333 1.492-3.333 3.333s1.492 3.333 3.333 3.333v0 7.333c0 0.736-0.597 1.333-1.333 1.333v0h-24c-0.736 0-1.333-0.597-1.333-1.333v0-21.333zM10.78 25.333c0.282-0.785 1.020-1.336 1.887-1.336s1.605 0.551 1.882 1.322l0.004 0.014h12.113v-3.957c-1.993-1.004-3.336-3.033-3.336-5.376s1.343-4.372 3.301-5.36l0.034-0.016v-3.957h-12.113c-0.282 0.785-1.020 1.336-1.887 1.336s-1.605-0.551-1.882-1.322l-0.004-0.014h-5.447v18.667h5.447zM12.667 14.667c-1.105 0-2-0.895-2-2s0.895-2 2-2v0c1.105 0 2 0.895 2 2s-0.895 2-2 2v0zM12.667 21.333c-1.105 0-2-0.895-2-2s0.895-2 2-2v0c1.105 0 2 0.895 2 2s-0.895 2-2 2v0z" fill="rgba(0,184.875,97.92,1)"></path>
+    </g>
+  </svg>

+ 1 - 1
pages/searchPile/chargeProcess/dcCharging.vue

@@ -393,7 +393,7 @@
 						</view>
 						<view class="detail">
 							<p class="electrovalence"><text class="num">{{chargingRecord.userCardId?price.electricityPrice.toFixed(2):price.costPrice.toFixed(2)}}</text> 元/度</p>
-							<p class="electrovalence-monthlyCard">电价:{{price.electricityPrice}} | 服务费:{{chargingRecord.userCardId?0+'(包月卡)':price.servicePrice}}</p>
+							<p class="electrovalence-monthlyCard">电价:{{price.electricityPrice}} | 服务费:{{chargingRecord.userCardId?0+'(包月卡)':(chargingStation.giveDiscount?'折后'+price.discountServicePrice:price.servicePrice)}}</p>
 						</view>
 					
 					</view>

+ 32 - 3
pages/searchPile/searchPile.vue

@@ -155,6 +155,16 @@
 							<text class="park-p" style="color: #FFFFFF;">p</text>
 							<text class="park-text">{{item.parkingDescription}}</text>
 						</view>	
+						<view class="park" >
+							<!-- <text class="park-p" style="color: #FFFFFF;">p</text> -->
+							<img src="@/assets/img/riFill-coupon-3-fill.svg">
+							<view class="park-text park-text2">
+								<view class="park-text3"> 
+									本站<span v-if="item.giveDiscount" >服务费{{item.discountRatio/10}}折,</span>支持包月卡、服务费代金券和超级代金券等优惠活动
+									
+								</view>
+							</view>
+						</view>	
 					</view>
 					<view class="img-box">
 						<img :src="item.image" alt="">
@@ -855,14 +865,19 @@ export default {
 //									longitude: 112.28541 + i * 0.001,
 //									latitude: 30.308354 + i * 0.01
 									};
-						if(items[i].id != null)
-							obj.id = items[i].id;
+						if(items[i].id != null){
+								obj.id = items[i].id;
+								obj=items[i];
+						}
+						
 						else
 							continue;
 						if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
 						{
 							obj.type = '快/慢'
 						}
+						
+						
 						if(items[i].name!=null)
 							obj.name = items[i].name;
 						if(items[i].address!=null)
@@ -885,6 +900,7 @@ export default {
 						if(items[i].image != null){
 							obj.image = items[i].image;
 						}
+						
 						if(items[i].parkingDescription != null){
 							obj.parkingDescription = items[i].parkingDescription;
 						}
@@ -944,8 +960,11 @@ export default {
 	//									longitude: 112.28541 + i * 0.001,
 	//									latitude: 30.308354 + i * 0.01
 								};
-							if(items[i].id != null)
+							if(items[i].id != null){
 								obj.id = items[i].id;
+								obj = items[i];
+							}
+								
 							else
 								continue;
 							if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
@@ -1648,6 +1667,16 @@ font-weight: 600;
 		margin-top: 2px;
 	}
 	
+	.park-text2 {
+		    width: 140%;
+		}
+		.park-text3 {
+			    white-space: nowrap;
+			 
+			 
+			    text-overflow: ellipsis;
+			    overflow: hidden;
+			}
 	 .map {
 		width: 100%;
 	 

+ 9 - 2
pages/searchPile/stationAndPile/chargePriceDetails.vue

@@ -19,9 +19,14 @@
 								<text class="unit">元/度</text>
 							</view>
 						</view>
-						<view class="unitPrice-serviceCharge">
+						<view class="unitPrice-serviceCharge" v-if="!chargingStation.giveDiscount">
 							充电单价:{{item.single_price.toFixed(2)}}元 | 服务费:{{item.service_price.toFixed(2)}}元
 						</view>
+						<view class="unitPrice-serviceCharge" v-if="chargingStation.giveDiscount">
+							
+							充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:折后{{item.discountServicePrice}}元(折前{{item.servicePrice.toFixed(2)}})
+						
+						</view>
 						<view v-if="item.current" class="product_tip">
 							<view class="product_tip_bg"></view>
 							<p>当前</p>
@@ -54,6 +59,7 @@
 				id:"",
 				type:"",
 				elderMode:false,
+				chargingStation:{},
 				list:[],
 				items:[],
 				current: 0,
@@ -85,6 +91,7 @@
 //					//('data'+JSON.stringify(res))
 					if(res.result){
 						let data = res.data;
+						_self.chargingStation=res.data.chargingStation;
 						if(data.prices){
 							//('data'+JSON.stringify(data.prices))
 								
@@ -114,7 +121,7 @@
 									let _subitem = _item.priceList[j];
 									//('priceList'+JSON.stringify(_subitem))
 									
-									let subitem = {time:'00:00-07:00',single_price:0,service_price:0,price:0};
+									let subitem =_subitem;
 									subitem.time = _subitem.startTime + '-'+_subitem.endTime;
 									subitem.single_price = _subitem.electricityPrice;
 									subitem.service_price = _subitem.servicePrice;

+ 17 - 27
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -37,16 +37,19 @@
 							</view>
 						</view>
 						<view class="content">
-							当前时段:{{price.startTime}}~{{price.endTime}}    费用为{{price.costPrice.toFixed(2)}} 元/度(含电费{{price.electricityPrice.toFixed(2)}}元/度 + 服务费{{price.servicePrice.toFixed(2)}}元/度)
+							当前时段:{{price.startTime}}~{{price.endTime}}    费用为<span style="color: #00b962;">{{price.costPrice.toFixed(2)}} </span>元/度
+							<span v-if="station.giveDiscount">(含电费{{price.electricityPrice.toFixed(2)}}元/度 + 服务费{{price.discountServicePrice.toFixed(2)}}元/度(折前价{{price.servicePrice.toFixed(2)}}元/度))</span>
+							
+							<span v-if="!station.giveDiscount">(含电费{{price.electricityPrice.toFixed(2)}}元/度 + 服务费{{price.servicePrice.toFixed(2)}}元/度)</span>
 							
 						</view>
 					</view>
-					<view class="item" v-if="false">
+					<view class="item" v-if="station.parkingDescription" >
 						<view class="title">
 							停车费用
 						</view>
-						<view class="content">
-							充电免停2小时停车费(临牌车不享受免停)
+						<view class="content" v-html="station.parkingSimpleDescription?station.parkingSimpleDescription:station.parkingDescription">
+							 
 						</view>
 					</view>
 					
@@ -78,6 +81,8 @@
 				</view>
 				<view class="price" v-if="price">
 					<text>{{price.costPrice.toFixed(2)}}</text><text class="unit">元/度</text>
+					<text class="unit"   v-if="station.giveDiscount" >(折前价{{((price.electricityPrice*1000+price.servicePrice*1000)/1000).toFixed(2)}}元/度)</text>
+					
 				</view>
 				<view class="address">
 					{{detail.stationAddress}}
@@ -95,8 +100,7 @@
 			
 				{{canUse?'充电服务费包月卡':'此充电站不支持月卡服务'}}
 				
-				<view v-if="!vinCk()" style="color: red;">vin码不一致,无法享受月卡服务</view>
-			
+				 
 			</view>
 			
 		</view>
@@ -149,20 +153,7 @@
 		<!-- 弹窗 -->
 		<view>
 
-		<u-modal v-model="showVin"  class="showOss"
-		    confirm-text="知道了"
-		:show-title="false"  >
-			<view class="slot-content">
-				
-					<u-image width="120px"  style="margin: auto;"
-					mode="widthFix"  
-					src="@/static/img/充电中-缺省页.png"></u-image>
-					<view style="padding:0 40px;font-size: 36rpx;">
-						系统检测出当前充电车辆与包月卡所绑定的车辆不一致,该车辆可以正常充电,但无法享受包月卡免服务费优惠。
-						
-					</view>
-			</view>
-		</u-modal>
+		 
 		
 		
 			<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
@@ -185,6 +176,7 @@
 	export default {
 		data() {
 			return {
+				station:{},
 				step:0,
 				isInsert:false,
 				isReady: false,
@@ -315,9 +307,7 @@
 					
 					if(this.userCardBool){
 						//检查vin码
-						if(!this.vinCk()){
-							this.showVin=true;
-						}
+						 
 					}
 					
 				}).catch(error2 => {
@@ -339,6 +329,7 @@
 						uni.hideLoading()
 					this.gunDetail= res.data;
 					this.detail = res.data.device
+					this.station = res.data.station
 					this.prices = res.data.prices
 					this.price=res.data.price
 					this.gun = res.data.gun
@@ -390,9 +381,7 @@
 							'&deviceNo=' + this.detail.deviceNo + "&gun=" + this.gun.channelNo + "&carNumber=" + (
 								this.car ? this.car.carNum : '');
 					
-					if(!this.vinCk()){
-						url+="&vin=no"
-					}
+					 
 					uni.navigateTo({
 						url: url
 					})
@@ -528,7 +517,8 @@
 				margin-top: 12px;
 
 				.unit {
-					font-size: 16px
+					font-size: 16px;
+					color: #666666;
 				}
 			}
 

+ 15 - 3
pages/searchPile/stationAndPile/stationDetails.vue

@@ -42,7 +42,16 @@
 				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;">
 					{{stationDetail.station.describe}}
 				</view>
-			</view>
+			</view>
+			
+			<view class="details-item">
+				<img class="iconfont font5" src="@/assets/img/riLine-coupon-3-line.svg"  style="width: 40rpx;" >
+				<!-- <view class="iconfont font5" style="color: #ffad79;">&#xe621;</view> -->
+				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;">
+					本站<span v-if="stationDetail.station.giveDiscount">服务费{{stationDetail.station.discountRatio/10}}折,</span>支持包月卡、服务费代金券和超级代金券等优惠活动
+				</view>
+			</view>
+			
 			<view class="station-address" @click="map">
 				<img src="static/img/Frame 201.png" alt="">
 				<view class="address-text  oldTextjp" oldstyle="font-size: 16px;">
@@ -262,8 +271,11 @@
 									<text class="unit">元/度</text>
 								</view>
 							</view>
-							<view class="unitPrice-serviceCharge">
-								充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:{{item.servicePrice.toFixed(2)}}元
+							<view class="unitPrice-serviceCharge" v-if="stationDetail.station.giveDiscount">
+								充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:折后{{item.discountServicePrice}}元(折前{{item.servicePrice.toFixed(2)}})
+							</view>
+							<view class="unitPrice-serviceCharge" v-if="!stationDetail.station.giveDiscount">
+								充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:{{item.servicePrice.toFixed(2)}}元
 							</view>
 							<view v-if="item.current" class="product_tip">
 								<view class="product_tip_bg"></view>