zhengkaixin 1 nedēļu atpakaļ
vecāks
revīzija
c956b414a4

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

@@ -4,9 +4,8 @@ const UNI_APP = {
 
 	
 	BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
-	//
-
-	BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
+	
+	//BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
 	
 	
 	//BASE_URL:'http://192.168.8.162:8081/charging-station/', //sz
@@ -18,7 +17,7 @@ const UNI_APP = {
 	
 	openId:"123456",
 	openId:"oSruR6YkhP7QDroLnZGxWis43Kn0",
-	openId:"oSruR6fYa0yzdMsDinzNOlePTotk",
+	//openId:"oSruR6fYa0yzdMsDinzNOlePTotk",
 	//appid
 	//VUE_APP_WXAPPID:"wxa9f555dc92a1cbfc",
 	VUE_APP_WXAPPID:"wxca33ab204e738ca4",

+ 1 - 1
pages/index/index.vue

@@ -185,7 +185,7 @@
 								{{item.stationName}} 
 							
 							</view>
-							<view class="value">
+							<view class="value"    style=" white-space: pre;">
 								<span style="color: red;" v-if="isToday(item.errorReportTime)">(今日)</span>
 								{{item.errorReportTime}}
 							</view>

+ 1 - 1
pages/station/stationInfo.vue

@@ -22,7 +22,7 @@
 				
 				</view>
 			</view>
-			<view class="body">
+			<view class="body" v-if="info.category!='电单车'">
 				<view class="span">
 					<image class="img" src="@/assets/img/station/item2.svg" mode=""></image>
 					在用

+ 30 - 4
pages/station/stationList.vue

@@ -44,11 +44,18 @@
 								 {{item.stationNo}}<span  style="margin: 0 8rpx;color:rgba(119, 119, 119, 1);" >|</span>
 								{{item.name}}
 							</view>
-							<view class="value">
+							<view class="value" v-if="item.category=='电单车'">
+								电单车充电站
+							</view>
+							<view class="value" v-else>
 								<span class="span span1">在用{{item.gunWorkNum}}</span> /
 								<span class="span span2">空闲{{item.gunFreeNum}}</span>/
-								<span class="span span3">故障{{item.gunFaultNum}}</span>/
-								<span class="span span4">离线{{item.gunOfflineNum}}</span>/
+								<span class="span "  :class="{
+									span3:item.gunFaultNum
+								}" >故障{{item.gunFaultNum}}</span>/
+								<span class="span "   :class="{
+									span4:item.gunOfflineNum
+								}" >离线{{item.gunOfflineNum}}</span>/
 								<span class="span span5">共{{item.gunNum}}把</span>
 							</view>
 						</view>
@@ -86,7 +93,7 @@
 				list: [],
 				listForm: {
 					pageIndex: 1,
-					pageSize: 20,
+					pageSize: 999,
 					recordsTotal: 1,
 				},
 				title: "场站列表",
@@ -179,7 +186,26 @@
 						];
 					}
 					this.listForm.recordsTotal=res.data.recordsTotal
+				
+					list=list.sort((item1,item2)=>{
+						var a1=item1.gunFaultNum+item1.gunOfflineNum
+						var a2=item2.gunFaultNum+item2.gunOfflineNum
+						if(a1&&a2){
+							return 1
+						}else if(a1&&!a2){
+							return -1
+						}else if(!a1&&!a2){
+							return 1
+						}
+						return true
+					})
+					
+				
 					this.list = list
+					
+					
+					
+					
 					uni.hideLoading();
 
 				}).catch(error => {