zhengkaixin 2 лет назад
Родитель
Сommit
022af2be9c

+ 5 - 3
.env.dev.js

@@ -1,14 +1,16 @@
 const UNI_APP = {  
 	ProjectName :"51充电联盟",
-	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
-	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 	//BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
-	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
+	openId:"zkxtest",//zkx
+	
+	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY-",//zkx
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//
 	

+ 19 - 0
apis/login.js

@@ -10,6 +10,25 @@ export function findByOpenId(data) {
 	})
 }
 
+ export function registerGuest(data) {
+ 	var url='/mobile/regUser/registerGuest';
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: url
+ 	})
+ }
+ export function validateGuestCode(data) {
+ 	var url='/mobile/regUser/validateGuestCode ';
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: url
+ 	})
+ }
+
+
+
  export function findNoLTextConfigure(data) {
  	var url='/mobile/dataDictionary/findNoLTextConfigure';
  	return requestWhite({

+ 6 - 0
assets/img/riFill-user-2-fill.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16" style="border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+    
+    <g>
+    <path d="M14.667 18.749v7.917h2.667v-7.917c5.261 0.656 9.333 5.144 9.333 10.584h-21.333c0-5.421 4.044-9.898 9.28-10.578l0.054-0.006zM16 17.333c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" fill="rgba(0,184.875,97.92,1)"></path>
+    </g>
+  </svg>

+ 109 - 30
pages/login/login.vue

@@ -1,5 +1,12 @@
 <template>
 	<view class="wrap">
+		<ujp-navbar :isBack="false" title="">
+			
+				<view slot="right" 
+				 v-if="!personInfo"
+				 @click="touristBl=true" style=" margin-right: 10px;color:#00B962"> 游客模式</view>
+		</ujp-navbar>
+		
 		<view class="login">
 			<view class="login-title">
 				<h3>手机号登录/注册</h3>
@@ -51,6 +58,20 @@
 			
 			>请先关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,然后进行会员注册</view>
 		</u-modal>
+		
+		<u-modal v-model="touristBl" 
+		:show-cancel-button="true"
+		   @confirm="touristConfirm"
+		cancel-text="取消"  	confirm-text="游客登录" title="提示">
+			<view style="
+								text-align: center;
+							">
+				
+			</view>
+			<view style="text-align: center;    padding: 10px;">游客身份充电将无法享受平台服务费8.5折及各类优惠券活动哦~</view>
+		
+		</u-modal>
+		
 	</view>
 </template>
 
@@ -86,6 +107,9 @@
 				projectName:'',
 				show1:false,
 				show2:false,
+				touristBl:false,
+				personInfo:null,
+				
 			}
 		},
 		computed: {
@@ -100,6 +124,7 @@
 		},
 		onLoad(op) {
 			this.projectName=process.car.ProjectName;
+			
 			if(op.jpcode) {
 				
 				var str1 = op.jpcode.slice(0,19);
@@ -128,6 +153,17 @@
 				
 			}
 			
+			this.personInfo=this.carhelp.getPersonInfo()
+			if(this.personInfo){
+				if(this.personInfo.userType=="1"){
+					
+				}else{
+					uni.redirectTo({
+						url: '/pages/index/index'
+					})
+				}
+			}
+			
 			
 		},
 		onReady() {
@@ -141,6 +177,28 @@
 			this.checkSubscribe()
 		},
 		methods: {
+			touristConfirm(){
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				this.form.nickName=this.carhelp.getUserInfo().nickname;
+				this.form.headImg=this.carhelp.getUserInfo().headimgurl;
+				this.form.openId= this.carhelp.getOpenId();
+				this.form.source=2//创建渠道1电单车2电车
+				
+				loginApi.registerGuest(this.form).then((response) => {
+					this.loginresponse(response);
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+			},
 			gotoGz(){
 				this.carhelp.setGzDate()
 				var url="https://mp.weixin.qq.com/s/mCHz1nNvg0xAICiBeIyKRQ";
@@ -252,6 +310,37 @@
 			checkboxChange() {
 				this.value = !this.value;
 			},
+			loginresponse(response){
+				uni.hideLoading();
+				
+				var token = response ? response.data.token : '';
+				this.carhelp.setToken(token);
+				this.carhelp.setPersonInfo(response.data.regUser);
+				if(!response.data.regUser.carId){
+					var url="/pages/login/completeInfo?login=1"
+					
+					if(this.code == 'A') {
+						url+="&jpcode=jp_team51_charge_id:A_" + this.codeId
+					} 	
+					uni.redirectTo({
+						url:url
+					})
+					
+				}else if(this.code == 'A') {
+					
+					var k=API.codeOperation("jp_team51_charge_id:A_"+this.codeId);
+					if(k){
+						uni.redirectTo({
+							url:k
+						})
+					}
+					
+				} else {
+					uni.redirectTo({
+						url: '/pages/index/index'
+					})
+				}
+			},
 			login() {
 				// if(!this.show2){
 				// 	this.show1=true;
@@ -292,42 +381,32 @@
 				this.form.headImg=this.carhelp.getUserInfo().headimgurl;
 				this.form.openId= this.carhelp.getOpenId();
 				this.form.source=2//创建渠道1电单车2电车
-				loginApi.validateCode(this.form).then((response) => {
-					uni.hideLoading(); 
+				
+				
+				if(this.personInfo&&this.personInfo.userType=="1"){
 					
-					var token = response ? response.data.token : '';
-					this.carhelp.setToken(token);
-					this.carhelp.setPersonInfo(response.data.regUser);
-					if(!response.data.regUser.carId){
-						var url="/pages/login/completeInfo?login=1"
+					loginApi.validateGuestCode(this.form).then((response) => {
+						this.loginresponse(response)
 						
-						if(this.code == 'A') {
-							url+="&jpcode=jp_team51_charge_id:A_" + this.codeId
-						} 	
-						uni.redirectTo({
-							url:url
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
 						})
+					})
+				}else{
+					loginApi.validateCode(this.form).then((response) => {
+						this.loginresponse(response)
 						
-					}else if(this.code == 'A') {
-						
-						var k=API.codeOperation("jp_team51_charge_id:A_"+this.codeId);
-						if(k){
-							uni.redirectTo({
-								url:k
-							})
-						}
-						
-					} else {
-						uni.redirectTo({
-							url: '/pages/index/index'
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
 						})
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
 					})
-				})
+				}
+				
+				
 			}
 		}
 	}

+ 1 - 0
pages/login/welcome.vue

@@ -42,6 +42,7 @@
 			}
 		},
 		methods: {
+			
 			imgsload(e){
 				 
 				

+ 13 - 6
pages/monthlyCardActivity/monthlyCardBuy.vue

@@ -82,7 +82,9 @@
 		<!-- 按钮 -->
 		<view class="button">
 			
-			<button class="btn "  v-if="!isReady" >加载中
+			<button class="btn "  v-if="userInfo.userType=='1'" >游客无法购买月卡
+			</button>
+			<button class="btn "  v-else-if="!isReady" >加载中
 			</button>
 			 <button class="btn " v-else-if="ispay" > {{userCard&&ispay?userCard.endTime:''}}到期
 			</button>
@@ -216,7 +218,7 @@
 				infoSet1: false,
 				userCard: null,
 				isReady:false,
-				
+				userInfo:{}
 
 			}
 		},
@@ -230,7 +232,10 @@
 
 		},
 		onShow() {
-			this.checkSubscribe();
+			this.checkSubscribe();
+			
+			// this.getCardList();
+			// this.show2 = true;
 		},
 		computed: {
 			
@@ -369,9 +374,11 @@
 					if (res.code == 200 && res.result) {
 
 						if (res.data.regUser) {
-							var userInfo = res.data.regUser
-
-							if (userInfo.carId && userInfo.realName) {
+							var userInfo = res.data.regUser
+							this.userInfo=userInfo;
+							if(userInfo.userType=="1"){
+							
+							}else if (userInfo.carId && userInfo.realName) {
 								this.infoSet = true;
 
 							} else {

+ 354 - 66
pages/searchPile/chargeProcess/charge.vue

@@ -14,40 +14,98 @@
 				<view class="left lefttitle">
 					请选择充电金额
 				</view>
-				<view class="to-recharge" @click="show=true,recordId='',otherNum_f='',fee=0">
+				<!-- <view class="to-recharge" @click="show=true,recordId='',otherNum_f='',fee=0">
 					去充值
-				</view>
+				</view> -->
+			</view>
+			<view class="card"
+			 @click="payValue=0"
+			 :class="{
+				cardselect:payValue==0,
+				cardno:payValue!=0
+			}">
+			<view class="cardgo" >
+				<view class="cardinfo">
+					<img src="@/assets/img/icon_success.png"  alt="">
+					
+				</view>
+			</view>
+				<view class="title">先付后退</view>
+				<p>充电结束后,余额自动退还,不享受会员优惠</p>
+				<view class="rechargeMain" v-show="payValue==0">
+				 
+					<view class="recharge-item" @click="moneyActiveClass_n=(item.id)"
+						:class="moneyActiveClass_n == item.id ? 'active' : ''" v-for="(item,index) in moneyListN"
+						:key="item.id">
+						{{item.name}}
+					</view>
+				 
+					
+				</view>
+				
 			</view>
-			<p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</p>
-			<view class="rechargeMain">
-				<view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''" class=" recharge-item  ">
-					充满自停
-				</view>
-				<view class="recharge-item" @click="moneyClick(item.id)"
-					:class="!otherNum&&moneyActiveClass == item.id ? 'active' : ''" v-for="(item,index) in moneyList"
-					:key="item.id">
-					{{item.name}}元
-				</view>
-				<view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
-					padding: 1px 0px;">
-					<u-input v-model="otherNum" @input="ckInput"  @focus="focus" type="digit" placeholder="其他充电金额" />
-
-				</view>
-				
+			<view class="card"
+			 @click="paySelectMethod"
+			 :class="{
+				cardselect:payValue==1,
+				cardno:payValue!=1
+			}">
+				<view class="cardgo" >
+					<view class="cardinfo">
+						<img src="@/assets/img/icon_success.png" width="32" alt="">
+						
+					</view>
+				</view>
+				<view class="title">会员账户余额充电</view>
+				
+				<p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
+					<span
+					  @click="paySelectShow()"
+					 style="color:#00B962;margin-left: 20px; ">去充值></span>
+				
+				</p>
+				<view class="rechargeMain" v-show="payValue==1">
+					<view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''" class=" recharge-item  ">
+						充满自停
+					</view>
+					<view class="recharge-item" @click="moneyClick(item.id)"
+						:class="!otherNum&&moneyActiveClass == item.id ? 'active' : ''" v-for="(item,index) in moneyList"
+						:key="item.id">
+						{{item.name}}元
+					</view>
+					<view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
+						padding: 1px 0px;">
+						<u-input v-model="otherNum" @input="ckInput"  @focus="focus" type="digit" placeholder="其他充电金额" />
+				
+					</view>
+					
+				</view>
+				
 			</view>
 			
-			
-			
-			
-			
-			
-
-    <!-- 优惠券2 -->
+    <!-- 优惠券2 -->
+			<view class="discounts2" v-if="false">
+				<view class="left lefttitle">
+					支付方式
+				</view>
+							
+				<view class="right" @click="paySelect=true" style="color:#101010"   >
+								{{payName}}
+					<view class="iconfont">&#xe600;</view>
+				</view>
+							
+			</view>
+	
 			 <view class="discounts2">
 			 	<view class="left lefttitle">
 			 		优惠券
-			 	</view>
-				<view class="right" @click="chooseCoupons"  v-if="selectObj.id">
+			 	</view>
+				
+				<view class="right"   v-if="payValue=='0'">
+					先付后退不享受会员优惠活动
+					
+				</view>
+				<view class="right" @click="chooseCoupons"  v-else-if="selectObj.id">
 					{{selectObj.threshold == 0 ? '无门槛' : '满'+selectObj.threshold.toFixed(2)+'元可用'}},
 					
 					<span class="price" v-if="selectObj.classify == '1'||selectObj.classify == '3'">抵扣{{selectObj.value.toFixed(2)}}元</span>
@@ -71,8 +129,12 @@
 			 <view class="member" v-if="userCardBool" >
 			 	<view class="actively ">
 			 		会员活动
-			 	</view>
-				<view class="type"  v-if="!vin" style="color: red;" >
+			 	</view>
+				<view class="right"   v-if="payValue=='0'">
+					先付后退不享受会员优惠活动
+					
+				</view>
+				<view class="type"  v-else-if="!vin" style="color: red;" >
 					vin码不一致
 				</view>
 				<view class="type" v-else-if="canUse">
@@ -117,7 +179,57 @@
 				title="余额不足" confirm-text="前往充值"
 				content="账户余额不足,充值成功后开始充电" @confirm="show=true"></u-modal>
 
-		
+		<!-- 弹窗2 -->
+		<template >
+			<view >
+				<u-popup v-model="paySelect" mode="bottom"  >
+					<view class="paySelect">
+						<view class="title lefttitle " >选择支付方式</view>
+						<u-radio-group v-model="payValueTemp">
+
+						<p  >
+							<u-radio 
+							name="0"
+							active-color="#2979f6" shape="circle" size="48">
+							<p  >{{payList[0].name}}<span>({{payList[0].tips}})</span> 	</p>
+							 </u-radio>
+						</p>
+						<p  v-if="personInfo.userType=='2'" >
+							<u-radio 
+								name="1"
+							
+							active-color="#2979f6" shape="circle" size="48">
+							<p  >{{payList[1].name}}<span>({{payList[1].tips}})</span> 	</p>
+							</u-radio>
+						</p>
+						<p  v-if="false" >
+							<u-radio  
+								name="2"
+							 active-color="#2979f6" shape="circle" size="48">
+							 <p  >{{payList[2].name}}<span>(其他充值金额)</span> 	</p>
+							 
+							 </u-radio>
+						</p>
+						</u-radio-group>
+					</view>
+					
+					<view class="recharge" style="padding-bottom: 0;">
+						
+						
+						<view class="recharge-btn transactionClass"  style="margin-top: 60px;">
+							
+							
+							<u-button
+							 class="success-btn" @click="paySelectMethod"
+								shape="circle" type="success"  style="margin-top: 12px;margin-bottom: 16px;">
+								<span>确定</span>
+							</u-button>
+						</view>
+					</view>
+				</u-popup>
+				
+			</view>
+		</template>
 		<!-- 弹窗 -->
 		<template >
 			<view >
@@ -154,7 +266,7 @@
 						<view class="recharge-btn transactionClass"  style="margin-top: 60px;">
 							<view >
 								<u-checkbox-group>
-									<u-checkbox active-color="green" v-model="checked" shape="circle" @change="checkboxChange()"></u-checkbox>
+									<u-checkbox active-color="green" v-model="checked" shape="circle"></u-checkbox>
 								</u-checkbox-group>
 								我已阅读并同意<span @click="gotoUrl('pages/article/details?code=CZXY')" style="color:#00B962" >《充值协议》</span>
 								
@@ -195,7 +307,8 @@
 				stationId:"",
 				elderMode:false,
 				isback:true,
-				show: false,
+				show: false,
+				moneyActiveClass_n: "50",
 				moneyActiveClass: "-1",
 				moneyActiveClass_f: "-1",
 				detail: {},
@@ -219,12 +332,29 @@
 				user: {},
 				otherNum_f: '',
 				otherNum: '',
-				moneyList_f:[],
+				moneyList_f:[],
+				paySelect:false,
+				payName:"",
+				payValueTemp:0,
+				payValue:0,
+				payList:[{
+					name:"先付后退",
+					tips:"游客不享受平台优惠活动",
+					value:"1",
+					select:false,
+				},{
+					name:"个人账户支付",
+					tips:"享受平台充电8.5折等优惠活动",
+					value:"2",
+						select:false,
+				},{
+					name:"单位账户支付",
+					tips:"账户余额:99999元",
+					value:"3",
+						select:false,
+				}],
 				moneyList: [
-					{
-						id: '5',
-						name: '5'
-					},
+					
 					{
 						id: '10',
 						name: '10'
@@ -243,7 +373,20 @@
 					},
 
 				],
-				
+				moneyListN: [
+					{
+						id: '50',
+						name: '50元'
+					},
+					{
+						id: '100',
+						name: '100元'
+					},
+					{
+						id: '150',
+						name: '150元'
+					}
+				],
 				userCard:null,
 				canUse:false,
 				selectObj:{},
@@ -253,7 +396,8 @@
 				vin:true,
 				bannerList:[],
             checked:true,
-			selectItem:{},
+			selectItem:{},
+			personInfo:{},
 			}
 		},
 		computed:{
@@ -273,7 +417,7 @@
 		},
 		onLoad(op) {
 			
-			// var plus=this.carhelp.getPersonInfoPlus()
+			 this.personInfo=this.carhelp.getPersonInfo()
 			// if(plus){
 			// 	this.userCard=plus.userCard;
 			// }
@@ -301,7 +445,17 @@
 				}
 				this.init()
 		},
-		onReady(){
+		onReady(){
+			this.personInfo=this.carhelp.getPersonInfo()
+			if(this.personInfo.userType=="1"){
+				this.payValueTemp=0;
+				this.payValue=0;
+			}else{
+				this.payValueTemp=1;
+				this.payValue=1;
+			}
+			this.payName=this.payList[this.payValue].name;
+			
 			this.getBannerInfo("charge-start")
 			
 			this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
@@ -310,7 +464,9 @@
 			else
 				this.theme('standard')
 		},
-		onShow() {
+		onShow() {
+			this.personInfo=this.carhelp.getPersonInfo()
+			
 			var obj=this.carhelp.get("chooseCoupons");
 			if(obj){
 				if(obj.uuid==this.uuid){
@@ -320,7 +476,28 @@
 			
 			this.getHomePage()
 		},
-		methods: {
+		methods: {
+			paySelectShow(){
+				if(this.personInfo.userType=="1"){
+					
+				}else{
+					this.show=true;
+					this.recordId='';
+					this.otherNum_f='';
+					this.fee=0
+				}
+				
+			},
+			paySelectMethod(){
+				if(this.personInfo.userType=="1"){
+					uni.showToast({
+						title:"游客模式只支持“先付后退”"
+					})
+				}else{
+					this.payValue=1
+				}
+				
+			},
 			moneyClick_f(index,item) {
 				this.otherNum_f='';
 				this.moneyActiveClass_f = index;
@@ -330,6 +507,29 @@
 					// 	this.selectImg=item
 					// }
 				}
+			},
+			rechargeNow2() {
+				//先付后退
+				
+				
+				this.submitForm_f={};
+				var fee=0;
+				this.submitForm_f.amount=this.fee;
+				
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				if(this.recordId){
+					this.submitForm_f.recordId=this.recordId
+					
+					
+				}
+				//(this.submitForm)
+				this.wxpy()
+				
 			},
 			rechargeNow() {
 				if(!this.checked){
@@ -570,13 +770,16 @@
 			radioChange(e){},
 			confirm() {
 
-				////(JSON.stringify(this.submitForm))
-				if(this.selectObj.id){
-					this.submitForm.userCouponId=this.selectObj.id
-				}
-				if(this.userCardBool&&this.canUse&&this.vin){
-					this.submitForm.userCardId=this.userCard.id
+				////(JSON.stringify(this.submitForm))
+				if(this.payValue!=0){
+					if(this.selectObj.id){
+						this.submitForm.userCouponId=this.selectObj.id
+					}
+					if(this.userCardBool&&this.canUse&&this.vin){
+						this.submitForm.userCardId=this.userCard.id
+					}
 				}
+				
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -586,16 +789,26 @@
 				API.startCarCharging(this.submitForm).then((res) => {
 					//(JSON.stringify(this.res))
 					
-					if(res.data.status=="5"){
-						uni.hideLoading()
-						this.showmodal=true;
-						this.recordId=res.data.recordId;
-					
-						var fee=res.data.fee;
-					
+					if(res.data.status=="5"){
+						
+						uni.hideLoading()
+						
+						if(this.submitForm.payType=="1"){
+							this.recordId=res.data.recordId;
+							this.fee=res.data.fee;
+							
+							this.rechargeNow2()//先付后退
+						}else{
+							this.showmodal=true;
+							this.recordId=res.data.recordId;
+												
+							var fee=res.data.fee;
+												
+							
+							this.fee=(fee-this.user.balance).toFixed(2);
+							this.otherNum_f=this.fee;
+						}
 						
-						this.fee=(fee-this.user.balance).toFixed(2);
-						this.otherNum_f=this.fee;
 					}else{
 						
 						this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id=" + res.data.recordId);
@@ -676,7 +889,9 @@
 					})
 				})
 			},
-			submitInit(){
+			submitInit(){
+				
+				
 				if (this.moneyActiveClass == -1 && !this.otherNum) {
 					this.submitForm.chargeStrategy = 0;
 					this.submitForm.amount = 0
@@ -687,10 +902,12 @@
 					} else {
 						this.submitForm.amount = this.moneyActiveClass
 					}
-				}
+				}
+				
+				
 			},
 			submit() {
-				this.submitInit()
+				
 				
 
 				if (!this.submitForm.channelNo) {
@@ -698,8 +915,15 @@
 						title: '请先选择充电通道'
 					})
 					return
+				}
+				this.submitForm.payType=this.payList[this.payValue].value;
+				if(this.submitForm.payType=="1"){
+					 this.submitForm.amount = this.moneyActiveClass_n
+					 this.submitForm.chargeStrategy = 2;
+				}else{
+					this.submitInit()
 				}
-
+				
 				this.confirm()
 			 
 
@@ -761,7 +985,27 @@
 		color: #999999;
 
 	}
-	
+	.paySelect{
+			padding: 16px;
+		.title{
+			font-size:40rpx
+		}
+		p  {
+			width: 100%;
+			span{
+				color: #666;
+			}
+			.u-radio__label{
+					color: #333333 ;
+			}
+			.u-radio{
+				width: 100% !important;;
+			}
+			color: #333333 ;
+			margin-top: 16rpx;
+			font-size:32rpx;
+		}
+	}
 
 	.recharge {
 		padding: 16px;
@@ -972,8 +1216,8 @@ position: relative;
 			color: rgba(16, 16, 16, 100);
 /*			font-size: 20px;*/
 			@include themeify{
-				width:themed('buttonWidth1');
-				font-size: themed('font-size5'); 
+				width:160rpx;
+				font-size: 40rpx; 
 			}
 		}
 		.right{
@@ -1095,5 +1339,49 @@ position: relative;
 		right: 0;
 	
 	}
-
+	.card {
+	
+		padding: 10px;
+		margin-top: 10px;
+		.title{
+			
+			font-weight: bold;
+		}
+	}
+	.cardselect {
+		border-radius: 8px;
+		border: 2px solid rgba(0, 185, 98, 1);
+		.title{
+			color:#00B962;
+			font-weight: bold;
+		}
+		.cardgo{
+				position: relative;
+			 
+				.cardinfo{
+					    background-color: #57ad55;
+					width: 64rpx;
+					height: 64rpx;
+					position: absolute;
+					    top: -10px;
+					    right: -10px;
+						    border-radius: 0 0 0 8px;
+							img{
+								width: 64rpx;
+							}
+				}
+		}
+	}
+	.cardno {
+		border: 2px solid rgba(204, 204, 204, 1);
+		border-radius: 8px;
+		.title{
+			
+			font-weight: bold;
+		}
+		.cardgo{
+			display: none;
+		}
+		
+	}
 </style>

+ 39 - 14
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -117,6 +117,29 @@
 				
 			</view>
 		</view>
+		<u-modal v-model="showVin"  class="showOss" 
+		    confirm-text="注册会员"   cancel-text="先不注册"
+			width="560"
+			
+		:show-title="false"  :show-cancel-button="false" :show-confirm-button="false" >
+			<view class="slot-content">
+				
+					<u-image width="120px"  style="margin: auto;margin-top:20px"
+					mode="widthFix"  
+					src="@/static/img/充电中-缺省页.png"></u-image>
+					<view style="padding:0 40px;font-size: 36rpx;">
+					
+					游客身份充电将无法享受<span style="color:red">会员服务费8.5折</span>等优惠活动哦~
+					</view>
+					<u-button shape="circle" @click="gotoLogin"
+					 style="    width: 60%; margin-top: 20px;"
+					 szie="mini" type="success" >注册会员</u-button>
+					<u-button shape="circle"
+					   style="    width: 60%; margin-top: 10px; margin-bottom: 30px;"
+					  szie="mini" type="info"  @click="showVin=false" >暂不注册,先充电</u-button>
+					
+			</view>
+		</u-modal>
 		
 		<view class="cost-explain">
 			<view class="text">
@@ -201,8 +224,6 @@
 		<!-- 弹窗 -->
 		<view>
 
-		 
-		
 		
 			<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
 				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone"
@@ -347,18 +368,7 @@
 					})
 				})
 			},
-			vinCk(){
-				
-				if(this.userCard&&this.userCard.vin&&this.gun&&this.gun.vin){
-					if(this.userCard.vin==this.gun.vin){
-						return true
-					}else{
-						return false
-					}
-				}else{
-					return true
-				}
-			},
+			 
 			priceDetail(){
 				uni.navigateTo({
 					url:'chargePriceDetails?stationId='+this.detail.stationId+"&type="+this.detail.type+"&id="+this.detail.id
@@ -383,6 +393,17 @@
 					})
 				}
 				
+			},
+			gotoLogin(){
+				this.onShowRole = true
+				if(false){
+					
+				}else{
+					uni.navigateTo({
+						url: "/pages/login/login?jpcode=jp_team51_charge_id:A_" +  this.id
+					})
+				}
+				
 			},
 			carDet(t){
 				this.onShowRole = true
@@ -563,6 +584,10 @@
 			if (op.id) {
 				this.id = op.id
 				
+				var personInfo=this.carhelp.getPersonInfo()
+				if(personInfo.userType=="1"){
+					this.showVin=true
+				}
 				
 				
 				//this.carhelp.setGunId(op.id)

+ 93 - 8
pages/user/index.vue

@@ -3,11 +3,22 @@
 		<view class="header">
 			<!-- 用户信息 -->
 			<view class="userinfo">
-				<view class="infos" @click="toData">
-					<view class="head-portrait">
+				<view class="infos" @click="toData"  >
+					<view class="head-portrait"  >
+						
 						<u-avatar :src="userId ? headImg : '../../assets/img/head.png'" size="96"></u-avatar>
 					</view>
-					<view class="username">
+					
+					<view class="username" v-if="personInfo&&personInfo.userType==1" >
+						<view class="name" :style="elderStatus ? 'font-size: 28px;' : ''">
+							{{userId ? nickName : '登录 / 注册'}}
+						</view>
+						<view class="change" :style="elderStatus ? 'font-size: 16px;' : ''">
+							点击注册51充电联盟会员
+						</view>
+					</view>
+					
+					<view class="username" v-else >
 						<view class="name" :style="elderStatus ? 'font-size: 28px;' : ''">
 							{{userId ? nickName : '登录 / 注册'}}
 						</view>
@@ -38,8 +49,24 @@
 				</view>
 			</view>
 		 
+		 <view class="openlogin" v-if="personInfo&&personInfo.userType==1" >
+		 	<view class="title">
+		 		<text class="img">
+		 			<img src="../../assets/img/riFill-user-2-fill.svg" alt="">
+		 		</text>51充电联盟会员
+				<view>
+					注册立享充电服务费<span style="color: red;">8.5折</span>
+				</view>
+		 	</view>
+			
+		 	<view class="open-btn" @click="gotoUrl('pages/login/login')">
+		 		立即注册
+		 		<text class="iconfont">&#xe632;</text>
+		 	</view>
+		 </view>
+		 
 			<!-- 立即开通 -->
-			<view class="open" v-if="userId&&!userCardBool">
+			<view class="open" v-else-if="userId&&!userCardBool">
 				<view class="title">
 					<text class="img">
 						<img src="../../assets/img/antFill-crown@3x.png" alt="">
@@ -64,7 +91,7 @@
 			</view>
 
 			<!-- 可用余额 -->
-			<view class="balance">
+			<view class="balance"   v-if="!(personInfo&&personInfo.userType==1)" >
 				<view class="item" @click="toBalance">
 					<view class="num oldTextjp" oldstyle="font-size: 28px;">
 						{{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}<span style="font-size: 16px;">元</span>
@@ -224,6 +251,7 @@
 				headImg: '',
 				nickName: '',
 				userPhone: '',
+				personInfo:{},
 				show: false,
 				title: '联系客服',
 				content: '400-8899-619',
@@ -236,7 +264,10 @@
 			}
 		},
 		onShow() {
+			this.personInfo=this.carhelp.getPersonInfo()
+			
 			if(this.carhelp.getPersonInfo()) {
+				
 				this.userId = this.carhelp.getPersonInfo().id;
 				
 				this.getCarPersonAccount();
@@ -426,7 +457,9 @@
 					this.userPhone = phone1 + '****' + phone2;
 					
 					if (res.code == 200&&res.result) {
-						var token = res ? res.data.token : '';					
+						var token = res ? res.data.token : '';	
+						this.personInfo=res.data.regUser
+										
 						this.carhelp.setPersonInfo(res.data.regUser );
 						this.carhelp.setToken(token);
 						this.carhelp.setPersonInfoPlus(res.data);
@@ -439,8 +472,12 @@
 					})
 				})
 			},
