Pārlūkot izejas kodu

恩施站, 费用公示

zhengkaixin 8 mēneši atpakaļ
vecāks
revīzija
9d306c527e
4 mainītis faili ar 112 papildinājumiem un 28 dzēšanām
  1. 3 3
      config/.env.dev.ud.js
  2. 4 2
      config/.env.test.ud.js
  3. 93 19
      pages/charge/index.vue
  4. 12 4
      pages/charge/switchCharge.vue

+ 3 - 3
config/.env.dev.ud.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
 	ProjectName :"优电联盟",
-	 BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	 BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
 	BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	// BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	branchParameter:"youdian",//team51,youdian
@@ -8,9 +8,9 @@ const UNI_APP = {
 	wechatUrl:"/youdian",
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
-	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
+	openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
 	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
-	openId:"1000",
+	//openId:"1000",
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
 	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	openId:"oSruR6YkhP7QDroLnZGxWis43Kn0",//zkx

+ 4 - 2
config/.env.test.ud.js

@@ -1,8 +1,10 @@
 const UNI_APP = {  
    // BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
-ProjectName :"优电联盟",
+	ProjectName :"优电联盟",
    //  BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
-	BASE_URL: 'http://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
+	
    // BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
    
 	branchParameter:"youdian",//team51,youdian

+ 93 - 19
pages/charge/index.vue

@@ -31,7 +31,7 @@
 						<p>桩名:</p>
 						<h4>{{detail.name}}</h4>
 					</view>
-					<view class="u-flex" @click="showTips()">
+					<view class="u-flex" @click="showTips()"  v-if="!(detail.electricityPrice&&detail.servicePrice)">
 						<span>费用说明</span>
 						<u-icon name="error-circle" color="#1677ff" size="32"></u-icon>
 					</view>
@@ -57,11 +57,13 @@
 			</view>
 		</view>
 		<view class="charge">
-			<view class="chargeInfo" style="margin-bottom: 10px;">
-				<p><span style="color:red">*</span>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span></p>
-			</view>
 			
-			 
+			
+			 <view class="chargeInfo" v-if="!(detail.electricityPrice&&detail.servicePrice)"
+			  style="margin-bottom: 10px;">
+			 	<p>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span></p>
+			 
+			 </view>
 			
 			<u-subsection :list="listType" mode="subsection" active-color="#3786f4" :current="0"
 				@change="changeListType"></u-subsection>
@@ -102,6 +104,23 @@
 				<p v-show="listTypeIndex==0"><span style="color:red">*</span>按时间付费:需要先充值,从余额中扣费,适用会员用户。</p>
 				<p v-show="listTypeIndex==1"><span style="color:red">*</span>按金额付费:无需充值,先付费后使用,未使用完的费用原路退回。</p>
 				
+			</view>
+			<view class="chargeInfo" v-if="(detail.electricityPrice&&detail.servicePrice)"
+			 style="margin-bottom: 10px;padding-top:10px;border-top:1px solid #CDCDCD">
+				<view style="    display: flex;
+    justify-content: space-between;">
+					 <p>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span>
+					 
+					 </p>
+					 <view class="u-flex" style="     color: #1677ff;
+    margin-right: 5px;" @click="showTips()">
+						<span>费用说明</span>
+						<u-icon name="error-circle" color="#1677ff" size="32"></u-icon>
+					 </view>
+				 </view>
+				
+				<p>电费单价:{{detail.electricityPrice}}元/千瓦时</p>
+				<p>服务费单价:{{detail.servicePrice}}元/千瓦时</p>
 			</view>
 		</view>
 
@@ -149,13 +168,40 @@
 		</view>
 
 		<u-modal v-model="showPriceList" title="费用说明">
+			<view class="priceListMain">
+				
+				<u-table  v-if="detail.priceList.length" 
+				align="right"
+				border-color="#fff" style=" padding: 20rpx;"  >
+					<u-tr class="u-tr u-tr1">
+						<u-td class="u-td u-td1">充电功率</u-td>
+						<template v-if="detail.priceList[0].electricityPrice&&detail.priceList[0].servicePrice">
+							<u-td class="u-td">电费</u-td>
+							<u-td class="u-td">服务费</u-td>
+						</template>
+						<u-td class="u-td" v-else>费用</u-td>
+					</u-tr>
+					
+					<u-tr class="u-tr"  v-for="(item,i) in detail.priceList" >
+						<u-td class="u-td u-td1">{{item.minPower}}W-{{item.maxPower}}W</u-td>
+						<template v-if="item.electricityPrice&&item.servicePrice">
+							<u-td class="u-td">{{item.electricityPrice}}元/小时</u-td>
+							<u-td class="u-td">{{item.servicePrice}}元/小时</u-td>
+						</template>
+						
+						<u-td class="u-td" v-else>{{item.price}}元/小时</u-td>
+					</u-tr>
+					
+					
+				</u-table>
+			
+				<!-- <p v-for="(item,i) in detail.priceList" class="showPriceList" :key="i">{{item.minPower}}W-{{item.maxPower}}W
+					<span>{{item.price}}元每小时</span></p> -->
 
-			<p v-for="(item,i) in detail.priceList" class="showPriceList" :key="i">{{item.minPower}}W-{{item.maxPower}}W
-				<span>{{item.price}}元每小时</span></p>
-
-			<p style="    padding: 15px;" v-if="detail.roundingMinute!=null&&detail.roundingMinute!=-1">
-				超过{{detail.roundingMinute}}分钟,按1小时记,不足{{detail.roundingMinute}}分钟,不计费</p>
-			<p style="    padding: 15px;" v-if="detail.priceList.length==0">无费用说明或为免费充电模式</p>
+				<p style="    padding: 20rpx;" v-if="detail.roundingMinute!=null&&detail.roundingMinute!=-1">
+					超过{{detail.roundingMinute}}分钟,按1小时记,不足{{detail.roundingMinute}}分钟,不计费</p>
+				<p style="    padding: 20rpx;" v-if="detail.priceList.length==0">无费用说明或为免费充电模式</p>
+			</view>
 		</u-modal>
 
 		<u-modal v-model="showmodel" @confirm="confirm" :showCancelButton="true" title="订单信息">
@@ -606,16 +652,44 @@
 			display: inline-block;
 			width: 100px;
 		}
+	}
+	.u-tr{
+		.u-td{
+			font-size: 24rpx !important;
+		}
+		
+		
+	}
+	.u-tr1{
+		.u-td{
+			font-size: 28rpx !important;
+		}
+	}
+	.u-td1{
+		text-align: left !important;
+	}
+	.u-tr:nth-child(even){
+		background-color: rgba(245, 245, 245, 1);
+		.u-td{
+			border:rgba(245, 245, 245, 1);
+			background-color: rgba(245, 245, 245, 1);
+		}
+		
 	}
-
-	.showPriceList {
-		margin-left: 20px;
-		margin-right: 20px;
-
-		span {
-			float: right;
-		}
+	.priceListMain{
+		p{
+			font-size: 24rpx;
+		}
+		.showPriceList {
+			margin-left: 20px;
+			margin-right: 20px;
+		
+			span {
+				float: right;
+			}
+		}
 	}
+	
 
 	.slot-wrap {
 		display: flex;

+ 12 - 4
pages/charge/switchCharge.vue

@@ -194,10 +194,18 @@
 			},
 			customBack() {
 				
-				if(this.stationShow&&this.stationId){
-					this.stationShow=false
-					this.stationIdSelect=stationId
-					this.getList()
+				if(this.stationShow&&this.stationId){
+					try{
+						this.stationShow=false
+						this.stationIdSelect=stationId
+						this.getList()
+					}catch(e){
+						//TODO handle the exception
+						uni.redirectTo({
+							url: '/pages/charge/index'
+						})
+					}
+					
 				}else{
 					uni.redirectTo({
 						url: '/pages/charge/index'