zhengkaixin hace 2 años
padre
commit
44ee2a395d

+ 3 - 2
pages/index/index.vue

@@ -487,7 +487,7 @@
 					}
 					
 					console.log("--------------")
-					if (res.data.regUser) {
+					if (res.data&&res.data.regUser) {
 						if(res.data.regUser.fontMode == null) {
 							this.show = true;
 						} else {
@@ -512,6 +512,7 @@
 							}
 						}
 					}else{
+						
 						this.carhelp.set("getElderModeClass", "长辈模式");
 						this.elderStatus = true;
 						
@@ -520,7 +521,7 @@
 						// 	op:op,
 						// 	date:new Date().getTime()
 						// })
-						if(obj){
+						if(obj&&false){
 							if(obj.date+1000*60*60*24 > new Date().getTime() ){
 							
 								this.friendsInvitation(obj)

+ 3 - 3
pages/login/login.vue

@@ -4,7 +4,7 @@
 			<view class="login-title">
 				<h3>手机号登录/注册</h3>
 				<p>欢迎来到{{projectName}}</p>
-				<p v-if="activityInfo"><span style="color: red;">*</span>正在参加活动<span style="color: #3fbd70;" ><{{activityInfo.name}}></span></p>
+				<p v-if="activityInfo"><span style="color: red;">*</span>正在参加活动<span style="color: #3fbd70;" ><邀请有礼></span></p>
 			</view>
 			
 			<view class="login-form">
@@ -114,12 +114,12 @@
 				
 			}
 			var obj=this.carhelp.get("friends_invitation")
-			
+			debugger
 			if(obj){
 				if(obj.date+1000*60*60*24 > new Date().getTime() ){
 					this.form.inviteId=obj.op.uid
 					this.form.code=obj.op.icode
-					this.activityInfo=obj.activityInfo;
+					this.activityInfo="true";
 				}
 				
 			}

+ 4 - 1
pages/login/welcome.vue

@@ -193,7 +193,10 @@
 					op:op,
 					date:new Date().getTime()
 				})
-					this.onReadyIng()
+				uni.redirectTo({
+					url:'/pages/login/login'
+				})
+					//this.onReadyIng()
 			}else  if(op.gunId){
 				var k=API.codeOperation("jp_team51_charge_id:A_"+op.gunId);
 				if(k){

+ 0 - 65
pages/searchPile/chargeProcess/charging.vue

@@ -176,71 +176,6 @@
 		width: 100%;
 		
 
-		// .img {
-		// 	width: 48%;
-		// 	height: 286px;
-
-		// 	img {
-		// 		width: 100%;
-		// 		height: 100%;
-		// 	}
-		// }
-
-		// .state-infos {
-		// 	padding-top: 38px;
-
-		// 	.state {
-		// 		color: rgba(0, 185, 98, 100);
-		// 		font-size: 28px;
-		// 		line-height: 28px;
-		// 		font-weight: 550;
-
-		// 		text {
-		// 			vertical-align: middle;
-		// 		}
-		// 	}
-
-		// 	.electric-quantity {
-		// 		margin-top: 17px;
-
-		// 		p {
-		// 			height: 22px;
-		// 			color: rgba(119, 119, 119, 100);
-		// 			font-size: 16px;
-		// 		}
-
-		// 		.percent {
-		// 			margin-top: 4px;
-		// 			line-height: 40px;
-		// 			color: rgba(51, 51, 51, 100);
-		// 			font-size: 36px;
-		// 			font-weight: 550;
-
-		// 			text {
-		// 				font-size: 24px;
-		// 				font-weight: 550;
-		// 			}
-		// 		}
-		// 	}
-
-		// 	.charge-time {
-		// 		margin-top: 12px;
-
-		// 		p {
-		// 			line-height: 22px;
-		// 			color: rgba(119, 119, 119, 100);
-		// 			font-size: 16px;
-		// 		}
-
-		// 		.time {
-		// 			margin-top: 4px;
-		// 			line-height: 36px;
-		// 			color: rgba(51, 51, 51, 100);
-		// 			font-size: 36px;
-		// 			font-weight: 550;
-		// 		}
-		// 	}
-		// }
 
 	}
 

+ 415 - 56
pages/searchPile/chargeProcess/dcCharging.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
-		<view v-if="chargingRecord.status==2">
+		<view v-if="chargingRecord.status==2" style="background-color: #fff; " >
 			<ujp-navbar title="充电结束">
 			</ujp-navbar>
 			<view class="progress-bar2">
-				<u-circle-progress width="400" active-color="green" duration='20'  :percent="100" border-width="20">
+				<u-circle-progress width="300" active-color="green" duration='20'  :percent="100" border-width="20">
 					<view class="u-progress-content">
 						 
 						<text class='u-progress-info' v-if="chargingGun.gunType==1">
@@ -73,37 +73,32 @@
 					<view class="info-text">
 						{{chargingRecord.actualFee}}元
 					</view>
-				</view>
-				<view class="info"  >
-					<view class="info-name">
-						优惠券
-					</view>
-					<view class="info-text" style="color:red">
-						{{couponObj&&couponObj.status=='1'?couponObj.text:'未使用'}}
-					</view>
-				</view>
-				<view class="info" v-if="userCardBool" >
-					<view class="info-name">
-						会员活动
-					</view>
-					<view class="info-text">
-						充电服务费包月卡
-					</view>
-				</view>
+				</view>
+				<view class="info" v-if="chargingRecord.discountAmount">
+					<view class="info-name">
+						优惠金额
+					</view>
+					<view class="info-text" style="color:red">
+						{{chargingRecord.discountAmount}}元
+					</view>
+				</view>
+				
+				<view class="info" v-if="chargingRecord.remark">
+					<view class="info-name">
+						结束原因
+					</view>
+					<view class="info-text" style="color: red;"  >
+						{{chargingRecord.remark}}
+					</view>
+				</view>
+				
+				
 				
-				<view class="info" v-if="chargingRecord.remark">
-					<view class="info-name">
-						结束原因
-					</view>
-					<view class="info-text" style="color: red;"  >
-						{{chargingRecord.remark}}
-					</view>
-				</view>
 				
 		
 			
-			
-			<!-- <view
+		<!-- 	
+			<view
 			
 			style="
 				margin-top: 20px;
@@ -116,8 +111,10 @@
 			</view> -->
 			
 			<view class="bottom">
-				<u-button size="default" shape="circle" @click="gotoMain(0)"  >返回首页</u-button>
-				<u-button size="default" shape="circle" @click="gotoMain(1)">查看订单详情</u-button>
+				<u-button size="default"  style="background-color:#53b56b"
+				 shape="circle" @click="gotoMain(0)"  >返回首页</u-button>
+				<u-button  style="background-color:#53b56b"
+				size="default" shape="circle" @click="gotoMain(1)">查看订单详情</u-button>
 			</view>
 				<u-line color="#E6E6E6 100%" length="81%" margin="auto"/>
 			<!-- 反馈 -->
@@ -130,15 +127,248 @@
 				</view>
 				<textarea value="" v-model="message" placeholder="请填写反馈内容" />
 				<u-button class="submit" type="success" @click="submitMessage()">提交</u-button>
-			</view>
+			</view>
+			<u-line color="#E6E6E6 100%" length="81%" margin="auto"/>
+			
+			<view class="info"  >
+				<view class="info-name">
+					优惠券
+				</view>
+				<view class="info-text" style="color:red">
+					{{couponObj&&couponObj.status=='1'?couponObj.text:'未使用'}}
+				</view>
+			</view>
+			<view class="info" v-if="userCardBool" >
+				<view class="info-name">
+					会员活动
+				</view>
+				<view class="info-text">
+					充电服务费包月卡
+				</view>
+			</view>
+			<u-divider  color="#B6BDC3" style="margin-bottom:20px;" bg-color="#ffffff">已经到底了</u-divider>
+			
+			
 			<view>
 				<u-toast ref="uToast" />
 			</view>
 		</view>
 
-		<view style="background-color: #fff; padding-bottom: 60px;"  class="progress-bar-main" v-else>
+		<view style="background-color: #fff; padding-bottom: 0px;" 
+		 class="progress-bar-main" v-else>
+			<view>
+				<ujp-navbar title="充电中">
+					<view class="to-recharge" @click="gotoUrl('pages/user/finance/recharge')">
+						去充值
+					</view>
+				</ujp-navbar>
+				<!-- 充电状态 -->
+				<view class="charge-state">
+					<view class="progress-bar">
+						<u-circle-progress width="440" active-color="#53b56b" :percent="percent?percent:percentValue" border-width="35">
+					
+							
+							<view class="u-progress-content" v-if="chargingRecord.status==4">
+								<text class='u-progress-info' v-if="waitNum==1">排队中</text>
+								<text class='u-progress-info' v-else >前方等待{{waitNum-1}}位</text>
+							</view>
+							
+							<view class="u-progress-content" v-else>
+								
+								<text class='u-progress-info'  >
+									<view v-if="chargingGun.gunType==1" style="
+											font-size: 40px;
+											font-weight: bold;
+											color: #009B52 ;
+										" >{{percent}}<span style="font-size: 16px;">%</span></view>
+									<view v-if="chargingGun.gunType==2"
+									style="
+											font-size: 30px;
+											font-weight: bold;
+											color: #009B52 ;
+										"
+									
+									>{{chargingRecord.statusText}}</view>
+									<view style="
+											font-size: 16px;
+											font-weight: bold;
+										" 	>已充费用{{chargingRecord.dueFee?chargingRecord.dueFee:0}}元</view>
+								</text>
+ 								
+								
+							</view>
+							
+							<view class="bot"></view>
+						</u-circle-progress>
+					</view>
+				<!-- 	<view class="img">
+						<img src="../../../assets/img/Group (2).png" alt="">
+					</view>
+					<view class="state-infos">
+						<view class="state">
+							<text><img src="../../../assets/img/if-flash.svg" alt=""></text>充电中...
+						</view>
+						<view class="electric-quantity">
+							<p>当前电量</p>
+							<view class="percent">
+								60<text>%</text>
+							</view>
+						</view>
+						<view class="charge-time">
+							<p>充电时长</p>
+							<view class="time">
+								00:24:01
+							</view>
+						</view>
+			
+					</view> -->
+			
+				</view>
+				<!-- 充电信息 -->
+				<view class="charge-info">
+					<view class="info-item">
+						<view class="content">
+							{{timer}}
+						</view>
+						<view class="name">
+							充电时长
+						</view>
+					</view>
+					<view class="info-item">
+						<view class="content">
+							{{chargingGun.kwh}}
+						</view>
+						<view class="name">
+							已充电量(度)
+						</view>
+					</view>
+					<view class="info-item">
+						<view class="content">
+							{{detail.balance>0&&chargingRecord.dueFee?(detail.balance*1000-chargingRecord.dueFee*1000)/1000:'0'}}
+						</view>
+						<view class="name">
+							账户余额(元)
+						</view>
+					</view>
+					
+					
+				</view>
+				<!-- 其他信息 -->
+				<view class="else-infos">
+					<view class="item">
+						<view class="title">
+							充电车辆
+						</view>
+						<view class="detail">
+							{{chargingRecord.carNumber}}
+						</view>
+			
+					</view>
+					<view class="item">
+						<view class="title">
+							<p class="price">当前价格</p>
+							<p class="time">{{price.startTime}}-{{price.endTime}}</p>
+						</view>
+						<view class="detail">
+							<p class="electrovalence"><text class="num">{{chargingRecord.userCardId?price.electricityPrice:price.costPrice}}</text> 元/度</p>
+							<p class="electrovalence-monthlyCard">电价:{{price.electricityPrice}} | 服务费:{{chargingRecord.userCardId?0+'(包月卡)':price.servicePrice}}</p>
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							{{chargingRecord.chargeStrategy==0?'充电模式':''}}
+							{{chargingRecord.chargeStrategy==2?'充电金额':''}}
+						</view>
+						<view class="detail">
+							{{chargingRecord.chargeStrategy==0?'充满自停':''}}
+								{{chargingRecord.chargeStrategy==2?chargingRecord.estimateFee+'元':''}}
+							
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							优惠券
+						</view>
+						<view class="detail">
+							
+							{{couponObj&&couponObj.useText?couponObj.useText:'未使用优惠券'}}
+							
+						</view>
+					
+					</view>
+					<view class="item"  v-if="userCardBool" >
+						<view class="title">
+							会员活动
+						</view>
+						<view class="detail">
+							充电免服务费包月卡
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							站点
+						</view>
+						<view class="detail">
+							 {{chargingRecord.stationName}}/{{chargingRecord.deviceName}}
+						</view>
+					
+					</view>
+					
+					<view class="item" v-if="false">
+						<view class="title">
+							占位费说明
+						</view>
+						<view class="detail">
+							停止充电后30分钟即开始收取占位费用,1元/分钟
+						</view>			
+					</view>
+			
+				</view>
+			
+			 <view class="bottom">
+				 <view class="img-box" @click="show = true">
+					 <img src="../../../assets/img/customer-service-2-line.svg" alt="">
+				 	
+				 </view>
+				 <button  
+				 :style="(chargingRecord.status=='0'||chargingRecord.status=='1'||chargingRecord.status=='4')?'':'background-color: #b3abab;'"
+				 style="width: 80%;"
+				 @click="submit" >结束充电</button>
+				
+				<view class="img-box" v-if="false">
+				 	<img src="../../../assets/img/tools-fill.svg" alt="">
+				 </view>
+			 	
+			 </view>
+			<u-modal v-model="show" @confirm="confirmPhone"
+			:confirm-text="confirmText"  confirm-color="#606266"
+				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone">
+			</u-modal>
+			
+			<u-modal v-model="show2" @confirm="gotoGz" 
+			cancel-text="暂不关注"  @cancel="cancelGz"
+			confirm-text="前往关注"
+			
+			 confirm-color="#53b56b"
+				:show-cancel-button="true" 
+				ref="uModal2" :asyncClose="true" 
+				 >
+				<view style="padding: 15px;"
+				
+				>请关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
+			</u-modal>
+			
+			</view>
+			
+			<view v-if="false">
+				
+			
 			<ujp-navbar title="充电详情">
-			</ujp-navbar>
+			</ujp-navbar>
+			
 			<view class="iconfont tittle-font" @click="show = true">
 				&#xe616;
 			</view>
@@ -294,14 +524,7 @@
 			</view>
 			
 			
-			<view class="info" v-if="false">
-				<view class="info-name">
-					占位费说明
-				</view>
-				<view class="info-text">
-					停止充电后30分钟即开始收取占位费用,1元/分钟
-				</view>
-			</view>
+		 
 			<view class="bottom2" >
 				<u-button type="primary"  @click="submit"
 				 :style="(chargingRecord.status==0||chargingRecord.status==1||chargingRecord.status==4)?'background-color: #00b962':'background-color: #9be6c2;'"
@@ -325,7 +548,7 @@
 				
 				>请关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
 			</u-modal>
- 			
+ 			</view>
 		</view>
 	</view>
 </template>
@@ -358,7 +581,8 @@
 				confirmText: '拨打电话',
 				detail:{},
 				percent: 0,
-				percentValue: 0,
+				percentValue: 0,
+				show3:false,
 				consumerPhone: "",
 				id: "",
 				chargingGun: {},
@@ -1049,19 +1273,19 @@
 		}
 	}
 
