zhupeng преди 3 години
родител
ревизия
7f77f24c45

+ 1 - 1
.env.prod.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  	
 const UNI_APP = {  	
 		ProjectName :"51充电联盟",
 		ProjectName :"51充电联盟",
-    BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
+    BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
 	NODE_ENV :"prod",
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,
 	SIMPLE_RUN:false,
 	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",//测试用openId
 	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",//测试用openId

+ 221 - 0
_theme.scss

@@ -0,0 +1,221 @@
+//当HTML的data-theme为dark时,样式引用dark
+//data-theme为其他值时,就采用组件库的默认样式
+//这里我只定义了两套主题方案,想要再多只需在`$themes`里加就行了
+//注意一点是,每套配色方案里的key可以自定义但必须一致,不然就会混乱
+ 
+$themes: (
+ 
+elder: (
+//字体
+font-size0: 12px,
+font-size1: 14px,
+font-size2: 16px,
+font-size3: 18px,
+font-size4: 20px,
+font-size5: 22px,
+font-size6: 24px,
+font-size7: 26px,
+font-size8: 28px,
+font-size9: 30px,
+font-size10: 32px,
+font-size11: 34px,
+font-size12: 36px,
+font-size13: 38px,
+buttonWidth: 300rpx,
+fontWeight: bold!important,
+font_color1: #410311,
+font_color2: white,
+font_colorLabel:#000000,
+letterSpacing:2px,
+cardHeight:390rpx,
+//背景
+background_color1: #3422ff,
+background_color2: #f0f2f5,
+background_color3: red,
+background_color4: #2674e7,
+ 
+//边框
+border_color1: #3d414a,
+ 
+),
+ 
+standard: (
+//字体
+font-size0: 10px,
+font-size1: 12px,
+font-size2: 14px,
+font-size3: 16px,
+font-size4: 18px,
+font-size5: 20px,
+font-size6: 22px,
+font-size7: 24px,
+font-size8: 26px,
+font-size9: 28px,
+font-size10: 30px,
+font-size11: 32px,
+font-size12: 34px,
+font-size13: 36px,
+
+font_color1: #a77439,
+font_color2: white,
+fontWeight: normal,
+font_colorLabel:#9f9c99,
+letterSpacing:0px,
+buttonWidth: 260rpx,
+cardHeight:360rpx,
+//背景
+background_color1: #1b2531,
+background_color2: #283142,
+background_color3: #1e6ceb,
+background_color4: #323e4e,
+ 
+//边框
+border_color1: #3d414a,
+ 
+)
+);
+
+//遍历主题map
+@mixin themeify {
+@each $theme-name, $theme-map in $themes {
+//!global 把局部变量强升为全局变量
+$theme-map: $theme-map !global;
+//判断html的data-theme的属性值  #{}是sass的插值表达式
+//& sass嵌套里的父容器标识   @content是混合器插槽,像vue的slot
+[data-theme="#{$theme-name}"] & {
+@content;
+}
+}
+}
+ 
+//声明一个根据Key获取颜色的function
+@function themed($key) {
+@return map-get($theme-map, $key);
+}
+
+.font1{
+		@include themeify{
+			font-size: themed('font-size1');
+		}
+	}
+	
+.font2{
+		@include themeify{
+			font-size: themed('font-size2');
+		}
+	}
+.font3{
+		@include themeify{
+			font-size: themed('font-size3');
+		}
+	}
+.font4{
+		@include themeify{
+			font-size: themed('font-size4');
+		}
+	}
+.font5{
+		@include themeify{
+			font-size: themed('font-size5');
+		}
+	}
+.font6{
+		@include themeify{
+			font-size: themed('font-size6');
+		}
+	}
+.font7{
+		@include themeify{
+			font-size: themed('font-size7');
+		}
+	}
+.font8{
+		@include themeify{
+			font-size: themed('font-size8');
+		}
+	}
+.font9{
+		@include themeify{
+			font-size: themed('font-size9');
+		}
+	}
+.font10{
+		@include themeify{
+			font-size: themed('font-size10');
+		}
+	}				
+						
+			
+
+.font-weight1{
+		@include themeify{
+			font-size: themed('font-size1');
+			font-weight:themed('font-weight1');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+	
+.font-weight2{
+		@include themeify{
+			font-size: themed('font-size2');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight3{
+		@include themeify{
+			font-size: themed('font-size3');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight4{
+		@include themeify{
+			font-size: themed('font-size4');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight5{
+		@include themeify{
+			font-size: themed('font-size5');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight6{
+		@include themeify{
+			font-size: themed('font-size6');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight7{
+		@include themeify{
+			font-size: themed('font-size7');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight8{
+		@include themeify{
+			font-size: themed('font-size8');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight9{
+		@include themeify{
+			font-size: themed('font-size9');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}
+.font-weight10{
+		@include themeify{
+			font-size: themed('font-size10');
+			font-weight:themed('fontWeight');
+			letter-spacing: themed('letterSpacing');
+		}
+	}				
+			 

+ 8 - 0
apis/chargeProcess.js

@@ -50,3 +50,11 @@ export function stopCarCharging(data) {
 		url: '/mobile/command/stopCarCharging'
 		url: '/mobile/command/stopCarCharging'
 	})
 	})
 }
 }
+
+export function useCoupon(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/chargingCouponApi/useCoupon'
+	})
+}

+ 6 - 0
apis/index.js

@@ -11,6 +11,12 @@ export function codeOperation(url) {
 	if(url&&url.indexOf("#/?jpcode=")>-1){
 	if(url&&url.indexOf("#/?jpcode=")>-1){
 		res=url.split("#/?jpcode=")[1]
 		res=url.split("#/?jpcode=")[1]
 	}
 	}
+	if(url&&url.indexOf("#/?gunId=")>-1){
+		var gunId=url.split("#/?gunId=")[1]
+		res="jp_team51_charge_id:A_"+gunId
+	}
+	
+	
 	if(res&&res.length>22){
 	if(res&&res.length>22){
 		
 		
 	}else if(res == 'toLogin') {
 	}else if(res == 'toLogin') {

+ 28 - 1
apis/user.js

@@ -86,6 +86,33 @@ export function feedback  (data) {
 	return request({
 	return request({
 		method: 'post',
 		method: 'post',
 		data:data ,
 		data:data ,
-		url: '/mobile/feedback/submit '
+		url: '/mobile/feedback/submit'
+	})
+}
+
+export function couponList(data) {
+	 
+	return request({
+		method: 'post',
+		data:data ,
+		url: '/mobile/chargingCouponApi/couponList'
+	})
+}
+
+export function couponDetail(data) {
+	 
+	return request({
+		method: 'post',
+		data:data ,
+		url: '/mobile/chargingCouponApi/couponDetail'
+	})
+}
+
+export function exchange(data) {
+	 
+	return request({
+		method: 'post',
+		data:data ,
+		url: '/mobile/chargingCouponApi/exchange'
 	})
 	})
 }
 }

+ 8 - 0
apis/weixin.js

@@ -41,3 +41,11 @@ export function getConfig() {
 		method: 'get',
 		method: 'get',
 	})
 	})
 }
 }
+
+export function checkSubscribe(data) {
+	return request({
+		url: '/wechat/checkSubscribe',
+		data: data,
+		method: 'post',
+	})
+}

+ 24 - 4
assets/font/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
 @font-face {
-  font-family: 'custom-icon';  /* Project id 3394761 */
-  src: url('//at.alicdn.com/t/font_3394761_66t9qhyeaj.woff2?t=1653371047948') format('woff2'),
-       url('//at.alicdn.com/t/font_3394761_66t9qhyeaj.woff?t=1653371047948') format('woff'),
-       url('//at.alicdn.com/t/font_3394761_66t9qhyeaj.ttf?t=1653371047948') format('truetype');
+  font-family: "custom-icon"; /* Project id 3394761 */
+  src: url('//at.alicdn.com/t/font_3394761_5uvbnito1fn.woff2?t=1653965408137') format('woff2'),
+       url('//at.alicdn.com/t/font_3394761_5uvbnito1fn.woff?t=1653965408137') format('woff'),
+       url('//at.alicdn.com/t/font_3394761_5uvbnito1fn.ttf?t=1653965408137') format('truetype');
 }
 }
 
 
 .custom-icon {
 .custom-icon {
@@ -13,6 +13,26 @@
   -moz-osx-font-smoothing: grayscale;
   -moz-osx-font-smoothing: grayscale;
 }
 }
 
 
+.custom-icon-account-pin-circle-fill:before {
+  content: "\e638";
+}
+
+.custom-icon-question-answer-fill:before {
+  content: "\e635";
+}
+
+.custom-icon-gift-2-fill:before {
+  content: "\e636";
+}
+
+.custom-icon-wechat-fill:before {
+  content: "\e637";
+}
+
+.custom-icon-a-Frame211:before {
+  content: "\e634";
+}
+
 .custom-icon-chenggong:before {
 .custom-icon-chenggong:before {
   content: "\e668";
   content: "\e668";
 }
 }

+ 39 - 13
main.js

@@ -33,21 +33,47 @@ const app = new Vue({
 Vue.mixin({
 Vue.mixin({
 	updated: function() {
 	updated: function() {
 		this.$nextTick(function() {
 		this.$nextTick(function() {
-			if (true) {
+			var g=this.carhelp.get("getElderModeClass");
+			
+		
 				//  仅在整个视图都被重新渲染之后才会运行的代码
 				//  仅在整个视图都被重新渲染之后才会运行的代码
 				var list = document.getElementsByClassName("oldTextjp")
 				var list = document.getElementsByClassName("oldTextjp")
-				var relist = {
-					oldNum1: "font-size:[num]px !important ;font-weight:bold !important;",
-					oldNum2: "line-height:[num]px ;",
-					oldNum3: "width:[num]px;",
-					oldNum4: "height:[num]px; ",
-				};
+				var list2 = document.getElementsByClassName("oldTextjp2")
 
 
-				for (var i = 0; i < list.length; i++) {
-					var str = list[i].getAttribute("oldstyle");
-					if(str){
-						list[i].style = str+";font-weight:bold !important;"
-					}
+				for (var i = 0; i < list.length; i++) {
+						var edit = list[i].getAttribute("oldstyle-edit");
+						if(!edit){
+											list[i].setAttribute("oldstyle-edit",list[i].style.cssText);			
+						}else{
+							edit=""
+						}
+						if (g) {
+							var str = list[i].getAttribute("oldstyle");
+							if(str){
+								list[i].style = str+";font-weight:bold !important;"
+							}
+						}else{
+								list[i].style=edit
+						}
+					
+				}
+				
+				for (var i = 0; i < list2.length; i++) {
+						var edit = list2[i].getAttribute("oldstyle-edit");
+						if(!edit){
+											list2[i].setAttribute("oldstyle-edit",list2[i].style.cssText);			
+						}else{
+							edit=""
+						}
+						if (g) {
+							var str = list2[i].getAttribute("oldstyle");
+							if(str){
+								list2[i].style = str+";"
+							}
+						}else{
+								list2[i].style=edit
+						}
+					
 				}
 				}
 	
 	
 				// for (var i = 0; i < list.length; i++) {
 				// for (var i = 0; i < list.length; i++) {
@@ -67,7 +93,7 @@ Vue.mixin({
 				// 	list[i].style = str
 				// 	list[i].style = str
 
 
 				// }
 				// }
-			}
+		
 
 
 
 
 
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 17539
package-lock.json


+ 6 - 0
pages.json

@@ -387,6 +387,12 @@
 			"style": {
 			"style": {
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
+		},
+		{ "name":"邀请好友",
+			"path": "pages/user/InviteFriends",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		}
 		}
         
         
     ],
     ],

+ 26 - 19
pages/index/index.vue

@@ -50,7 +50,7 @@
 		</view>
 		</view>
         
         
 		<!-- 模式选择 -->
 		<!-- 模式选择 -->
-		<u-mask :show="show" @click="show = false">
+		<u-mask :show="show">
 			<view class="wrap">
 			<view class="wrap">
 				
 				
 		
 		
@@ -68,14 +68,15 @@
 								active-color="red"
 								active-color="red"
 							>
 							>
 								{{item.name}}
 								{{item.name}}
-								<p>字体更大 看的清楚</p>
+								<p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
+								<p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
 							</u-radio>
 							</u-radio>
 								
 								
 						</u-radio-group>
 						</u-radio-group>
 					</view>
 					</view>
 					<view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
 					<view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
 					<view class="btn-box">
 					<view class="btn-box">
-							<u-button class="choice-btn" type="success" shape="circle" >我选好了</u-button>
+							<u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
 					</view>
 					</view>
 			</view>
 			</view>
 				</view>
 				</view>
@@ -275,7 +276,7 @@
 				latitude: '',
 				latitude: '',
 				message: '',
 				message: '',
 				indexLogo:'',
 				indexLogo:'',
-				show: true,
+				show: false,
 				list: [
 				list: [
 								{
 								{
 									name: '长辈模式',
 									name: '长辈模式',
@@ -309,6 +310,10 @@
 			this.timeOut = false;
 			this.timeOut = false;
 			this.pointTimeOut = false;
 			this.pointTimeOut = false;
 		},
 		},
+		onHide() {
+			this.timeOut = false;
+			this.pointTimeOut = false;
+		},
 		onReachBottom() {
 		onReachBottom() {
 			if (this.newsList.length < this.recordsTotal) {
 			if (this.newsList.length < this.recordsTotal) {
 				this.myLoadmore();
 				this.myLoadmore();
@@ -316,6 +321,7 @@
 		},
 		},
 		onReady() {
 		onReady() {
 			if (this.carhelp.getPersonInfo()) {
 			if (this.carhelp.getPersonInfo()) {
+				this.show = true;
 				this.userId = this.carhelp.getPersonInfo().id;
 				this.userId = this.carhelp.getPersonInfo().id;
 				this.getFindChargeData();
 				this.getFindChargeData();
 			}
 			}
@@ -332,21 +338,20 @@
 			this.getActivityInfoList();
 			this.getActivityInfoList();
 		},
 		},
 		methods: {
 		methods: {
+			elderClick() {
+				this.show = false;
+			},
 			getPointTimeOut() {
 			getPointTimeOut() {
-				if(this.pointTimeOut){
+			
 					setTimeout(()=>{
 					setTimeout(()=>{
-						this.getPoint();
+						if(this.pointTimeOut){
+							this.getPoint();
+						}
 					},1000)
 					},1000)
-				}
+				
 			},
 			},
 			getFindChargeData() {
 			getFindChargeData() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				
 				API.findChargeData().then((res) => {				
 				API.findChargeData().then((res) => {				
-					uni.hideLoading();
 					this.chargeList = res.data.chargingRecordList;
 					this.chargeList = res.data.chargingRecordList;
 					
 					
 					var list = res.data.chargingRecordList;
 					var list = res.data.chargingRecordList;
@@ -1004,7 +1009,7 @@
 		border-radius: 16px;
 		border-radius: 16px;
 		background-color: #fff;
 		background-color: #fff;
 		position: fixed;
 		position: fixed;
-		top: 150px;
+		top: 100px;
 		left: 0;
 		left: 0;
 		right: 0;
 		right: 0;
 	   margin: 0 auto;
 	   margin: 0 auto;
@@ -1017,12 +1022,12 @@
 		   padding: 16px 0 ;
 		   padding: 16px 0 ;
 	   }
 	   }
 	   .u-radio-group{
 	   .u-radio-group{
-		  margin: 16px 24px;
-		  
+		  margin: 16px 5vw;
 	   }
 	   }
 	   /deep/.u-radio{
 	   /deep/.u-radio{
-		     width:60vw !important;  
-		   padding: 24px 24px 50px;
+		     width:60vw !important; 
+			 
+		   padding: 24px 24px 40px;
 		   line-height: 20px;
 		   line-height: 20px;
 		   border-radius: 16px;
 		   border-radius: 16px;
 		   text-align: center;
 		   text-align: center;
@@ -1038,10 +1043,12 @@
 
 
 	   }
 	   }
 	   p{
 	   p{
+		   
 		   height: 22px;
 		   height: 22px;
 		   color: rgba(102, 102, 102, 100);
 		   color: rgba(102, 102, 102, 100);
-		   font-size: 16px;
+		   font-size: 14px;
 		   margin-top: 12px;
 		   margin-top: 12px;
+		   white-space: nowrap
 	   }
 	   }
 	   .hint{
 	   .hint{
 		   text-align: center;
 		   text-align: center;

+ 11 - 2
pages/login/login.vue

@@ -191,8 +191,17 @@
 					var token = response ? response.data.token : '';
 					var token = response ? response.data.token : '';
 					this.carhelp.setToken(token);
 					this.carhelp.setToken(token);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfo(response.data.regUser);
-					
-					if(this.code == 'A') {
+					if(!response.data.regUser.carId){
+						var url="/pages/user/car/carDet?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);
 						var k=API.codeOperation("jp_team51_charge_id:A_"+this.codeId);
 						if(k){
 						if(k){

+ 70 - 10
pages/login/welcome.vue

@@ -1,11 +1,26 @@
 <template>
 <template>
 	<view>
 	<view>
+		
+		
 		<view class="welcome">
 		<view class="welcome">
-			<view class="welcome-state1">
-				<view class="welcome-next" @click="gotoIndex()">{{step?step+'|':''}}跳过</view>
-				<view class="welcome-foot">
-					<u-image width="185px" height="48px" src="../../static/img/logo.png"></u-image>
-				</view>
+			
+			<view class="welcome-state1" >
+				<view class="welcome-next" style="z-index: 999;" @click="gotoIndex()">{{step?step+'|':''}}跳过</view>
+				
+			</view>
+			
+			<u-image  id="imgw" v-if="imgmode"   @load="imgsload" ref="imgw"  mode="widthFix">
+				<view slot="loading"></view>
+				<view slot="error"></view>
+			</u-image>
+			
+			<u-image   v-if="!imgmode"  :height="imgH"  ref="imgw2"  mode="aspectFill">
+				<view slot="loading"></view>
+				<view slot="error"></view>
+			</u-image>
+			
+ 			<view class="welcome-foot">
+				<u-image width="185px" height="48px" src="../../static/img/logo.png"></u-image>
 			</view>
 			</view>
 			<!-- <view class="welcome-state2">
 			<!-- <view class="welcome-state2">
 				<view class="welcome-logo">
 				<view class="welcome-logo">
@@ -28,10 +43,39 @@
 		data() {
 		data() {
 			return {
 			return {
 				isReady:true,
 				isReady:true,
-				step:3
+				step:3,
+				imgH:'',
+				imgmode:true
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			imgsload(e){
+				 
+				
+				uni.getSystemInfo({
+					success: (res) => {
+						console.log(res)
+						
+						const query = uni.createSelectorQuery().in(this);
+						query.select('#imgw').boundingClientRect(data => {
+						  console.log("得到布局位置信息" + JSON.stringify(data));
+						  console.log("节点离页面顶部的距离为" + data.height);
+						  var windowH=res.windowHeight;
+						  var imgH= data.height;
+						  var value=windowH-imgH;
+						  console.log(value)
+						  if(value>=100){
+							  this.imgmode=true
+							  document.getElementsByClassName("welcome-foot")[0].style="height:"+value+"px"
+						  }else{
+							  this.imgmode=false
+							  
+						  }
+						}).exec();
+						
+					}
+				})
+			},
 			 findNoLTextConfigure(){
 			 findNoLTextConfigure(){
 				 loginApi.findNoLTextConfigure().then((response) => {
 				 loginApi.findNoLTextConfigure().then((response) => {
 				
 				
@@ -85,10 +129,14 @@
 			},
 			},
 			setBackImg(){
 			setBackImg(){
 				var  img=this.carhelp.getConfig().homepageLogo
 				var  img=this.carhelp.getConfig().homepageLogo
-				// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+					
 				if(img){
 				if(img){
-					document.body.style="background:url("+img+") no-repeat;background-size: 100%;"
+					this.$refs.imgw.src=img
+					//document.body.style="background:url("+img+") no-repeat;background-size: 100%;"
+				}else{
+					this.$refs.imgw.src="../../static/img/welcome_bg.png"
 				}
 				}
+				
 			},
 			},
 			gotoIndex(){
 			gotoIndex(){
 				if(this.isReady){
 				if(this.isReady){
@@ -111,12 +159,22 @@
 					},1000)
 					},1000)
 			},
 			},
 			onReadyIng(){
 			onReadyIng(){
+				//let state = {};
+				uni.getSystemInfo({
+					success: (res) => {
+						 var windowH=res.windowHeight;
+						this.imgH=(windowH-100)+"px";
+						
+					}
+				})
+								
 				this.indexstep()
 				this.indexstep()
 				this.setBackImg( )
 				this.setBackImg( )
 			},
 			},
 			
 			
 		},
 		},
 		onLoad(op) {
 		onLoad(op) {
+			
 			this.findNoLTextConfigure()
 			this.findNoLTextConfigure()
 			this.findByOpenId()
 			this.findByOpenId()
 			if(op.gunId){
 			if(op.gunId){
@@ -137,6 +195,7 @@
 				}
 				}
 							
 							
 			}else{
 			}else{
+				
 				this.onReadyIng()
 				this.onReadyIng()
 			}
 			}
 			
 			
@@ -152,8 +211,9 @@
 </script>
 </script>
 <style>
 <style>
 	page{
 	page{
-		background:url(../../static/img/welcome_bg.png) no-repeat;
-		background-size:100%;
+		/* background:url(../../static/img/welcome_bg.png) no-repeat;
+		background-size:100%; */
+		background-color: #ffffff;
 	}
 	}
 </style>
 </style>
 <style  lang="scss" scoped>
 <style  lang="scss" scoped>

+ 62 - 46
pages/searchPile/chargeProcess/charge.vue

@@ -27,25 +27,28 @@
 			</view>
 			</view>
 
 
 			<!-- 优惠券 -->
 			<!-- 优惠券 -->
-			<view class="discounts" v-if="false">
+			<view class="discounts" v-if="list.length" >
 				<view class="title">
 				<view class="title">
-					<view class="title-1">
+					<span class="title-1">
 						优惠券
 						优惠券
-					</view>
-					<view class="title-2">
+					</span>
+					<span class="title-2">
 						每次只能使用1张
 						每次只能使用1张
-					</view>
-					<view class="title-3">
+					</span>
+					<span class="title-3">
 						-¥6.00
 						-¥6.00
-					</view>
+					</span>
 				</view>
 				</view>
 				<view class="select">
 				<view class="select">
-					<u-radio-group v-model="value" @change="radioGroupChange" wrap="true">
+					<u-radio-group v-model="value" @change="radioGroupChange" :wrap="true">
+						
 						<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name"
 						<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name"
+							:style="item.disabled?'	background-color: #e3e3e3 !important;':''"
 							:disabled="item.disabled">
 							:disabled="item.disabled">
 							{{item.name}}
 							{{item.name}}
 
 
-						</u-radio>
+						</u-radio>
+						 
 						<view class="explain">使用说明</view>
 						<view class="explain">使用说明</view>
 					</u-radio-group>
 					</u-radio-group>
 
 
@@ -78,7 +81,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				isback:true,
 				isback:true,
-				moneyActiveClass: "5",
+				moneyActiveClass: "20",
 				detail: {},
 				detail: {},
 				//提交信息
 				//提交信息
 				submitForm: {
 				submitForm: {
@@ -91,7 +94,8 @@
 				},
 				},
 				user: {},
 				user: {},
 				otherNum: '',
 				otherNum: '',
-				moneyList: [{
+				moneyList: [
+					{
 						id: '5',
 						id: '5',
 						name: '5'
 						name: '5'
 					},
 					},
@@ -112,20 +116,10 @@
 						name: '100'
 						name: '100'
 					},
 					},
 
 
-				],
+				],
+				value:"",
 				// 优惠券
 				// 优惠券
-				list: [{
-						name: '满50元减6元',
-						disabled: false
-					},
-					{
-						name: '满30元减3元',
-						disabled: false
-					},
-					{
-						name: '满100减15元 未满足使用条件',
-						disabled: false
-					}
+				list: [
 				],
 				],
 
 
 			}
 			}
@@ -140,7 +134,7 @@
 			if(op.isback){
 			if(op.isback){
 				this.isback=false;
 				this.isback=false;
 			}
 			}
-
+			this.useCoupon()
 		},
 		},
 		onShow() {
 		onShow() {
 			this.getHomePage()
 			this.getHomePage()
@@ -172,7 +166,8 @@
 
 
 			},
 			},
 			moneyClick(index) {
 			moneyClick(index) {
-				this.moneyActiveClass = index;
+				this.moneyActiveClass = index;
+				this.useCoupon()
 
 
 			},
 			},
 			confirm() {
 			confirm() {
@@ -224,27 +219,48 @@
 					this.user = res.data
 					this.user = res.data
 					this.isReady = true;
 					this.isReady = true;
 					uni.hideLoading()
 					uni.hideLoading()
-
+					//this.useCoupon()
 				}).catch(error => {
 				}).catch(error => {
 					uni.showToast({
 					uni.showToast({
 						title: error
 						title: error
 					})
 					})
 				})
 				})
 			},
 			},
-
+			useCoupon(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				 	this.submitInit()
+				API.useCoupon({
+					amount:this.submitForm.amount
+				}).then((res) => {
+					
+					this.list=res.data.userCouponList
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			submitInit(){
+				if (this.moneyActiveClass == -1 && !this.otherNum) {
+					this.submitForm.chargeStrategy = 0;
+					this.submitForm.amount = 0
+				} else {
+					this.submitForm.chargeStrategy = 2;
+					if (this.otherNum) {
+						this.submitForm.amount = this.otherNum
+					} else {
+						this.submitForm.amount = this.moneyActiveClass
+					}
+				}
+			},
 			submit() {
 			submit() {
-
-				if (this.moneyActiveClass == -1 && !this.otherNum) {
-					this.submitForm.chargeStrategy = 0;
-					this.submitForm.amount = 0
-				} else {
-					this.submitForm.chargeStrategy = 2;
-					if (this.otherNum) {
-						this.submitForm.amount = this.otherNum
-					} else {
-						this.submitForm.amount = this.moneyActiveClass
-					}
-				}
+				this.submitInit()
+				
 
 
 				if (!this.submitForm.channelNo) {
 				if (!this.submitForm.channelNo) {
 					uni.showToast({
 					uni.showToast({
@@ -404,10 +420,10 @@
 
 
 		.title {
 		.title {
 			width: 100%;
 			width: 100%;
-			display: flex;
+			
 
 
 			.title-1 {
 			.title-1 {
-				width: 48px;
+			
 				height: 22px;
 				height: 22px;
 				color: rgba(16, 16, 16, 100);
 				color: rgba(16, 16, 16, 100);
 				font-size: 16px;
 				font-size: 16px;
@@ -420,7 +436,7 @@
 			}
 			}
 
 
 			.title-3 {
 			.title-3 {
-				margin-left: 126px;
+				float: right;
 				height: 19px;
 				height: 19px;
 				font-size: 16px;
 				font-size: 16px;
 			}
 			}
@@ -441,10 +457,10 @@
 				position: relative;
 				position: relative;
 			}
 			}
 
 
-			/deep/.u-radio:nth-child(3) {
-				background-color: #e3e3e3 !important;
+			// /deep/.u-radio:nth-child(3) {
+			// 
 
 
-			}
+			// }
 
 
 			/deep/.u-radio__icon-wrap {
 			/deep/.u-radio__icon-wrap {
 				left: 16px;
 				left: 16px;

+ 67 - 8
pages/searchPile/chargeProcess/dcCharging.vue

@@ -28,7 +28,7 @@
 					<view class="item-num">
 					<view class="item-num">
 						{{getPercent2()}}
 						{{getPercent2()}}
 					</view>
 					</view>
-					<view class="item-text">
+					<view class=" item-text ">
 						充电时长
 						充电时长
 					</view>
 					</view>
 				</view>
 				</view>
@@ -73,6 +73,8 @@
 			<view class="iconfont tittle-font" @click="show = true">
 			<view class="iconfont tittle-font" @click="show = true">
 				&#xe616;
 				&#xe616;
 			</view>
 			</view>
+			
+
 
 
 			<view class="progress-bar">
 			<view class="progress-bar">
 				<u-circle-progress width="440" active-color="green" :percent="percent?percent:percentValue" border-width="50">
 				<u-circle-progress width="440" active-color="green" :percent="percent?percent:percentValue" border-width="50">
@@ -108,7 +110,7 @@
 					<view class="cost-top">
 					<view class="cost-top">
 						{{chargingRecord.dueFee?chargingRecord.dueFee:0}}元
 						{{chargingRecord.dueFee?chargingRecord.dueFee:0}}元
 					</view>
 					</view>
-					<view class="cost-bottom">
+					<view class="cost-bottom "  >
 						实时费用
 						实时费用
 					</view>
 					</view>
 				</view>
 				</view>
@@ -181,17 +183,33 @@
 				 shape="circle" >结束充电</u-button>
 				 shape="circle" >结束充电</u-button>
 			</view>
 			</view>
 
 
-			<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
+			<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">
 				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone">
+			</u-modal>
+			
+			<u-modal v-model="show2" @confirm="gotoGz" 
+			cancel-text="暂不关注"  @cancel="cancelGz"
+			confirm-text="前往关注"
+			
+			 confirm-color="#53b56b"
+				:show-cancel-button="true" 
+				ref="uModal2" :asyncClose="true" 
+				 >
+				<view style="padding: 15px;"
+				
+				>请关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
 			</u-modal>
 			</u-modal>
-
+ 			
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 
 
 <script>
 <script>
-	import * as API from '@/apis/chargeProcess.js'
+	import * as API from '@/apis/chargeProcess.js'
+	import * as API_weixin from '@/apis/weixin.js'
+	
 	import {
 	import {
 		secondsDistance,
 		secondsDistance,
 		hourDistanceArr
 		hourDistanceArr
@@ -211,11 +229,15 @@
 				chargingGun: {},
 				chargingGun: {},
 				chargingRecord: {},
 				chargingRecord: {},
 				show: false,
 				show: false,
+				show2: false,
 				isReady:true,
 				isReady:true,
-				waitNum:'',
+				waitNum:'',
+				projectName:"",
 			}
 			}
 		},
 		},
-		onLoad(op) {
+		onLoad(op) {
+			this.projectName=process.car.ProjectName;
+			
 			if (op.id) {
 			if (op.id) {
 				this.id = op.id;
 				this.id = op.id;
 				this.init()
 				this.init()
@@ -225,7 +247,8 @@
 			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
 			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
 			if (consumerPhone) {
 			if (consumerPhone) {
 				this.consumerPhone = consumerPhone
 				this.consumerPhone = consumerPhone
-			}
+			}
+			
 
 
 		},
 		},
 		onUnload() {
 		onUnload() {
@@ -235,6 +258,15 @@
 			this.addpercent()
 			this.addpercent()
 		},
 		},
 		methods: {
 		methods: {
+			cancelGz(){
+				this.carhelp.setGzDate()
+			},
+			gotoGz(){
+				this.carhelp.setGzDate()
+				var url="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg4Njc5ODEyMw==#wechat_redirect";
+				window.location.href=url
+				
+			},
 			gotoMain(i){
 			gotoMain(i){
 				if(i==0){
 				if(i==0){
 					uni.reLaunch({
 					uni.reLaunch({
@@ -301,6 +333,26 @@
 						title: error
 						title: error
 					})
 					})
 				})
 				})
+			},
+			checkSubscribe(){
+				API_weixin.checkSubscribe({
+					openId: this.carhelp.getOpenId() 
+				}).then((res) => {
+					
+					if(res.data=="0"){
+						
+						this.show2=true;
+					}else{
+						this.carhelp.setGzDate() 
+					}
+					
+					//setGzDate
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+				
 			},
 			},
 			confirmPhone() {
 			confirmPhone() {
 				this.show = false;
 				this.show = false;
@@ -338,6 +390,13 @@
 					}else if(this.chargingGun.gunType==2){
 					}else if(this.chargingGun.gunType==2){
 						//交流
 						//交流
 					}
 					}
+					if (this.chargingRecord.status == 1) {
+						if(this.carhelp.getGzDate()&&!this.show2){
+							
+							this.checkSubscribe()
+							
+						}
+					}
 					if(this.isReady&&this.chargingRecord.status!=2){
 					if(this.isReady&&this.chargingRecord.status!=2){
 						var time=500;
 						var time=500;
 						if(this.chargingRecord.status==0){
 						if(this.chargingRecord.status==0){

+ 1 - 1
pages/searchPile/searchPile.vue

@@ -108,7 +108,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="preference_group">
 				<view class="preference_group">
-					<view class="preference_group_item"><label class="preference_label">充电桩电压 (kW)</label></view>
+					<view class="preference_group_item"><label class="preference_label">充电桩电压 (kw)</label></view>
 					<view style="height: 50rpx;margin-left: 30rpx;">
 					<view style="height: 50rpx;margin-left: 30rpx;">
 						<DoubleSlider
 						<DoubleSlider
 							ref="obc_voltage"
 							ref="obc_voltage"

+ 22 - 16
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -27,7 +27,7 @@
 				<view class="detail-name">
 				<view class="detail-name">
 					充电功率
 					充电功率
 				</view>
 				</view>
-				<view class="detail-content" style="font-weight: 900;">{{detail.chargingPower/1000}}kW</view>
+				<view class="detail-content" style="font-weight: 900;">{{detail.chargingPower}}kw</view>
 			</view>
 			</view>
 			<!-- 收费标准 -->
 			<!-- 收费标准 -->
 			<view class="rates">
 			<view class="rates">
@@ -39,15 +39,19 @@
 						{{car.carNum}}
 						{{car.carNum}}
 					</view>
 					</view>
 					<view class="title-right" v-else>
 					<view class="title-right" v-else>
-						<view style="color:#00b962"  @click="carDet">点击绑定</view>
+						<view style="color:#53b56b;font-weight: bold;"  @click="carDet">点击绑定</view>
 					</view>
 					</view>
+					
 				</view>
 				</view>
 				
 				
-				<view style="padding: 15px;" >
-					{{content}}
- 				</view>
-				
-			</view>
+			</view>
+			
+		
+				<!-- 提示 -->
+				<view class="tips  " >
+					<u-alert-tips size="12" :show-icon="true"  type="warning" :description="content"></u-alert-tips>
+				</view>
+			
 			<!-- 收费标准 -->
 			<!-- 收费标准 -->
 			<view class="rates ">
 			<view class="rates ">
 				<view class="rates-title">
 				<view class="rates-title">
@@ -60,7 +64,7 @@
 
 
 				</view>
 				</view>
 				<!-- 时段分类 -->
 				<!-- 时段分类 -->
-				<view class="time-rates">
+				<view class="time-rates" style="    padding-bottom: 10px;">
 					<view class="time-part" v-for="(item,index) in prices" :key="index">
 					<view class="time-part" v-for="(item,index) in prices" :key="index">
 						<view class="part-top">
 						<view class="part-top">
 							<view class="time">
 							<view class="time">
@@ -68,13 +72,13 @@
 							</view>
 							</view>
 							<view class="price">
 							<view class="price">
 
 
-								<text class="price-number">{{item.electricityPrice}}</text>
+								<text class="price-number">{{item.costPrice}}</text>
 								<text class="price-unit">元/度</text>
 								<text class="price-unit">元/度</text>
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="part-bottom">
 						<view class="part-bottom">
 							<view class="unitPrice-servicePrice">
 							<view class="unitPrice-servicePrice">
-								充电单价:¥{{item.costPrice}}| 服务费:¥{{item.servicePrice}}
+								充电单价:¥{{item.electricityPrice}} | 服务费:¥{{item.servicePrice}}
 							</view>
 							</view>
 						</view>
 						</view>
 
 
@@ -82,13 +86,14 @@
 				</view>
 				</view>
 				
 				
 			</view>
 			</view>
-			<view class="rates ratesbottom">
+			<view class=" ratesbottom">
 				<!-- 提示 -->
 				<!-- 提示 -->
-				<view class="tips  ">
+				<view class="tips  " style="    margin-top: 10px;">
 					<u-alert-tips size="12" :show-icon="true"  type="warning" :description="description"></u-alert-tips>
 					<u-alert-tips size="12" :show-icon="true"  type="warning" :description="description"></u-alert-tips>
-				</view>
+				</view>
 			</view>
 			</view>
-		</view>
+		</view>
+		
 		<!-- 底部按钮 -->
 		<!-- 底部按钮 -->
 
 
 		<view class="bottom">
 		<view class="bottom">
@@ -241,7 +246,8 @@
 
 
 <style lang="scss">
 <style lang="scss">
 	.ratesbottom{
 	.ratesbottom{
-		margin-bottom: 80px;
+		  
+		padding-bottom: 90px;
 	}
 	}
 	// 头部
 	// 头部
 	.title {
 	.title {
@@ -352,7 +358,7 @@
 		.tips {
 		.tips {
 
 
 			font-size: 12px;
 			font-size: 12px;
-			margin-top: 12px;
+		
 			background-color: #fff;
 			background-color: #fff;
 			position: relative;
 			position: relative;
 
 

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

@@ -112,7 +112,7 @@
 						|
 						|
 					</view>
 					</view>
 					<view>
 					<view>
-						{{item.chargingPower!=null?item.chargingPower+'kW':''}}
+						{{item.chargingPower!=null?item.chargingPower+'kw':''}}
 					</view> 		
 					</view> 		
 				</view>
 				</view>
 				<view class="charging-gun" v-for="(item1,index1) in item.gunList" :key="index1" >
 				<view class="charging-gun" v-for="(item1,index1) in item.gunList" :key="index1" >

+ 334 - 0
pages/user/InviteFriends.vue

@@ -0,0 +1,334 @@
+<template>
+	<view>
+		<u-navbar title="邀请好友"></u-navbar>
+		<view class="InviteFriends">
+			<view class="InviteFriends-head">
+				<u-image width="274rpx" height="60rpx" src="/static/img/logo3.png"></u-image>
+				<u-image class="textImg" width="662rpx" height="59rpx" src="/static/img/text.png"></u-image>
+				<u-image width="100%" height="320rpx" src="/static/img/handshake.png"></u-image>
+			</view>
+			<view class="InviteFriends-main">
+				<view class="InviteFriends-coupons">
+					<h4>每邀请1位好友注册,将获得1张抵扣券</h4>
+					<view class="coupons-price">
+						<h2>5</h2><span>元</span>
+					</view>
+					<view class="coupons-line"></view>
+					<view class="coupons-btn">
+						<u-icon name="wechat-fill" custom-prefix="custom-icon" color="#fff" size="48"></u-icon>
+						<span>分享至微信</span>
+					</view>
+				</view>
+				<view class="InviteFriends-title">福利获取流程</view>
+				<view class="InviteFriends-info">
+					<view class="InviteFriends-info-row">
+						<u-icon name="question-answer-fill" custom-prefix="custom-icon" color="#00B962" size="48"></u-icon>
+						<p>1.发送链接给好友</p>
+					</view>
+					<view class="InviteFriends-info-row">
+						<u-icon name="account-pin-circle-fill" custom-prefix="custom-icon" color="#00B962" size="48"></u-icon>
+						<p>2.好友注册并登录51充电联盟</p>
+					</view>
+					<view class="InviteFriends-info-row">
+						<u-icon name="gift-2-fill" custom-prefix="custom-icon" color="#00B962" size="48"></u-icon>
+						<p>3.和好友一起领5元红包</p>
+					</view>
+					<view class="InviteFriends-tips">
+						<span>*</span><p>邀请成功,你和好友各得5元红包,一年有效;邀请更多人,你可领最高500元红包,红包在本活动页兑换。</p>
+					</view>
+				</view>
+				<view class="InviteFriends-title">我的奖励</view>
+				<view class="InviteFriends-reward">
+					<view class="reward-head">
+						<p>成功邀请1人,已获得</p>
+						<view class="reward-head-price">
+							<h2>5</h2><span>元</span>
+						</view>
+					</view>
+					<view class="reward-main">
+						<view class="reward-info">
+							<view class="reward-info-item">
+								<p>待兑换</p>
+								<view class="reward-info-price">
+									<h2>5</h2><span>元</span>
+								</view>
+							</view>
+							<view class="reward-info-item reward-info-item2">
+								<p>已兑换</p>
+								<view class="reward-info-price">
+									<h2>5</h2><span>元</span>
+								</view>
+							</view>
+						</view>
+						<view class="reward-btn">兑换奖励</view>
+						<view class="reward-list">
+							<view class="reward-list-title">
+								成功邀请记录
+							</view>
+							<view class="rewardList">
+								<view class="rewardList-item">
+									<view class="u-flex">
+										<u-avatar src="/static/img/head1.png" size="72"></u-avatar>
+										<span>asdas</span>
+									</view>
+									<p>2022-05-30</p>
+								</view>
+								<view class="rewardList-item">
+									<view class="u-flex">
+										<u-avatar src="/static/img/head1.png" size="72"></u-avatar>
+										<span>asdas</span>
+									</view>
+									<p>2022-05-30</p>
+								</view>
+								<view class="rewardList-item">
+									<view class="u-flex">
+										<u-avatar src="/static/img/head1.png" size="72"></u-avatar>
+										<span>asdas</span>
+									</view>
+									<p>2022-05-30</p>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="InviteFriends-foot">
+					*本活动最终解释权,归51充电联盟所有。
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+<style>
+	page{
+	}
+</style>
+<style lang="scss" scoped>
+	.InviteFriends{
+		background-image: linear-gradient(0deg, #a2e9c9 , #01b963);
+
+	}
+	.InviteFriends-head{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding-top: 36px;
+		.textImg{
+			margin:20px 0 10px;
+		}
+	}
+	.InviteFriends-main{
+		padding: 0 32px;
+	}
+	.InviteFriends-coupons{
+		background-color: #fff;
+		border-radius: 20px;
+		padding: 20px;
+		h4{
+			font-size: 15px;
+			font-weight: normal;
+			text-align: center;
+		}
+		.coupons-price{
+			display: flex;
+			justify-content: center;
+			align-items: flex-end;
+			margin: 16px 0;
+			h2{
+				font-size: 44px;
+				line-height: 44px;
+				color:#FF9600;
+			}
+			span{
+				font-size: 18px;
+				margin-left: 2px;
+			}
+		}
+		.coupons-line{
+			height: 1px;
+			border-bottom: 1px dashed #cacaca;
+			position: relative;
+			&:before{
+				content: '';
+				position: absolute;
+				height: 15px;
+				width: 15px;
+				background-color:#2dc67f ;
+				border-radius: 50%;
+				left:-27px;
+				top:-7px;
+			}
+			&:after{
+				content: '';
+				position: absolute;
+				height: 15px;
+				width: 15px;
+				background-color:#2dc67f ;
+				border-radius: 50%;
+				right:-27px;
+				top:-7px;
+			}
+		}
+		.coupons-btn{
+			background-color: #FF9600;
+			margin-top: 20px;
+			height: 50px;
+			text-align: center;
+			line-height: 50px;
+			border-radius: 25px;
+			font-size: 20px;
+			color:#fff;
+			span{
+				margin-left: 8px;
+			}
+		}
+	}
+	.InviteFriends-title{
+		color:#fff;
+		margin: 40px 0 24px;
+		font-size: 18px;
+	}
+	.InviteFriends-info{
+		background-color: #fff;
+		border-radius: 20px;
+		padding: 20px;
+		.InviteFriends-info-row{
+			display: flex;
+			align-items: center;
+			margin-bottom: 20px;
+			&:last-child{
+				margin-bottom: 0;
+			}
+			p{
+				margin-left: 12px;
+				font-size: 16px;
+			}
+		}
+	}
+	.InviteFriends-tips{
+		padding-left:30px;
+		margin-top: -16px;
+		span{
+			float: left;
+			color:#FF1C1C;
+		}
+		p{
+			color:#999;
+		}
+	}
+	.reward-head{
+		background-color: #00B962;
+		border-radius: 16px 16px 0 0;
+		height: 75px;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 20px;
+		margin: 0 4px;
+		p{
+			color:#fff;
+			font-size: 17px;
+		}
+		.reward-head-price{
+			color:#fff;
+			display: flex;
+			align-items: flex-end;
+			h2{
+				font-size: 36px;
+				line-height: 36px;
+				margin-right: 2px;
+			}
+		}
+	}
+	.reward-main{
+		background-color: #fff;
+		border-radius: 16px;
+		padding: 24px;
+		margin-top: -4px;
+		.reward-info{
+			display: flex;
+			justify-content: space-between;
+			.reward-info-item{
+				width: 122px;
+				height: 122px;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				border:1px solid  #CBE1D7 ;
+				justify-content: center;
+				border-radius: 12px;
+			}
+			p{
+				font-size: 16px;
+				color:#666;
+				margin-bottom: 10px;
+			}
+			.reward-info-price{
+				display: flex;
+				align-items: flex-end;
+				h2{
+					font-size: 44px;
+					line-height: 44px;
+					margin-right: 2px;
+					color:#00B962;
+				}	
+			}
+			.reward-info-item2{
+				background-color:#E6EEEA;
+				border: none;
+				.reward-info-price h2{
+					color:#333;
+				}
+			}
+		}
+		.reward-btn{
+			height: 40px;
+			width: 120px;
+			border-radius: 20px;
+			background-color: #00B962 ;
+			line-height: 40px;
+			color:#fff;
+			text-align: center;
+			font-size: 18px;
+			margin: 20px auto;
+		}
+	}
+	.reward-list{
+		border-top: 1px dashed #cacaca;
+		padding-top: 20px;
+		.reward-list-title{
+			font-size: 18px;
+			margin-bottom: 20px;
+		}
+		.rewardList-item{
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-top: 12px;
+			span{
+				margin-left: 12px;
+				font-size: 16px;
+			}
+			p{
+				color:#999;
+			}
+		}
+	}
+	.InviteFriends-foot{
+		text-align: center;
+		color:#2A9563;
+		padding: 20px 0 64px;
+	}
+</style>

+ 28 - 15
pages/user/car/carDet.vue

@@ -1,6 +1,8 @@
 <template>
 <template>
 	<view class="wrap">
 	<view class="wrap">
-		<u-navbar title="添加车牌"></u-navbar>
+		<u-navbar title="添加车牌">
+			<view slot="right" v-if="isLogin" @click="gotoLink" style=" margin-right: 10px;"> 跳过</view>
+		</u-navbar>
 		<view class="key-input">
 		<view class="key-input">
 			<u-message-input :focus="true" :value="form.carNum" :maxlength="maxlength" :disabled-keyboard="true"></u-message-input>
 			<u-message-input :focus="true" :value="form.carNum" :maxlength="maxlength" :disabled-keyboard="true"></u-message-input>
 		</view>
 		</view>
@@ -24,6 +26,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				isLogin:false,
 				maxlength:8,
 				maxlength:8,
 				keyShow: true,
 				keyShow: true,
 				form: {
 				form: {
@@ -33,10 +36,10 @@
 			}
 			}
 		},
 		},
 		onLoad(op) {
 		onLoad(op) {
-			if (op.id) {
-				var str1 = op.id.slice(0, 19);
-				var str2 = op.id.slice(20, 21);
-				var str3 = op.id.slice(22);
+			if (op.jpcode) {
+				var str1 = op.jpcode.slice(0, 19);
+				var str2 = op.jpcode.slice(20, 21);
+				var str3 = op.jpcode.slice(22);
 
 
 				if (str1 == 'jp_team51_charge_id') {
 				if (str1 == 'jp_team51_charge_id') {
 					if (str2 == 'A') {
 					if (str2 == 'A') {
@@ -45,11 +48,29 @@
 					}
 					}
 				}
 				}
 			}
 			}
+			if(op.login){
+				this.isLogin=true;
+			}
 		},
 		},
 		onReady() {
 		onReady() {
 			this.$refs.uKeyboard.changeCarInputMode();
 			this.$refs.uKeyboard.changeCarInputMode();
 		},
 		},
 		methods: {
 		methods: {
+			gotoLink(){
+				if (this.code == 'A') {
+					uni.redirectTo({
+						url: '/pages/searchPile/stationAndPile/chargingPileDetails?id=' + this.codeId
+					})
+				} else if (this.isLogin){
+					uni.redirectTo({
+						url: '/pages/index/index'
+					})
+				}else {
+					uni.navigateBack({
+						url: '/pages/user/car/index'
+					})
+				}
+			},
 			checkboxChange() {
 			checkboxChange() {
 				this.form.defaultFlag = !this.form.defaultFlag;
 				this.form.defaultFlag = !this.form.defaultFlag;
 			},
 			},
@@ -82,16 +103,8 @@
 				})
 				})
 				userApi.addRegUserCar(this.form).then((res) => {
 				userApi.addRegUserCar(this.form).then((res) => {
 					uni.hideLoading();
 					uni.hideLoading();
-
-					if (this.code == 'A') {
-						uni.navigateBack({
-							url: '/pages/searchPile/stationAndPile/chargingPileDetails?id=' + this.codeId
-						})
-					} else {
-						uni.navigateBack({
-							url: '/pages/user/car/index'
-						})
-					}
+					
+					this.gotoLink()
 				}).catch(error => {
 				}).catch(error => {
 					uni.showToast({
 					uni.showToast({
 						title: error,
 						title: error,

+ 33 - 2
pages/user/coupon/conversion.vue

@@ -3,14 +3,45 @@
 		<u-navbar title="优惠券兑换"></u-navbar>
 		<u-navbar title="优惠券兑换"></u-navbar>
 		
 		
 		<view class="input-box">
 		<view class="input-box">
-			<u-input placeholder="请输入兑换码"></u-input>
+			<u-input v-model="exchangeCode" placeholder="请输入兑换码"></u-input>
 		</view>
 		</view>
-		<u-button class="couversion-btn" type="success" shape="circle" >立即兑换</u-button>
+		<u-button class="couversion-btn" type="success" shape="circle" @click="redeemNow">立即兑换</u-button>
 		
 		
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import * as userApi from '@/apis/user.js'
+	
+	export default{
+		data(){
+			return{
+				exchangeCode: '',
+			}
+		},
+		methods:{
+			redeemNow() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				userApi.exchange({
+					key: this.exchangeCode
+				}).then((res) => {
+					uni.hideLoading();
+					
+					uni.navigateBack({
+						
+					})
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
 </script>
 </script>
 <style>
 <style>
 	page{
 	page{

+ 62 - 70
pages/user/coupon/couponDetails.vue

@@ -1,48 +1,27 @@
 <template>
 <template>
 	<view >
 	<view >
-			<u-navbar title="优惠券详情"></u-navbar>
-			<view class="" style="background-color: rgba(188, 225, 208, 100);padding: 12px 0 ;">
-				<view class="list-item" style="margin-top: 0	;">
-					<view class="voucher">充值券抵扣</view>
-					<view class="content">
-						<view class="content-left">
-							<view class="text">新客首充专享</view>
-							<view class="useful-life">
-								有效期至2022.05.22
-							</view>
-							
-							
-						</view>
-						<view class="content-right">
-							 <view class="price">
-							 	¥15
-							 </view>
-							 <view class="price-condition">
-							 	满100可用
-							 </view>
-						</view>
+		<u-navbar title="优惠券详情"></u-navbar>
+		<view class="" style="background-color: rgba(188, 225, 208, 100);padding: 12px 0 ;">
+			<view class="list-item" style="margin-top: 0	;">
+				<view class="voucher" v-if="userCoupon.classify == '1'">优惠券</view>
+				<view class="voucher" v-if="userCoupon.classify == '2'">折扣卷</view>
+				<view class="content">
+					<view class="content-left">
+						<view class="text">{{userCoupon.accessChannel}}</view>
+						<view class="useful-life">
+							有效期至{{userCoupon.endDate ? userCoupon.endDate.slice(0,10) : ''}}
+						</view>		
 					</view>
 					</view>
-					
-					<view class="limit">
-						<view class="limit-text">
-								
-								<view class="limit-text1">
-									<view class="">
-										限用户充电电费+服务费满100元使用。
-									</view>
-									<view class="arrows iconfont">
-										&#xe62c;
-									</view>
-								</view>
-								
-								
-						</view>
-						<view class="have-used">
-							 <img src="../../../static/img/overdue.png" alt="">
-						</view>
+					<view class="content-right">
+						 <view class="price" v-if="userCoupon.classify == '1'">¥{{userCoupon.value}}</view>
+						 <view class="price" v-if="userCoupon.classify == '2'">{{userCoupon.value*10}}折</view>
+						 <view class="price-condition">
+							{{userCoupon.threshold == 0 ? '无门槛' : '满'+userCoupon.threshold+'可用'}}
+						 </view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
+		</view>
 		
 		
 		<view class="main">
 		<view class="main">
 			<view class="explain-item">
 			<view class="explain-item">
@@ -50,7 +29,7 @@
 					卡券编号
 					卡券编号
 				</view>
 				</view>
 				<view class="content">
 				<view class="content">
-					345678956234567895
+					{{userCoupon.couponNo}}
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="explain-item">
 			<view class="explain-item">
@@ -58,15 +37,7 @@
 					获取渠道
 					获取渠道
 				</view>
 				</view>
 				<view class="content">
 				<view class="content">
-					新用户注册
-				</view>
-			</view>
-			<view class="explain-item">
-				<view class="name">
-					适用时段
-				</view>
-				<view class="content">
-					08:00:00-22:00:00
+					{{userCoupon.accessChannel}}
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="explain-item">
 			<view class="explain-item">
@@ -74,46 +45,67 @@
 					适用范围
 					适用范围
 				</view>
 				</view>
 				<view class="content">
 				<view class="content">
-					仅限部分充电桩扫码充电,即插即充充电使用。
+					{{chargingCoupon.useScope}}
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="explain-item">
 			<view class="explain-item">
 				<view class="name">
 				<view class="name">
 					使用规则
 					使用规则
 				</view>
 				</view>
-				<view class="content">
-					<p>1.抵扣充电服务费</p>
-					<p>2.订单满10元可用</p>
-					<p>3.充电电费满5元可用</p>
-					<p>4.充电服务费满10元可用</p>
-					<p>5.充电量满5度可使用</p>
-					<p>6.仅限注册用户使用</p>
-					<p>7.仅限个人用户使用</p>
-					<p>8.仅限实名用户使用</p>
+				<view class="content" v-html="chargingCoupon.useRules">
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="explain-item">
 			<view class="explain-item">
 				<view class="name">
 				<view class="name">
 					使用说明
 					使用说明
 				</view>
 				</view>
-				<view class="content">
-					<p>限51充电联盟使用</p>
-					<p>1.只抵扣正常结算的订单部分的服务费部分</p>
-					<p>2.不可提现</p>
-					<p>3.每次充电只限使用一张</p>
-					<p>4.不返现,不退款</p>
-					<p>5.最终解释权归湖北荆鹏集团有限公司所有</p>
-					
+				<view class="content" v-html="chargingCoupon.useInstruction">
 				</view>
 				</view>
-			</view>
-			
-			
+			</view>	
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 
 
 <script>
 <script>
+	import * as userApi from '@/apis/user.js'
+	
+	export default{
+		data(){
+			return{
+				id: '',
+				userCoupon: {},
+				chargingCoupon: {},
+			}
+		},
+		onLoad(op) {
+			if(op.id) {
+				this.id = op.id
+				this.getCouponDetail();
+			}
+		},
+		methods:{
+			getCouponDetail() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				userApi.couponDetail({
+					id: this.id
+				}).then((res) => {
+					uni.hideLoading();
+					
+					this.userCoupon = res.data.userCoupon;
+					this.chargingCoupon = res.data.chargingCoupon;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
 </script>
 </script>
 <style>
 <style>
 	page{
 	page{

+ 72 - 278
pages/user/coupon/myCoupon.vue

@@ -1,317 +1,111 @@
 <template>
 <template>
 	<view >
 	<view >
-		<u-navbar title="我的优惠券"><view class="exchange">兑换</view></u-navbar>
+		<u-navbar title="我的优惠券"><view class="exchange" @click="toConversion">兑换</view></u-navbar>
 		<view class="tab" >
 		<view class="tab" >
 			<u-tabs :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
 			<u-tabs :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
 		</view>
 		</view>
-		<!-- 可以使用 -->
-		<view class="workable" v-show="current==0">
-			<view class="list-item">
-				<view class="voucher">抵扣券</view>
-				<view class="content">
+
+		<view class="workable" :style="current == 0 ? '' : 'opacity: 0.6'">
+			<view class="list-item" v-for="(item,index) in myCouponList" :key="item.id">
+				<view class="voucher" v-if="item.classify == '1'">优惠券</view>
+				<view class="voucher" v-if="item.classify == '2'">折扣卷</view>
+				<view class="content" @click="gotoUrl('pages/user/coupon/couponDetails?id=' + item.id)">
 					<view class="content-left">
 					<view class="content-left">
-						<view class="text">新客首充专享</view>
+						<view class="text">{{item.accessChannel}}</view>
 						<view class="useful-life">
 						<view class="useful-life">
-							有效期至2022.05.22
-						</view>
-						
-						
+							有效期至{{item.endDate.slice(0,10)}}
+						</view>	
 					</view>
 					</view>
 					<view class="content-right">
 					<view class="content-right">
-						 <view class="price">
-						 	¥15
-						 </view>
-						 <view class="price-condition">
-						 	满100可用
-						 </view>
-					</view>
-				</view>
-				
-				<view class="limit">
-					<view class="limit-text">
-							
-							<view class="limit-text1">
-								限用户充电电费+服务费满100元使用。
-								<text class="arrows iconfont">
-									&#xe62c;
-								</text>
-							</view>
-							
-							
-					</view>
-					<view class="use-button">
-						去使用
-					</view>
-				</view>
-			</view>
-			<view class="list-item">
-				<view class="voucher">抵扣券</view>
-				<view class="content">
-					<view class="content-left">
-						<view class="text">新客首充专享</view>
-						<view class="useful-life">
-							有效期至2022.05.22
+						<view class="price" v-if="item.classify == '1'">¥{{item.value}}</view>
+						<view class="price" v-if="item.classify == '2'">{{item.value*10}}折</view>
+						<view class="price-condition">
+							{{item.threshold == 0 ? '无门槛' : '满'+item.threshold+'可用'}}
 						</view>
 						</view>
-						
-						
-					</view>
-					<view class="content-right">
-						 <view class="price">
-						 	¥15
-						 </view>
-						 <view class="price-condition">
-						 	满100可用
-						 </view>
 					</view>
 					</view>
 				</view>
 				</view>
 				
 				
 				<view class="limit">
 				<view class="limit">
 					<view class="limit-text">
 					<view class="limit-text">
-							
 							<view class="limit-text1">
 							<view class="limit-text1">
-								限用户充电电费+服务费满100元使用。<text class="iconfont arrows">&#xe607;</text>
-								限微信钱包、支付宝生活号APP端使用,
-								不支持找零,
+								<u-read-more ref="uReadMore" :shadow-style="shadowStyle" :show-height="50" text-indent="0" :close-text="closeContent" 
+									:open-text="openContent" color="#999999" :toggle="true">
+									<rich-text :nodes="item.useScope"></rich-text>
+								</u-read-more>
 							</view>
 							</view>
-							
-							<view class="limit-text2">
-								限登录和充电帐号为155****1111使用。
-							</view>
-					</view>
-					<view class="use-button">
-						去使用
 					</view>
 					</view>
-				</view>
-			</view>
-			<view class="list-item">
-				<view class="voucher">抵扣券</view>
-				<view class="content">
-					<view class="content-left">
-						<view class="text">新客首充专享</view>
-						<view class="useful-life">
-							有效期至2022.05.22
-						</view>
-						
-						
-					</view>
-					<view class="content-right">
-						 <view class="price">
-						 	¥15
-						 </view>
-						 <view class="price-condition">
-						 	满100可用
-						 </view>
-					</view>
-				</view>
-				
-				<view class="limit">
-					<view class="limit-text">
-							
-							<view class="limit-text1">
-								限首次注册用户使用。
-								<text class="arrows iconfont">
-									&#xe62c;
-								</text>
-							</view>
-							
-							
-					</view>
-					<view class="use-button">
-						去使用
-					</view>
-				</view>
-			</view>
-			<view class="list-item">
-				<view class="voucher">抵扣券</view>
-				<view class="content">
-					<view class="content-left">
-						<view class="text">新客首充专享</view>
-						<view class="useful-life">
-							有效期至2022.05.22
-						</view>
-						
-						
-					</view>
-					<view class="content-right">
-						 <view class="price">
-						 	¥15
-						 </view>
-						 <view class="price-condition">
-						 	满100可用
-						 </view>
-					</view>
-				</view>
-				
-				<view class="limit">
-					<view class="limit-text">
-							
-							<view class="limit-text1">
-								限首次注册用户使用。
-								<text class="arrows iconfont">
-									&#xe62c;
-								</text>
-							</view>
-							
-							
-					</view>
-					<view  class="use-button" style="	width: 56px;
-				height: 24px;
-				line-height: 24px;
-				border-radius: 4px;
-				background-color: rgba(0, 185, 98, 100);
-				color: rgba(255, 255, 255, 100);
-				font-size: 12px;
-				text-align: center;">
-						去使用
-					</view>
-				</view>
-			</view>
-		</view>
-	
-	 <!-- 已使用 -->
-	  <view class="used" v-show="current==1" style="opacity: 0.6;">
-		  <view class="list-item">
-		  	<view class="voucher">充值券抵扣</view>
-		  	<view class="content">
-		  		<view class="content-left">
-		  			<view class="text">新客首充专享</view>
-		  			<view class="useful-life">
-		  				有效期至2022.05.22
-		  			</view>
-		  			
-		  			
-		  		</view>
-		  		<view class="content-right">
-		  			 <view class="price">
-		  			 	¥15
-		  			 </view>
-		  			 <view class="price-condition">
-		  			 	满100可用
-		  			 </view>
-		  		</view>
-		  	</view>
-		  	
-		  	<view class="limit">
-		  		<view class="limit-text">
-		  				
-		  				<view class="limit-text1">
-		  					限用户充电电费+服务费满100元使用。
-		  					<text class="arrows iconfont">
-		  						&#xe62c;
-		  					</text>
-		  				</view>
-		  				
-		  				
-		  		</view>
-		  		<view class="have-used">
-		  			 <img src="../../../static/img/haveused.png" alt="">
-		  		</view>
-		  	</view>
-		  </view>
-		  <view class="list-item">
-		  	<view class="voucher">充值券抵扣</view>
-		  	<view class="content">
-		  		<view class="content-left">
-		  			<view class="text">新客首充专享</view>
-		  			<view class="useful-life">
-		  				有效期至2022.05.22
-		  			</view>
-		  			
-		  			
-		  		</view>
-		  		<view class="content-right">
-		  			 <view class="price">
-		  			 	¥15
-		  			 </view>
-		  			 <view class="price-condition">
-		  			 	满100可用
-		  			 </view>
-		  		</view>
-		  	</view>
-		  	
-		  	<view class="limit">
-		  		<view class="limit-text">
-		  				
-		  				<view class="limit-text1">
-		  					限用户充电电费+服务费满100元使用。
-		  					<text class="arrows iconfont">
-		  						&#xe62c;
-		  					</text>
-		  				</view>
-		  				
-		  				
-		  		</view>
-		  		<view class="have-used">
-		  			 <img src="../../../static/img/haveused.png" alt="">
-		  		</view>
-		  	</view>
-		  </view>
-		  
-	  </view>
-	<!-- 已过期 -->
-	<view class="overdue" v-show="current==2" style="opacity: 0.6;">
-		<view class="list-item">
-			<view class="voucher">充值券抵扣</view>
-			<view class="content">
-				<view class="content-left">
-					<view class="text">新客首充专享</view>
-					<view class="useful-life">
-						有效期至2022.05.22
-					</view>
-					
-					
-				</view>
-				<view class="content-right">
-					 <view class="price">
-					 	¥15
-					 </view>
-					 <view class="price-condition">
-					 	满100可用
-					 </view>
-				</view>
-			</view>
-			
-			<view class="limit">
-				<view class="limit-text">
-						
-						<view class="limit-text1">
-							限用户充电电费+服务费满100元使用。
-							<text class="arrows iconfont">
-								&#xe62c;
-							</text>
-						</view>
-						
-						
-				</view>
-				<view class="have-used">
-					 <img src="../../../static/img/overdue.png" alt="">
+					<view class="use-button" v-if="current == '0'" @click="toIndex">去使用</view>
+					<view class="have-used" v-if="current == '1'"><img src="../../../static/img/haveused.png" alt=""></view>
+					<view class="have-used" v-if="current == '2'"><img src="../../../static/img/overdue.png" alt=""></view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-	
-	</view>
-	</view>
-	
+	</view>	
 </template>
 </template>
 
 
 <script>
 <script>
+	import * as userApi from '@/apis/user.js'
+	
 	export default{
 	export default{
 		data(){
 		data(){
 			return{
 			return{
 				tabList: [
 				tabList: [
-					{name: '可使用',type: '1'},
-					{name: '已使用',type: '2'},
-					{name: '已过期',type: '3'},
+					{name: '可使用',type: '0'},
+					{name: '已使用',type: '1'},
+					{name: '已过期',type: '2'},
 				],
 				],
 				current: 0,
 				current: 0,
+				couponType: '0',
+				myCouponList: [],
+				readContent: `限用户充电电费+服务费满100元使用。限微信钱包、支付宝生活号APP端使用,<br />不支持找零,限登录和充电帐号为155****1111使用。`,
+				shadowStyle: {
+					width: "110%",
+					backgroundImage: "none",
+					paddingTop: "0",
+					marginTop: "-10%",
+					justifyContent: "right",
+				},
+				closeContent: '',
+				openContent: ','
 			}
 			}
 		},
 		},
+		onShow() {
+			this.getCouponList();
+		},
 		methods:{
 		methods:{
+			toConversion() {
+				uni.navigateTo({
+					url: '/pages/user/coupon/conversion'
+				})
+			},
+			toIndex() {
+				uni.navigateTo({
+					url: '/pages/index/index'
+				})
+			},
+			getCouponList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				userApi.couponList({
+					status: this.couponType
+				}).then((res) => {
+					uni.hideLoading();
+					
+					this.myCouponList = res.data.data;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			change(index) {
 			change(index) {
 				this.current = index;
 				this.current = index;
-				
+				this.couponType = this.tabList[index].type;
+				this.getCouponList();
 			},
 			},
-			           
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 1 - 1
pages/user/finance/balance.vue

@@ -68,7 +68,7 @@
 				userId: '',
 				userId: '',
 				show: false,
 				show: false,
 				confirmText: '知道了',
 				confirmText: '知道了',
-				content: `总余额=可用金额+冻结金额。使用预付费充电时,在充电过程中会冻结部分金额,充电完成后将剩余金额返还至余额账户,每笔预充金额的冻结时间不超过96小时。`,
+				content: `总金额=可用余额+冻结金额。使用预付费充电时,在充电过程中会冻结部分金额,充电完成后将剩余金额返还至余额账户,每笔预充金额的冻结时间不超过96小时。`,
 				personAccount: {},
 				personAccount: {},
 				accountList: [],
 				accountList: [],
 			}
 			}

+ 2 - 2
pages/user/finance/refundList.vue

@@ -47,7 +47,7 @@
 			</view>
 			</view>
 		</view>	
 		</view>	
 		<view>
 		<view>
-			<u-modal v-model="show" :title="title" :content='content'  :show-confirm-button="true" :show-cancel-button='true' @confirm="confirm"></u-modal> 
+			<u-modal v-model="show" :title="title" :content="content"  :show-confirm-button="true" :show-cancel-button='true' @confirm="confirm"></u-modal> 
 		</view>
 		</view>
 		<view>
 		<view>
 			<u-modal v-model="showtip" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
 			<u-modal v-model="showtip" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
@@ -70,7 +70,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				elderMode:false,
 				elderMode:false,
-				content1:`本平台仅支持可支持金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
+				content1:`本平台仅支持金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
 				title:'提示',
 				title:'提示',
 				content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
 				content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
 				show:false,
 				show:false,

+ 480 - 457
pages/user/index.vue

@@ -1,457 +1,480 @@
-<template>
-	<view>
-		<view class="userHead" @click="toData">
-			<view class="userHead-img">
-				<u-avatar :src="userId ? headImg : '../../assets/img/head.png'" size="96"></u-avatar>
-			</view>
-			<view class="userHead-text">
-				<h3>{{userId ? userPhone : '点击登录/注册'}}</h3>
-			</view>
-		</view>
-		<view class="userData">
-			<view class="userData-num" @click="toBalance">
-				<view class="userData-data">¥{{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}</view>
-				<view class="userData-foot">可用余额</view>
-			</view>
-			<view class="line">
-				
-			</view>
-			<view class="userData-num" @click="toMyCoupon">
-				<view class="userData-data">0</view>
-				<view class="userData-foot">优惠券</view>
-			</view>
-		</view>
-		<view class="userBanner">
-			<u-image width="100%" height="80px" src="../../static/img/banner.jpg"></u-image>
-		</view>
-		<view class="userIcon">
-			<view class="userIcon-tit">
-				<h3>常用功能</h3>
-			</view>
-			<view class="userIcon-main">
-				<view class="userIcon-item" @click="getScanCode">
-					<view class="userIcon-icon userIcon-icon1">
-						<u-icon name="qr-scan-2-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
-					</view>
-					<p>扫码充电</p>
-				</view>
-				<view class="userIcon-item" @click="fastRecharge">
-					<view class="userIcon-icon userIcon-icon2">
-						<u-icon name="wallet-3-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
-					</view>
-					<p>快速充值</p>
-				</view>
-				<view class="userIcon-item" @click="chargingRecord">
-					<view class="userIcon-icon userIcon-icon3">
-						<u-icon name="todo-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
-					</view>
-					<p>充电记录</p>
-				</view>
-				<view class="userIcon-item" @click="toSearchPile">
-					<view class="userIcon-icon userIcon-icon4">
-						<u-icon name="road-map-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
-					</view>
-					<p>附近站点</p>
-				</view>
-			</view>
-		</view>
-		<view class="userCell">
-			<view class="userCell-item" @click="carManage">
-				<view class="userCell-title">
-					<u-icon name="menu_cwcl" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>车辆管理</p>
-				</view>
-				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-			</view>
-			<view class="userCell-item" @click="gotoUrl('pages/user/help')">
-				<view class="userCell-title">
-					<u-icon name="compass-3-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>操作指南</p>
-				</view>
-				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-			</view>
-			<view class="userCell-item" @click="feedback">
-				<view class="userCell-title">
-					<u-icon name="feedback-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>意见反馈</p>
-				</view>
-				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-			</view>
-			<view class="userCell-item" @click="gotoUrl('pages/user/about')">
-				<view class="userCell-title">
-					<u-icon name="information-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>关于我们</p>
-				</view>
-				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-			</view>
-			<view class="userCell-item" @click="openModal">
-				<view class="userCell-title">
-					<u-icon name="customer-service-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>联系客服</p>
-				</view>
-				<span>{{content}}</span>
-			</view>
-			<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="content"></u-modal>
-			</view>
-			<view class="userCell-item" @click="setUp">
-				<view class="userCell-title">
-					<u-icon name="settings-4-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
-					<p>设置</p>
-				</view>
-				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-			</view>
-		</view>
-		
-		<Tabbar :current="2"></Tabbar>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	import * as userApi from '@/apis/user.js'
-	import * as loginApi from '@/apis/login.js'
-	import * as WxJsApi from '@/utils/wxJsApi.js'
-	import Tabbar from '@/components/Tabbar.vue'
-	
-	export default {
-		components: {
-			Tabbar
-		},
-		data() {
-			return {
-				personAccount: {},
-				userId: '',
-				headImg: '',
-				userPhone: '',
-				show: false,
-				title: '联系客服',
-				content: '400-8899-619',
-				confirmText: '拨打电话',
-				background:{
-					background: 'none'
-				},
-			}
-		},
-		onShow() {
-			if(this.carhelp.getPersonInfo()) {
-				this.userId = this.carhelp.getPersonInfo().id;
-				
-				this.getCarPersonAccount();
-				this.getUserInfo();			
-			}
-		},
-		onReady() {
-			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
-				// console.log(res)
-			}).catch(error => {
-				console.log(res)
-			})
-			
-			var  consumerPhone=this.carhelp.getConfig().consumerPhone
-			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
-			if(consumerPhone){
-				this.content=consumerPhone
- 			}
-		},
-		methods: {
-			//微信扫二维码
-			getScanCode() {
-				if (this.userId) {
-					WxJsApi.scanQRCode(1).then(res => {
-						if(res) {
-							API.scanCode(res).then((response) => {
-						
-							}).catch(error => {
-								uni.showToast({
-									title: error,
-									icon: "none"
-								})
-							})
-						}
-					}).catch(error => {
-			
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			fastRecharge() {
-				if (this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/finance/recharge'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			chargingRecord() {
-				if (this.userId) {
-					uni.navigateTo({
-						url: '/pages/record/index'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			toSearchPile() {
-				uni.navigateTo({
-					url: '/pages/searchPile/searchPile'
-				})
-			},
-			getUserInfo() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})		
-				loginApi.findByOpenId({
-					openId: this.carhelp.getOpenId()
-				}).then((res) => {
-					uni.hideLoading();
-					this.headImg = res.data.regUser.headImg;
-					
-					var phone = res.data.regUser.phone;
-					var phone1 = phone.slice(0,3);
-					var phone2 = phone.slice(-4);
-					this.userPhone = phone1 + '****' + phone2;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			toData() {			
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/data'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			toBalance() {			
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/finance/balance'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			toMyCoupon() {
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/coupon/myCoupon'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			toRecharge() {	
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/finance/recharge'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			carManage() {
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/car/index'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			feedback() {
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/message'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}		
-			},
-			setUp() {
-				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/setting'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-				}
-			},
-			openModal() {
-				this.show = true;
-			},
-			confirmPhone(){
-				this.show = false;
-				uni.makePhoneCall({
-					phoneNumber:this.content //仅为示例
-				});
-			},
-			getCarPersonAccount() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})		
-				userApi.carPersonAccount().then((res) => {
-					uni.hideLoading();
-					
-					this.personAccount = res.data;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background:url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
-		background-size: 100%;
-	}
-</style>
-<style lang="scss" scoped>
-	.userBanner{
-		margin: 16px;
-	}
-	.userIcon{
-		background-color: #fff;
-		margin: 16px;
-		border-radius: 8px;
-		padding: 16px;
-	}
-	.userIcon-item{
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-	}
-	.userIcon-main{
-		margin-top: 16px;
-		display: flex;
-		justify-content: space-between;
-	}
-	.userIcon-icon{
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		height: 40px;
-		width: 40px;
-		border-radius: 50%;
-		margin-bottom: 6px;
-	}
-	.userIcon-icon1{background-color: #59D96E;}
-	.userIcon-icon2{background-color: #4BD2C0;}
-	.userIcon-icon3{background-color: #6FA5FF;}
-	.userIcon-icon4{background-color: #9D9FFF;}
-	.userCell{
-		background-color: #fff;
-		border-radius: 8px;
-		margin: 16px;
-		.userCell-item{
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding: 16px;
-			.userCell-title{
-				display: flex;
-				align-items: center;
-				p{
-					margin-left: 8px;
-				}
-			}
-			span{
-				color:#999;
-			}
-		}
-	}
-	
-	.userHead{
-		display: flex;
-		align-items: center;
-		align-items: center;
-		padding:40px 20px 0;
-		.userHead-img{
-
-		}
-		.userHead-text{
-			margin-left: 12px;
-			h3{
-				font-size: 20px;
-				color:#fff;
-				font-weight: normal;
-			}
-			
-		}
-	}
-	.userData{
-		background-color: #fff;
-		margin: 16px;
-		padding: 16px ;
-		border-radius: 8px;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-	}
-	.userData-num{
-		width: 50%;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content:space-between;
-		padding-right: 5px;
-		.userData-data{
-			font-size: 24px;
-			font-weight: 600;
-		
-		}
-		.userData-name{
-			font-size: 16px;
-		}
-		.userData-foot{
-			margin-top: 4px;
-			color:#999;	
-			font-size: 12px;
-		}
-	}
-	.userInfo-btn{
-		padding: 6px 30px;
-		// background-color: #00B962;
-		// color:#fff;
-		// border-radius: 15px;
-	}
-	.line{
-		width: 0px;
-		height: 36px;
-		border: 1px solid rgba(237, 237, 237, 100);
-	}
-</style>
+<template>
+	<view>
+		<view class="userHead" @click="toData">
+			<view class="userHead-img">
+				<u-avatar :src="userId ? headImg : '../../assets/img/head.png'" size="96"></u-avatar>
+			</view>
+			<view class="userHead-text oldTextjp2" >
+				<h3>{{userId ? userPhone : '点击登录/注册'}}</h3>
+			</view>
+		</view>
+		<view class="userData">
+			<view class="userData-num" @click="toBalance">
+				<view class="userData-data">¥{{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}</view>
+				<view class="userData-foot">可用余额</view>
+			</view>
+			<view class="line">
+				
+			</view>
+			<view class="userData-num" @click="toMyCoupon">
+				<view class="userData-data">{{myCouponList.length}}</view>
+				<view class="userData-foot">优惠券</view>
+			</view>
+		</view>
+		<view class="userBanner">
+			<u-image width="100%" height="80px" src="../../static/img/banner.jpg" border-radius="16"></u-image>
+		</view>
+		<view class="userIcon">
+			<view class="userIcon-tit">
+				<h3>常用功能</h3>
+			</view>
+			<view class="userIcon-main">
+				<view class="userIcon-item" @click="getScanCode">
+					<view class="userIcon-icon userIcon-icon1">
+						<u-icon name="qr-scan-2-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
+					</view>
+					<p>扫码充电</p>
+				</view>
+				<view class="userIcon-item" @click="fastRecharge">
+					<view class="userIcon-icon userIcon-icon2">
+						<u-icon name="wallet-3-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
+					</view>
+					<p>快速充值</p>
+				</view>
+				<view class="userIcon-item" @click="chargingRecord">
+					<view class="userIcon-icon userIcon-icon3">
+						<u-icon name="todo-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
+					</view>
+					<p>充电记录</p>
+				</view>
+				<view class="userIcon-item" @click="toSearchPile">
+					<view class="userIcon-icon userIcon-icon4">
+						<u-icon name="road-map-line" custom-prefix="custom-icon" color="#fff" size="36"></u-icon>
+					</view>
+					<p>附近站点</p>
+				</view>
+			</view>
+		</view>
+		<view class="userCell">
+			<view class="userCell-item" @click="carManage">
+				<view class="userCell-title">
+					<u-icon name="menu_cwcl" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>车辆管理</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+			<view class="userCell-item" @click="gotoUrl('pages/user/help')">
+				<view class="userCell-title">
+					<u-icon name="compass-3-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>操作指南</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+			<view class="userCell-item" @click="feedback">
+				<view class="userCell-title">
+					<u-icon name="feedback-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>意见反馈</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+			<view class="userCell-item" @click="gotoUrl('pages/user/about')">
+				<view class="userCell-title">
+					<u-icon name="information-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>关于我们</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+			<view class="userCell-item" @click="openModal">
+				<view class="userCell-title">
+					<u-icon name="customer-service-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>联系客服</p>
+				</view>
+				<span>{{content}}</span>
+			</view>
+			<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="content"></u-modal>
+			</view>
+			<view class="userCell-item" @click="setUp">
+				<view class="userCell-title">
+					<u-icon name="settings-4-fill" custom-prefix="custom-icon" color="#6BC6A7" size="36"></u-icon>
+					<p>设置</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+		</view>
+		
+		<Tabbar :current="2"></Tabbar>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/index.js'
+	import * as userApi from '@/apis/user.js'
+	import * as loginApi from '@/apis/login.js'
+	import * as WxJsApi from '@/utils/wxJsApi.js'
+	import Tabbar from '@/components/Tabbar.vue'
+	
+	export default {
+		components: {
+			Tabbar
+		},
+		data() {
+			return {
+				myCouponList: [],
+				elderStatus: false,
+				personAccount: {},
+				userId: '',
+				headImg: '',
+				userPhone: '',
+				show: false,
+				title: '联系客服',
+				content: '400-8899-619',
+				confirmText: '拨打电话',
+				background:{
+					background: 'none'
+				},
+			}
+		},
+		onShow() {
+			if(this.carhelp.getPersonInfo()) {
+				this.userId = this.carhelp.getPersonInfo().id;
+				
+				this.getCarPersonAccount();
+				this.getUserInfo();
+				this.getCouponList();
+			}
+			
+			this.elderStatus=this.carhelp.get("getElderModeClass");
+		},
+		onReady() {
+			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
+				// console.log(res)
+			}).catch(error => {
+				console.log(res)
+			})
+			
+			var  consumerPhone=this.carhelp.getConfig().consumerPhone
+			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+			if(consumerPhone){
+				this.content=consumerPhone
+ 			}
+		},
+		methods: {
+			getCouponList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				userApi.couponList({
+					status: '0'
+				}).then((res) => {
+					uni.hideLoading();
+					
+					this.myCouponList = res.data.data;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			//微信扫二维码
+			getScanCode() {
+				if (this.userId) {
+					WxJsApi.scanQRCode(1).then(res => {
+						if(res) {
+							API.scanCode(res).then((response) => {
+						
+							}).catch(error => {
+								uni.showToast({
+									title: error,
+									icon: "none"
+								})
+							})
+						}
+					}).catch(error => {
+			
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			fastRecharge() {
+				if (this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/finance/recharge'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			chargingRecord() {
+				if (this.userId) {
+					uni.navigateTo({
+						url: '/pages/record/index'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			toSearchPile() {
+				uni.navigateTo({
+					url: '/pages/searchPile/searchPile'
+				})
+			},
+			getUserInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				loginApi.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((res) => {
+					uni.hideLoading();
+					this.headImg = res.data.regUser.headImg;
+					
+					var phone = res.data.regUser.phone;
+					var phone1 = phone.slice(0,3);
+					var phone2 = phone.slice(-4);
+					this.userPhone = phone1 + '****' + phone2;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			toData() {			
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/data'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			toBalance() {			
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/finance/balance'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			toMyCoupon() {
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/coupon/myCoupon'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			toRecharge() {	
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/finance/recharge'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			carManage() {
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/car/index'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			feedback() {
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/message'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}		
+			},
+			setUp() {
+				if(this.userId) {
+					uni.navigateTo({
+						url: '/pages/user/setting'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			openModal() {
+				this.show = true;
+			},
+			confirmPhone(){
+				this.show = false;
+				uni.makePhoneCall({
+					phoneNumber:this.content //仅为示例
+				});
+			},
+			getCarPersonAccount() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})		
+				userApi.carPersonAccount().then((res) => {
+					uni.hideLoading();
+					
+					this.personAccount = res.data;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background:url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
+		background-size: 100%;
+	}
+</style>
+<style lang="scss" scoped>
+	.userBanner{
+		margin: 16px;
+	}
+	.userIcon{
+		background-color: #fff;
+		margin: 16px;
+		border-radius: 8px;
+		padding: 16px;
+	}
+	.userIcon-item{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+	.userIcon-main{
+		margin-top: 16px;
+		display: flex;
+		justify-content: space-between;
+	}
+	.userIcon-icon{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+		width: 40px;
+		border-radius: 50%;
+		margin-bottom: 6px;
+	}
+	.userIcon-icon1{background-color: #59D96E;}
+	.userIcon-icon2{background-color: #4BD2C0;}
+	.userIcon-icon3{background-color: #6FA5FF;}
+	.userIcon-icon4{background-color: #9D9FFF;}
+	.userCell{
+		background-color: #fff;
+		border-radius: 8px;
+		margin: 16px;
+		.userCell-item{
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 16px;
+			.userCell-title{
+				display: flex;
+				align-items: center;
+				p{
+					margin-left: 8px;
+				}
+			}
+			span{
+				color:#999;
+			}
+		}
+	}
+	
+	.userHead{
+		display: flex;
+		align-items: center;
+		align-items: center;
+		padding:40px 20px 0;
+		.userHead-img{
+
+		}
+		.userHead-text{
+			margin-left: 12px;
+			h3{
+				font-size: 20px;
+				color:#fff;
+				font-weight: normal;
+			}
+			
+		}
+	}
+	.userData{
+		background-color: #fff;
+		margin: 16px;
+		padding: 16px ;
+		border-radius: 8px;
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+	}
+	.userData-num{
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content:space-between;
+		padding-right: 5px;
+		.userData-data{
+			font-size: 24px;
+			font-weight: 600;
+		
+		}
+		.userData-name{
+			font-size: 16px;
+		}
+		.userData-foot{
+			margin-top: 4px;
+			color:#999;	
+			font-size: 12px;
+		}
+	}
+	.userInfo-btn{
+		padding: 6px 30px;
+		// background-color: #00B962;
+		// color:#fff;
+		// border-radius: 15px;
+	}
+	.line{
+		width: 0px;
+		height: 36px;
+		border: 1px solid rgba(237, 237, 237, 100);
+	}
+</style>

+ 1 - 1
pages/user/message.vue

@@ -5,7 +5,7 @@
 			<view class="message-form">
 			<view class="message-form">
 				<u-form :model="subForm" ref="uForm" label-width ="100">
 				<u-form :model="subForm" ref="uForm" label-width ="100">
 					<u-form-item label-width="0">
 					<u-form-item label-width="0">
-							<u-input v-model="subForm.content" type="textarea"  placeholder="请描述您的商品" height="200"/>
+							<u-input v-model="subForm.content" type="textarea"  placeholder="请描述您的意见" height="200"/>
 					</u-form-item>
 					</u-form-item>
 					<u-form-item label-width="0">
 					<u-form-item label-width="0">
 						<view class="upload">
 						<view class="upload">

+ 54 - 4
pages/user/setting.vue

@@ -1,13 +1,28 @@
 <template>
 <template>
 	<view>
 	<view>
-		<u-navbar title="设置"></u-navbar>
+		<u-navbar title="设置" :title-bold="checked" :title-size="checked ? 38 : 30"></u-navbar>
 		<u-cell-group>
 		<u-cell-group>
-			<u-cell-item title="修改手机号" v-model="userPhone" @click="gotoUrl('pages/user/phone')"></u-cell-item>
-			<u-cell-item title="注销账号" value="注销后无法恢复,请谨慎操作" :value-style="valueStyle" @click="gotoUrl('pages/user/logout')"></u-cell-item>
+			<u-cell-item title="修改手机号" :title-style="checked ? titleStyle : {}" v-model="userPhone" @click="gotoUrl('pages/user/phone')"
+				:value-style="checked ? {fontSize:'16px'} : {}">
+			</u-cell-item>
+			<u-cell-item title="注销账号" :title-style="checked ? titleStyle : {}" value="注销后无法恢复,请谨慎操作" 
+				:value-style="checked ? {color:'#ff3300',fontSize:'16px'} : valueStyle" @click="gotoUrl('pages/user/logout')">
+			</u-cell-item>
 		</u-cell-group>
 		</u-cell-group>
-		<view class="logout-btn oldTextjp" oldstyle="font-size: 18px;" @click="signOut">
+		<view class="switcher-mode">
+			<view class="oldTextjp2" oldstyle="font-weight:bold;font-size:18px">
+				长辈模式
+				<text class="oldTextjp2" oldstyle="font-weight:normal;font-size:16px;">字体更大更清晰</text>
+			</view>
+			<view class="switch-box" >
+				<u-switch v-model="checked" class="switch" active-color="#00E266" @change="checkedChange"></u-switch>
+			</view>
+		</view>
+		
+		<view class="logout-btn oldTextjp" oldstyle="font-size:18px" @click="signOut">
 			退出帐号
 			退出帐号
 		</view>
 		</view>
+		
 		<view>
 		<view>
 			<u-modal v-model="show" @confirm="confirm":show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="content"></u-modal>
 			<u-modal v-model="show" @confirm="confirm":show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="content"></u-modal>
 		</view>
 		</view>
@@ -25,8 +40,13 @@
 				content: '是否退出当前账号?',
 				content: '是否退出当前账号?',
 				userId: '',
 				userId: '',
 				userPhone: '',
 				userPhone: '',
+				checked:false,
 				valueStyle: {
 				valueStyle: {
 					color:'#ff3300',
 					color:'#ff3300',
+				},
+				titleStyle: {
+					fontWeight: 'bold',
+					fontSize: '18px',
 				}
 				}
 			}
 			}
 		},
 		},
@@ -38,9 +58,14 @@
 				var phone1 = phone.slice(0,3);
 				var phone1 = phone.slice(0,3);
 				var phone2 = phone.slice(-4);
 				var phone2 = phone.slice(-4);
 				this.userPhone = phone1 + '****' + phone2;
 				this.userPhone = phone1 + '****' + phone2;
+				
+				this.checked = this.carhelp.get("getElderModeClass");
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			checkedChange() {
+				this.carhelp.set("getElderModeClass", this.checked);
+			},
 			signOut() {
 			signOut() {
 				this.show = true;
 				this.show = true;
 			},
 			},
@@ -74,4 +99,29 @@
 		text-align: center;
 		text-align: center;
 		margin-top: 12px;
 		margin-top: 12px;
 	}
 	}
+	.switcher-mode{
+		background-color: #fff;
+		height: 44px;
+		line-height: 44px;
+		display: flex;
+		justify-content: space-between;
+		padding: 0 14px;
+		text{
+			font-size: 12px;
+			color: rgba(119, 119, 119, 100);
+			margin-left: 8px;
+			}
+			.switch-box{
+				padding-top: 8px;
+			}
+			.switch{
+				width: 40px;
+				height: 22px;
+				
+			}
+			/deep/.u-switch__node{
+				width: 20px !important;
+				height: 20px !important;
+			}
+	}
 </style>
 </style>

BIN
static/img/9999.png


BIN
static/img/AAA.jpg


BIN
static/img/handshake.png


BIN
static/img/logo3.png


BIN
static/img/text.png


BIN
static/img/welcome_bg.png


+ 39 - 2
utils/init.js

@@ -18,7 +18,7 @@ var app = {
 					if (!openId) {
 					if (!openId) {
 						this.getOpenId();
 						this.getOpenId();
 					} else {
 					} else {
-					 
+						this.getPersion(openId)
 					}
 					}
 				}
 				}
 			} else{
 			} else{
@@ -29,11 +29,48 @@ var app = {
 			}
 			}
 		}else{
 		}else{
 			carhelp.setOpenId(process.car.openId)
 			carhelp.setOpenId(process.car.openId)
+			this.getPersion(process.car.openId)
 		}
 		}
 		
 		
 		
 		
 	},
 	},
-	 
+	 getPersion(thisopenId){
+		 var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
+		 var token_tdate=carhelp.get("token_tdate");//每10分钟存储一次token
+		 
+		  if(token_tdate&&token_tdate==tdate){
+			return
+		  }
+		  
+		 var loginurl="/mobile/regUser/findByOpenId"
+		  
+		 uni.request({
+		 	method:'get',
+		 	url: process.car.BASE_URL + loginurl,
+		 	data: {
+		 		openId:thisopenId,
+		 	},
+		 	header: {
+		 		'Content-Type': 'application/x-www-form-urlencoded',
+		 		'X-Requested-With': 'XMLHttpRequest',
+		 		//'Authorization':token
+		 	}
+		 }).then((response) => {
+		 	let [error, res] = response;
+		 	
+		 	if (res.data.code == 200&&res.data.result) {
+		 		
+		 		var token = res ? res.data.data.token : '';
+		 		carhelp.setPersonInfo(res.data.data.regUser );
+		 		
+		 		carhelp.setToken(token);
+		 	 
+		 	} 
+		 }).catch(error => {
+		 	
+		 	
+		 })
+	 },
 	getOpenId() {
 	getOpenId() {
 		
 		
 		const code = getUrlParam('code');
 		const code = getUrlParam('code');

+ 14 - 0
utils/mixin.js

@@ -1,6 +1,20 @@
 var prefix = 'jp_charging_' + process.car.NODE_ENV + '_';
 var prefix = 'jp_charging_' + process.car.NODE_ENV + '_';
 
 
 var app = {
 var app = {
+	getGzDate : (key) => {
+		var tdate=new Date( ).toJSON().substr(0,10).replace("T"," ")
+		var date= uni.getStorageSync( prefix + "is_gz_date")
+		
+		if(tdate==date){
+			return false
+		}else{
+			return  true;
+		}
+		
+	},
+	
+	setGzDate : () => uni.setStorageSync(prefix + "is_gz_date", new Date( ).toJSON().substr(0,10).replace("T"," ") ),
+	
 	getGunIdCharge :()=>{
 	getGunIdCharge :()=>{
 
 
 		var date= uni.getStorageSync( prefix + "GunId_Date_charge")
 		var date= uni.getStorageSync( prefix + "GunId_Date_charge")

Някои файлове не бяха показани, защото твърде много файлове са промени