zhengkaixin 2 tahun lalu
induk
melakukan
a619553b88

+ 14 - 11
pages/searchPile/chargeProcess/charge.vue

@@ -368,16 +368,7 @@
 					title: "加载中",
 					mask: true,
 				})
-				API.personalCenter().then((res) => {
-					this.user = res.data
-					this.isReady = true;
-					uni.hideLoading()
-				 
-				}).catch(error => {
-					uni.showToast({
-						title: error
-					})
-				})
+				
 				
 			
 				API.userCard({
@@ -387,7 +378,19 @@
 					this.userCard=res.data.regUserCard
 					this.canUse=res.data.canUse
 					//this.user = res.data
-				
+					
+					
+					API.personalCenter().then((res2) => {
+						this.user = res2.data
+						this.isReady = true;
+						uni.hideLoading()
+					 
+					}).catch(error => {
+						uni.showToast({
+							title: error
+						})
+					})
+					
 				 
 				}).catch(error => {
 					uni.showToast({

+ 10 - 4
pages/searchPile/stationAndPile/stationDetails.vue

@@ -2,7 +2,7 @@
 	<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>
+				<span style="font-size: 16px; color: rgb(96, 98, 102);" @click="getChargingStationDetail(false)">刷新</span>
 			</view>
 		</ujp-navbar>
 
@@ -25,8 +25,13 @@
 			</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米'}}
+				<view class="item-text oldTextjp2" oldstyle="font-size: 16px;" >
+					<template v-if="stationDetail.station.distance">
+						{{stationDetail.station.distance!=null&&stationDetail.station.distance>0.1 ? stationDetail.station.distance.toFixed(1)+'公里':'小于100米'}}
+					</template>
+					<template v-else>
+						定位中
+					</template>
 					<span style="font-size: 12px;
 							color: #5c95f8;
 							margin-left: 10px;" @click="getPoint()">重新定位</span>
@@ -426,7 +431,8 @@
 
 		},
 		methods: {
-			getChargingStationDetail(bl) {
+			getChargingStationDetail(bl) {
+				
 				var _self = this;
 				if(!bl){
 					uni.showLoading({