Selaa lähdekoodia

Merge branch 'master' of http://47.92.161.104:10080/zkx/JP-ChargeTeam51 into master

zhupeng 3 vuotta sitten
vanhempi
commit
06632f26ff

+ 2 - 1
.env.test.js

@@ -13,7 +13,8 @@ const UNI_APP = {
 	VUE_APP_WXAPPID:"wx3afdb1b60188c1e5",
 	//zkx的测试openId
 	//openId:"oHjCawsJ5blME36lHaSpSVfEhleU",
-	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	// openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	openId:"oK9Wr55J1J1eL6BqI2tW749NTxNU",
 	//zq的测试openId
 	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",
 }  

+ 27 - 13
pages/index/index.vue

@@ -48,7 +48,8 @@
 			</view>
 
 		</view>
-
+        
+ <view style="height:50px"></view>  
 		<!-- 站点 -->
 		<view class="station" v-if="message == 'getLocation:ok' && chargeList.length == 0" @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
 			<view class="img-box">
@@ -81,7 +82,7 @@
 			</view>
 		</view>
 		<!-- 定位 -->
-		<view class="location-box" v-if="message != 'getLocation:ok'">
+		<view class="location-box" v-if="message != 'getLocation:ok' && chargeList.length == 0">
 			<view class="location">
 				<view class="location-text">
 					<view class="text-1">
@@ -108,8 +109,8 @@
 		 	<view class="text-1">
 		 		{{item.statusText}}
 		 	</view>
-			<view v-if="item.status == '4'" class="text-2">
-				前方等待2位
+			<view v-if="item.status == '0'" class="text-2">
+				启动中
 			</view>
 			<view v-if="item.status == '1'" class="text-2">
 				已充{{item.dueFee != null ? item.dueFee : '0.00'}}元
@@ -117,14 +118,18 @@
 			<view v-if="item.status == '2'" class="text-2" style="color: red;">
 				超出时间将收取占位费
 			</view>
+			<view v-if="item.status == '4'" class="text-2">
+				前方等待{{item.waitNum}}位
+			</view>
 			<view class="text-3">
-				{{item.stationName}}/{{item.deviceNo}}
+				{{item.deviceName}}/<br />{{item.deviceNo}}
 			</view>
 		 </view>
 	 	<view class="img-box">
-	 		<img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
+	 		<img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
 			<img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
 			<img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
+			<img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
 	 	</view>
 	 </view>
 	 <!-- <view class="state2 state">
@@ -280,8 +285,16 @@
 					mask: true,
 				})
 				