-			toData() {			
-				if(this.userId) {
+			toData() {
+				if(this.personInfo&&this.personInfo.userType==1){
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}else if(this.userId) {
 					uni.navigateTo({
 						url: '/pages/user/dataSet'
 					})
@@ -449,6 +486,8 @@
 						url: '/pages/login/login'
 					})
 				}
+				
+				
 			},
 			toBalance() {			
 				if(this.userId) {
@@ -684,7 +723,53 @@
 				font-size: 16px;
 			}
 		}
+// 立即开通
+		.openlogin {
+			border: 1px solid rgba(187, 226, 189, 1);
+			background: #F4FFF3 ;
+			width: 91.4%;
+			padding: 30rpx 24rpx 24rpx 24rpx;
+			margin: 8rpx auto 0;
+			margin-bottom: 10px;
+			display: flex;
+			justify-content: space-between;
+			border-radius: 8px;
+			.title {
+				line-height: 24px;
+				color: #101010;
+				font-size: 32rpx;
+					
+				.img {
+					display: inline-block;
+					width: 48rpx;
+					height: 48rpx;
+					vertical-align: middle;
+					margin-right: 8px;
+					
+					img {
+						width: 40rpx;
+						height: 40rpx;
+					}
+				}
+			}
+					
+			.open-btn {
+				    margin: auto;
+				padding-left: 12px;
+				padding-right: 4px;
+				line-height: 28px;
+				    height: 32px;
+				// text-align: center;
+				color: #ffffff;
 
+				border-radius: 10px;
+				background: linear-gradient(to right,#34BC58 , #00A39A );
+					
+				.iconfont {
+					margin-left: 0px;
+				}
+			}
+		}
 		// 立即开通
 		.open,.opened {
 			background: linear-gradient(#4A4C62, #2C3145);