zhengkaixin 2 vuotta sitten
vanhempi
commit
372c4c9212

+ 9 - 7
components/u-navbar/u-navbar.vue

@@ -325,6 +325,14 @@
 					this.descriptionShow2=true;
 				}
 			},
+			navberBack(){
+				const pages=getCurrentPages()
+				if(pages.length===1){
+					history.back()
+				}else{
+					uni.navigateBack();
+				}
+			},
 			goBack() {
 					//console.log("修复bug, 刷新后不能返回问题")
 			
@@ -334,13 +342,7 @@
 					// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
 					this.customBack.bind(this.$u.$parent.call(this))();
 				} else {
-					const pages=getCurrentPages()
-					if(pages.length===1){
-						history.back()
-					}else{
-						uni.navigateBack();
-					}
-					
+					this.navberBack();
 				}
 			}
 		}

+ 8 - 2
pages/index/index.vue

@@ -728,6 +728,7 @@
 
 			},
 			getFindChargeData() {
+				
 				API.findChargeData().then((res) => {
 					this.chargeList = res.data.chargingRecordList;
 
@@ -878,11 +879,16 @@
 				})
 			},
 			searchStationData(){
-				siteApi.searchStationData({
+				var data={
 					longitude: this.longitude,
 					latitude: this.latitude,
 					pageSize:5
-				}).then((response) => {
+				}
+				if (this.carhelp.getPersonInfo()) {
+						data.openId=this.carhelp.getOpenId()
+				}
+				
+				siteApi.searchStationData(data).then((response) => {
 					this.stationList = response.data.data;
 					
 					if(response.data.data.length){

+ 36 - 6
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view v-show="step==1">
-				<ujp-navbar title="费用说明页" :custom-back="customback2">
+				<ujp-navbar title="费用说明页" :custom-back="customback2" ref="ujpnavbar" >
 					
 				</ujp-navbar>
 				<view class="main2">
@@ -143,7 +143,11 @@
 							解锁中<img style="margin-left: 4px;" src="../../../static/img/riLine-refresh-line.svg" alt="">
 						</u-button> -->
 			<!-- 刷新充电枪状态 -->
-			<u-button shape="circle" type="success" @click="getPile()" v-if="gunDetail.chargingAppointment&&!gunDetail.isMeAppoint"   >已被预约</u-button>
+			
+			<u-button shape="circle" type="success"  v-if="!openBool"   >仅合约用户可使用</u-button>
+			
+			
+			<u-button shape="circle" type="success" @click="getPile()"  v-else-if="gunDetail.chargingAppointment&&!gunDetail.isMeAppoint"   >已被预约</u-button>
 			
 			<u-button shape="circle" v-else-if="!isInsert" @click="getPile()" type="success">刷新充电枪状态</u-button>
 			
@@ -208,9 +212,18 @@
 				carDetText: '',
 				userCard:null,
 				canUse:false,
+				openStatus:0,
+				isVip:false,
+				openBoolShow:false,
 			}
 		},
 		computed:{
+			openBool(){
+				if(this.openStatus=='3'){
+					return this.isVip
+				}
+				return true
+			},
 			userCardBool(){
 				if(this.userCard){
 					var date=new Date().getTime()
@@ -257,9 +270,14 @@
 			},
 			customback(){
 				if(this.isback){
-					uni.navigateBack({
-						
-					})
+					if(this.$refs.ujpnavbar){
+						this.$refs.ujpnavbar.navberBack()
+					}else{
+						uni.navigateBack({
+							
+						})
+					}
+					
 				}else{
 					uni.reLaunch({
 						url:"/pages/login/welcome"
@@ -335,9 +353,21 @@
 					this.gun = res.data.gun
 					this.car = res.data.car
 					
-				
+					this.isVip=res.data.isVip
+					this.openStatus=res.data.station.openStatus
 					
 					this.isInsert=this.gun.insertStatus
+					if(!this.openBool){
+						//this.openBoolShow=true;
+						uni.showModal({
+							title:"提示",
+							content: "当前设备仅合约用户可用,如有问题可联系客服",
+							showCancel: false,
+							success: () => {
+						
+							}
+						})
+					}
 					this.role()
 					if (res.data.chargingAppointment) {