浏览代码

游客模式

zhengkaixin 2 年之前
父节点
当前提交
0ebb69b855

+ 1 - 1
pages/index/index.vue

@@ -246,7 +246,7 @@
 					{{stationData.address}}
 				</view>
 				<view class="sign" v-else>
-					<template v-if="personInfo.userType!=1">
+					<template v-if="personInfo&&personInfo.userType!=1">
 						<view class="sign-1" v-if="stationData.giveDiscount&&stationData.discountRatio">会员服务费{{stationData.discountRatio/10}}折</view>
 						<view class="sign-2" v-if="stationData.tagList.length != 0" v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
 					</template>

+ 4 - 4
pages/login/login.vue

@@ -310,13 +310,13 @@
 			checkboxChange() {
 				this.value = !this.value;
 			},
-			loginresponse(response){
+			loginresponse(response,bl){
 				uni.hideLoading();
 				
 				var token = response ? response.data.token : '';
 				this.carhelp.setToken(token);
 				this.carhelp.setPersonInfo(response.data.regUser);
-				if(!response.data.regUser.carId){
+				if(!bl&&!response.data.regUser.carId){
 					var url="/pages/login/completeInfo?login=1"
 					
 					if(this.code == 'A') {
@@ -386,8 +386,8 @@
 				if(this.personInfo&&this.personInfo.userType=="1"){
 					
 					loginApi.validateGuestCode(this.form).then((response) => {
-						this.loginresponse(response)
-						
+						this.loginresponse(response,true)
+					 
 					}).catch(error => {
 						uni.showToast({
 							title: error,

+ 1 - 1
pages/search/search.vue

@@ -31,7 +31,7 @@
 			<view class="sign" >
 				{{item.address}}
 			</view>
-			<view class="sign" v-if="item.stationType!=50&&personInfo.userType!=1">
+			<view class="sign" v-if="item.stationType!=50&&personInfo&&personInfo.userType!=1">
 				<view class="sign-1" v-if="item.giveDiscount">会员服务费{{item.discountRatio/10}}折</view>
 				<view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
 			</view>

+ 21 - 8
pages/searchPile/chargeProcess/charge.vue

@@ -196,7 +196,7 @@
 							<p  >{{payList[0].name}}<span>({{payList[0].tips}})</span> 	</p>
 							 </u-radio>
 						</p>
-						<p  v-if="personInfo.userType=='2'" >
+						<p  v-if="personInfo&&personInfo.userType=='2'" >
 							<u-radio 
 								name="1"
 							
@@ -377,16 +377,16 @@
 				],
 				moneyListN: [
 					{
-						id: '50',
-						name: '50元'
+						id: '10',
+						name: '10元'
 					},
 					{
-						id: '100',
-						name: '100元'
+						id: '20',
+						name: '20元'
 					},
 					{
-						id: '150',
-						name: '150元'
+						id: '50',
+						name: '50元'
 					}
 				],
 				userCard:null,
@@ -621,7 +621,20 @@
 						this.selectItem = this.moneyList_f[0];
 						this.moneyActiveClass_f = this.moneyList_f[0].id
 						//(this.moneyActiveClass)
-					}
+					}
+					
+					var list=res.data.priceList
+					if(list.length){
+						this.moneyListN=[];
+						for(var i in list){
+							this.moneyListN.push({
+								id:list[i],
+								name:list[i]+"元"
+							})
+						}
+						this.moneyActiveClass_n=list[0]
+					}
+					
 					
 				}).catch(error => {
 					uni.showToast({

+ 2 - 2
pages/searchPile/searchPile.vue

@@ -155,7 +155,7 @@
 							{{item.address}}
 						</view>
 						<view class="sign" v-else>
-							<template v-if="personInfo.userType!=1">
+							<template v-if="personInfo&&personInfo.userType!=1">
 								<view class="sign-1" v-if="item.giveDiscount">会员服务费{{item.discountRatio/10}}折</view>
 								<view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
 								
@@ -233,7 +233,7 @@
 									</view> -->
 								</view>
 								<view class="sign min-h">
-									<template v-if="personInfo.userType!=1">
+									<template v-if="personInfo&&personInfo.userType!=1">
 										
 								
 									<view class="sign-1" v-if="item.giveDiscount">会员服务费{{item.discountRatio/10}}折</view>

+ 1 - 1
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -585,7 +585,7 @@
 				this.id = op.id
 				
 				var personInfo=this.carhelp.getPersonInfo()
-				if(personInfo.userType=="1"){
+				if(personInfo&&personInfo.userType=="1"){
 					this.showVin=true
 				}
 				

+ 1 - 1
pages/searchPile/stationAndPile/stationDetails.vue

@@ -37,7 +37,7 @@
 			</view>
 			
 			<view class="sign" 
-					v-if="stationDetail.station.stationType!=50&&personInfo.userType!=1"
+					v-if="stationDetail.station.stationType!=50&&personInfo&&personInfo.userType!=1"
 			:class="{
 				noImg:!(stationDetail.station != null && stationDetail.station.image != null)
 			}">

+ 1 - 1
pages/searchPile/stationAndPile/stationDetailsMap.vue

@@ -23,7 +23,7 @@
 							暂无定位
 						</view> -->
 					</view>
-					<view class="sign" v-if="personInfo.userType!=1">
+					<view class="sign" v-if="personInfo&&personInfo.userType!=1">
 						<view class="sign-1" v-if="item.giveDiscount">会员服务费{{item.discountRatio/10}}折</view>
 						<view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" 
 							:key="tagIndex">{{tagName}}</view>