-	.bottom {
-		background-color: #fff;
-		display: flex;
-		width: 91.4%;
-		padding: 0 16px;
-		margin:0 auto 40px;
+	// .bottom {
+	// 	background-color: #fff;
+	// 	display: flex;
+	// 	width: 91.4%;
+	// 	padding: 0 16px;
+	// 	margin:0 auto 40px;
 
-		.u-size-default {
-			border: 1px solid rgba(0, 185, 98, 100);
-			color: #00b962;	
-			width: 44%;
-		}
-	}
+	// 	.u-size-default {
+	// 		border: 1px solid rgba(0, 185, 98, 100);
+	// 		color: #00b962;	
+	// 		width: 44%;
+	// 	}
+	// }
 
 // 反馈
 .feedback{
@@ -1100,3 +1324,138 @@
 
 
 </style>
+
+
+
+<style lang="scss" scoped>
+	page {
+		background-color: #f6f8f8;
+		padding-bottom: 60px;
+	}
+.to-recharge{
+	position: absolute;
+	right: 22px;
+	color: #333333
+}
+	// 充电状态
+	.charge-state {
+		
+		width: 100%;
+		
+
+
+	}
+
+	// 充电信息
+	.charge-info {
+		background-color: #ffffff;
+		width: 88.2%;
+		padding: 20px 10px 4px 7px;
+		margin: 24px auto 0;
+		box-shadow: 0px 2px 8px 0px #1A095A34;
+		border-radius: 12px;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+
+		.info-item {
+			width: 33%;
+			text-align: center;
+			margin-bottom: 14px;
+
+			.content {
+				line-height: 33px;
+				color: rgba(51, 51, 51, 100);
+				font-size: 24px;
+                font-weight: 550;
+			}
+
+			.name {
+				line-height: 22px;
+				color: rgba(119, 119, 119, 100);
+				font-size: 16px;
+
+			}
+		}
+	}
+
+	//其他信息
+	.else-infos {
+		padding: 0 12px;
+		background-color: #ffffff;
+		width: 88.2%;
+		margin: 16px auto 0;
+		border-radius: 12px;
+		.item{
+			display: flex;
+			justify-content: space-between;
+			line-height: 23px;
+			padding: 10px 0 10px 0;
+			border-bottom: 1px solid #E9EBEE;
+			.title{
+				// width: 100px;
+				width: 26.6vw;
+				color: rgba(16, 16, 16, 100);
+				font-size: 18px;
+				font-weight: 550;
+				.time{
+					font-size: 13px;
+					color: #666666 100%;
+					font-weight: normal;
+				}
+			}
+			.detail{
+				// width: 197px;
+				width: 52.5vw;
+				color: rgba(16, 16, 16, 100);
+				font-size: 16px;
+				text-align: right;
+				.electrovalence{
+					.num{
+						color: rgba(255, 61, 0, 100);
+						margin-right: 4px;
+					}
+				}
+				
+				.electrovalence-monthlyCard{
+					font-size: 14px;
+					color: #959595;
+				}
+			}
+			
+		}
+
+	}
+	// 底部按钮
+	.bottom{
+		background:white ;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		display: flex;
+		padding: 12px 24px;
+		padding-bottom: 12px;
+		    z-index: 999;
+		.img-box{
+			width: 48px;
+			height: 48px;
+			padding: 12px 0;
+			background-color: rgba(210, 215, 213, 100);
+			text-align: center;
+			border-radius: 999px;
+			
+			img{
+				
+			}
+		}
+		button{
+			width: 60.8%;
+			background-color: black;
+			color: #fff;
+			height: 48px;
+			border-radius: 50px;
+			font-size: 18px;
+		}
+	}
+</style>

+ 1461 - 0
pages/searchPile/chargeProcess/dcCharging2.vue

@@ -0,0 +1,1461 @@
+<template>
+	<view>
+		<view v-if="chargingRecord.status==2" style="background-color: #fff; " >
+			<ujp-navbar title="充电结束">
+			</ujp-navbar>
+			<view class="progress-bar2">
+				<u-circle-progress width="300" active-color="green" duration='20'  :percent="100" border-width="20">
+					<view class="u-progress-content">
+						 
+						<text class='u-progress-info' v-if="chargingGun.gunType==1">
+							<p style="text-align: center;">{{chargingRecord.endSoc}}%</p>
+							<p class="progress-text">当前电量</p>
+						</text>
+						
+						<text class='u-progress-info' v-if="chargingGun.gunType==2">
+							<p style="text-align: center;">{{chargingRecord.electricQuantity/10000}}</p>
+							<p class="progress-text">已充电量(度)</p>
+						</text>
+						
+					</view>
+
+					
+				</u-circle-progress>
+			</view>
+<!-- 充电信息 -->
+			
+				<!-- <view class="charge-infos">
+					<view class="item">
+						<view class="title">
+							充电金额
+						</view>
+						<view class="content">
+							50.00
+						</view>
+					</view>
+					<view class="item">
+						<view class="title">
+							充电时长
+						</view>
+						<view class="content">
+							00.00.00
+						</view>
+					</view>
+					<view class="item">
+						<view class="title">
+							优惠金额
+						</view>
+						<view class="content discounts">
+							-6.00元
+						</view>
+					</view>
+					<view class="item">
+						<view class="title">
+							会员活动
+						</view>
+						<view class="content">
+							充电服务费包月卡
+						</view>
+					</view>
+				</view> -->
+				 <view class="info" >
+					<view class="info-name">
+						充电时长
+					</view>
+					<view class="info-text">
+						{{getPercent2()}}
+					</view>
+				</view>
+				<view class="info" >
+					<view class="info-name">
+						充电金额
+					</view>
+					<view class="info-text">
+						{{chargingRecord.actualFee}}元
+					</view>
+				</view>
+				<view class="info" v-if="chargingRecord.discountAmount">
+					<view class="info-name">
+						优惠金额
+					</view>
+					<view class="info-text" style="color:red">
+						{{chargingRecord.discountAmount}}元
+					</view>
+				</view>
+				
+				<view class="info" v-if="chargingRecord.remark">
+					<view class="info-name">
+						结束原因
+					</view>
+					<view class="info-text" style="color: red;"  >
+						{{chargingRecord.remark}}
+					</view>
+				</view>
+				
+				
+				
+				
+		
+			
+		<!-- 	
+			<view
+			
+			style="
+				margin-top: 20px;
+				text-align: center;
+				padding: 0 45px;
+				padding-bottom: 40px;
+				color:#9e9e9e;
+			">
+				<span style="color: red;">*</span>实际充电金额与所选金额会略有出入,最终结算金额将以实际充入电量为准。
+			</view> -->
+			
+			<view class="bottom">
+				<u-button size="default"  style="background-color:#53b56b"
+				 shape="circle" @click="gotoMain(0)"  >返回首页</u-button>
+				<u-button  style="background-color:#53b56b"
+				size="default" shape="circle" @click="gotoMain(1)">查看订单详情</u-button>
+			</view>
+				<u-line color="#E6E6E6 100%" length="81%" margin="auto"/>
+			<!-- 反馈 -->
+			<view class="feedback">
+				<view class="title-1">
+					您对本次充电服务还满意吗?
+				</view>
+				<view class="title-2">
+					请在下方描述您所遇到的问题,或填写您的反馈意见。我们将对优质内容的反馈者发放奖励!
+				</view>
+				<textarea value="" v-model="message" placeholder="请填写反馈内容" />
+				<u-button class="submit" type="success" @click="submitMessage()">提交</u-button>
+			</view>
+			<u-line color="#E6E6E6 100%" length="81%" margin="auto"/>
+			
+			<view class="info"  >
+				<view class="info-name">
+					优惠券
+				</view>
+				<view class="info-text" style="color:red">
+					{{couponObj&&couponObj.status=='1'?couponObj.text:'未使用'}}
+				</view>
+			</view>
+			<view class="info" v-if="userCardBool" >
+				<view class="info-name">
+					会员活动
+				</view>
+				<view class="info-text">
+					充电服务费包月卡
+				</view>
+			</view>
+			<u-divider  color="#B6BDC3" style="margin-bottom:20px;" bg-color="#ffffff">已经到底了</u-divider>
+			
+			
+			<view>
+				<u-toast ref="uToast" />
+			</view>
+		</view>
+
+		<view style="background-color: #fff; padding-bottom: 0px;" 
+		 class="progress-bar-main" v-else>
+			<view>
+				<ujp-navbar title="充电中">
+					<view class="to-recharge" @click="gotoUrl('pages/user/finance/recharge')">
+						去充值
+					</view>
+				</ujp-navbar>
+				<!-- 充电状态 -->
+				<view class="charge-state">
+					<view class="progress-bar">
+						<u-circle-progress width="440" active-color="#53b56b" :percent="percent?percent:percentValue" border-width="35">
+					
+							
+							<view class="u-progress-content" v-if="chargingRecord.status==4">
+								<text class='u-progress-info' v-if="waitNum==1">排队中</text>
+								<text class='u-progress-info' v-else >前方等待{{waitNum-1}}位</text>
+							</view>
+							
+							<view class="u-progress-content" v-else>
+								
+								<text class='u-progress-info'  >
+									<view v-if="chargingGun.gunType==1" style="
+											font-size: 40px;
+											font-weight: bold;
+											color: #009B52 ;
+										" >{{percent}}<span style="font-size: 16px;">%</span></view>
+									<view v-if="chargingGun.gunType==2"
+									style="
+											font-size: 30px;
+											font-weight: bold;
+											color: #009B52 ;
+										"
+									
+									>{{chargingRecord.statusText}}</view>
+									<view style="
+											font-size: 16px;
+											font-weight: bold;
+										" 	>已充费用{{chargingRecord.dueFee?chargingRecord.dueFee:0}}元</view>
+								</text>
+ 								
+								
+							</view>
+							
+							<view class="bot"></view>
+						</u-circle-progress>
+					</view>
+				<!-- 	<view class="img">
+						<img src="../../../assets/img/Group (2).png" alt="">
+					</view>
+					<view class="state-infos">
+						<view class="state">
+							<text><img src="../../../assets/img/if-flash.svg" alt=""></text>充电中...
+						</view>
+						<view class="electric-quantity">
+							<p>当前电量</p>
+							<view class="percent">
+								60<text>%</text>
+							</view>
+						</view>
+						<view class="charge-time">
+							<p>充电时长</p>
+							<view class="time">
+								00:24:01
+							</view>
+						</view>
+			
+					</view> -->
+			
+				</view>
+				<!-- 充电信息 -->
+				<view class="charge-info">
+					<view class="info-item">
+						<view class="content">
+							{{timer}}
+						</view>
+						<view class="name">
+							充电时长
+						</view>
+					</view>
+					<view class="info-item">
+						<view class="content">
+							{{chargingGun.kwh}}
+						</view>
+						<view class="name">
+							已充电量(度)
+						</view>
+					</view>
+					<view class="info-item">
+						<view class="content">
+							{{detail.balance>0&&chargingRecord.dueFee?(detail.balance*1000-chargingRecord.dueFee*1000)/1000:'0'}}
+						</view>
+						<view class="name">
+							账户余额(元)
+						</view>
+					</view>
+					
+					
+				</view>
+				<!-- 其他信息 -->
+				<view class="else-infos">
+					<view class="item">
+						<view class="title">
+							充电车辆
+						</view>
+						<view class="detail">
+							{{chargingRecord.carNumber}}
+						</view>
+			
+					</view>
+					<view class="item">
+						<view class="title">
+							<p class="price">当前价格</p>
+							<p class="time">{{price.startTime}}-{{price.endTime}}</p>
+						</view>
+						<view class="detail">
+							<p class="electrovalence"><text class="num">{{chargingRecord.userCardId?price.electricityPrice:price.costPrice}}</text> 元/度</p>
+							<p class="electrovalence-monthlyCard">电价:{{price.electricityPrice}} | 服务费:{{chargingRecord.userCardId?0+'(包月卡)':price.servicePrice}}</p>
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							{{chargingRecord.chargeStrategy==0?'充电模式':''}}
+							{{chargingRecord.chargeStrategy==2?'充电金额':''}}
+						</view>
+						<view class="detail">
+							{{chargingRecord.chargeStrategy==0?'充满自停':''}}
+								{{chargingRecord.chargeStrategy==2?chargingRecord.estimateFee+'元':''}}
+							
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							优惠券
+						</view>
+						<view class="detail">
+							
+							{{couponObj&&couponObj.useText?couponObj.useText:'未使用优惠券'}}
+							
+						</view>
+					
+					</view>
+					<view class="item"  v-if="userCardBool" >
+						<view class="title">
+							会员活动
+						</view>
+						<view class="detail">
+							充电免服务费包月卡
+						</view>
+					
+					</view>
+					<view class="item">
+						<view class="title">
+							站点
+						</view>
+						<view class="detail">
+							 {{chargingRecord.stationName}}/{{chargingRecord.deviceName}}
+						</view>
+					
+					</view>
+					
+					<view class="item" v-if="false">
+						<view class="title">
+							占位费说明
+						</view>
+						<view class="detail">
+							停止充电后30分钟即开始收取占位费用,1元/分钟
+						</view>			
+					</view>
+			
+				</view>
+			
+			 <view class="bottom">
+				 <view class="img-box" @click="show = true">
+					 <img src="../../../assets/img/customer-service-2-line.svg" alt="">
+				 	
+				 </view>
+				 <button  
+				 :style="(chargingRecord.status=='0'||chargingRecord.status=='1'||chargingRecord.status=='4')?'':'background-color: #b3abab;'"
+				 style="width: 80%;"
+				 @click="submit" >结束充电</button>
+				
+				<view class="img-box" v-if="false">
+				 	<img src="../../../assets/img/tools-fill.svg" alt="">
+				 </view>
+			 	
+			 </view>
+			<u-modal v-model="show" @confirm="confirmPhone"
+			:confirm-text="confirmText"  confirm-color="#606266"
+				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone">
+			</u-modal>
+			
+			<u-modal v-model="show2" @confirm="gotoGz" 
+			cancel-text="暂不关注"  @cancel="cancelGz"
+			confirm-text="前往关注"
+			
+			 confirm-color="#53b56b"
+				:show-cancel-button="true" 
+				ref="uModal2" :asyncClose="true" 
+				 >
+				<view style="padding: 15px;"
+				
+				>请关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
+			</u-modal>
+			
+			</view>
+			
+			<view v-if="false">
+				
+			
+			<ujp-navbar title="充电详情">
+			</ujp-navbar>
+			
+			<view class="iconfont tittle-font" @click="show = true">
+				&#xe616;
+			</view>
+			
+
+
+			<view class="progress-bar">
+				<u-circle-progress width="440" active-color="green" :percent="percent?percent:percentValue" border-width="50">
+
+					
+					<view class="u-progress-content" v-if="chargingRecord.status==4">
+						<text class='u-progress-info' v-if="waitNum==1">排队中</text>
+						<text class='u-progress-info' v-else >前方等待{{waitNum-1}}位</text>
+					</view>
+					<view class="u-progress-content" v-else-if="chargingGun.gunType==1">
+						
+						<text class='u-progress-info'>{{percent}}%</text>
+					</view>
+					<view class="u-progress-content" v-else-if="chargingGun.gunType==2">
+						
+						<text class='u-progress-info'>{{chargingRecord.statusText}}...</text>
+					</view>
+					<view class="bot"></view>
+				</u-circle-progress>
+			</view>
+			<view class="starting"  v-if="chargingGun.gunType==1">
+				
+				<span  v-if="chargingRecord.status==4">
+					可用功率不足,您可以换桩或继续排队等待...
+				</span>
+				<span v-else>
+					{{chargingRecord.statusText}}...
+				</span>
+			</view>
+
+
+			<view class="timer">
+				{{timer}}
+			</view>
+			<view class="charged">
+				已充电{{chargingGun.kwh}}度
+			</view>
+			<view class="cost">
+				<view class="">
+					<view class="cost-top">
+						{{chargingRecord.dueFee?chargingRecord.dueFee:0}}元
+					</view>
+					<view class="cost-bottom "  >
+						实时费用
+					</view>
+				</view>
+				<view class="line"></view>
+				<view class="">
+					<view class="cost-top">
+						{{detail.balance>0?detail.balance:0}}元
+						<view class="iconfont cost-font" @click="gotoUrl('pages/user/finance/recharge')" >&#xe633;</view>
+					</view>
+					<view class="cost-bottom">
+						账户余额
+					</view>
+				</view>
+			</view>
+			<view class="power">
+				<view>
+					<view class="power-num">
+						{{chargingRecord.chargeVoltage?chargingRecord.chargeVoltage:0}}v
+					</view>
+					<view class="power-text">
+						电压
+					</view>
+				</view>
+				<view class="line"></view>
+				<view>
+					<view class="power-num">
+						{{chargingRecord.chargingPower?chargingRecord.chargingPower/1000:0}}kW
+					</view>
+					<view class="power-text">
+						功率
+					</view>
+				</view>
+				<view class="line"></view>
+				<view>
+					<view class="power-num">
+						{{chargingRecord.chargeAmpere?chargingRecord.chargeAmpere:0}}A
+					</view>
+					<view class="power-text">
+						电流
+					</view>
+				</view>
+			</view>
+			<view class="info" >
+				<view class="info-name">
+					{{chargingRecord.chargeStrategy==0?'充电模式':''}}
+					{{chargingRecord.chargeStrategy==2?'充电金额':''}}
+				</view>
+				<view class="info-text" >
+					{{chargingRecord.chargeStrategy==0?'充满自停':''}}
+					{{chargingRecord.chargeStrategy==2?chargingRecord.estimateFee+'元':''}}
+				</view>
+			</view>
+			
+			<view class="info" >
+				<view class="info-name">
+					优惠券
+				</view>
+				<view class="info-text" style="color:red">
+					{{couponObj&&couponObj.useText?couponObj.useText:'未使用'}}
+				</view>
+			</view>
+			<view class="info" v-if="chargingRecord.carNumber">
+				<view class="info-name">
+					充电车辆
+				</view>
+				<view class="info-text">
+					{{chargingRecord.carNumber}}
+				</view>
+			</view>
+			<view class="info">
+				<view class="info-name">
+					站点
+				</view>
+				<view class="info-text">
+					 {{chargingRecord.stationName}}
+				</view>
+			</view>
+			<view class="info">
+				<view class="info-name">
+					充电桩
+				</view>
+				<view class="info-text">
+					 {{chargingRecord.deviceName}}枪{{chargingRecord.channelNo}} 
+					
+				</view>
+			</view>
+			
+			<view class="info" v-if="price" style="line-height: 23px;">
+				<view class="info-text" style="text-align: left;"  >
+					<view style="font-weight: bold;font-size: 20px;">当前价格</view>
+					<view class="info-name2" >
+						{{price.startTime}}-{{price.endTime}}
+					</view>
+				</view>
+				<view class="info-text"  style="line-height: 23px;">
+					<view><span style="color: #FF3D00;font-size: 20px;"><b>{{price.costPrice}}</b></span>元/度</view>
+					
+					<view class="info-name2">
+						电价:{{price.electricityPrice}}元 | 服务费:{{price.servicePrice}}元
+					</view>
+				</view>
+				
+				
+				
+			</view>
+			
+			
+		 
+			<view class="bottom2" >
+				<u-button type="primary"  @click="submit"
+				 :style="(chargingRecord.status==0||chargingRecord.status==1||chargingRecord.status==4)?'background-color: #00b962':'background-color: #9be6c2;'"
+				 shape="circle" >结束充电</u-button>
+			</view>
+
+			<u-modal v-model="show" @confirm="confirmPhone" 
+			:confirm-text="confirmText"  confirm-color="#606266"
+				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone">
+			</u-modal>
+			
+			<u-modal v-model="show2" @confirm="gotoGz" 
+			cancel-text="暂不关注"  @cancel="cancelGz"
+			confirm-text="前往关注"
+			
+			 confirm-color="#53b56b"
+				:show-cancel-button="true" 
+				ref="uModal2" :asyncClose="true" 
+				 >
+				<view style="padding: 15px;"
+				
+				>请关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
+			</u-modal>
+ 			</view>
+		</view>
+	</view>
+</template>
+
+
+<script>
+	var formatNum=function(num) {
+		let res = Number(num);
+		return res < 10 ? '0' + res : res;
+	};
+	import * as api from "@/apis/site.js"
+	
+	import * as API from '@/apis/chargeProcess.js'
+	import * as API_weixin from '@/apis/weixin.js'
+	import * as userAPI from '@/apis/user.js'
+	
+	import {
+		newDate,
+		secondsDistance,
+		hourDistanceArr
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				message: '',
+				elderMode:false,
+				timer:'',
+				title: '联系客服',
+				content: '0716-8123456',
+				confirmText: '拨打电话',
+				detail:{},
+				percent: 0,
+				percentValue: 0,
+				show3:false,
+				consumerPhone: "",
+				id: "",
+				chargingGun: {},
+				chargingRecord: {},
+				couponObj:{},
+				show: false,
+				show2: false,
+				isReady:true,
+				waitNum:'',
+				projectName:"",
+				userCard:null,
+				price:null,
+			}
+		},
+		onLoad(op) {
+			this.projectName=process.car.ProjectName;
+			
+			var plus=this.carhelp.getPersonInfoPlus()
+			if(plus){
+				this.userCard=plus.userCard;
+			}
+			if (op.id) {
+				this.id = op.id;
+				this.init()
+				this.getInfo()
+			}
+			var consumerPhone = this.carhelp.getConfig().consumerPhone
+			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+			if (consumerPhone) {
+				this.consumerPhone = consumerPhone
+			}
+			
+
+		},
+		onShow() {
+		
+			if(!this.isReady){
+				this.isReady=true;
+				this.addpercent();
+				this.getInfo()
+			}
+			
+		},
+		onHide() {
+			this.isReady=false;
+			console.log("onHide")
+			},
+		onUnload() {
+				console.log("onUnload")
+			this.isReady=false;
+		},
+		onReady() {
+			this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
+			if(this.elderMode)
+				this.theme('elder')
+			else
+				this.theme('standard')
+				
+			this.addpercent()
+		},
+		computed:{
+			userCardBool(){
+				if(this.chargingRecord&&this.chargingRecord.userCardId){
+					
+					return true;
+				}
+				return false
+			}
+		},
+		methods: {
+			getChargingStationPrice(id){
+				 
+				if(!id||id==undefined){
+					return 
+				}
+				//id='e012f9fe-90a8-4a47-bb64-26ea139c3c05'
+				api.getChargingStationPrice({
+					stationId:id
+				}).then((res)=>{
+					let date = new Date();
+					let hours = date.getHours();
+					let minutes = date.getMinutes();
+					let seconds = date.getSeconds();
+					let date_str =  formatNum(hours)+ ':'+ formatNum(minutes);//+ ' ' +formatWeek;
+					if(res.data.prices&&res.data.prices.length){
+						
+						for(var i in  res.data.prices[0].priceList){
+							var item=res.data.prices[0].priceList[i];
+							if(date_str>=item.startTime &&  date_str<= item.endTime)
+							{
+								this.price=	item								
+							}
+						}
+						
+					}
+					
+					
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			showToast() {
+				this.$refs.uToast.show({
+					title: '提交成功',
+					type: 'success'
+				})
+			},
+			submitMessage() {
+				if(!this.message) {
+					uni.showToast({
+						title: "请填写反馈内容",
+						icon: "none"
+					})
+					return
+				}
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userAPI.feedback({content: this.message}).then(response => {
+					uni.hideLoading()
+					this.message = '';
+					this.showToast();
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			theme(type) {
+				
+			  if(type == 'elder')	
+			  {
+				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+				 
+			  }
+			  else
+			  {
+				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+				 
+				  
+			  } 
+			},
+			cancelGz(){
+				this.carhelp.setGzDate()
+			},
+			gotoGz(){
+				this.carhelp.setGzDate()
+				var url="https://mp.weixin.qq.com/s/mCHz1nNvg0xAICiBeIyKRQ";
+				window.location.href=url
+				
+			},
+			gotoMain(i){
+				if(i==0){
+					uni.reLaunch({
+						url:"/pages/index/index"
+					})
+				}
+				if(i==1){
+					uni.navigateTo({
+					
+						url:"/pages/record/details?id="+this.id
+					})
+				}
+			},
+			addpercent(){
+				this.timer=this.getPercent()
+				if(this.isReady){
+					setTimeout(()=>{	
+						this.percentValue++;
+						if(this.percentValue>=100){
+							this.percentValue=0;
+						}
+						this.addpercent()
+					},100)
+				}
+			},
+			getPercent2() {
+				var ms=this.chargingRecord.chargingMinute*60;
+				
+				var Hour = parseInt(Math.floor(ms / (60 * 60)));
+				var Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
+				var S = parseInt(Math.floor(ms % (60) ));
+				
+				var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen+ ":" + (S > 9 ? "" : "0") + S
+				 
+			
+				return obj;
+			},
+			getPercent() {
+				if(!this.chargingRecord.startTime){
+					return '00:00:00'
+				}
+				var Hour=0;
+				var Fen=0;
+				var S=0;
+				if (this.chargingRecord.status == 1) {
+					var second = secondsDistance(newDate(this.chargingRecord.startTime));
+				
+				var ms=second;
+				
+				 Hour = parseInt(Math.floor(ms / (60 * 60)));
+				 Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
+				 S = parseInt(Math.floor(ms % (60) ));
+				
+				 }
+				 var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen+ ":" + (S > 9 ? "" : "0") + S
+				 
+			
+				return obj;
+			},
+			init() {
+				 
+			
+				API.personalCenter().then((res) => {
+					this.detail = res.data
+					 
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			checkSubscribe(){
+				API_weixin.checkSubscribe({
+					openId: this.carhelp.getOpenId() 
+				}).then((res) => {
+					
+					if(res.data=="0"){
+						
+						this.show2=true;
+					}else{
+						this.carhelp.setGzDate() 
+					}
+					
+					//setGzDate
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+				
+			},
+			confirmPhone() {
+				this.show = false;
+				uni.makePhoneCall({
+					phoneNumber: this.consumerPhone //仅为示例
+				});
+			},
+			getInfo() {
+				// uni.showLoading({
+				// 	title: "加载中",
+				// 	mask: true,
+				// })
+				API.chargingDetail({
+					id: this.id
+				}).then((res) => {
+					
+					this.chargingRecord = res.data.chargingRecord
+					//(this.chargingRecord)
+					this.couponObj= res.data.coupon
+					this.chargingGun = res.data.chargingGun
+					this.waitNum=res.data.chargingRecord.waitNum;
+					this.getChargingStationPrice(this.chargingGun.stationId )
+					//this.isReady = true;
+					//直流
+					if(this.chargingGun.gunType==1){
+						
+						if (this.chargingRecord.status == 1) {
+							this.percent=this.chargingGun.soc
+							
+							
+						}
+					}else if(this.chargingGun.gunType==2){
+						//交流
+					}
+					if (this.chargingRecord.status == 1) {
+						if(this.carhelp.getGzDate()&&!this.show2){
+							
+							this.checkSubscribe()
+							
+						}
+					}
+					
+					if(this.isReady&&this.chargingRecord.status!=2){
+						var time=500;
+						if(this.chargingRecord.status==0){
+							
+						}else{
+							time=3000;
+							this.init();
+						}
+						
+						setTimeout(()=>{
+							this.getInfo();
+						},time)
+					}
+					uni.hideLoading()
+
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			submit() {
+				if(this.chargingRecord.status==0||this.chargingRecord.status==1||this.chargingRecord.status==4){
+					
+				}else{
+					return
+				}
+				uni.showModal({
+					title: '提示',
+					content: '确认结束充电?',
+					success: res => {
+						if (res.confirm) {
+							//付钱  改为组件
+							this.confirm()
+				
+						} else if (res.cancel) {
+							//('用户点击取消');
+						}
+					}
+				});
+			},
+			confirm() {
+			
+				////(JSON.stringify(this.submitForm))
+				
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+			
+				//this.submitForm.deviceNo = this.detail.deviceNo;
+				API.stopCarCharging({
+					chargingRecordId:this.chargingRecord.id
+				}).then((res) => {
+					this.getInfo()
+				}).catch(error => {
+					
+					uni.showToast({
+						title: error
+					})
+			
+				})
+			},
+
+		}
+
+	}
+</script>
+<style>
+	page {
+		background: #fff;
+		padding-bottom: 50px;
+	}
+</style>
+<style lang="scss" scoped>
+	.progress-bar-main{
+		.info-name2{
+			color: #777777 ;
+			font-size:14px;
+		}
+		.info-name{
+			font-weight:bold;
+			font-size: 20px;
+			
+		}
+	}
+
+	@import "@/_theme.scss";
+	.tittle-font {
+		@include themeify{
+			font-size: themed('font-size7');
+		}
+/*		font-size: 24px;*/
+		position: fixed;
+		top: 12px;
+		right: 16px;
+		z-index: 99999;
+
+	}
+
+	.bot {
+		width:100%;
+		height:0;
+		padding-top: 100%;
+		border: 2px #00b962 dotted;
+		border-radius:100%;
+		box-sizing: border-box;
+		position: absolute;
+		top: 0px;
+		left: 0px;
+		right: 0px;
+		margin: auto;
+	}
+
+	.progress-bar {
+
+		text-align: center;
+		    margin-top: 20px;
+		/deep/.u-circle-progress {
+			
+			position: relative;
+			// min-width:220px;
+			// min-height: 220px;
+		}
+
+		.u-progress-content {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+		}
+
+
+		.u-progress-dot {
+			width: 16rpx;
+			height: 16rpx;
+			border-radius: 50%;
+			background-color: #fb9126;
+		}
+
+		.u-progress-info {
+			@include themeify{
+				font-size: themed('font-size6');
+			}
+/*			font-size: 22px;*/
+			padding-left: 16rpx;
+			letter-spacing: 2rpx;
+			color: rgba(51, 51, 51, 100);
+		}
+
+		/deep/.u-progress-dot[data-v-05b104e0] {
+			display: none;
+		}
+
+		/deep/.u-circle-progress[data-v-cab6fc66] {
+			margin: 30px;
+		}
+
+	}
+
+	.starting {
+/*		height: 22px;*/
+		color: rgba(0, 185, 98, 100);
+		@include themeify{
+			font-size: themed('font-size3');
+			height:themed('font-size6');
+		}
+/*		font-size: 16px;*/
+		text-align: center;
+		margin-top: 10px;
+	}
+
+	.timer {
+		height: 43px;
+		color: rgba(51, 51, 51, 100);
+		@include themeify{
+			font-size: themed('font-size13'); 
+		}
+/*		font-size: 36px;*/
+		text-align: center;
+		margin-top: 40px;
+	}
+
+	.charged {
+/*		height: 20px;*/
+		color: rgba(153, 153, 153, 100);
+		@include themeify{
+			font-size: themed('font-size2'); 
+			height:themed('font-size5')
+		}
+/*		font-size: 14px;*/
+		text-align: center;
+		margin-top: 4px;
+	}
+
+	.cost {
+		// width: 50%;
+		padding: 0 50px;
+		margin-top: 16px;
+		    margin: auto;
+		    width: 280px;
+		display: flex;
+		justify-content: space-between;
+
+		.cost-top {
+			line-height: 33px;
+			text-align: center;
+			@include themeify{
+				font-size: themed('font-size7');  
+			}
+/*			font-size: 24px;*/
+			position: relative;
+
+			.cost-font {
+				position: absolute;
+				top: 0;
+				right: -25px;
+				color: #ff6200;
+				@include themeify{
+					font-size: themed('font-size7');  
+				}
+/*				font-size: 24px*/
+			}
+		}
+
+		.cost-bottom {
+			@include themeify{
+				line-height: themed('font-size5');  
+			}
+/*			line-height: 20px;*/
+			color: #999999;
+			text-align: center;
+		}
+	}
+
+	.line {
+		width: 0;
+		height: 36px;
+		border: 1px solid rgba(237, 237, 237, 100);
+		margin-top: 10px;
+		background-color: #ededed;
+	}
+
+	.power {
+		display: flex;
+		justify-content: space-around;
+		padding: 0 55px;
+		margin-top: 40px;
+
+		.power-num {
+/*			height: 27px;*/
+			color: rgba(51, 51, 51, 100);
+			@include themeify{
+				font-size: themed('font-size5');  
+				height: themed('font-size9');  	
+			}
+/*			font-size: 20px;*/
+			text-align: center;
+		}
+
+		.power-text {
+/*			height: 20px;*/
+			color: rgba(153, 153, 153, 100);
+			@include themeify{
+				font-size: themed('font-size2');  
+				height: themed('font-size5');  	
+			}
+/*			font-size: 14px;*/
+			text-align: center;
+		}
+	}
+
+	.info {
+		display: flex;
+		justify-content: space-between;
+		margin: 0 40px;
+		// height: 48px;
+		line-height: 48px;
+		background-color: rgba(255, 255, 255, 100);
+		color: rgba(16, 16, 16, 100);
+		border-bottom: 1px solid #ededed;
+
+		.info-text {
+			@include themeify{
+				line-height: themed('font-size7');   
+			}
+/*			line-height: 23px;*/
+			padding: 13px 0 12px;
+			//width: 200px;
+			text-align: right;
+		}
+	}
+	.charge-infos{
+		padding: 20px 36px;
+		margin: 0 auto;
+		.item{
+			display: flex;
+			justify-content: space-between;
+			color: rgba(102, 102, 102, 100);
+			font-size: 18px;
+			margin-bottom: 12px;
+			.discounts{
+				color:red
+			}
+		}
+	}
+
+	.bottom2 {
+	
+		padding: 12px 20px;
+		background-color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		margin: auto;
+
+		 
+	}
+
+
+	.progress-bar2 {
+			text-align: center;
+			margin-top: 20px;
+
+		/deep/.u-circle-progress {
+		//	margin-left: 23.3% !important;
+			position: relative;
+
+		}
+
+		.u-progress-content {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+		}
+
+
+		.u-progress-dot {
+			width: 16rpx;
+			height: 16rpx;
+			border-radius: 50%;
+			background-color: #fb9126;
+		}
+
+		.u-progress-info {
+			display: block;
+			@include themeify{
+				font-size: themed('font-size11');   
+			}
+/*			font-size: 32px;*/
+			padding-left: 16rpx;
+			letter-spacing: 2rpx;
+			color: rgba(51, 51, 51, 100);
+
+			.progress-text {
+				@include themeify{
+					font-size: themed('font-size2');   
+				}
+/*				font-size: 14px;*/
+				text-align: center;
+				color: #666666;
+			}
+		}
+
+		/deep/.u-progress-dot[data-v-05b104e0] {
+			display: none;
+		}
+
+		/deep/.u-circle-progress[data-v-cab6fc66] {
+			margin: 30px;
+		}
+
+	}
+
+	.time-price {
+		display: flex;
+		justify-content: space-between;
+		padding: 0 65px;
+
+		.item-num {
+/*			height: 33px;*/
+			color: rgba(51, 51, 51, 100);
+			@include themeify{
+				font-size: themed('font-size7');   
+				height:themed('font-size12')
+			}
+/*			font-size: 24px;*/
+			text-align: center;
+		}
+
+		.item-text {
+			eight: 20px;
+			color: rgba(153, 153, 153, 100);
+			@include themeify{
+				font-size: themed('font-size2');   
+			}
+/*			font-size: 14px;*/
+			text-align: center;
+		}
+	}
+
+	// .bottom {
+	// 	background-color: #fff;
+	// 	display: flex;
+	// 	width: 91.4%;
+	// 	padding: 0 16px;
+	// 	margin:0 auto 40px;
+
+	// 	.u-size-default {
+	// 		border: 1px solid rgba(0, 185, 98, 100);
+	// 		color: #00b962;	
+	// 		width: 44%;
+	// 	}
+	// }
+
+// 反馈
+.feedback{
+	padding: 20px 36px ;
+	.title-1{
+		color: rgba(16, 16, 16, 100);
+		font-size: 18px;
+	}
+	.title-2{
+		color: rgba(102, 102, 102, 100);
+		margin-top: 8px;
+		line-height: 20px;
+	}
+	textarea{
+		margin-top: 16px;
+		width: 93.5%;
+		height: 100px;
+		background-color: rgba(228, 228, 228, 100);
+		color: rgba(153, 153, 153, 100);
+		font-size: 16px;
+		border-radius: 12px;
+		padding: 12px;
+		line-height: 23px;
+		
+	}
+	.submit{
+		height: 44px;
+		line-height: 26px;
+		border-radius: 50px;
+		background-color: rgba(0, 185, 98, 100);
+		color: rgba(255, 255, 255, 100);
+		font-size: 18px;
+		margin-top: 16px;
+	}
+}
+
+
+</style>
+
+
+
+<style lang="scss" scoped>
+	page {
+		background-color: #f6f8f8;
+		padding-bottom: 60px;
+	}
+.to-recharge{
+	position: absolute;
+	right: 22px;
+	color: #333333
+}
+	// 充电状态
+	.charge-state {
+		
+		width: 100%;
+		
+
+
+	}
+
+	// 充电信息
+	.charge-info {
+		background-color: #ffffff;
+		width: 88.2%;
+		padding: 20px 10px 4px 7px;
+		margin: 24px auto 0;
+		box-shadow: 0px 2px 8px 0px #1A095A34;
+		border-radius: 12px;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+
+		.info-item {
+			width: 33%;
+			text-align: center;
+			margin-bottom: 14px;
+
+			.content {
+				line-height: 33px;
+				color: rgba(51, 51, 51, 100);
+				font-size: 24px;
+                font-weight: 550;
+			}
+
+			.name {
+				line-height: 22px;
+				color: rgba(119, 119, 119, 100);
+				font-size: 16px;
+
+			}
+		}
+	}
+
+	//其他信息
+	.else-infos {
+		padding: 0 12px;
+		background-color: #ffffff;
+		width: 88.2%;
+		margin: 16px auto 0;
+		border-radius: 12px;
+		.item{
+			display: flex;
+			justify-content: space-between;
+			line-height: 23px;
+			padding: 10px 0 10px 0;
+			border-bottom: 1px solid #E9EBEE;
+			.title{
+				// width: 100px;
+				width: 26.6vw;
+				color: rgba(16, 16, 16, 100);
+				font-size: 18px;
+				font-weight: 550;
+				.time{
+					font-size: 13px;
+					color: #666666 100%;
+					font-weight: normal;
+				}
+			}
+			.detail{
+				// width: 197px;
+				width: 52.5vw;
+				color: rgba(16, 16, 16, 100);
+				font-size: 16px;
+				text-align: right;
+				.electrovalence{
+					.num{
+						color: rgba(255, 61, 0, 100);
+						margin-right: 4px;
+					}
+				}
+				
+				.electrovalence-monthlyCard{
+					font-size: 14px;
+					color: #959595;
+				}
+			}
+			
+		}
+
+	}
+	// 底部按钮
+	.bottom{
+		background:white ;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		display: flex;
+		padding: 12px 24px;
+		padding-bottom: 12px;
+		    z-index: 999;
+		.img-box{
+			width: 48px;
+			height: 48px;
+			padding: 12px 0;
+			background-color: rgba(210, 215, 213, 100);
+			text-align: center;
+			border-radius: 999px;
+			
+			img{
+				
+			}
+		}
+		button{
+			width: 60.8%;
+			background-color: black;
+			color: #fff;
+			height: 48px;
+			border-radius: 50px;
+			font-size: 18px;
+		}
+	}
+</style>

+ 1489 - 1451
pages/searchPile/stationAndPile/stationDetails.vue

@@ -1,1458 +1,1496 @@
-<template>
-	<view style="padding-bottom: 28px;">
-		<ujp-navbar title="站点详情">
-			<view slot="right" style="margin-right: 10px;">
-				<span  style="font-size: 16px; color: rgb(96, 98, 102);" @click="getChargingStationDetail">刷新</span>
-			</view>
-		</ujp-navbar>
-		 
-		<view v-if="stationDetail.station!=null"  class="station-details">
-			<u-image border-radius='15rpx'  v-if="stationDetail.station != null && stationDetail.station.image != null" class="img" 
-			width="30.6%" height="75px" 
-			:src="stationDetail.station.image" loading-icon="photo" @click="previewImage(stationDetail.station.image)"></u-image>			
-			<view class="station-name" >
-				{{stationDetail.station.name}}
-			</view>
-			
-			<view class="details-item" style="margin-top: 16px;">
-				<view class="iconfont font5" :style="stationDetail.station.type.indexOf('1')>=0?(stationDetail.station.type.indexOf('2')>=0?'color: #00BAC8;':'color: #9d9fff;'):('color: #00b962;')">&#xe60a;</view> 
-<!--				style="color: #00b962;"-->
-				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;" >{{(stationDetail.station.type.indexOf('1')>=0?'直流快充':'')}}{{(stationDetail.station.type.indexOf(',')>=0?'/':'')}}{{(stationDetail.station.type.indexOf('2')>=0?'交流慢充':'')}}</view>
-			</view>
-			<view class="details-item" >
-				<view class="iconfont font5" style="color: #4e94ff;">&#xe60e;</view> 
-				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;" >
-					{{stationDetail.station.distance!=null&&stationDetail.station.distance>0.1 ? stationDetail.station.distance.toFixed(1)+'公里':'小于100米'}}
-					<span style="font-size: 12px;
-							color: #5c95f8;
-							margin-left: 10px;" @click="getPoint()">重新定位</span>
-				</view>
-			</view>
-			 <view class="details-item" v-if="stationDetail.station.describe">
-				<view class="iconfont font5" style="color: #ffad79;">&#xe621;</view>
-				 <view class="item-text oldTextjp2" oldstyle="font-size: 16px;" >
-				 {{stationDetail.station.describe}}</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;" >
-					{{stationDetail.station.address}}
-				</view>
-				<!--
-				<view class="address-font">
-					<view class="iconfont">
-						&#xe60c;
-					</view>
-					<view  class="view-map" >
-						查看地图
-					</view>
-				</view>
--->
-
-				<view class="address-box">
-					<view class="iconfont address-font" >
-							&#xe60c;
+<template>
+	<view style="padding-bottom: 28px;">
+		<ujp-navbar title="站点详情">
+			<view slot="right" style="margin-right: 10px;">
+				<span style="font-size: 16px; color: rgb(96, 98, 102);" @click="getChargingStationDetail">刷新</span>
+			</view>
+		</ujp-navbar>
+
+		<view v-if="stationDetail.station!=null" class="station-details">
+			<u-image border-radius='15rpx' v-if="stationDetail.station != null && stationDetail.station.image != null"
+				class="img" width="30.6%" height="75px" :src="stationDetail.station.image" loading-icon="photo"
+				@click="previewImage(stationDetail.station.image)"></u-image>
+			<view class="station-name">
+				{{stationDetail.station.name}}
+			</view>
+
+			<view class="details-item" style="margin-top: 16px;">
+				<view class="iconfont font5"
+					:style="stationDetail.station.type.indexOf('1')>=0?(stationDetail.station.type.indexOf('2')>=0?'color: #00BAC8;':'color: #9d9fff;'):('color: #00b962;')">
+					&#xe60a;</view>
+				<!--				style="color: #00b962;"-->
+				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;">
+					{{(stationDetail.station.type.indexOf('1')>=0?'直流快充':'')}}{{(stationDetail.station.type.indexOf(',')>=0?'/':'')}}{{(stationDetail.station.type.indexOf('2')>=0?'交流慢充':'')}}
+				</view>
+			</view>
+			<view class="details-item">
+				<view class="iconfont font5" style="color: #4e94ff;">&#xe60e;</view>
+				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;">
+					{{stationDetail.station.distance!=null&&stationDetail.station.distance>0.1 ? stationDetail.station.distance.toFixed(1)+'公里':'小于100米'}}
+					<span style="font-size: 12px;
+							color: #5c95f8;
+							margin-left: 10px;" @click="getPoint()">重新定位</span>
+				</view>
+			</view>
+			<view class="details-item" v-if="stationDetail.station.describe">
+				<view class="iconfont font5" style="color: #ffad79;">&#xe621;</view>
+				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;">
+					{{stationDetail.station.describe}}
+				</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;">
+					{{stationDetail.station.address}}
+				</view>
+		
+				<view class="address-box">
+					<view class="iconfont address-font">
+						&#xe60c;
+
+					</view>
+					<view class="view-map" style="text-align: center;">导航</view>
+				</view>
+
+
+			</view>
+		</view>
+
+		<view class="tabs-box">
+			<u-tabs inactive-color="#888888" active-color="#101010" :list="list" :is-scroll="true" :current="current"
+				@change="change"></u-tabs>
+		</view>
+		<view class="charging-gun" v-if="stationDetail.devices&&current==0">
+			<view v-for="(device,index) in stationDetail.devices" :key="index">
+				<template v-for="(item,i) in device.gunList">
+					<view class="item" :style="item.open?'':'  border-bottom: 1px solid rgba(238, 242, 240, 100);'"
+						:key="i+'_'+index">
+
+						<view
+							:style="item.workStatusText.length>3?' padding: 0 10px':(item.workStatusText.length==3?'padding: 4px;font-size:24rpx':'padding: 10px;')"
+							:class="{
+						free:true,
+						charging:item.enableShare&&item.workStatus!=0,
+						'not-open':!device.online,
+						'not-open2':item.enableShare&&!item.enableShareWithinTime&&device.online
+						
+					}">
+							{{item.workStatusText}}
+						</view>
+						<view class="info">
+							<view class="name oldTextjp" oldstyle="font-size: 20px;line-height: 23px;">
+								{{item.sortNo}}号/{{device.name}}{{device.gunList.length>1?'枪'+item.channelNo:''}}
+							</view>
+							<view class="details oldTextjp2" @click="setOpen(item)"
+								oldstyle="font-size: 16px;line-height:16px;">
+								<text :style="device.type=='1' ? 'color:#CA9DFF':'color:#00B962'"
+									style="margin-right:1px;">{{device.interfaceType}}{{device.chargingType}}</text> |
+								<text
+									style="margin-left: 1px;">{{device.chargingPower!=null?device.chargingPower+'kW':''}}
+									<text class="iconfont">{{item.open?'&#xe62c;':'&#xe607;'}}</text></text>
+
+
+							</view>
+						</view>
+
+						<template v-if="item.enableShare&&item.enableShareWithinTime&&device.online">
+
+							<view class="tag" v-if="item.workStatus != 2 ">
+								<view class="tag-item" @click="book(item,item.isAppointment)"
+									:class="item.isAppointment?'':'not-open-tag'">
+									预约
+								</view>
+								<view class="tag-item" @click="book2(item,item.enableShare&&item.enableShareWithinTime)"
+									:class="item.enableShare&&item.enableShareWithinTime?'':'not-open-tag'">
+									充电
+								</view>
+							</view>
+
+						</template>
+						<view class="persent" v-if="item.workStatus == 2 ">
+							{{item.soc?'电量:'+( item.soc.toFixed(0))+'%':item.workStatusText}}
+
+						</view>
+
+
+
+					</view>
+					<view :key="i+'_aa'+index" class="open-time" v-show="item.open">
+						<table>
+							<tr>
+								<td>开放充电时段:</td>
+
+
+								<td v-if="!item.enableShare||!(item.sharedWeekSettingList&&item.sharedWeekSettingList.length)">充电功能未开放</td>
+
+
+								<template v-else v-for="(time,index) in  item.sharedWeekSettingList">
+
+									<td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
+
+								</template>
+
+							</tr>
+							<template  v-if="item.enableShare" v-for="(time,index) in  item.sharedWeekSettingList">
+
+								<tr :key="index" v-if="index==1">
+									<td></td>
+									<td>{{time.startTime}}-{{time.endTime}}</td>
+								</tr>
+
+							</template>
+
+
+						</table>
+
+						<table>
+							<tr>
+								<td>开放预约时段:</td>
+
+
+								<td v-if="!item.enableAppointment||!(item.reserveWeekSettingList&&item.reserveWeekSettingList.length)">预约功能未开放
+								</td>
+								<template v-else v-for="(time,index) in  item.reserveWeekSettingList">
+									<td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
+								</template>
+							</tr>
+							<template  v-if="item.enableAppointment" v-for="(time,index) in  item.reserveWeekSettingList">
+
+								<tr :key="index" v-if="index==1">
+									<td></td>
+									<td>{{time.startTime}}-{{time.endTime}}</td>
+								</tr>
+
+							</template>
+
+
+						</table>
+
+
+					</view>
+				</template>
+
+			</view>
+
+
+		</view>
+
+		<view class="price-explain" :class="{
+			'elderMode':elderMode
+		}" v-show="current==1">
+			<!-- <u-cell-group>
+				<u-cell-item
+				
+				 @click="priceDetail(1,item.deviceId)"  :title="item.deviceName" :label="'当前时段:'+item.startTime+'~'+item.endTime+'  '+item.costPrice+'元/度(含电费'+item.electricityPrice+'元/度+服务费'+item.servicePrice+'元/度'"></u-cell-item>
+			
+ 					<u-cell-item :arrow="false" v-if="false" title="停车费用" value="充电免停2小时停车费(临牌车不享受免停)"></u-cell-item>
+				</u-cell-group> -->
+			<view class="main">
+
+
+
+				<view style="width: 100%;">
+					<view>
+						<u-line color="#999999" />
+					</view>
+					<view class="time-frame" v-for="(item,i) in pricesInfo" :key="i">
+						<view class="time-items">
+							<view class="time-price">
+								<view class="time">
+									{{item.startTime}}-{{item.endTime}}
+								</view>
+								<view class="price">
+									<text class="price-text">{{item.costPrice.toFixed(2)}}</text>
+									<text class="unit">元/度</text>
+								</view>
+							</view>
+							<view class="unitPrice-serviceCharge">
+								充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:{{item.servicePrice.toFixed(2)}}元
+							</view>
+							<view v-if="item.current" class="product_tip">
+								<view class="product_tip_bg"></view>
+								<p>当前</p>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+
+
+		</view>
+		<u-divider color="#B6BDC3" style="margin-top:20px;" bg-color="#F2F4F4">已经到底了</u-divider>
+
+		<!-- 弹窗 -->
+		<view>
+			<u-modal v-model="show" confirm-text="去看空闲桩" cancel-text="查看处罚规则" confirm-color="#00B962">
+				<view class="" style="padding: 15px 20px;">
+					因您近期存在预约超时未前往充电的违约行为,平台为保证每位车主的合理权益,
+					对您作出停用预约充电功能1天的处罚。
+					您可于<span style="color: #00b962;">2022年6月20日09时45分</span>后使用此功能。
+				</view>
+			</u-modal>
+
+		</view>
+
+
+
+
+
+	</view>
+</template>
+
+<script>
+	import * as indexAPI from '@/apis/index.js'
+	import * as WxJsApi from '@/utils/wxJsApi.js'
+	import MapLoader from '@/utils/AMap'
+
+	import * as api from "@/apis/site.js"
+	let _self;
+
+
+	export default {
+
+		data() {
+			return {
+				stationId: '',
+				pricesInfo: [],
+				devicesId: '',
+				elderMode: false,
+				userId: '',
+				show: false,
+				list: [{
+						"name": "充电桩"
+					},
+					{
+						"name": "价格说明"
+					}
+				],
+				current: 0,
+				currentPos: {
+					/*						name:'荆鹏软件园充电站',
+											longitude: 112.28468,
+											latitude: 30.307094,*/
+				},
+				station: {},
+				stationDetail: {
+
+					devices: [],
+					slowPrice: null,
+					station: null,
+					fastPrice: null
+
+				},
+
+				info: {
+					station: {
+
+						time: '周一到周日 07:00~22:00(节假日除外)',
+						/*						id:1,
+												name:'荆鹏软件园充电站',
+												longitude: 112.28468,
+												latitude: 30.307094,
+												type:'交流慢充',
+												distance:0.1,
+												address:'湖北省荆州市沙市区江津东路附155号'*/
+					},
+					prices: [
+
+					],
+					park: {
+						price: '2小时免费停车'
+					},
+					priceList: [],
+					devices: {
+						idleNum: 1,
+						total: 6,
+						items: [
+
+						]
+					}
+				}
+			}
+		},
+		onLoad(op) {
+			_self = this;
+
+			//			document.getElementsByTagName('body')[0].style.setProperty('--mode',1)
+		 
+
+			if (op != null) {
+
+				if (op.id != null && op.id != undefined) {
+					this.stationId = op.id;
+
+					this.getPriceList(op.id)
+				
+					this.getChargingStationDetail()
+				}
+				
+			}
+		},
+		onReady() {
+			this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
+
+			if (this.elderMode)
+				this.theme('elder')
+			else
+				this.theme('standard')
+
+			if (this.carhelp.getPersonInfo()) {
+				this.userId = this.carhelp.getPersonInfo().id;
+
+			}
+			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
+				// //(res)
+			}).catch(error => {
+				//(res)
+			})
+
+		},
+		methods: {
+			getChargingStationDetail() {
+				var _self = this;
+				uni.showLoading({
+
+				})
+				let data = {
+					stationId: this.stationId
+				};
+				api.getChargingStationDetail(data).then(function(res) {
+					uni.hideLoading()
+				
+					if (res && res.result && res.data) {
+
+						let data = res.data;
+
+						_self.stationDetail = data;
+						var totalNum=0;
+						for(var  i in _self.stationDetail.devices ){
+							var device=_self.stationDetail.devices[i]
+							totalNum+=device.gunList.length
 							
-					</view>
-					<view class="view-map" style="text-align: center;">导航</view>
-				</view>
-			
-				
-			</view>
-		</view> 
-		
-		<view class="tabs-box">
-			<u-tabs  inactive-color="#888888" active-color="#101010" :list="list" :is-scroll="true"
-					:current="current" @change="change"></u-tabs>
-		</view>
-		<view class="charging-gun" v-if="stationDetail.devices&&current==0">
-			<view   v-for="(device,index) in stationDetail.devices" :key="index">
-			<template  v-for="(item,i) in device.gunList" >
-			<view class="item" 
-			 :style="item.open?'':'  border-bottom: 1px solid rgba(238, 242, 240, 100);'"
-			 
-			 :key="i+'_'+index"  >
-					
-					<view 
-					:style="item.workStatusText.length>3?' padding: 0 10px':(item.workStatusText.length==3?'padding: 4px;':'padding: 10px;')"
-					:class="{
-						free:true,
-						charging:item.enableShare&&item.workStatus!=0,
-						'not-open':!(item.enableShare&&device.online)
-						
-					}">
-						{{item.workStatusText}}
-					</view>
-					<view class="info">
-						<view class="name oldTextjp"  oldstyle="font-size: 20px;line-height: 23px;">
-						{{item.sortNo}}号/{{device.name}}{{device.gunList.length>1?'枪'+item.channelNo:''}}
-						</view>
-						<view class="details oldTextjp2" @click="setOpen(item)"  oldstyle="font-size: 16px;line-height:16px;">
-							<text :style="device.type=='1' ? 'color:#CA9DFF':'color:#00B962'" style="margin-right:1px;">{{device.interfaceType}}{{device.chargingType}}</text> |
-							<text style="margin-left: 1px;">{{device.chargingPower!=null?device.chargingPower+'kW':''}}  <text class="iconfont"  >{{item.open?'&#xe62c;':'&#xe607;'}}</text></text>			
-						  
-					 
-						</view>
-					</view>
-					
-					<template v-if="item.enableShare&&device.online">
-						
-						<view class="tag" v-if="item.workStatus != 2 ">
-							<view class="tag-item"    @click="book(item,item.isAppointment&&item.enableAppointment)" :class="item.isAppointment&&item.enableAppointment?'':'not-open-tag'">
-								预约
-							</view>
-							<view class="tag-item"  @click="book2(item,item.enableShare)"   :class="item.enableShare?'':'not-open-tag'" >
-								充电
-							</view>
-						</view>
-						
-					</template>
-					<view class="persent" v-if="item.workStatus == 2 ">
-						{{item.soc?'电量:'+( item.soc.toFixed(0))+'%':item.workStatusText}}
-					
-					</view>
-				
-					
-				
-			</view>
-				<view  :key="i+'_aa'+index" class="open-time" v-show="item.open">
-					<table>
-						<tr>
-							<td>开放充电时段:</td>
-							
-							 
-								<td v-if="!item.sharedWeekSettingList||item.sharedWeekSettingList.length==0">充电功能未开放</td>
-							
-							
-								<template v-for="(time,index) in  item.sharedWeekSettingList" >
-									
-									<td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
-									
-								</template>
-							 
-						</tr>
-						<template v-for="(time,index) in  item.sharedWeekSettingList" >
-							
-							<tr :key="index" v-if="index==1">
-								<td></td>
-								<td>{{time.startTime}}-{{time.endTime}}</td>
-							</tr>
-							
-						</template>
-													 
-						
-					</table>
-					
-					<table>
-						<tr>
-							<td>开放预约时段:</td>
-							
-							 
-								<td v-if="!item.reserveWeekSettingList||item.reserveWeekSettingList.length==0">预约功能未开放</td>
-							
-							
-								<template v-for="(time,index) in  item.reserveWeekSettingList" >
-									
-									<td :key="index" v-if="index==0">{{time.startTime}}-{{time.endTime}}</td>
-									
-								</template>
-							 
-						</tr>
-						<template v-for="(time,index) in  item.reserveWeekSettingList" >
-							
-							<tr :key="index" v-if="index==1">
-								<td></td>
-								<td>{{time.startTime}}-{{time.endTime}}</td>
-							</tr>
-							
-						</template>
-													 
-						
-					</table>
-					
-					 
-					</view>
-				</template>
-			
-			</view>
-			
-			
-		</view>
-		
-		<view class="price-explain" 
-		:class="{
-			'elderMode':elderMode
-		}"
-		v-show="current==1" >
-			<!-- <u-cell-group>
-				<u-cell-item
-				
-				 @click="priceDetail(1,item.deviceId)"  :title="item.deviceName" :label="'当前时段:'+item.startTime+'~'+item.endTime+'  '+item.costPrice+'元/度(含电费'+item.electricityPrice+'元/度+服务费'+item.servicePrice+'元/度'"></u-cell-item>
-			
- 					<u-cell-item :arrow="false" v-if="false" title="停车费用" value="充电免停2小时停车费(临牌车不享受免停)"></u-cell-item>
-				</u-cell-group> -->
-				<view class="main">
-					
-			
-				
-					<view style="width: 100%;">
-						<view ><u-line color="#999999" /></view>
-						<view  class="time-frame"  v-for="(item,i) in pricesInfo" :key="i">
-							<view class="time-items">
-								<view class="time-price">
-									<view class="time">
-										{{item.startTime}}-{{item.endTime}}
-									</view>
-									<view class="price">
-										<text  class="price-text">{{item.costPrice.toFixed(2)}}</text>
-										<text class="unit">元/度</text>
-									</view>
-								</view>
-								<view class="unitPrice-serviceCharge">
-								充电单价:{{item.electricityPrice.toFixed(2)}}元 | 服务费:{{item.servicePrice.toFixed(2)}}元
-								</view>
-								<view v-if="item.current" class="product_tip">
-									<view class="product_tip_bg"></view>
-									<p>当前</p>
-								</view>
-							</view> 
-						</view>
-						
-					</view>
-				</view>
-				
-			
-		</view>
-		<u-divider color="#B6BDC3" style="margin-top:20px;" bg-color="#F2F4F4">已经到底了</u-divider>
-		
-		<!-- 弹窗 -->
-		<view>
-			<u-modal v-model="show"   confirm-text="去看空闲桩" cancel-text="查看处罚规则"
-			confirm-color="#00B962">
-			<view class="" style="padding: 15px 20px;">
-				因您近期存在预约超时未前往充电的违约行为,平台为保证每位车主的合理权益,
-				对您作出停用预约充电功能1天的处罚。
-				您可于<span style="color: #00b962;">2022年6月20日09时45分</span>后使用此功能。
-			</view>
-			</u-modal>
-			
-		</view>
-		
-		  
-		
-		 
-	 
-	</view>
-</template>
-
-<script>
-	import * as indexAPI from '@/apis/index.js'
-	import * as WxJsApi from '@/utils/wxJsApi.js'
-	import MapLoader from '@/utils/AMap'
-	
-	import * as api from "@/apis/site.js"
-	let _self;
-	 
-	
-	export default {
- 
-		data() {
-			return {
-				stationId:'',
-				pricesInfo:[],
-				devicesId:'',
-				elderMode:false,
-				userId:'',
-				show:false,
-				list:[
-					{"name":"充电桩"},
-					{"name":"价格说明"}
-				],
-				current: 0,
-				currentPos:{
-/*						name:'荆鹏软件园充电站',
-						longitude: 112.28468,
-						latitude: 30.307094,*/					
-				},
-				station:{},
-				stationDetail:
-				{
-					
-					devices:[],
-					slowPrice:null,
-					station:null,
-					fastPrice:null
-					
-				   },
-				
-				info:{
-					station:{
-						
-						time:'周一到周日 07:00~22:00(节假日除外)',
-/*						id:1,
-						name:'荆鹏软件园充电站',
-						longitude: 112.28468,
-						latitude: 30.307094,
-						type:'交流慢充',
-						distance:0.1,
-						address:'湖北省荆州市沙市区江津东路附155号'*/
-					},
-					prices: [
-							
-						]	 ,
-					park:{ 
-						price:'2小时免费停车'
-					},
-					priceList:[],
-					devices:{
-						idleNum:1,
-						total:6,
-						items:[
-
-						]
-					}
-				}
-			}
-		},
-		onLoad(op){
-			_self = this;
-			
-//			document.getElementsByTagName('body')[0].style.setProperty('--mode',1)
-			_self.processStationsInfo();
-				 
-			if(op!=null){
-				
-				if(op.id != null && op.id != undefined){ 
-					this.stationId=op.id;	
-					
-					this.getPriceList(op.id)
-						//if(station.distance != null)
-						//	_self.stationDetail.station.distance = station.distance;
-						////('station'+JSON.stringify(station))
-						//_self.station = station; 
-						this.getChargingStationDetail()
-				}
-				if(op.station != null){
-					let station = JSON.parse(decodeURIComponent(op.station))
-					let data = {stationId:station.id};
-					if(station.distance != null)
-						_self.stationDetail.station.distance = station.distance;
-					//('station'+JSON.stringify(station))
-					_self.station = station; 
-					api.getChargingStationDetail(data).then(function(res){
-						//('站点详情'+JSON.stringify(res))
-						//this.info.st
-						if(res && res.result)
-						{
-							if(res.data){
-								let data = res.data;
-								data.station.distance = station.distance;
-								_self.stationDetail = data;
-								_self.processStationsInfo();							
-//								//('data'+JSON.stringify(data)); 
-							}
-							
-						}
-						
-					})
-					/*api.getChargingStationPrice(data).then(function(res){
-						if(res.result){
-							let data = res.data;
-							if(data.prices){
-								_self.list = [];
-								for(let i = 0;i< data.prices.length;i++){
-									let _item = data.prices[i];
-									let item = {name:data.prices[i].name,items:[]};
-									for(let j = 0;j<_item.priceList.length;j++){
-										let _subitem = _item.priceList[j];
-										let subitem = {time:'00:00-07:00',single_price:0.5,service_price:0.25,price:0.75};
-										subitem.time = _subitem.startTime + '-'+_subitem.endTime;
-										subitem.single_price = _subitem.electricityPrice;
-										subitem.service_price = _subitem.servicePrice;
-										subitem.price = _subitem.costPrice;
-										item.items.push(subitem);
-									}
-									_self.priceList.push(item);
-								}
-								//('站点价格详情'+JSON.stringify(list));
+							for (let j = 0; j < device.gunList.length; j++) {
 								
+								device.gunList[j].open = false;
 							}
-						}
-					})*/
-					//this.info.station = station;
-					//('stationDetail onLoad'+JSON.stringify(station))					
-				} 
-			}
-		},
-		onReady(){
-			this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
-			
-			if(this.elderMode)
-				this.theme('elder')
-			else
-				this.theme('standard')
-				
-			if (this.carhelp.getPersonInfo()) {
-				this.userId = this.carhelp.getPersonInfo().id;
-						
-			}
-			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
-				// //(res)
-			}).catch(error => {
-				//(res)
-			})
-			 
-		},
-		methods:{
-			getChargingStationDetail(){
-				var _self = this;
-				uni.showLoading({
-					
-				})
-				let data = {stationId:this.stationId};
-				api.getChargingStationDetail(data).then(function(res){
-					uni.hideLoading()
-				//							//('站点详情'+JSON.stringify(res))
-											//this.info.st
-											if(res && res.result)
-											{
-												if(res.data){
-													let data = res.data;
-													//data.station.distance = station.distance;
-													
-													_self.stationDetail = data;
-													
-													if(_self.stationDetail.station){
-														_self.list[0].name="充电桩("+_self.stationDetail.station.totalNum+")"
-													}
-													_self.processStationsInfo();							
-													if(_self.stationDetail.station.distance == null){
-														_self.getPoint();
-													}
-					//								//('data'+JSON.stringify(data)); 
-												}
-												
-											}
-											
-										})
-			},
-			setOpen(item){
-				
-				if(item.open){
-					item.open=false;
-					
-				}else{
-					item.open=true
-				}
-				this.$forceUpdate()
-			},
-			getItem(item,device){
-				
-				return !device.online?('离线'):(item.enableShare&&device.online?item.workStatusText:'暂不开放')
-			},
-			change(index) {
-				this.current = index;
-				this.items = this.list[index].items;
-			},
-			previewImage(img){
-				let imgs = [];
-				imgs.push(img);
-				uni.previewImage({
-					urls:imgs,
-					current:0
-				})
-			},
-			book2(item,bl){
-				if(bl){
-					
-				}else{
-					return
-				}
-				uni.navigateTo({
-					url:'/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id='+item.gunNo,
-				})
-				////('book'+JSON.stringify(item))
-			},
-			book(item,bl){
-				if(bl){
-					
-				}else{
-					uni.showToast({
-						title:'当前设备不可预约'
-					})
-					return
-				}
-				uni.navigateTo({
-					url:'/pages/searchPile/apointment/apointmentRecharge?id='+item.gunNo,
-				})
-				////('book'+JSON.stringify(item))
-			},
-			getPoint() {
-				 
-	//			//('getPoint')
-				WxJsApi.getLocation().then((res) => {
-					
-					var latitude = parseFloat(res.latitude);
-					var longitude = parseFloat(res.longitude);
-					var startLngLat = {longitude: longitude,latitude: latitude};
-					var endLngLat = {longitude: _self.stationDetail.station.longitude,latitude: _self.stationDetail.station.latitude};
-					_self.calculateDistance(startLngLat,endLngLat);
-					
-					/*uni.showToast({
-						title:'getPoint'+JSON.stringify(res)
-					})*/
-					////('当前位置' +JSON.stringify(data))
-					
-					//this.latitude2 = latitude;
-					//this.longitude2 = longitude;
-					/*uni.showToast({
-						title:JSON.stringify(res)
-					})*/
-					//this.message=JSON.stringify(res)
-				}).catch(error => {
-					uni.showToast({
-						title:error//'getPoint'+JSON.stringify()
-					})					
-				})
-			},
-			calculateDistance(startLngLat,endLngLat){
-					var _this = this;
-					//直线距离
-					MapLoader().then(AMap1 => {
-						var lnglat = new AMap.LngLat(startLngLat.longitude,startLngLat.latitude);
-						 var myDistance = lnglat.distance([endLngLat.longitude, endLngLat.latitude]);
-						_self.stationDetail.station.distance = myDistance/1000;
-						_self.stationDetail.station.time = myDistance/500;
-					})
-			
-				//
-				 return
-				 //驾车距离
-				var _this = this;
-				MapLoader().then(AMap1 => {
-					
-					this.AMap=AMap;
-				
-					var map=new AMap.Map("container", {
-						center: [116.397559, 39.89621],
-						zoom: 14
-					});  
-					var lnglat = new AMap.LngLat(117.186602, 34.261579);
-					 
-					//AMap.Walking
-					 AMap.plugin('AMap.Driving', function() {
-					  var driving = new AMap.Driving({
-					    // 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
-					    policy: AMap.DrivingPolicy.LEAST_TIME
-					  })
- 			  
-					 //var startLngLat = [116.379028, 39.865042]
-					 //var endLngLat = [116.427281, 39.903719]
-					 var startLngLat2 = [startLngLat.longitude, startLngLat.latitude]
-					 var endLngLat2 = [endLngLat.longitude, endLngLat.latitude]
-					 					
-					 
-					  driving.search(startLngLat2, endLngLat2, function (status, result) {
-							//(result)
-							//(result.routes[0].time)//秒
-							//(result.routes[0].distance)//米
-							_self.stationDetail.station.distance = result.routes[0].distance/1000;
-							_self.stationDetail.station.time = result.routes[0].time/60;
-							 
-					  })
-					  
-					})
-					
-				
-				}, e => {
-					//_this.mui.toast('地图加载失败');
-					//('地图加载失败', e)
-					console.log(e)
-				})
-			},
-			getScanCode() {
-				if (this.userId) {
-					WxJsApi.scanQRCode(1).then(res => {
-						if(res) {
-							indexAPI.scanCode(res).then((response) => {
-						
-							}).catch(error => {
-								uni.showToast({
-									title: 'scanQRCode'+error,
-									icon: "none"
-								})
-							})
-						}
-					}).catch(error => {
-			
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			getPriceList(id){
-				var formatNum=function(num) {
-					let res = Number(num);
-					return res < 10 ? '0' + res : res;
-				};
-				let data = {stationId:id};
-				api.getChargingStationPrice(data).then((res)=>{
-					
-					if(res.data.prices.length){
-						
-						let date = new Date();
-						let hours = date.getHours();
-						let minutes = date.getMinutes();
-						let seconds = date.getSeconds();
-						let date_str =  formatNum(hours)+ ':'+ formatNum(minutes);//+ ' ' +formatWeek;
-						
-						
-						this.pricesInfo=res.data.prices[0].priceList
-						console.log(this.pricesInfo)
-						
-						for(var i in this.pricesInfo ){
-							var obj=this.pricesInfo[i]
 							
-							if(date_str>=obj.startTime &&  date_str<= obj.endTime)
-							{
-								obj.current = true;										
-							}
-							
-						}
-					}
-					
-				})
-			},
-			processStationsInfo(){
-				for(let i = 0;i <_self.stationDetail.devices.length;i++){
-					
-					 
-					
-					for(let j = 0;j < _self.stationDetail.devices[i].gunList.length;j++){
-						////('j'+JSON.stringify(_self.stationDetail.devices[i].gunList[j]))
-						_self.stationDetail.devices[i].gunList[j].open=false;
-					}
-					if(!_self.stationDetail.devices[i].online)
-					{
-						_self.stationDetail.devices[i].workStatus = 99;
-						_self.stationDetail.devices[i].workStatusText ='不在线';
-						continue;
-					}
-					////('device['+i.toString()+']'+JSON.stringify(_self.stationDetail.devices[i]))
-					_self.stationDetail.devices[i].workStatus = 2;
-					_self.stationDetail.devices[i].workStatusText ='充电中';
-//					//('站点详情'+JSON.stringify(_self.stationDetail.devices[i]))
-						
- 					for(let j = 0;j < _self.stationDetail.devices[i].gunList.length;j++){
-						////('j'+JSON.stringify(_self.stationDetail.devices[i].gunList[j]))
-						
-						if(_self.stationDetail.devices[i].gunList[j].workStatus == 0)
-						{
-							_self.stationDetail.devices[i].workStatus =0;
-							_self.stationDetail.devices[i].workStatusText ='空闲';
 						}
-					}
-				}
-			},
-			
-			navigate(){
-				 /*wx.openLocation({
-				     latitude: _self.station.latitude,//目的地latitude
-				     longitude: _self.station.longitude,//目的地longitude
-				     name: _self.station.name,
-				     address: _self.station.address,
-				     scale: 15//地图缩放大小,可根据情况具体调整
-				 });*/
-				 //('station'+JSON.stringify(_self.stationDetail.station))
-				 window.location.href="https://uri.amap.com/marker?position="+ _self.stationDetail.station.longitude+","+_self.stationDetail.station.latitude+"&name="+_self.stationDetail.station.name;
-				 
-			},
-			charge(){
-				 //('扫码充电')
-				//#ifdef MP-WEIXIN
-				uni.scanCode({
-					success:function(res){
-						uni.navigateTo({
-							url:'chargingPileDetails?pile='+encodeURIComponent(JSON.stringify(data))
-						})
-						
-					}
-				}) 
-				return;
-				//#endif
-				 
-				 //('扫码充电1')
-				 uni.navigateTo({
-				 	url:'chargingPileDetails'
-				 })
-				
-			},
-			priceDetail(t,id){
-				uni.navigateTo({
-					url:'chargePriceDetails?stationId='+_self.stationDetail.station.id+"&type="+t+"&id="+id
-				})
-			},
-			map(){
-				//('map'+JSON.stringify(_self.station))
-				_self.station.address = 'xxxxxxxxxxxxx'
-				//this.carhelp.set(_self.stationDetail.station.id,_self.station);
-				uni.navigateTo({
-					url:'stationDetailsMap?stationId='+_self.stationDetail.station.id
-					//url:'stationDetailsMap?station='+encodeURIComponent(JSON.stringify(_self.station))
-					 
-				})
-			},theme(type) { 
-			  if(type == 'elder')	
-			  {
- 				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
- 				  
-			  }
-			  else
-			  {
- 				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
- 				  
-			  } 
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped> 
-	@import "@/_theme.scss";
-	.qr-code{
-		font-size: 24px;
-		color: #666666;
-		position: absolute;
-		right: 16px;
-	}
-	// 站点信息
-	
-	.station-details {
-		width: 100%;
-		height: 100%;
-		padding: 16px 16px 0px;
-		background-color: #fff;
-		position: relative;
-     .img{
-		 position: absolute;
-		 top: 16px;right: 16px;
-	 }
-		.station-name {
-			//line-height: 18px;
-			color: #101010;		
-			@include themeify{
-				line-height: themed('font-size4');
-				font-weight: themed('fontWeight');
-				font-size: themed('font-size4');
-				letter-spacing: themed('letterSpacing');
-			}
-			width: 65%;
-/*			line-height: 18px;*/
- 			margin-bottom: 11px;
-		}
-
-		.details-item {
-			display: flex;
-			justify-content: start;
-			width: 100%;
-			margin-top: 8px;
-			line-height: 17px;
-
-			@include themeify{
-				font-size: themed('font-size1');
-			}
-			/*font-size: 12px;*/
-			// position: relative;
-		}
-		.font5{
-		
-			
-		}
-
-		.item-text {
-			
-			color: rgba(102, 102, 102, 100);
-			margin-left: 10px;
-			font-size: 14px;
-			// position: absolute;
-			// left: 24px;
-			// top: 1px;
-		}
-
-		.station-address {
-			width: 100%;
-			height: 40px;
-			margin-top: 14px;
-			position: relative;
-
-			img {
-				width: 100%;
-				height: 100%;
-			}
-
-			.address-text {
-
-				
-				position: absolute;
-				top: 12px;
-				left: 0;
-				@include themeify{
-					font-size: themed('font-size1');
-					line-height: themed('font-size4');
-					height: themed('font-size4');
-				}
-/*				font-size: 12px*/
-			}
-			
-			.address-box {
 						
-			/*				font-size: 28px;*/
-							color: #4e94ff;
-							position: absolute;
-							top: 0;
-							right: 0;
-							.address-font{
-								@include themeify{
-									font-size: themed('font-size8');
-								}
-							}
-			 				.view-map{
-								@include themeify{
-									font-size: themed('font-size1');
-			/*						line-height: themed('font-size2');
-									height: themed('font-size2'); */
-								}
-							}
-				
-			}
-			
-		}
-	}
-
-	// 价格详情
-	.price-details {
-		width: 100%;
-		margin-top: 12px;
-		background-color: #fff;
-		padding: 20px 15px 16px 16px;
-		position: relative;
-
-		.detail-title {
-			display: flex;
-			justify-content: space-between;
-
-			.title-left {
-				@include themeify{
-					font-size: themed('font-size3');
-				}
-/*				font-size: 16px;*/
-				color: #101010;
-			}
-
-			.title-right {
-				@include themeify{
-					font-size: themed('font-size2');
-					line-height: themed('font-size2');
-				}
-/*				font-size: 14px;
-				line-height: 14px;*/
-				color: #00b962;
-
-
-			}
-
-			.right-text {
-				@include themeify{
-					font-size: themed('font-size2');
-				}
-/*				font-size: 14px;*/
-				position: absolute;
-				top: 23px;
-				right: 36px;
-
-			}
-
-			.right-font {
-/*                width: 24px;
-				height: 24px;
-				line-height: 24px;
-				font-size: 24px;*/
-				@include themeify{
-					font-size: themed('font-size7');
-					width: themed('font-size7');
-					height: themed('font-size7');
-					line-height: themed('font-size7');
-				}
-                position: absolute;
-				top: 20px;
-				right: 12px;
-
-			}
-		}
-	.price-item{
-		padding: 16px 0;
-		display: flex;
-		border-bottom: 1px solid rgba(238, 242, 240, 100);
-		
-		.text1{
-			width: 44px;
-/*			height: 20px;
-			line-height: 20px;*/
-			border-radius: 50px;
-			background-color: rgba(0, 185, 98, 100);
-			color: rgba(255, 255, 255, 100);
-/*			font-size: 12px;*/
-			
-			@include themeify{
-				font-size: themed('font-size1');
-				height: themed('font-size5'); 
-				line-height: themed('font-size5');
-			}
-			text-align: center;
-		}
-		.text5{
-			width: 44px;
-/*			height: 20px;
-			line-height: 20px;*/
-			border-radius: 50px;
-			background-color: #9d9fff;
-			color: rgba(255, 255, 255, 100);
-			@include themeify{
-				font-size: themed('font-size1');
-				height: themed('font-size5'); 
-				line-height: themed('font-size5');
-			}
-			/*font-size: 12px;*/
-			text-align: center;
-		}
-		.text2{
-/*			width: 40px;
-			line-height: 19px;*/
-			margin-left: 8px;
-			color: rgba(255, 98, 0, 100);
-/*			font-size: 20px;*/
-			@include themeify{
-				font-size: themed('font-size5');
-				line-height: themed('font-size5');
-				width:themed('font-size15')
-			}
-			text-align: left;
-		}
-		.text3{
-			margin-left: 4px;
-			color: rgba(51, 51, 51, 100);
-/*			font-size: 16px;*/
-			@include themeify{
-				font-size: themed('font-size3');
- 			}
-			
-		}
-		.text4{
-			// margin-left: 72px;
-/*			font-size: 12px;
-			line-height: 20px;*/
-			@include themeify{
-				font-size: themed('font-size3');
-				line-height: themed('font-size5');
-			}
-			color: rgba(102, 102, 102, 100);
-		}
-	}
-	
-	.park-item{
-		padding: 16px 0;
-		display: flex;
-		justify-content: space-between;
-		.text-box{
-			display: flex;	
-		}
-		.text1{
-			width: 44px;
-			@include themeify{
-				font-size: themed('font-size1');
-				line-height: themed('font-size5');
-				height: themed('font-size5');
-			}
-/*			height: 20px;
-			line-height: 20px;*/
-			border-radius: 50px;
-			background-color: rgba(78, 148, 255, 100);
-			color: rgba(255, 255, 255, 100);
-/*			font-size: 12px;*/
-			text-align: center;	
-		}
-		.text2{
-			margin-left: 8px;
-			color: rgba(51, 51, 51, 100);
-			@include themeify{
-				font-size: themed('font-size3');
- 			}
-/*			font-size: 16px;*/
-		}
-		.text3{
-			@include themeify{
-				font-size: themed('font-size1');
-				line-height: themed('font-size5');
- 			}
-		   color: #666666;
-/*		   font-size: 12px;
-		   line-height: 20px;*/
-		}
-		
-	}
-	}
-	// 设备详情
-	.equipment-details{
-		background-color: #fff;
-		margin-top: 12px;
-		padding:16px;
-		.title{
-			display: flex;
-			justify-content: space-between;
-			.title-left{
-				@include themeify{
-					font-size: themed('font-size3');
-					height: themed('font-size3');					
-					font-weight: themed('fontWeight');
-					letter-spacing: themed('letterSpacing');
-				}
-	
-/*				height: 16px;*/
-				color: rgba(16, 16, 16, 100);
-/*				font-size: 16px;*/
-			}
-			.title-right{
-				@include themeify{
-					font-size: themed('font-size2');
-					height: themed('font-size3');
-					font-weight: themed('fontWeight');
-					letter-spacing: themed('letterSpacing');
-				}
-/*				height: 16px;
-				font-size: 14px;*/
-				.free{
-					color: #00b962;
-				}
-			}
-		}
-	.equipment-item{
-		margin-left: 52px;
-		margin-top: 20px;
-		padding-bottom: 17px;
-		border-bottom:  1px solid rgba(238, 242, 240, 100);
-		position: relative;
-		.left-font{
-			color:#00b962 ;
-			@include themeify{
-				font-size: themed('font-size13'); 
-			}
-/*			font-size: 36px;*/
-			position: absolute;
-			left: -52px;
-			top: -4px
-		}
-		.name{
-			display: flex;
-			.name-text{
-				color: #101010;
-				@include themeify{
-					font-size: themed('font-size3'); 
-					line-height: themed('font-size3'); 
-					font-weight: themed('fontWeight');
-				}
-/*				font-size: 16px;
-				line-height: 16px;*/
-			}
-		}
-		.type{
-/*			height: 17px;*/
-			color: rgba(102, 102, 102, 100);
-			@include themeify{
-				font-size: themed('font-size1'); 
-				height: themed('font-size4'); 
-			}
-/*			font-size: 12px;*/
-			margin-top: 4px;
-		}
-		.charging-gun{
-			
-			display: flex;
-			justify-content: space-between;
-			width: 100%; 
-			margin-top: 12px;
-			.iconfont{
-				color: #a5aaa8;
-				@include themeify{
-					font-size: themed('font-size5'); 
- 				}
-/*				font-size: 20px*/
-			}
-			.gun-num{
-				margin-left: 8px;
-				@include themeify{
-					font-size: themed('font-size1'); 
-					line-height: themed('font-size5'); 
-				}
-/*				font-size: 12px;
-				line-height: 20px;	*/
-				color: rgba(102, 102, 102, 100);
-			}
-			.free-state{
-				color: rgba(0, 185, 98, 100);
-				@include themeify{
-					font-size: themed('font-size1'); 
-					line-height: themed('font-size5'); 
-				}
-/*				font-size: 12px;
-				line-height: 20px;*/
-				margin-left: 12px;
-			}
-			
-			.recharge-state{
-				height: 17px;
-				color: rgba(255, 98, 0, 100);
-				@include themeify{
-					font-size: themed('font-size1'); 
-					line-height: themed('font-size5'); 
-				}
-/*				font-size: 12px;
-				line-height: 20px;*/
-				margin-left: 12px;
-			}
-		}
-	}
-	.tag-recharge{
-		
-	/*	
-		height: 16px;		
-		line-height: 15px;*/
-		@include themeify{
-			font-size: themed('font-size0'); 
-			line-height: themed('font-size2'); 
-			height: themed('font-size3'); 
-			//width: themed('font-size14');
-			min-width: 38px;
-		}
-		border-radius: 2px;
-		color: rgba(255, 98, 0, 100);
-/*		font-size: 10px;*/
-		text-align: center;
-		font-family: Arial;
-		border: 1px solid rgba(255, 98, 0, 100);
-		margin-left: 8px;
-		
-	}
-	.tag-free{
-/*		width: 28px;*/
-		@include themeify{
-			font-size: themed('font-size0'); 
-			line-height: themed('font-size2'); 
-			height: themed('font-size3'); 
-			width: themed('font-size9');
-		}		
-/*		height: 16px;
-		line-height: 15px;*/
-		border-radius: 2px;
-		color: rgba(0, 185, 98, 100);
-/*		font-size: 10px;*/
-		text-align: center;
-		font-family: Arial;
-		border: 1px solid rgba(0, 185, 98, 100);
-		margin-left: 8px;
-	}
-	}
-	// 底部
-	.bottom{
-		width: 100%;
-		height: 56px;
-		background-color: #fff;
-		position: fixed;
-		left: 0;
-		bottom: 0;
-		padding: 12px 16px;
-		display: flex;
-		justify-content: space-between;
-		z-index: 9999;
-		.button1{
-			width: 44%;
-			height: 32px;
-			border: 1px solid rgba(0, 185, 98, 100);
-			color: rgba(0, 185, 98, 100);
-/*			font-size: 14px;*/
-			@include themeify{
-				font-size: themed('font-size2'); 
-			}	
-		}
-		.button2{
-			width: 44%;
-			height: 32px;
-			border-radius: 50px;
-			background-color: rgba(0, 185, 98, 100);
-			color: rgba(255, 255, 255, 100);
-			@include themeify{
-				font-size: themed('font-size2'); 
- 			}	
-/*			font-size: 14px;*/
-			margin-left: 13px;
-		}
-		
-	}
-	
-	.buttonAppointment{
-		width: 120rpx;
-		height: 56rpx;
-		position: relative;
-		top : -10rpx;
-		right: -10rpx;
-		border-radius: 100rpx;
-		background-color: rgba(0, 185, 98, 100);
-		color: rgba(255, 255, 255, 100);
-		@include themeify{
-			font-size: themed('font-size2'); 
-		}	
-/*			font-size: 14px;*/
-		margin-left: 13px;
-	}
-	
-	.tabs-box {
-		width: 100%;
-        line-height: 87px;
-		border-bottom: 1px solid #7FDCB0;
-		margin-top: 12px;
- /deep/.u-scroll-box{
-	 width: 53.6% !important;
-	 margin: 0 auto;
-	 // background-color: #4e94ff;
-	 display: flex;
-	 
- }
-	}
-	
-	.elderMode .u-cell_title{
-		font-size: 22px;
-		font-weight: bold !important;
-		 
-		
-	}
-	.charging-gun{
-		padding-bottom: 50px;
-		background-color: #fff;
-		.item{
-			padding: 12px 0 8px 0;
-			margin: 0 16px;
-			display: flex;
-			
-			.free{
-				
-			
-				 max-width: 50px;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				background-color: rgba(228, 246, 234, 100);
-				color: rgba(0, 140, 74, 100);
-				border-radius: 8px;
-				text-align: center;
-			}
-			.charging{
-				background-color: rgba(241, 241, 241, 100);
-				color: rgba(74, 74, 74, 100);
-			}
-			
-			.not-open{
-				background-color: rgba(255, 233, 233, 100);
-				color: rgba(255, 70, 70, 100);
-				
-			}
-			.info{
-				width: 45vw;
-				margin-left: 8px;
-				.name{
-					
-					font-size: 14px;
-					line-height: 16px;
-					color: rgba(16, 16, 16, 100);
-					
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-				}
-				.details{
-					height: 16px;
-					margin-top: 8px;
-					font-size: 12px;
-					.iconfont{
-						color: #999999;
-						font-size: 16px;
-						margin-left: 4px;
-					}
-				}
-				
-			}
-			.tag{
-				width: 30%;
-				display: flex;
-				justify-content: space-around;
-				align-items: center;
-				margin-left:4px;
-				.tag-item{
-					width: 48px;
-					height: 24px;
-					line-height:24px;
-					border-radius: 50px;
-					background-color: rgba(0, 185, 98, 100);
-					color: rgba(255, 255, 255, 100);
-					text-align: center;
-					margin-left: 8px;
-				}
-				.not-open-tag{
-					background-color: rgba(192, 196, 208, 100);
-					
-				}
-				
-			}
-			.persent{
-				text-align: right;
-				font-size: 16px;
-				flex: 1;
-				
-				
-			}
-		}
-		
-	}
-	.open-time{
-		padding-top:5px;
-		border-bottom: 1px solid rgba(238, 242, 240, 100);
-		padding-left: 76px;
-		padding-bottom: 19px;
-		line-height: 18px;
-		font-size: 14px;
-		color: rgb(136, 136, 136);
-		p{
-		text-indent: 112px;
-		}
-	}
-	/deep/.u-tab-bar{
-		height: 4px !important;
-		background-color: #00b962 !important;
-		width: 50px !important;
-		left: -15px !important;
-		bottom: -5px !important;
-		
-	}
-	/deep/.u-cell__value{
-		text-align: left;
-		margin-left: 12px;
-		color: #101010;
-	}
-	/deep/.u-model__content__message{
-		line-height: 22px;
-	}
-	
-	
-	.main {
-			background-color: #fff;
-	       
-			.tabs-box {
-				width: 55%;
-				height: 88rpx;
-				margin: 0 auto;
-				// line-height: 44px;
-				position: relative;
-			}
-				.line-box{
-					width: 100%;
-					height: 88rpx;
-					position: absolute;
-					top: 145rpx;
-	 			}
-	
-			.time-frame {
-				padding-left: 32rpx;
-	/*			position: absolute;
-				top:260rpx;
-		*/		
-				.time-items {
-					padding-right: 32rpx;
-					height: 152rpx;
-					border-bottom: #F2F4F4 2rpx solid;
-	                  position: relative;
-					.time-price {
-						display: flex;
-						justify-content: space-between;
-						padding: 32rpx 0 20rpx;
-	
-						.time {
-							color: rgba(16, 16, 16, 100);
-							@include themeify{
-								font-size:themed('font-size3'); 
-							}
-	/*						font-size: 32rpx;*/
-						}
-	
-						.price {
-							.price-text{
-								color: #ff3d00; 
-								@include themeify{
-									font-size:themed('font-size4'); 
-								}
-	/*							font-size: 36rpx;*/
-							}
-							.unit {
-								color: rgba(102, 102, 102, 100);
-								@include themeify{
-									font-size:themed('font-size2'); 
-								}
-	/*							font-size: 28rpx;*/
-								margin-left: 8rpx;
-							}
-						}
-	
-					}
-	
-					.unitPrice-serviceCharge {
-						float: right;
-						@include themeify{
-							font-size:themed('font-size1'); 
-						}
-	/*					font-size: 24rpx;*/
-						color: #888888;
-					}
-				}
-			}
-		}
-		
-		
-		.product_tip{
-		  position: absolute;
-		  top: 0;
-		  right: 0;
-		  width: 55rpx;
-		  height: 55rpx;
-		  text-align: right;
-		  p{
-		    font-size: 24rpx;
-		    color: #ffffff;
-		    transform: rotate(45deg);
-		    position: relative;
-		    top: 0rpx;
-		    right: 0rpx;
-		  }
-		  .product_tip_bg{
-		    width: 0;
-		    height: 0;
-		    border-bottom: 44rpx solid #FD662A;
-		    border-right: 44rpx solid transparent;
-		    border-left: 44rpx solid transparent;
-		    transform: rotate(45deg);
-		    position: absolute;
-		    top: -7rpx;
-		    right: -29rpx;
-		  }
-		}
+						_self.list[0].name = "充电桩(" + totalNum + ")"
+						
+					 
+						if (_self.stationDetail.station.distance == null) {
+							_self.getPoint();
+						}
+					
+					}
+
+				})
+			},
+			setOpen(item) {
+
+				if (item.open) {
+					item.open = false;
+
+				} else {
+					item.open = true
+				}
+				this.$forceUpdate()
+			},
+		
+			change(index) {
+				this.current = index;
+				this.items = this.list[index].items;
+			},
+			previewImage(img) {
+				let imgs = [];
+				imgs.push(img);
+				uni.previewImage({
+					urls: imgs,
+					current: 0
+				})
+			},
+			book2(item, bl) {
+				if (bl) {
+
+				} else {
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id=' + item.gunNo,
+				})
+				////('book'+JSON.stringify(item))
+			},
+			book(item, bl) {
+				if (bl) {
+
+				} else {
+					uni.showToast({
+						title: '当前设备不可预约'
+					})
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/searchPile/apointment/apointmentRecharge?id=' + item.gunNo,
+				})
+				////('book'+JSON.stringify(item))
+			},
+			getPoint() {
+
+				//			//('getPoint')
+				WxJsApi.getLocation().then((res) => {
+
+					var latitude = parseFloat(res.latitude);
+					var longitude = parseFloat(res.longitude);
+					var startLngLat = {
+						longitude: longitude,
+						latitude: latitude
+					};
+					var endLngLat = {
+						longitude: _self.stationDetail.station.longitude,
+						latitude: _self.stationDetail.station.latitude
+					};
+					_self.calculateDistance(startLngLat, endLngLat);
+
+					/*uni.showToast({
+						title:'getPoint'+JSON.stringify(res)
+					})*/
+					////('当前位置' +JSON.stringify(data))
+
+					//this.latitude2 = latitude;
+					//this.longitude2 = longitude;
+					/*uni.showToast({
+						title:JSON.stringify(res)
+					})*/
+					//this.message=JSON.stringify(res)
+				}).catch(error => {
+					uni.showToast({
+						title: error //'getPoint'+JSON.stringify()
+					})
+				})
+			},
+			calculateDistance(startLngLat, endLngLat) {
+				var _this = this;
+				//直线距离
+				MapLoader().then(AMap1 => {
+					var lnglat = new AMap.LngLat(startLngLat.longitude, startLngLat.latitude);
+					var myDistance = lnglat.distance([endLngLat.longitude, endLngLat.latitude]);
+					_self.stationDetail.station.distance = myDistance / 1000;
+					_self.stationDetail.station.time = myDistance / 500;
+				})
+
+				//
+				return
+				//驾车距离
+				var _this = this;
+				MapLoader().then(AMap1 => {
+
+					this.AMap = AMap;
+
+					var map = new AMap.Map("container", {
+						center: [116.397559, 39.89621],
+						zoom: 14
+					});
+					var lnglat = new AMap.LngLat(117.186602, 34.261579);
+
+					//AMap.Walking
+					AMap.plugin('AMap.Driving', function() {
+						var driving = new AMap.Driving({
+							// 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
+							policy: AMap.DrivingPolicy.LEAST_TIME
+						})
+
+						//var startLngLat = [116.379028, 39.865042]
+						//var endLngLat = [116.427281, 39.903719]
+						var startLngLat2 = [startLngLat.longitude, startLngLat.latitude]
+						var endLngLat2 = [endLngLat.longitude, endLngLat.latitude]
+
+
+						driving.search(startLngLat2, endLngLat2, function(status, result) {
+							//(result)
+							//(result.routes[0].time)//秒
+							//(result.routes[0].distance)//米
+							_self.stationDetail.station.distance = result.routes[0].distance /
+							1000;
+							_self.stationDetail.station.time = result.routes[0].time / 60;
+
+						})
+
+					})
+
+
+				}, e => {
+					//_this.mui.toast('地图加载失败');
+					//('地图加载失败', e)
+					console.log(e)
+				})
+			},
+			getScanCode() {
+				if (this.userId) {
+					WxJsApi.scanQRCode(1).then(res => {
+						if (res) {
+							indexAPI.scanCode(res).then((response) => {
+
+							}).catch(error => {
+								uni.showToast({
+									title: 'scanQRCode' + error,
+									icon: "none"
+								})
+							})
+						}
+					}).catch(error => {
+
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			getPriceList(id) {
+				var formatNum = function(num) {
+					let res = Number(num);
+					return res < 10 ? '0' + res : res;
+				};
+				let data = {
+					stationId: id
+				};
+				api.getChargingStationPrice(data).then((res) => {
+
+					if (res.data.prices.length) {
+
+						let date = new Date();
+						let hours = date.getHours();
+						let minutes = date.getMinutes();
+						let seconds = date.getSeconds();
+						let date_str = formatNum(hours) + ':' + formatNum(minutes); //+ ' ' +formatWeek;
+
+
+						this.pricesInfo = res.data.prices[0].priceList
+						console.log(this.pricesInfo)
+
+						for (var i in this.pricesInfo) {
+							var obj = this.pricesInfo[i]
+
+							if (date_str >= obj.startTime && date_str <= obj.endTime) {
+								obj.current = true;
+							}
+
+						}
+					}
+
+				})
+			},
+			 
+
+			navigate() {
+				/*wx.openLocation({
+				    latitude: _self.station.latitude,//目的地latitude
+				    longitude: _self.station.longitude,//目的地longitude
+				    name: _self.station.name,
+				    address: _self.station.address,
+				    scale: 15//地图缩放大小,可根据情况具体调整
+				});*/
+				//('station'+JSON.stringify(_self.stationDetail.station))
+				window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
+					"," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
+
+			},
+			charge() {
+				//('扫码充电')
+				//#ifdef MP-WEIXIN
+				uni.scanCode({
+					success: function(res) {
+						uni.navigateTo({
+							url: 'chargingPileDetails?pile=' + encodeURIComponent(JSON.stringify(data))
+						})
+
+					}
+				})
+				return;
+				//#endif
+
+				//('扫码充电1')
+				uni.navigateTo({
+					url: 'chargingPileDetails'
+				})
+
+			},
+			priceDetail(t, id) {
+				uni.navigateTo({
+					url: 'chargePriceDetails?stationId=' + _self.stationDetail.station.id + "&type=" + t + "&id=" +
+						id
+				})
+			},
+			map() {
+				//('map'+JSON.stringify(_self.station))
+				_self.station.address = 'xxxxxxxxxxxxx'
+				//this.carhelp.set(_self.stationDetail.station.id,_self.station);
+				uni.navigateTo({
+					url: 'stationDetailsMap?stationId=' + _self.stationDetail.station.id
+					//url:'stationDetailsMap?station='+encodeURIComponent(JSON.stringify(_self.station))
+
+				})
+			},
+			theme(type) {
+				if (type == 'elder') {
+					document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
+
+				} else {
+					document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
+
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "@/_theme.scss";
+
+	.qr-code {
+		font-size: 24px;
+		color: #666666;
+		position: absolute;
+		right: 16px;
+	}
+
+	// 站点信息
+
+	.station-details {
+		width: 100%;
+		height: 100%;
+		padding: 16px 16px 0px;
+		background-color: #fff;
+		position: relative;
+
+		.img {
+			position: absolute;
+			top: 16px;
+			right: 16px;
+		}
+
+		.station-name {
+			//line-height: 18px;
+			color: #101010;
+
+			@include themeify {
+				line-height: themed('font-size4');
+				font-weight: themed('fontWeight');
+				font-size: themed('font-size4');
+				letter-spacing: themed('letterSpacing');
+			}
+
+			width: 65%;
+			/*			line-height: 18px;*/
+			margin-bottom: 11px;
+		}
+
+		.details-item {
+			display: flex;
+			justify-content: start;
+			width: 100%;
+			margin-top: 8px;
+			line-height: 17px;
+
+			@include themeify {
+				font-size: themed('font-size1');
+			}
+
+			/*font-size: 12px;*/
+			// position: relative;
+		}
+
+		.font5 {}
+
+		.item-text {
+
+			color: rgba(102, 102, 102, 100);
+			margin-left: 10px;
+			font-size: 14px;
+			// position: absolute;
+			// left: 24px;
+			// top: 1px;
+		}
+
+		.station-address {
+			width: 100%;
+			height: 40px;
+			margin-top: 14px;
+			position: relative;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+
+			.address-text {
+
+
+				position: absolute;
+				top: 12px;
+				left: 0;
+
+				@include themeify {
+					font-size: themed('font-size1');
+					line-height: themed('font-size4');
+					height: themed('font-size4');
+				}
+
+				/*				font-size: 12px*/
+			}
+
+			.address-box {
+
+				/*				font-size: 28px;*/
+				color: #4e94ff;
+				position: absolute;
+				top: 0;
+				right: 0;
+
+				.address-font {
+					@include themeify {
+						font-size: themed('font-size8');
+					}
+				}
+
+				.view-map {
+					@include themeify {
+						font-size: themed('font-size1');
+						/*						line-height: themed('font-size2');
+									height: themed('font-size2'); */
+					}
+				}
+
+			}
+
+		}
+	}
+
+	// 价格详情
+	.price-details {
+		width: 100%;
+		margin-top: 12px;
+		background-color: #fff;
+		padding: 20px 15px 16px 16px;
+		position: relative;
+
+		.detail-title {
+			display: flex;
+			justify-content: space-between;
+
+			.title-left {
+				@include themeify {
+					font-size: themed('font-size3');
+				}
+
+				/*				font-size: 16px;*/
+				color: #101010;
+			}
+
+			.title-right {
+				@include themeify {
+					font-size: themed('font-size2');
+					line-height: themed('font-size2');
+				}
+
+				/*				font-size: 14px;
+				line-height: 14px;*/
+				color: #00b962;
+
+
+			}
+
+			.right-text {
+				@include themeify {
+					font-size: themed('font-size2');
+				}
+
+				/*				font-size: 14px;*/
+				position: absolute;
+				top: 23px;
+				right: 36px;
+
+			}
+
+			.right-font {
+
+				/*                width: 24px;
+				height: 24px;
+				line-height: 24px;
+				font-size: 24px;*/
+				@include themeify {
+					font-size: themed('font-size7');
+					width: themed('font-size7');
+					height: themed('font-size7');
+					line-height: themed('font-size7');
+				}
+
+				position: absolute;
+				top: 20px;
+				right: 12px;
+
+			}
+		}
+
+		.price-item {
+			padding: 16px 0;
+			display: flex;
+			border-bottom: 1px solid rgba(238, 242, 240, 100);
+
+			.text1 {
+				width: 44px;
+				/*			height: 20px;
+			line-height: 20px;*/
+				border-radius: 50px;
+				background-color: rgba(0, 185, 98, 100);
+				color: rgba(255, 255, 255, 100);
+				/*			font-size: 12px;*/
+
+				@include themeify {
+					font-size: themed('font-size1');
+					height: themed('font-size5');
+					line-height: themed('font-size5');
+				}
+
+				text-align: center;
+			}
+
+			.text5 {
+				width: 44px;
+				/*			height: 20px;
+			line-height: 20px;*/
+				border-radius: 50px;
+				background-color: #9d9fff;
+				color: rgba(255, 255, 255, 100);
+
+				@include themeify {
+					font-size: themed('font-size1');
+					height: themed('font-size5');
+					line-height: themed('font-size5');
+				}
+
+				/*font-size: 12px;*/
+				text-align: center;
+			}
+
+			.text2 {
+				/*			width: 40px;
+			line-height: 19px;*/
+				margin-left: 8px;
+				color: rgba(255, 98, 0, 100);
+
+				/*			font-size: 20px;*/
+				@include themeify {
+					font-size: themed('font-size5');
+					line-height: themed('font-size5');
+					width: themed('font-size15')
+				}
+
+				text-align: left;
+			}
+
+			.text3 {
+				margin-left: 4px;
+				color: rgba(51, 51, 51, 100);
+
+				/*			font-size: 16px;*/
+				@include themeify {
+					font-size: themed('font-size3');
+				}
+
+			}
+
+			.text4 {
+
+				// margin-left: 72px;
+				/*			font-size: 12px;
+			line-height: 20px;*/
+				@include themeify {
+					font-size: themed('font-size3');
+					line-height: themed('font-size5');
+				}
+
+				color: rgba(102, 102, 102, 100);
+			}
+		}
+
+		.park-item {
+			padding: 16px 0;
+			display: flex;
+			justify-content: space-between;
+
+			.text-box {
+				display: flex;
+			}
+
+			.text1 {
+				width: 44px;
+
+				@include themeify {
+					font-size: themed('font-size1');
+					line-height: themed('font-size5');
+					height: themed('font-size5');
+				}
+
+				/*			height: 20px;
+			line-height: 20px;*/
+				border-radius: 50px;
+				background-color: rgba(78, 148, 255, 100);
+				color: rgba(255, 255, 255, 100);
+				/*			font-size: 12px;*/
+				text-align: center;
+			}
+
+			.text2 {
+				margin-left: 8px;
+				color: rgba(51, 51, 51, 100);
+
+				@include themeify {
+					font-size: themed('font-size3');
+				}
+
+				/*			font-size: 16px;*/
+			}
+
+			.text3 {
+				@include themeify {
+					font-size: themed('font-size1');
+					line-height: themed('font-size5');
+				}
+
+				color: #666666;
+				/*		   font-size: 12px;
+		   line-height: 20px;*/
+			}
+
+		}
+	}
+
+	// 设备详情
+	.equipment-details {
+		background-color: #fff;
+		margin-top: 12px;
+		padding: 16px;
+
+		.title {
+			display: flex;
+			justify-content: space-between;
+
+			.title-left {
+				@include themeify {
+					font-size: themed('font-size3');
+					height: themed('font-size3');
+					font-weight: themed('fontWeight');
+					letter-spacing: themed('letterSpacing');
+				}
+
+				/*				height: 16px;*/
+				color: rgba(16, 16, 16, 100);
+				/*				font-size: 16px;*/
+			}
+
+			.title-right {
+				@include themeify {
+					font-size: themed('font-size2');
+					height: themed('font-size3');
+					font-weight: themed('fontWeight');
+					letter-spacing: themed('letterSpacing');
+				}
+
+				/*				height: 16px;
+				font-size: 14px;*/
+				.free {
+					color: #00b962;
+				}
+			}
+		}
+
+		.equipment-item {
+			margin-left: 52px;
+			margin-top: 20px;
+			padding-bottom: 17px;
+			border-bottom: 1px solid rgba(238, 242, 240, 100);
+			position: relative;
+
+			.left-font {
+				color: #00b962;
+
+				@include themeify {
+					font-size: themed('font-size13');
+				}
+
+				/*			font-size: 36px;*/
+				position: absolute;
+				left: -52px;
+				top: -4px
+			}
+
+			.name {
+				display: flex;
+
+				.name-text {
+					color: #101010;
+
+					@include themeify {
+						font-size: themed('font-size3');
+						line-height: themed('font-size3');
+						font-weight: themed('fontWeight');
+					}
+
+					/*				font-size: 16px;
+				line-height: 16px;*/
+				}
+			}
+
+			.type {
+				/*			height: 17px;*/
+				color: rgba(102, 102, 102, 100);
+
+				@include themeify {
+					font-size: themed('font-size1');
+					height: themed('font-size4');
+				}
+
+				/*			font-size: 12px;*/
+				margin-top: 4px;
+			}
+
+			.charging-gun {
+
+				display: flex;
+				justify-content: space-between;
+				width: 100%;
+				margin-top: 12px;
+
+				.iconfont {
+					color: #a5aaa8;
+
+					@include themeify {
+						font-size: themed('font-size5');
+					}
+
+					/*				font-size: 20px*/
+				}
+
+				.gun-num {
+					margin-left: 8px;
+
+					@include themeify {
+						font-size: themed('font-size1');
+						line-height: themed('font-size5');
+					}
+
+					/*				font-size: 12px;
+				line-height: 20px;	*/
+					color: rgba(102, 102, 102, 100);
+				}
+
+				.free-state {
+					color: rgba(0, 185, 98, 100);
+
+					@include themeify {
+						font-size: themed('font-size1');
+						line-height: themed('font-size5');
+					}
+
+					/*				font-size: 12px;
+				line-height: 20px;*/
+					margin-left: 12px;
+				}
+
+				.recharge-state {
+					height: 17px;
+					color: rgba(255, 98, 0, 100);
+
+					@include themeify {
+						font-size: themed('font-size1');
+						line-height: themed('font-size5');
+					}
+
+					/*				font-size: 12px;
+				line-height: 20px;*/
+					margin-left: 12px;
+				}
+			}
+		}
+
+		.tag-recharge {
+
+			/*	
+		height: 16px;		
+		line-height: 15px;*/
+			@include themeify {
+				font-size: themed('font-size0');
+				line-height: themed('font-size2');
+				height: themed('font-size3');
+				//width: themed('font-size14');
+				min-width: 38px;
+			}
+
+			border-radius: 2px;
+			color: rgba(255, 98, 0, 100);
+			/*		font-size: 10px;*/
+			text-align: center;
+			font-family: Arial;
+			border: 1px solid rgba(255, 98, 0, 100);
+			margin-left: 8px;
+
+		}
+
+		.tag-free {
+
+			/*		width: 28px;*/
+			@include themeify {
+				font-size: themed('font-size0');
+				line-height: themed('font-size2');
+				height: themed('font-size3');
+				width: themed('font-size9');
+			}
+
+			/*		height: 16px;
+		line-height: 15px;*/
+			border-radius: 2px;
+			color: rgba(0, 185, 98, 100);
+			/*		font-size: 10px;*/
+			text-align: center;
+			font-family: Arial;
+			border: 1px solid rgba(0, 185, 98, 100);
+			margin-left: 8px;
+		}
+	}
+
+	// 底部
+	.bottom {
+		width: 100%;
+		height: 56px;
+		background-color: #fff;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		padding: 12px 16px;
+		display: flex;
+		justify-content: space-between;
+		z-index: 9999;
+
+		.button1 {
+			width: 44%;
+			height: 32px;
+			border: 1px solid rgba(0, 185, 98, 100);
+			color: rgba(0, 185, 98, 100);
+
+			/*			font-size: 14px;*/
+			@include themeify {
+				font-size: themed('font-size2');
+			}
+		}
+
+		.button2 {
+			width: 44%;
+			height: 32px;
+			border-radius: 50px;
+			background-color: rgba(0, 185, 98, 100);
+			color: rgba(255, 255, 255, 100);
+
+			@include themeify {
+				font-size: themed('font-size2');
+			}
+
+			/*			font-size: 14px;*/
+			margin-left: 13px;
+		}
+
+	}
+
+	.buttonAppointment {
+		width: 120rpx;
+		height: 56rpx;
+		position: relative;
+		top: -10rpx;
+		right: -10rpx;
+		border-radius: 100rpx;
+		background-color: rgba(0, 185, 98, 100);
+		color: rgba(255, 255, 255, 100);
+
+		@include themeify {
+			font-size: themed('font-size2');
+		}
+
+		/*			font-size: 14px;*/
+		margin-left: 13px;
+	}
+
+	.tabs-box {
+		width: 100%;
+		line-height: 87px;
+		border-bottom: 1px solid #7FDCB0;
+		margin-top: 12px;
+
+		/deep/.u-scroll-box {
+			width: 53.6% !important;
+			margin: 0 auto;
+			// background-color: #4e94ff;
+			display: flex;
+
+		}
+	}
+
+	.elderMode .u-cell_title {
+		font-size: 22px;
+		font-weight: bold !important;
+
+
+	}
+
+	.charging-gun {
+		padding-bottom: 50px;
+		background-color: #fff;
+
+		.item {
+			padding: 12px 0 8px 0;
+			margin: 0 16px;
+			display: flex;
+
+			.free {
+
+
+				max-width: 50px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background-color: rgba(228, 246, 234, 100);
+				color: rgba(0, 140, 74, 100);
+				border-radius: 8px;
+				text-align: center;
+			}
+
+			.charging {
+				background-color: rgba(241, 241, 241, 100);
+				color: rgba(74, 74, 74, 100);
+			}
+
+			.not-open {
+				background-color: rgba(255, 233, 233, 100);
+				color: rgba(255, 70, 70, 100);
+
+			}
+			.not-open2 {
+				background-color: #fceee5;
+				color: #FF6100;
+
+			}
+			.info {
+				width: 45vw;
+				margin-left: 8px;
+
+				.name {
+
+					font-size: 14px;
+					line-height: 16px;
+					color: rgba(16, 16, 16, 100);
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+
+				.details {
+					height: 16px;
+					margin-top: 8px;
+					font-size: 12px;
+
+					.iconfont {
+						color: #999999;
+						font-size: 16px;
+						margin-left: 4px;
+					}
+				}
+
+			}
+
+			.tag {
+				width: 30%;
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+				margin-left: 4px;
+
+				.tag-item {
+					width: 48px;
+					height: 24px;
+					line-height: 24px;
+					border-radius: 50px;
+					background-color: rgba(0, 185, 98, 100);
+					color: rgba(255, 255, 255, 100);
+					text-align: center;
+					margin-left: 8px;
+				}
+
+				.not-open-tag {
+					background-color: rgba(192, 196, 208, 100);
+
+				}
+
+			}
+
+			.persent {
+				text-align: right;
+				font-size: 16px;
+				flex: 1;
+
+
+			}
+		}
+
+	}
+
+	.open-time {
+		padding-top: 5px;
+		border-bottom: 1px solid rgba(238, 242, 240, 100);
+		padding-left: 76px;
+		padding-bottom: 19px;
+		line-height: 18px;
+		font-size: 14px;
+		color: rgb(136, 136, 136);
+
+		p {
+			text-indent: 112px;
+		}
+	}
+
+	/deep/.u-tab-bar {
+		height: 4px !important;
+		background-color: #00b962 !important;
+		width: 50px !important;
+		left: -15px !important;
+		bottom: -5px !important;
+
+	}
+
+	/deep/.u-cell__value {
+		text-align: left;
+		margin-left: 12px;
+		color: #101010;
+	}
+
+	/deep/.u-model__content__message {
+		line-height: 22px;
+	}
+
+
+	.main {
+		background-color: #fff;
+
+		.tabs-box {
+			width: 55%;
+			height: 88rpx;
+			margin: 0 auto;
+			// line-height: 44px;
+			position: relative;
+		}
+
+		.line-box {
+			width: 100%;
+			height: 88rpx;
+			position: absolute;
+			top: 145rpx;
+		}
+
+		.time-frame {
+			padding-left: 32rpx;
+
+			/*			position: absolute;
+				top:260rpx;
+		*/
+			.time-items {
+				padding-right: 32rpx;
+				height: 152rpx;
+				border-bottom: #F2F4F4 2rpx solid;
+				position: relative;
+
+				.time-price {
+					display: flex;
+					justify-content: space-between;
+					padding: 32rpx 0 20rpx;
+
+					.time {
+						color: rgba(16, 16, 16, 100);
+
+						@include themeify {
+							font-size: themed('font-size3');
+						}
+
+						/*						font-size: 32rpx;*/
+					}
+
+					.price {
+						.price-text {
+							color: #ff3d00;
+
+							@include themeify {
+								font-size: themed('font-size4');
+							}
+
+							/*							font-size: 36rpx;*/
+						}
+
+						.unit {
+							color: rgba(102, 102, 102, 100);
+
+							@include themeify {
+								font-size: themed('font-size2');
+							}
+
+							/*							font-size: 28rpx;*/
+							margin-left: 8rpx;
+						}
+					}
+
+				}
+
+				.unitPrice-serviceCharge {
+					float: right;
+
+					@include themeify {
+						font-size: themed('font-size1');
+					}
+
+					/*					font-size: 24rpx;*/
+					color: #888888;
+				}
+			}
+		}
+	}
+
+
+	.product_tip {
+		position: absolute;
+		top: 0;
+		right: 0;
+		width: 55rpx;
+		height: 55rpx;
+		text-align: right;
+
+		p {
+			font-size: 24rpx;
+			color: #ffffff;
+			transform: rotate(45deg);
+			position: relative;
+			top: 0rpx;
+			right: 0rpx;
+		}
+
+		.product_tip_bg {
+			width: 0;
+			height: 0;
+			border-bottom: 44rpx solid #FD662A;
+			border-right: 44rpx solid transparent;
+			border-left: 44rpx solid transparent;
+			transform: rotate(45deg);
+			position: absolute;
+			top: -7rpx;
+			right: -29rpx;
+		}
+	}
 </style>
-
-

+ 39 - 2
pages/user/InviteFriends.vue

@@ -72,6 +72,19 @@
 						</view>
 					</view>
 				</view>
+				
+				<view class="InviteFriends-title">我的二维码</view>
+				<view class="InviteFriends-reward">
+					
+					<view class="reward-main" style="text-align:center;" >
+						<img id="qrcode2" :src="qrCodeImg">
+						
+						
+					</view>
+					<img id="qrcode" style="display: none;">
+					
+				</view>
+				
 				<view class="InviteFriends-foot">
 					*本活动最终解释权,归51充电联盟所有。
 				</view>
@@ -98,18 +111,22 @@
 	import jweixin from 'weixin-js-sdk'
 	//var jweixin = require('jweixin-module')  
 	import {
-		substrMb
+		convertCanvasToImage,substrMb
 	} from '@/utils'
 	import * as API_WeiXin from '@/apis/weixin'
 	import * as API from '@/apis/friends.js'
 	import * as WxJsApi from '@/utils/wxJsApi.js'
 	import * as API_weixin from '@/apis/weixin.js'
+	import QRCode from 'qrcodejs2'
+	
+	
 	
 	export default {
 		data() {
 			return {
 				elderMode:false,
 				id:"",
+				qrCodeImg:"",
 				code:"",
 				show:false,
 				amount:0,
@@ -137,6 +154,22 @@
 				this.theme('elder')
 			else
 				this.theme('standard')
+				
+			var info=this.carhelp.getPersonInfo();
+				
+			let joinUrl = window.location.href.split("#")[0]+"#/?friends=friends&id="+this.id+"&icode="+this.code+"&uid="+info.id;
+			//this.joinUrl=joinUrl;
+			
+			let qrcode = new QRCode('qrcode', {
+				width: 200,
+				height: 200,
+				text: joinUrl,
+				correctLevel: QRCode.CorrectLevel.M,
+			
+			})
+			var canvas = document.getElementsByTagName('canvas')[0];
+			this.qrCodeImg = convertCanvasToImage(canvas);
+			
 		},
 		onShow() {
 			
@@ -183,6 +216,8 @@
 			onShowmethods(){
 				var info=this.carhelp.getPersonInfo();
 				if(info){
+					 
+					
 					this.inviteCouponList();
 				}else{
 					window.location= window.location.href.split("#")[0]+'#';
@@ -276,7 +311,9 @@
 				//"["+ProjectName+"]"+'和好友一起领5元红包'
 			 	var desc=ProjectName
 				let joinUrl = window.location.href.split("#")[0]+"#/?friends=friends&id="+this.id+"&icode="+this.code+"&uid="+info.id;
-				var _this = this;
+				//this.joinUrl=joinUrl;
+				 
+				
 				jweixin.ready(function() {
 					//("readyreadyreadyreadyready")
 					jweixin.updateAppMessageShareData({