-				API.findChargeData().then((res) => {
-					uni.hideLoading()					
+				API.findChargeData().then((res) => {				
+					uni.hideLoading();
+					// var list1 = res.data.chargingRecordList;
+					// var list2 = [];
+					// for(var i=0;i<list1.length;i++) {
+					// 	if(list1[i].status != '0') {
+					// 		list2.push(list1[i]);
+					// 	}
+					// }
+					// this.chargeList = list2;
 					this.chargeList = res.data.chargingRecordList;
 				}).catch(error => {
 					uni.showToast({
@@ -500,9 +513,8 @@
 	.station {
 		width:91.4%;
 		height: 120px;
-		margin-top: 70px auto 0 ;
+		margin-top: 20px auto 0 ;
 		padding-top: 20px;
-		padding: 0 12px;
 		position: relative;
 
 		.img-box {
@@ -616,6 +628,7 @@
 				width: 100%;
 				display: flex;
 				justify-content: space-between;
+				padding: 0 5px;
 			}
 		}
 
@@ -628,7 +641,7 @@
 		background-color: #ffffff;
 		height: 120px;
 		display: flex;
-		margin: 70px auto 0;
+		margin: 20px auto 0;
 		border-radius: 8px;
 		border: #F2F4F4 1px;
 
@@ -672,12 +685,13 @@
 		}
 	}
 
+  
 	.state{
 		width: 91.4%;
 		background-color: #ffffff;
 		height: 120px;
 		display: flex;
-		margin: 70px auto 0;
+		margin: 20px auto 0;
 		border-radius: 8px;
 		border: #F2F4F4 1px;
 		.state-text{
@@ -700,7 +714,7 @@
 			
 			.text-3 {
 				font-size: 12px;
-				text-align: center;
+				line-height: 20px;
 				margin-top: 6px;
 				color: #999999;
 			}

+ 16 - 3
pages/record/index.vue

@@ -9,14 +9,14 @@
 				<u-icon name="arrow-down-s-fill" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
 			</view>
 			<view class="carNone" v-if="chargeList.length == 0">
-				<img src="static/img/none2.svg" alt="">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
 				<p>暂无充电订单</p>
 			</view>
 			<view class="recordList" v-if="chargeList.length > 0">
 				<view class="recordList-item" v-for="(item,index) in chargeList" :key="item.id" @click="gotoUrl('pages/record/details?id=' + item.id)">
 					<view class="recordList-name">
 						<h4>{{item.stationName}}/{{item.deviceNo}}</h4>
-						<span class="state1">{{item.statusText}}</span>
+						<span class="state1" :style="{color : textColor(item)}">{{item.statusText}}</span>
 					</view>
 					<view class="recordList-row">
 						<p>开始时间:{{item.status == '0' || item.status == '4' ? '暂未开始' : item.createTime}}</p>
@@ -73,6 +73,19 @@
 			this.getChargeList();
 		},
 		methods: {
+			textColor(item) {
+				switch (item.status) {
+					case '1':
+						return '#00B962'
+						break;
+					case '2':
+						return '#666666'
+						break;
+					case '4':
+						return '#8161FF'
+						break;
+				}
+			},
 			confirmTime(params) {
 				if(params.month.slice(0,1) == '0') {
 					this.month = params.month.slice(1);
@@ -96,7 +109,7 @@
 				})		
 				API.chargingRecordData({
 					pageIndex: 1,
-					pageSize: 100,
+					pageSize: 10,
 					startDate: this.startDate,
 					endDate: this.endDate
 				}).then((res) => {

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

@@ -27,7 +27,7 @@
 			</view>
 
 			<!-- 优惠券 -->
-			<view class="discounts">
+			<view class="discounts" v-if="false">
 				<view class="title">
 					<view class="title-1">
 						优惠券

+ 22 - 5
pages/user/finance/balance.vue

@@ -1,6 +1,10 @@
 <template>
 	<view>
-		<u-navbar title="我的余额"></u-navbar>
+		<u-navbar title="我的余额">
+			<view class="slot-wrap">
+				<span class="navBtn" @click="toRefundList">退费</span>
+			</view>
+		</u-navbar>
 		<view class="balance">
 			<view class="balanceHead">
 				<view class="balanceCard">
@@ -35,10 +39,6 @@
 						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
 					</view>
 				</view>
-				<view class="carNone" v-if="accountList.length == 0">
-					<img src="static/img/none2.svg" alt="">
-					<p>暂无充值记录</p>
-				</view>
 				<view class="balanceMain-list" v-if="accountList.length > 0">
 					<view class="balanceMain-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?id=' + item.id)">
 						<view class="title">
@@ -49,6 +49,10 @@
 					</view>
 				</view>
 			</view>
+			<view class="carNone" v-if="accountList.length == 0">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
+				<p>本月暂无充值记录</p>
+			</view>
 		</view>	
 	</view>
 </template>
@@ -82,6 +86,11 @@
 			this.getAccountRecordData();
 		},
 		methods: {
+			toRefundList() {
+				uni.navigateTo({
+					url: '/pages/user/finance/refundList'
+				})
+			},
 			getAccountRecordData() {
 				uni.showLoading({
 					title: "加载中",
@@ -133,6 +142,14 @@
 </script>
 
 <style lang="scss" scoped>
+	.slot-wrap{
+		flex: 1;
+	}
+	.navBtn{
+		float: right;
+		margin-right: 15px;
+		color:#3fbd70;
+	}
 	.carNone{
 		display: flex;
 		flex-direction: column;

+ 2 - 2
pages/user/finance/rechargeList.vue

@@ -7,7 +7,7 @@
 			<u-icon name="arrow-down-s-fill" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
 		</view>
 		<view class="carNone" v-if="accountList.length == 0">
-			<img src="static/img/none2.svg" alt="">
+			<img src="static/img/暂无数据-缺省页.png" alt="">
 			<p>暂无充值记录</p>
 		</view>
 		<view class="rechargeList" v-if="accountList.length > 0">
@@ -66,7 +66,7 @@
 				})		
 				API.accountRecordData({
 					pageIndex: 1,
-					pageSize: 100,
+					pageSize: 10,
 					month: this.dateMonth,
 				}).then((res) => {
 					uni.hideLoading();