Bladeren bron

首页调整

zhengkaixin 2 jaren geleden
bovenliggende
commit
21a585b472

+ 4 - 1
.env.dev.js

@@ -1,14 +1,17 @@
 const UNI_APP = {  
-	// BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
 	// BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	
+	ProjectName :"运营中心",
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
 	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
 	//openId:"1000",
+	//openId:"oK9Wr56yEh-TbCvUg3s9LYQSL8tM",//提现
 	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
+	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	//小鹏管家appid
 	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",
 	VUE_APP_WXAPPID:"wx3afdb1b60188c1e5",

+ 1 - 1
.env.prod.js

@@ -1,5 +1,5 @@
 const UNI_APP = {
-  	
+  		ProjectName :"运营中心",
     BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,

+ 1 - 1
.env.test.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
    // BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
-
+	ProjectName :"运营中心",
    //  BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
    // BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',

+ 9 - 13
bobo-router/index.js

@@ -16,20 +16,16 @@
 
  uniCrazyRouter.afterEach((to, from) => {
  	// 逻辑代码
-
- 	var title = "智能充电系统"
-
- 	if (to && to.url && to.url.indexOf("pagesFinance") == 0) {
- 		title = "合伙收益通"
- 	}
- 	console.log("afterEach")
- 	if (process.car.NODE_ENV == 'dev' || process.car.NODE_ENV == 'test') {
- 		title+= '(' + process.car.NODE_ENV + ')'
- 	}
-	uni.setNavigationBarTitle({
-		title: title ,
 	
-	})
+	console.log("afterEach")
+	var ProjectName=process.car.ProjectName;
+	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
+		  ProjectName+='('+process.car.NODE_ENV+')';				 
+	}
+	uni.setNavigationBarTitle({
+	   		title:ProjectName
+	}) 
+ 	 
  })
 
  uniCrazyRouter['on' + 'Error']((to, from) => {

+ 1 - 1
manifest.json

@@ -79,7 +79,7 @@
                 "enable" : true
             }
         },
-        "title" : "智能充电系统",
+        "title" : "运管中心",
         "router" : {
             "base" : "./"
         }

+ 2 - 89
pages.json

@@ -3,94 +3,7 @@
 		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages	
-		{
-			"name": "充电中",
-			"path": "pages/index/index",
-			"style": {
-
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "充电中",
-			"path": "jpsoft",
-			"style": {
-
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "充电",
-			"path": "pages/charge/index",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-
-
-		{
-			"name": "切换充电桩",
-			"path": "pages/charge/switchCharge",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "充电记录",
-			"path": "pages/charge/chargeList",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "充电详情",
-			"path": "pages/charge/chargeDetails",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "我的",
-			"path": "pages/user/index",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "余额充值",
-			"path": "pages/user/recharge",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-
-		{
-			"name": "充值记录",
-			"path": "pages/user/rechargeList",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		}, {
-			"name": "充值详情",
-			"path": "pages/user/rechargeDeatils",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "登录",
-			"path": "pages/index/none",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
-		{
-			"name": "登录",
-			"path": "pages/login/index",
-			"style": {
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		},
+		
 		{
 			"name": "登录",
 			"path": "pagesFinance/login/index",
@@ -382,7 +295,7 @@
     ],
 	"globalStyle": {
 		"navigationStyle": "custom", // 隐藏系统导航栏
-		"navigationBarTitleText": "智能充电系统",
+		"navigationBarTitleText": "运管中心",
 		"enablePullDownRefresh": false
 
 	}

+ 0 - 106
pages/charge/chargeDetails.vue

@@ -1,106 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充电详情">
-		</u-navbar>
-		<view class="chargeDetails">
-			<view class="chargeDetails-item">
-				<span>金额</span>
-				<p class="price">{{isnull(detail.actualFee!=null?detail.actualFee:detail.estimateFee)}}元</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>桩名</span>
-				<p>{{detail.deviceName}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>桩号</span>
-				<p>{{detail.deviceNo}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>充电通道</span>
-				<p>{{detail.channelNo}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>结束原因</span>
-				<p>{{detail.remark}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>开始时间</span>
-				<p>{{detail.startTime}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>结束时间</span>
-				<p>{{detail.endTime}}</p>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				id:'',
-				detail:{
-					
-				}
-			}
-		},
-		onLoad(op){
-			this.id=op.id;
-			this.getInfo()
-		},
-		methods: {
-			isnull(str){
-				if(!str){
-					return 0
-				}else{
-					return str
-				}
-			},
-			getInfo(){
-				uni.showLoading({
-					title:"加载中",mask:true,
-				})
-				API.chargingDetail(this.id).then((res) => {
-					this.detail=res.data.chargingRecord	 
-					
-					uni.hideLoading()
-					 
-				}).catch(error => {
-						uni.showToast({
-							
-							title:error
-						})
-				})
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	.chargeDetails{
-		background-color: #FFFFFF;
-		.chargeDetails-item{
-			margin:0 10px;
-			border-bottom: 1px solid #F7F7F7;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			padding: 15px;
-		}
-		span{
-			color:#999;
-		}
-		.price{
-			font-size: 20px;
-			color:#FF3D00;
-			font-weight: bold;
-		}
-	}
-</style>

+ 0 - 181
pages/charge/chargeList.vue

@@ -1,181 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充电记录">
-		</u-navbar>
-		<view class="chargeScreen">
-			<view class="chargeScreen-item">
-				<p>
-				 <picker mode="date" :value="startDate"  :end="endDate"   @change="bindDateChange0">
-				            <view class="uni-input">{{startDate}}</view>
-				     </picker>
-				</p>
-				<u-icon name="arrow-down-fill" color="#999" size="24"></u-icon>
-			</view>
-			<span>至</span>
-			<view class="chargeScreen-item">
-				<p>
-				<picker mode="date" :value="endDate" :start="startDate"   @change="bindDateChange1">
-				           <view class="uni-input">{{endDate}}</view>
-				    </picker>
-				
-				</p>
-				<u-icon name="arrow-down-fill" color="#999" size="24"></u-icon>
-			</view>
-		</view>
-		<view style="text-align: center;margin-top: 100px" v-if="!list.length">
-		
-			<img src="@/assets/img/blankpage.png">
-			<p>暂无充电记录</p>
-		</view>
-		<view class="chargeList">
-			<view v-for="(item ,index) in list" :key="item.id"
-			 @click="gotoUrl('pages/charge/chargeDetails?id='+item.id)"
-			 class="chargeList-item" 
-			 >
-				<view class="chargeList-text">
-					<p>{{item.createTime}}</p>
-					<h4>{{item.deviceName}} 通道:{{item.channelNo}}</h4>
-				</view>
-				<span>{{isnull(item.actualFee!=null?item.actualFee:item.estimateFee)}}元</span>
-			</view>
-		
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	import {parseUnixTime,beforeTimeStamp} from  '@/utils/index.js'
-	
-	export default {
-		data() {
-			return {
-				form:{
-					
-				},
-				startDate:'',
-				endDate:'',
-				pageIndex: 1,
-				recordsTotal: 0,
-				list: [],
-			}
-		},
-		onReachBottom() {
-			if (this.list.length < this.recordsTotal) {
-				this.myLoadmore();
-			}
-		},
-		methods: {
-			isnull(str){
-				if(!str){
-					return 0
-				}else{
-					return str
-				}
-			},
-			  bindDateChange0: function(e) {
-			            this.startDate= e.target.value
-			            
-						
-						this.getList(true)
-			  },
-			  bindDateChange1: function(e) {
-			          this.endDate= e.target.value
-			          
-			  						this.getList(true)
-			  },
-			myLoadmore() {
-		
-				this.pageIndex += 1;
-				this.getList()
-			},
-			getList(bl) {
-				
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				if (bl) {
-					this.list = [];
-					this.pageIndex = 1;
-				}
-				var data = {
-					startDate:this.startDate,
-					endDate:this.endDate,
-					pageIndex: this.pageIndex
-				};
-				API.chargingRecordData(data).then((res) => {
-		
-					this.list = [
-						...this.list,
-						...res.data.data
-					];
-					this.recordsTotal = res.data.recordsTotal
-					uni.hideLoading()
-		
-				}).catch(error => {
-					uni.showToast({
-		
-						title: error
-					})
-				})
-			},
-			onReady() {
-				this.startDate=parseUnixTime(beforeTimeStamp(5),"{y}-{m}-{d}")
-				this.endDate=parseUnixTime(new Date(),"{y}-{m}-{d}")
-				
-				this.getList()
-				
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	.chargeScreen{
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding: 10px 0;
-		background-color: #fff;
-		span{
-			color:#777;
-		}
-	}
-	.chargeScreen-item{
-		display: flex;
-		align-items: center;
-		flex: 1;
-		justify-content: center;
-		p{
-			color:#777;
-			margin-right: 5px;
-		}		
-	}
-	.chargeList{
-		margin-top: 10px;
-	}
-	.chargeList-item{
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding: 15px;
-		background-color: #fff;
-		border-bottom: 1px solid #f7f7f7;
-		h4{
-			font-weight: normal;
-			color:#999;
-			margin-top: 3px;
-			font-size: 12px;
-		}
-		span{
-			font-size: 20px;
-			color:#1677FF;
-			font-weight: bold;
-		}
-	}
-</style>

+ 0 - 517
pages/charge/index.vue

@@ -1,517 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充电">
-			<view class="slot-wrap">
-				<view class="navbar-left"></view>				
-<!-- 				<view class="navbar-right"><u-icon name="iconfontscan" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon></view>
- -->			</view>
-		</u-navbar>
-		<view class="charge">
-			<view class="chargeInfo">
-				<view class="chargeInfo-row">
-					<view class="u-flex"><p>站点:</p><h4>{{detail.stationName}}</h4></view>
-				</view>
-				<view class="chargeInfo-row">
-					
-					<view class="u-flex"><p>桩号:</p><h4>{{detail.deviceNo}}</h4></view>
-					<view class="u-flex" @click="switchCharge">
-						<span>切换充电桩</span>
-						<u-icon name="arrow-right" color="#999" size="24"></u-icon>
-					</view>
-				</view>
-				<view class="chargeInfo-row">
-					<view class="u-flex"><p>桩名:</p><h4>{{detail.name}}</h4></view>
-					<view class="u-flex" @click="showTips()">
-						<span>费用说明</span>
-						<u-icon name="error-circle" color="#1677ff" size="32" ></u-icon>
-					</view>
-				</view>
-			
-			</view>
-			<view class="chargeMain">
-				<template v-for="(item,i) in list">
-					
-					<view :key="i" class="chargeMain-item "
-					@click="selectItem(item)"
-					:class="{
-						'active':item.channelNo==submitForm.channelNo,
-						'occupy':item.status==1,
-						'fault':item.status==2,
-					}"
-					
-					><p>{{i+1}}</p>
-					<p >{{item.statusStr}}</p>
-					
-					</view>
-					
-				</template>
-				<h2 v-if="isReady&&list.length==0">无可用通道<br/>请联系客服人员</h2>
-				 
-			</view>
-		</view>
-		<view class="charge">
-			<view class="chargeTime">
-				
-				<view v-for="(item,i) in timelist" 
-					class="chargeTime-item " :key="i"
-					@click="submitForm.hour=item.id"
-					:class="{
-						'chargeTime-active':submitForm.hour==item.id,
-						
-						'chargeTime-first':i==0
-					}"
-					>
-					<template v-if="i==0">
-						<p>充满</p><p>自停</p>
-					</template>
-						<template v-else>
-							{{item.name}}
-						</template>
-				</view>
-					
-			</view>
-			<view class="chargeTime-text">
-				<p>充电时长</p>
-				<span>{{timelist[submitForm.hour].name}}</span>
-			</view>
-		</view>
-		<view style="padding-bottom: 100px;">
-			<view class="charge">
-				<view class="chargeRadio">
-					<view class="u-flex">
-						<u-icon name="rmb-circle-fill"  color="#ff9502" size="90"></u-icon>
-						<view class="chargeRadio-text">
-							<p>余额支付</p>
-							<p>现有余额¥{{user.availableBalance}} </p>
-						</view>
-					</view>
-					<u-button type="warning"  style="    height: 34px;"
-						@click='gotoUrl("pages/user/recharge")'
-					>我要充值</u-button>
-				</view>
-			</view>
-		</view>
-	
-		<view class="foot-btn">
-			<u-button type="primary" :custom-style="customStyle" 
-				@click="submit"
-			shape="square">开始充电</u-button>
-		</view>
-		
-		<u-modal v-model="showPriceList" title="费用说明" >
-			
-			<p v-for="(item,i) in detail.priceList" class="showPriceList" :key="i">{{item.minPower}}W-{{item.maxPower}}W <span>{{item.price}}元每小时</span></p>
-			
-			<p style="    padding: 15px;" v-if="detail.roundingMinute!=null&&detail.roundingMinute!=-1">超过{{detail.roundingMinute}}分钟,按1小时记,不足{{detail.roundingMinute}}分钟,不计费</p>
-			<p style="    padding: 15px;" v-if="detail.priceList.length==0">无费用说明或为免费充电模式</p>
-		</u-modal>
-		
-		<u-modal v-model="showmodel" @confirm="confirm" :showCancelButton="true" title="订单信息" >
-			<div class="showmodel" ><p  >桩号</p>{{detail.deviceNo}}</div>
-			<div class="showmodel" ><p  >充电通道</p>{{submitForm.channelNo}}</div>
-			<div class="showmodel" ><p  >支付方式</p>余额支付</div>
-			<div class="showmodel" ><p  >充电时间</p>{{timelist[submitForm.hour].name}}</div>
-			
-			<p class="showmodel" style="color: red;" v-if="submitForm.hour==0" >充满自停模式,设备充满后会自动停止计费,剩余费用会原路返还</p>
-			
-		</u-modal>
-		
-	</view>
-</template>
-	
-<script>
-	import * as API  from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				id:"",
-				showPriceList:false,
-				showmodel:false,
-				//充电桩信息
-				detail:{
-					roundingMinute:-1,
-					priceList:[],
-				},
-				user:{},
-				//充电位子list
-				list:[
-					 
-				],
-				timelist:[
-					{
-						id:'0',
-						name:'充满自停'
-					},
-					{
-						id:'1',
-						name:'1小时'
-					},
-					{
-						id:'2',
-						name:'2小时'
-					},
-					{
-						id:'3',
-						name:'3小时'
-					},
-					{
-						id:'4',
-						name:'4小时'
-					},
-					{
-						id:'5',
-						name:'5小时'
-					},
-					{
-						id:'6',
-						name:'6小时'
-					},
-					{
-						id:'7',
-						name:'7小时'
-					},
-					{
-						id:'8',
-						name:'8小时'
-					},
-				],
-				//提交信息
-				submitForm:{
-					deviceNo:'',
-					channelNo:'',
-					hour:'0',
-					//paytype:'YE',
-				},
-				
-				isReady:false,
-				customStyle: {
-					background: '#1677ff'
-				}
-			}
-		},
-		onLoad(op) {
-			
-			if (op.id) {
-				this.id = op.id;
-				this.carhelp.set("qr-default-id",op.id);
-			}else{
-				//用于支付后返回系统  -- 点金计划
-				var  id=this.carhelp.get("qr-default-id")
-				if(id){
-					this.id =this.carhelp.get("qr-default-id");
-					
-				}
-			}
-			
-			
-			this.init()
-			
-			
-		},
-		methods: {
-			switchCharge(){
-				var stationId=this.detail.stationId;
-				console.log("switchCharge")
-			
-				uni.redirectTo({
-					url:'/pages/charge/switchCharge?id='+this.id+'&stationId='+stationId
-				})
-			},
-			init(){
-				if(!this.id){
-					this.switchCharge()
-				}else{
-					
-						
-					
-					uni.showLoading({
-						title: "加载中",
-						mask: true,
-					})
-					var data = {
-						
-					};
-					if(this.id){
-						data.deviceId=this.id
-					}
-					API.chargingData(data).then((res) => {
-						this.detail = res.data.chargingDevice;
-						
-						if(!this.detail .online){
-							uni.showToast({
-								title:'设备不在线,请扫描其他二维码'
-							})
-							return
-						}
-						
-						this.carhelp.set("qr-default-id",this.id);
-						this.user = res.data.userAccount;
-						this.list=this.detail.chargeStatusArray
-						this.isReady=true;
-						uni.hideLoading()
-						
-					}).catch(error => {
-						this.isReady=true;
-						uni.showToast({
-							title: error
-						})
-					})
-				}
-			},
-			selectItem(row){
-				if(row.status==0){
-					this.submitForm.channelNo=row.channelNo
-				}else{
-					uni.showToast({
-						title:'当前设备不可选'
-					})
-				}
-			},
-			confirm(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				
-				this.submitForm.deviceNo=this.detail.deviceNo;
-				API.startCharging(this.submitForm).then((res) => {
-				
-					 this.gotoUrl("pages/index/index");
-					// uni.showModal({
-					//     title: '提示',
-					// 	showCancel:false,
-					//     content: '启动成功',
-					//     success: res=> {
-					//         if (res.confirm) {
-					//            //付钱  改为组件
-					//            this.gotoUrl("pages/index/index");
-					           
-					//         } else if (res.cancel) {
-					//             console.log('用户点击取消');
-					//         }
-					//     }
-					// });
-					// uni.showToast({
-					// 	title: '启动中..'
-					// })
-					// setTimeout(()=>{
-						
-					// },3000)
-					// uni.hideLoading()
-					
-				}).catch(error => {
-					if(error=='用户账户余额不足!'){
-						uni.showModal({
-						    title: '支付',
-						    content: '用户账户余额不足,是否充值?',
-						    success: res=> {
-						        if (res.confirm) {
-						           //付钱  改为组件
-						           this.gotoUrl("pages/user/recharge");
-						           
-						        } else if (res.cancel) {
-						            console.log('用户点击取消');
-						        }
-						    }
-						});
-					}else{
-						uni.showToast({
-							title: error
-						})
-					}
-					
-				})
-			},
-			submit(){
-				
-				if(!this.submitForm.channelNo){
-					uni.showToast({
-						title:'请先选择充电通道'
-					})
-					return
-				}
-				var obj=this.list.find(item=>{
-					return item.channelNo==this.submitForm.channelNo
-				})
-				
-				if(!obj||obj.status!=0){
-					uni.showToast({
-						title:'当前设备不可选'
-					})
-					return
-				}
-				if(this.submitForm.hour==0&&this.user.availableBalance<5){
-					uni.showModal({
-					    title: '支付',
-					    content: '余额不足5元无法开启充满自停,是否充值?',
-					    success: res=> {
-					        if (res.confirm) {
-					           //付钱  改为组件
-					           this.gotoUrl("pages/user/recharge");
-					           
-					        } else if (res.cancel) {
-					            console.log('用户点击取消');
-					        }
-					    }
-					});
-				}else{
-					
-					this.showmodel=true;
-				}
-				 
-				
-			},
-			showTips(){
-				this.showPriceList=true
-			}
-		},onShow() {
-			if(this.isReady){
-				if (this.id) {
-					this.carhelp.set("qr-default-id",this.id);
-				}else{
-					//用于支付后返回系统  -- 点金计划
-					this.id =this.carhelp.get("qr-default-id");
-				}
-				this.init()
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	
-	.showmodel{
-		  margin-left: 20px;
-		   margin-right: 20px;
-		  p{
-			     display: inline-block;
-		  	 width: 100px;
-		  }
-	}
-	.showPriceList{
-		  margin-left: 20px;
-		   margin-right: 20px;
-		  span{
-		  	 float: right;
-		  }
-	}
-	.slot-wrap {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		flex: 1;
-	}
-	.navbar-right {
-		display: flex;
-		margin-right: 20rpx;
-		align-items: center;
-	}
-	.charge{
-		padding: 15px;
-		background-color: #fff;
-		margin-bottom: 10px;
-	}
-	.chargeRadio{
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		width: 100%;
-		.chargeRadio-text{
-			margin-left: 5px;
-		}
-	}
-	.chargeTime{
-		display: flex;
-		overflow: scroll;
-		padding-bottom: 15px;
-	
-		.chargeTime-item{
-			border: 1px solid #1677ff;
-			border-radius: 50%;
-			min-width: 56px;
-			height: 56px;
-			text-align: center;
-			line-height: 56px;
-			margin-right: 20px;
-		}
-		.chargeTime-first{
-			line-height: 20px !important;
-			
-			padding-top: 6px;
-			margin-right: 20px;
-		}
-		.chargeTime-active{
-			color:#fff;
-			background-color: #1677ff;
-		}
-	}
-	.chargeTime-text{
-		border-top: 1px solid #f7f7f7;
-		padding-top: 15px;
-		display: flex;
-		align-items: center;
-		span{
-			margin-left: 20px;
-			color:#1677ff;
-		}
-	}
-	.chargeInfo{
-		.chargeInfo-row{
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			margin-bottom: 10px;
-			p{
-				color:#999;
-			}
-			h4{
-				font-weight: normal;
-			}
-			span{
-				color:#1677ff;
-				margin-right: 5px;
-			}
-		}
-	}
-	.chargeMain{
-		display: flex;
-		flex-wrap: wrap;
-		justify-content: space-between;
-		margin-top: 20px;
-		.chargeMain-item{
-			width: 18%;
-			text-align: center;
-			padding: 10px;
-			border: 1px solid #1677ff;
-			margin-bottom: 10px;
-			border-radius: 10px;
-			color:#1677ff;
-		}
-		.active{
-			background-color:#1677ff;
-			color:#fff;
-		}
-		.fault{
-			background-color:#e1e1e1;
-			color:#666;
-			border: 1px solid #ccc;
-		}
-		.occupy{
-			color:#FF4F3F;
-			border: 1px solid #FF4F3F;
-		}
-	}
-	.foot-btn{
-		padding: 10px;
-		position: fixed;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		background-color: #fff;
-	}
-</style>

+ 0 - 310
pages/charge/switchCharge.vue

@@ -1,310 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="选择充电桩" :autoBack="false" :customBack="customBack">
-
-			<!-- <view class="slot-wrap">
-				<view class="navbar-left"></view>
-				<view class="navbar-right" @click="selectBtn"><span>确定选择</span></view>
-			</view> -->
-		</u-navbar>
-		
-		<view class="chargeListStation" v-show="stationShow">
-			<view style="text-align: center;margin-top: 100px" v-if="!stationList.length">
-			
-				<img src="@/assets/img/blankpage.png">
-				<p v-if="isPoint">暂无充电站</p>
-				<p  v-else >暂无充电站</p>
-				<p><span style="color: #1677ff;" @click="getPoint()">重新定位?</span></p>
-			</view>
-			<view class="chargeHead" v-if="stationList.length" >已为您查询附近2公里内的充电站</view>
-			
-			<template v-for="(item,i) in stationList">
-				
-				<view class="chargeList-item " @click="stationIdSelect=item.id,stationShow=false,getList()" :class="{
-				
-			}" :key="i">
-		
-					<view class="chargeList-item-row">
-						<u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff"
-							size="40"></u-icon>
-						<p>名称</p>
-						<span> {{item.name}}</span>
-					</view>
-					<view class="chargeList-item-row" v-if="false">
-						<u-icon name="shoujichongdian" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-						<p>空闲</p>
-						<span>{{item.availableNumOfChannel}}</span>
-						
-					</view>
-				<!-- 	<view class="chargeList-item-row">
-						<u-icon name="juli" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-						<p>位置</p>
-						
-					</view> -->
-						
-				<view class="chargeList-item-row">
-					<u-icon name="dizhi" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-					<p>地址</p>
-					<span>{{item.address}}</span>
-				</view>
-				</view>
-			</template>
-		
-		</view>
-		
-		<view class="chargeList" v-show="!stationShow">
-			<view style="text-align: center;margin-top: 100px" v-if="!list.length">
-			
-				<img src="@/assets/img/blankpage.png">
-				<p>暂无充电桩</p>
-				<p><span style="color: #1677ff;" @click="getPoint()">查询附近站点</span></p>
-			</view>
-			
-			<view class="chargeHead" v-if="list.length" >{{stationName}}<span @click="getPoint()">查询附近站点</span></view>
-			
-			<template v-for="(item,i) in list">
-				<view class="chargeList-item " @click="select=item.id,selectBtn()" :class="{
-				'active':item.id==select,
-			}" :key="i">
-
-					<view class="chargeList-item-row">
-						<u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff"
-							size="40"></u-icon>
-						<p>名称</p>
-						<span> {{item.name}}</span>
-					</view>
-					<view class="chargeList-item-row">
-						<u-icon name="shoujichongdian" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-						<p>通道数</p>
-						<span>{{item.numOfChannel}}</span>
-						<p>空闲</p>
-						<span>{{item.availableNumOfChannel}}</span>
-						
-					</view>
-					<!-- 	<view class="chargeList-item-row">
-					<u-icon name="juli" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-					<p>距离</p>
-					<span>荆鹏软件园1号充电桩</span>
-				</view>
-				<view class="chargeList-item-row">
-					<u-icon name="dizhi" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-					<p>地址</p>
-					<span>荆鹏软件园1号充电桩</span>
-				</view> -->
-				</view>
-			</template>
-
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	import * as WxJsApi from '@/utils/wxJsApi.js'
-	export default {
-		data() {
-			return {
-				list: [
-
-				],
-				stationList:[],
-				stationId: '',
-				stationIdSelect: '',
-				stationShow: false,
-				select: '',
-				selectBtnId: '',
-				index: false,
-				stationName:'',
-				isReady:false,
-				isPoint:true,
-				longitude: 0,
-				latitude: 0,
-			}
-		},
-		onLoad(op) {
-			if (op.id) {
-				this.select = op.id;
-
-			}
-			if (op.stationId) {
-				this.stationId = op.stationId;
-
-			}
-			if (op.index) {
-				this.index = true;
-			}
-			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
-				// //(res)
-				this.isReady=true;
-				
-			}).catch(error => {
-				//(res)
-			})
-		},
-		methods: {
-			getPoint() {
-				uni.showToast({
-					title: "定位中...请打开定位设置",
-					icon: "none"
-				})
-				WxJsApi.getLocation().then((res) => {
-					this.isPoint=true;
-					this.latitude = parseFloat(res.latitude);
-					this.longitude = parseFloat(res.longitude);
-				
-			
-					if (res.errMsg != 'getLocation:ok') {
-						uni.showToast({
-							title: res
-						})
-					} else {
-						this.searchStationData()
-					}
-				}).catch(error => {
-					this.isPoint=false;
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			searchStationData(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				
-				var data={
-					longitude: this.longitude,
-					latitude: this.latitude,
-					pageSize:50,
-					raidus:2,
-				}
-				API.chargingStationData(data).then((res) => {
-					this.stationList = res.data.data;
-					this.stationShow = true;
-					uni.hideLoading()
-				
-				}).catch(error => {
-					uni.showToast({
-				
-						title: error
-					})
-				})
-			},
-			customBack() {
-				
-				if(this.stationShow&&this.stationId){
-					this.stationShow=false
-					this.stationIdSelect=stationId
-					this.getList()
-				}else{
-					uni.redirectTo({
-						url: '/pages/charge/index'
-					})
-				}
-				
-			},
-			selectBtn() {
-				this.selectBtnId = this.select;
-				this.carhelp.set("qr-default-id", this.selectBtnId);
-				uni.redirectTo({
-					url: '/pages/charge/index?id=' + this.selectBtnId
-				})
-
-			},
-			getList() {
-
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-
-				var data = {
-					//deviceId: this.select,
-					stationId: this.stationIdSelect,
-					pageSize: 50,
-				};
-				API.chargingDeviceData(data).then((res) => {
-					console.log(res)
-					this.list =res.data.data;
-					if(this.list.length){
-						this.stationName=this.list[0].stationName
-					}
-					this.recordsTotal = res.data.recordsTotal
-					uni.hideLoading()
-
-				}).catch(error => {
-					uni.showToast({
-
-						title: error
-					})
-				})
-			}
-		},
-		onReady() {
-			if(this.stationId){
-				this.stationIdSelect=this.stationId
-				this.getList()
-			}else{
-				this.stationShow = true;
-				this.getPoint()
-			}
-			
-		},
-	}
-</script>
-<style>
-	page {
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	.slot-wrap {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		flex: 1;
-	}
-
-	.navbar-right {
-		display: flex;
-		margin-right: 20rpx;
-		align-items: center;
-		color: #1677ff;
-	}
-	.chargeHead{
-		padding:0 15px ;
-		margin-top: 10px;
-		span{
-			float: right;
-			color: #1677ff;
-		}
-	}
-
-	.chargeList-item {
-		background-color: #fff;
-		padding: 15px;
-		margin: 10px;
-		border-radius: 10px;
-
-		.chargeList-item-row {
-			display: flex;
-			align-items: center;
-			margin-bottom: 10px;
-
-			&:last-child {
-				margin-bottom: 0;
-			}
-
-			p {
-				color: #999;
-				margin: 0 10px;
-			}
-		}
-	}
-
-	.chargeList-item.active {
-		border: 1px solid #1677ff;
-	}
-</style>

+ 0 - 529
pages/index/index.vue

@@ -1,529 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充电中" :is-back="false">
-			<view class="slot-wrap">
-				<view class="navbar-left"></view>
-				<view class="navbar-right" @click="f5(true)" style="    color: #1d7cff;">
-					<u-icon name="shuaxin" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>刷新
-				</view>
-			</view>
-		</u-navbar>
-		<view class="chargeInfoNull" v-if="list.length==0">
-			<img height="80" width="80" src="@/assets/img/ddc.png" alt="">
-			<p>暂无充电车辆</p>
-		</view>
-
-
-		<swiper class="swiper" :current="current" @change="changeswiper" style="    height: 700px;"
-			v-if="list.length!=0">
-			<swiper-item v-for="(item,i) in list" :key="i">
-				<view class="chargeInfo">
-					<view class="chargeInfo-text">
-						<p>桩名:{{item.deviceName}}</p>
-						<p>桩号:{{item.deviceNo}}</p>
-					</view>
-					<view class="chargeInfo-btn">
-						通道:{{item.channelNo}}
-					</view>
-				</view>
-				<view class="chargeImg">
-					<img v-if="item.status==0" src="@/assets/img/charge-0.png" alt="">
-					<img v-if="item.status==1" src="@/assets/img/charge-1.png" alt="">
-					<img v-if="item.status==2" src="@/assets/img/charge-2.png" alt="">
-					<img v-if="item.status==3" src="@/assets/img/charge-3.png" alt="">
-					<div class="JPTIME JPTIME1" v-if="item.status==0||item.status==3" v-text="showtime[i]"></div>
-
-				</view>
-				<view class="chargeTime" v-if="item.status==3">
-					<h1>关闭中...</h1>
-
-				</view>
-				<view class="chargeTime" v-if="item.status==0">
-					<h1>启动中...</h1>
-					请在2分钟内接入电源!
-				</view>
-				<view class="chargeTime" v-if="item.status==2">
-					<h1>充电结束</h1>
-					{{item.updateTime}}{{item.remark?':'+item.remark:''}}
-				</view>
-				<view class="chargeTime" v-if="item.status==1">
-					<p>剩余时长<span>(时分)</span></p>
-					<u-line-progress active-color="#ececec" height="48" :percent="getPercent(item).percent">
-						<div style="     
-						border-radius: 100px;
-						 min-width: 70px;  width: 100%;background-color: rgba(51, 136, 255, 100);height: 8px;">
-							&nbsp;
-							<div class="" style="float: right;
-										
-										padding: 0 8px;
-										border-radius: 100px;
-										background-color: rgba(51, 136, 255, 100);
-										color: rgb(255, 255, 255);
-										font-size: 12px;
-										text-align: center;
-										font-family: -apple-system;
-										top: -5px;
-										position: relative;							
-							">{{getPercent(item).value}}</div>
-						</div>
-
-
-					</u-line-progress>
-				</view>
-				<view class="chargeData">
-					<view class="chargeData-item">
-						<u-icon name="jiagebaohu" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
-						<h2>{{item.actualFee?item.actualFee:(item.estimateFee?item.estimateFee:0)}}元</h2>
-						<p>消费金额</p>
-					</view>
-					<view class="chargeData-item">
-						<u-icon name="dian" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
-						<h2>{{item.chargingPower?item.chargingPower:0}}W</h2>
-						<p>充电功率</p>
-					</view>
-				</view>
-				<view class="chargeBtn">
-					<view class="chargeBtn-item" v-if="item.status==1||item.status==0" @click="returnMoney(item)">终止并退款
-					</view>
-					<view class="chargeBtn-item" v-if="item.status==2" @click="f5(true)">刷新</view>
-					<view class="chargeBtn-item" @click="showTips(item)">费用说明</view>
-				</view>
-
-				<view class="chargeNext">{{i+1}}/{{list.length}}</view>
-			</swiper-item>
-
-
-
-
-		</swiper>
-		<u-modal v-model="showmodel" title="费用说明">
-			<p v-if="showitem.length==0">当前为免费充电桩</p>
-			<p v-for="(item,i) in showitem" class="showmodel" :key="i">{{item.minPower}}W-{{item.maxPower}}W
-				<span>{{item.price}}元每小时</span></p>
-
-
-		<p style="    padding: 15px;" v-if="roundingMinute!=null&&roundingMinute!=-1">超过{{roundingMinute}}分钟,按1小时记,不足{{roundingMinute}}分钟,不计费</p>
-			<p style="    padding: 15px;" v-if="showitem.length==0">无费用说明或为免费充电模式</p>
-	
-
-		</u-modal>
-		<Tabbar :current="0" ref="tabbarMain"  :id="id"></Tabbar>
-	</view>
-</template>
-
-<script>
-	import Tabbar from '@/components/Tabbar.vue'
-	import * as API from '@/apis/index.js'
-	import {
-		secondsDistance,
-		hourDistanceArr
-	} from '@/utils'
-	export default {
-		data() {
-			return {
-				k: 0,
-				id: "",
-				current: "0",
-				showmodel: false,
-				showitem: [],
-				percent: 0,
-				list: [],
-				showtime: {},
-				isReady: false,
-				isCharge: false,
-				roundingMinute:-1,
-				detail: {
-
-				},
-				detailIng: {
-
-				},
-				setTimeoutId: ""
-			}
-		},
-		onLoad(op) {
-			if (op.k) {
-				this.k = op.k;
-				//如果是扫码 ,或者登陆进来的, 并且没有充电,就跳转到充电页面  k= null
-				//如果是在系统内部访问的,  k=1  不跳转;
-			}
-			
-			if (op.id) {
-				this.id = op.id;
-				this.carhelp.set("qr-default-id",op.id);
-			}else{
-				//用于支付后返回系统  -- 点金计划
-				this.id =this.carhelp.get("qr-default-id");
-			}
-			uni.showLoading({
-				title: "加载中",
-				mask: true,
-			})
-			this.init(op.phone)
-			setInterval(this.formatDate, 500);
-
-		},
-		beforeDestroy() {
-			if (this.formatDate) {
-				clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
-			}
-		},
-		methods: {
-			
-			changeswiper(e) {
-				this.current = e.detail.current;
-			},
-			formatDate() {
-				for (var i in this.list) {
-					var obj = this.list[i];
-					var second = 0;
-
-					if (obj.status == 0) {
-						second = secondsDistance(obj.createTime);
-					}
-					if (obj.status == 3) {
-						second = secondsDistance(obj.updateTime);
-					}
-					//obj.showtime=this.getShowTime(obj);
-					var ms = 60 * 2 - second;
-					if (ms > 0) {
-						var Hour = parseInt(Math.floor(ms / (60)));
-						var Fen = parseInt(Math.floor(ms % 60));
-						this.showtime[i] = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen
-
-					} else {
-						this.showtime[i] = "00:00";
-					}
-
-					this.$forceUpdate()
-
-				}
-			},
-
-			getPercent(item) {
-				var obj = {
-
-				}
-				if (item.status == 1) {
-
-					var second = secondsDistance(item.startTime);
-					if (second > 0) {
-
-						obj.percent = (second / 60) / item.estimateMinute * 100;
-						var ms = item.estimateMinute * 60 - second
-						if (ms > 0) {
-							var Hour = parseInt(Math.floor(ms / (60 * 60)));
-							var Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
-							
-							obj.value = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen
-						}
-
-					}
-				}
-				if (item.status == 0) {
-					obj.value = "启动中"
-					obj.percent = "50";
-				}
-				if (item.status == 2) {
-					obj.value = "关闭中"
-					obj.percent = "50";
-				}
-				//特殊情况默认值
-				if (!obj.value) {
-					obj.value = "00:00"
-				}
-				if (!obj.percent) {
-					obj.percent = "100";
-				}
-
-				return obj;
-			},
-			showTips(item) {
-				this.showmodel = true;
-				this.roundingMinute=item.roundingMinute;
-				if(this.roundingMinute==null){
-					this.roundingMinute=5;
-				}
-				this.showitem = item.chargingPriceList;
-				
-			},
-			returnMoney(item) {
-
-				uni.showModal({
-					title: '停止充电确认',
-					showCancel: true,
-					content: '您确定要停止充电吗?停止后将不再充电并退款到余额',
-					success: res => {
-						if (res.confirm) {
-							this.stopCharging(item)
-
-						} else if (res.cancel) {
-							console.log('用户点击取消');
-						}
-					}
-				});
-			},
-			stopCharging(item) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				var data = {
-					chargingRecordId: item.id,
-					channelNo: item.channelNo,
-					deviceNo: item.deviceNo,
-				};
-				API.stopCharging(data).then((res) => {
-					this.f5(true)
-				}).catch(error => {
-
-					uni.showToast({
-						title: error
-					})
-				})
-			},
-			init(phone) {
-				if (!phone) {
-					phone = ""
-				}
-				// uni.showLoading({
-				// 	title: "加载中",
-				// 	mask: true,
-				// })
-				var data = {
-					phone: phone
-				};
-				API.findChargeData(data).then((res) => {
-
-					if (res.data.chargingRecordList.length != this.list.length) {
-						this.current = 0;
-					}
-
-					this.list = res.data.chargingRecordList;
-					this.isCharge = res.data.isCharge;
-					this.isReady = true;
-					
-					if (!this.isCharge && this.k != 1) {
-						if( this.id){
-							this.gotoUrl("pages/charge/index?id=" + this.id)
-						}else{
-								uni.hideLoading()							
-						}
-						return
-					} else {
-						uni.hideLoading()
-					}
-					if (this.list.length > 0) {
-						//防止定时器重复调用
-						if (this.setTimeoutId == "") {
-							for (var i in this.list) {
-								var item = this.list[i];
-
-								if (item.status == 0 || item.status == 3) {
-									this.setTimeoutId = setTimeout(() => {
-										this.setTimeoutId = "";
-										this.f5()
-									}, 5 * 1000)
-								} else if (item.status == 1 && item.startTime) {
-									var second = secondsDistance(item.startTime);
-									var ms = item.estimateMinute * 60 - second
-									if (ms < 60 * 10) {
-										this.setTimeoutId = setTimeout(() => {
-											this.setTimeoutId = "";
-											this.f5()
-										}, 5 * 1000)
-									}
-								}
-							}
-						}
-					} else {
-						this.setTimeoutId = ""
-					}
-
-				}).catch(error => {
-					uni.showToast({
-						title: error
-					})
-				})
-			},
-			f5(bl) {
-
-				if (bl) {
-					uni.showLoading({
-						title: "加载中",
-						mask: true,
-					})
-				}
-				this.k = 1;
-				this.init()
-			},
-		},
-		components: {
-			Tabbar
-
-		},
-		onShow() {
-			if (this.isReady) {
-				this.f5(true)
-			}
-			if(this.$refs.tabbarMain){
-				this.$refs.tabbarMain.setcount(0);
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	@import '@/assets/font/jptime.css';
-
-	.JPTIME1 {
-		position: relative;
-		bottom: 170px;
-		font-size: 40px;
-		text-align: center;
-		color: #eee;
-	}
-
-	.showmodel {
-		margin-left: 20px;
-		margin-right: 20px;
-
-		span {
-			float: right;
-		}
-	}
-
-	.slot-wrap {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		flex: 1;
-	}
-
-	.chargeNext {
-		background: rgba(0, 0, 0, 0.5);
-		color: #fff;
-		float: right;
-		padding: 5px 15px;
-		border-radius: 15px;
-		font-size: 12px;
-		margin-bottom: 10px;
-		margin-right: 10px;
-	}
-
-	.navbar-right {
-		display: flex;
-		margin-right: 20rpx;
-		align-items: center;
-	}
-
-	.chargeInfoNull {
-		text-align: center;
-		padding: 100px 0 50px;
-
-		p {
-			color: #999;
-			font-size: 20px;
-			margin-top: 10px;
-		}
-	}
-
-	.chargeInfo {
-		padding: 10px;
-		position: relative;
-
-		.chargeInfo-text {
-			p {
-				color: #777;
-				margin-bottom: 5px;
-			}
-		}
-
-		.chargeInfo-btn {
-			background-color: #E0EDFF;
-			width: 72px;
-			height: 32px;
-			border-radius: 16px 0 0 16px;
-			line-height: 32px;
-			text-align: center;
-			position: absolute;
-			right: 0;
-			top: 16px;
-			color: #1677FF;
-		}
-	}
-
-	.chargeImg {
-		height: 300px;
-		width: 300px;
-		margin: 10px auto 0;
-
-		img {
-			height: 100%;
-			width: 100%;
-		}
-	}
-
-	.chargeTime {
-		padding: 20px 30px;
-		text-align: center;
-
-		p {
-			color: #999;
-			margin-bottom: 10px;
-		}
-	}
-
-	.chargeBtn {
-		display: flex;
-		justify-content: space-around;
-		padding: 20px 50px;
-
-		.chargeBtn-item {
-			width: 80px;
-			height: 32px;
-			background-color: #1677FF;
-			line-height: 32px;
-			color: #fff;
-			text-align: center;
-			border-radius: 16px;
-		}
-
-	}
-
-	.chargeData {
-		display: flex;
-		justify-content: space-around;
-
-		.chargeData-item {
-			text-align: center;
-
-			h2 {
-				font-size: 24px;
-				font-weight: normal;
-				color: #1677FF;
-				margin: 10px 0;
-			}
-
-			.chargeData-power {
-				display: flex;
-				align-items: center;
-				display: flex;
-				width: 120px;
-				text-align: center;
-				height: 31px;
-				margin: 10px 0;
-
-				span {
-					font-size: 14px;
-					color: #1677FF;
-					margin: 0 5px;
-				}
-			}
-
-			p {
-				color: #999;
-			}
-		}
-	}
-</style>

+ 0 - 87
pages/index/none.vue

@@ -1,87 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充电中" :is-back="false">
-			<view class="slot-wrap">
-				<view class="navbar-left"></view>				
-				<view class="navbar-right">
-					<u-icon name="shuaxin" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-				</view>
-			</view>
-		</u-navbar>
-		<view class="chargeInfo">
- 			<p>暂无充电车辆</p>
-		</view>
-		<view class="chargeBtn">
-			查看附近充电桩
-		</view>
-		<u-tabbar v-model="current" :list="tabbarList" :mid-button="true" active-color="#1677ff"></u-tabbar>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				tabbarList: [{
-						iconPath: "motuoche-diandongche",
-						selectedIconPath: "motuoche-diandongche",
-						text: '充电',
-						count: 0,
-						isDot: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "/@/assets/img/min_button_select.png",
-						selectedIconPath: "/@/assets/img/min_button_select.png",
-						text: '充电中',
-						midButton: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "31wode",
-						selectedIconPath: "31wode",
-						text: '我的',
-						count: 0,
-						isDot: false,
-						customIcon: true,
-					},
-				],
-				current: 0
-			}
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.slot-wrap {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		flex: 1;
-	}
-	.navbar-right {
-		display: flex;
-		margin-right: 20rpx;
-		align-items: center;
-	}
-	.chargeInfo{
-		text-align: center;
-		padding:100px 0 50px;
-		p{
-			color:#999;
-			font-size: 20px;
-			margin-top: 10px;
-		}
-	}
-	.chargeBtn{
-		padding: 10px 20px;
-		border-radius:22px ;
-		width: 150px;
-		border: 2px solid #1677FF;
-		color:#1677FF;
-		margin: 0 auto;
-	}
-</style>

+ 0 - 284
pages/login/index.vue

@@ -1,284 +0,0 @@
-<template>
-	<view>
-
-		<div class="vongi-login-logo" style="
-			text-align: center;
-			margin-top: 40px;">
-			<img src="@/assets/img/logo_xiaopengguanjia.png" style="
-			   width: 72px;
-			   height: 72px;
-			   border-radius: 15px;
-			" />
-			<div style="
-				color: rgba(16, 16, 16, 100);
-				font-size: 18px;
-				text-align: center;
-				font-family: PingFangSC-regular;
-			">51充电联盟</div>
-			<!-- 51充电联盟 -->
-		</div>
-		<view class="login-title">
-<!-- 			<u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
- -->			<h3>电单车智能充电系统</h3>
-		</view>
-		<view class="login-main">
-			<u-form :model="form" ref="uForm">
-				<u-form-item label="手机号码" prop="phone" label-width="150" label-position="top">
-					<u-input placeholder="请输入手机号" v-model="form.phone" type="number"></u-input>
-				</u-form-item>
-				<u-form-item label="验证码" prop="code" label-width="150" label-position="top">
-					<u-input placeholder="请输入验证码" v-model="form.code" type="text"></u-input>
-					<view class="login-code" @click="getCode">
-						{{codeTips}}
-					</view>
-				</u-form-item>
-			</u-form>
-		</view>
-		<view class="login-btn">
-			<u-button type="primary" :custom-style="customStyle" @click="finish" shape="square">登录</u-button>
-		</view>
-		<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start">
-		</u-verification-code>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/login.js'
-
-	import {
-		checkPhone
-	} from '@/utils'
-	export default {
-		data() {
-			return {
-				form: {
-					phone: '',
-					code: '',
-				},
-				backUrl: "",
-				message: "",
-				codeTips: '',
-				isSendMsgIng: false,
-				sendMsgSecond: 60 * 2,
-				customStyle: {
-					background: '#1677ff'
-				}
-			}
-		},
-		onLoad(op) {
-
-			this.message = op.message;
-			this.backUrl = op.back;
-			if (op.phone) {
-				this.form.phone = op.phone;
-			}
-
-		},
-		methods: {
-			codeChange(text) {
-				this.codeTips = text;
-			},
-			//倒计时
-
-			end() {
-				this.sendMsgSecond = 2 * 60;
-				this.isSendMsgIng = false;
-			},
-			finish() {
-
-				if (!this.carhelp.getOpenId()) {
-					// uni.showToast({
-					// 	title: "请使用“微信”访问本系统登录"
-					// })
-					// return
-				}
-				if (!this.form.phone) {
-					uni.showToast({
-						title: "请输入手机号"
-					})
-					return
-				}
-				if (!this.form.code) {
-					uni.showToast({
-						title: "请输入验证码"
-					})
-					return
-				}
-
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				var headImg = "";
-				var userInfo = this.carhelp.get("xpgj_wx_user_info")
-				if (userInfo) {
-
-					headImg = userInfo.headimgurl;
-				}
-
-
-				API.validateCode({
-					verifyCode: this.form.code,
-					telephone: this.form.phone,
-					openId: this.carhelp.getOpenId(),
-					headImg: headImg,
-					source:1,
-				}).then((response) => {
-					var token = response ? response.data.token : '';
-					this.carhelp.setToken(token);
-					this.carhelp.setPersonInfo(response.data.regUser);
-					this.carhelp.setPersonInfoPlus(response.data.data  )
-					
-					//this.gotoUrl("pages/user/index")
-					uni.redirectTo({
-						url: '/pages/index/index'
-					})
-
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			start() {
-				if (!this.isSendMsgIng) {
-
-
-					uni.showLoading({
-						title: "加载中",
-						mask: true,
-					})
-					API.getVerifyCode(this.form.phone).then((response) => {
-
-
-						uni.hideLoading();
-						this.carhelp.set("getvcodetime", new Date().getTime());
-
-						if (!"") {
-							//倒计时
-							uni.showToast({
-								title: "发送成功"
-							})
-						} else {
-							uni.showToast({
-								title: "您的验证码已经发送[5分钟有效],请勿重复点击"
-							})
-						}
-					}).catch(error => {
-						uni.showToast({
-							title: error,
-							icon: "none"
-						})
-					})
-
-
-				}
-			},
-			// 获取验证码
-			getCode() {
-				if (this.$refs.uCode.canGetCode) {
-
-				} else {
-
-					uni.showToast({
-						title: '倒计时结束后再发送',
-						icon: "none"
-					})
-					return
-				}
-
-				var checkPhoneResult = checkPhone(this.form.phone);
-
-				if ( checkPhoneResult !== true) {
-					uni.showToast({
-						title: checkPhoneResult,
-
-					})
-					return;
-				}
-				this.$refs.uCode.start();
-			},
-			query(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				
-				API.findByOpenId({
-					
-					openId: this.carhelp.getOpenId(),
-					
-				}).then((response) => {
-					
-					var token = response ? response.data.token : '';
-					this.carhelp.setToken(token);
-					this.carhelp.setPersonInfo(response.data.regUser);
-					//this.gotoUrl("pages/user/index")
-					this.carhelp.setPersonInfoPlus(response.data.data  )
-					
-					uni.redirectTo({
-						url: '/pages/index/index'
-					})
-				
-				}).catch(error => {
-					uni.hideLoading();
-					if (!this.carhelp.getOpenId()) {
-						// uni.showToast({
-						// 	title: "请使用“微信”访问本系统登录"
-						// })
-						// return
-					} else if (this.message) {
-						uni.showToast({
-							title: this.message.split(",")[0],
-							icon: "none"
-						})
-					}
-					var time = this.carhelp.get("getvcodetime");
-					if (time) {
-						//this.$refs.uCode.start();
-						var nowtime = new Date().getTime()
-						var differ = (nowtime - time) / 1000
-						if (differ < 2 * 60) {
-							this.sendMsgSecond = 2 * 60 - parseInt(differ)
-							this.isSendMsgIng = true;
-							this.$refs.uCode.start();
-						}
-					}
-					
-				})
-			}
-		},
-		onReady() {
-			this.query()
-			
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.login-title {
-		text-align: center;
-		align-items: center;
-		margin: 25px 30px;
-
-		h3 {
-			font-size: 18px;
-			margin-left: 10rpx;
-			color: #1677ff;
-			font-weight: normal;
-		}
-	}
-
-	.login-main {
-		margin: 0 30px;
-	}
-
-	.login-btn {
-		margin: 30px;
-	}
-
-	.login-code {
-		color: #1677ff;
-	}
-</style>

+ 0 - 271
pages/user/index.vue

@@ -1,271 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="个人中心" :is-back="false"  :background="background" title-color="#fff" :border-bottom="false"></u-navbar>
-		<view class="userHead">
-			<view class="userHead-top">
-				<view class="userHead-data">
-					<p>余额(元)</p>
-					<h2>{{detail.balance}}</h2>
-				</view>
-				<view class="userHead-img">
-					<u-avatar class="userHead-head" :src="src" size="144"></u-avatar>
-				</view>
-				<view class="userHead-btn" 
-				 @click="gotoUrl('pages/user/recharge')" >
-					<u-icon name="jiagebaohu" custom-prefix="custom-icon" color="#1677ff" size="32"></u-icon>
-					<span>充值</span>
-				</view>
-			</view>
-			<view class="userHead-bot">
-				<view class="userHead-bot-item">
-					<p>充电度数</p>
-					<h2>{{detail.electricQuantity}}</h2>
-				</view>
-				<view class="userHead-bot-item">
-					<p>充电次数</p>
-					<h2>{{detail.chargingTimes}}</h2>
-				</view>
-			</view>
-			<view class="user-cell">
-				<view 
-				@click="gotorechargeDeatils"
-				
-				class="user-cell-item">
-					<view class="user-cell-title">
-						<u-icon name="jiagebaohu" custom-prefix="custom-icon" color="#1677ff" size="32"></u-icon>
-						<span>充值记录</span>
-					</view>
-					<view class="user-cell-value"></view>
-				</view>
-				<view 
-				@click="gotoUrl('pages/charge/chargeList')"
-				class="user-cell-item">
-					<view class="user-cell-title">
-						<u-icon name="shoujichongdian" custom-prefix="custom-icon" color="#1677ff" size="32"></u-icon>
-						<span>充电记录</span>
-					</view>
-					<view class="user-cell-value"></view>
-				</view>
-				<view class="user-cell-item" @click="phone()">
-					<view class="user-cell-title">
-						<u-icon name="kefu" custom-prefix="custom-icon" color="#1677ff" size="32"></u-icon>
-						<span>我的客服</span>
-					</view>
-					<view class="user-cell-value">{{tel}}</view>
-				</view>
-				<view class="user-cell-item" @click="logout">
-					<view class="user-cell-title">
-						<u-icon name="tuichu" custom-prefix="custom-icon" color="#1677ff" size="32"></u-icon>
-						<span>退出账户</span>
-					</view>
-					<view class="user-cell-value"></view>
-				</view>
-			</view>
-		</view>
-			<Tabbar :current="2" ref="tabbarMain"  :id="id" ></Tabbar>
- 	</view>
-</template>
-
-<script>
-	import Tabbar from '@/components/Tabbar.vue'
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				id:"",
-				src:'',
-				isReady:false,
-				tel:'400-8899-619',
-				detail:{},
-				background: {
-					backgroundColor: '#1677ff',
-				},
-				
-			}
-		},onLoad(op){
-			if (op.id) {
-				this.id = op.id;
-				this.carhelp.set("qr-default-id",op.id);
-			}else{
-				//用于支付后返回系统  -- 点金计划
-				this.id =this.carhelp.get("qr-default-id");
-			}
-			this.init();
-		},
-		methods: {
-			gotorechargeDeatils( ){
-				
-				uni.navigateTo({
-					url:'/pages/user/rechargeList'
-				})
-				
-			},
-			init(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-			
-				API.personalCenter().then((res) => {
-					this.detail = res.data
-					this.src= res.data.regUser.headImg
-					this.isReady=true;
-					uni.hideLoading()
-					
-				}).catch(error => {
-					uni.showToast({
-						title: error
-					})
-				})
-			},
-			logoutApi(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				var data = {
-					
-				};
-				 
-				API.logout(data).then((res) => {
-					this.carhelp.setToken("");
-					this.carhelp.set("token_tdate","")
-					this.carhelp.setPersonInfo("");
-					this.carhelp.setPersonInfoPlus(""  )
-					
-					uni.reLaunch({
-						url:"/pages/login/index?phone="+this.detail.regUser.phone
-					})
-					
-				}).catch(error => {
-					uni.showToast({
-						title: error
-					})
-				})
-			},
-			logout(){
-				uni.showModal({
-				    title: '提示',
-				    content: '确认是否退出?',
-				    success: res=> {
-				        if (res.confirm) {
-				           //付钱  改为组件
-				           this.logoutApi();
-				           
-				        } else if (res.cancel) {
-				            console.log('用户点击取消');
-				        }
-				    }
-				});
-			},
-			phone(){
-				uni.makePhoneCall({
-				    phoneNumber:this.tel //仅为示例
-				});
-			}
-		},onShow() {
-			if(this.$refs.tabbarMain){
-				this.$refs.tabbarMain.setcount(2);
-			}
-			if(this.isReady){
-				this.init()
-			}
-		
-		},
-		components: {
-			Tabbar
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.user-cell-item{
-		padding: 13px 15px;
-		position: relative;
-		border-bottom: 1px solid #f7f7f7;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		.user-cell-value{
-			flex: 1;
-			text-align: right;
-			padding-right: 25px;
-			color:#999;
-		}
-		&:after{
-			content:'\e77c';
-			font-family: "custom-icon" !important;
-			font-size: 16px;
-			position: absolute;
-			right: 15px;
-			top: 15px;
-			color:#999;
-		}
-		.user-cell-title{
-			span{
-				margin-left: 5px;
-			}
-		}
-	}
-	.userHead{
-		.userHead-top{
-			background-color: #1677ff;
-			height: 120px;
-			position: relative;
-			padding: 0 30px;
-			.userHead-data{
-				color:#fff;
-				text-align: center;
-				position: absolute;
-				top: 35px;
-				left: 30px;
-				p{
-					margin-bottom: 5px;
-				}
-				h2{
-					font-weight: normal;
-				}
-			}
-			.userHead-img{
-				position: absolute;
-				left: 50%;
-				margin-left: -36px;
-				top:24px ;
-				.userHead-head{
-					border:4px solid  #5ca0ff;
-				}
-			}
-			.userHead-btn{
-				position: absolute;
-				top: 46px;
-				right: 20px;
-				width: 80px;
-				height: 28px;
-				border-radius: 14px;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				background-color: #FFFFFF;
-				span{
-					margin-left: 5px;
-					color:#1677ff;
-				}
-			}
-		}
-		.userHead-bot{
-			background-color: #125fcc;
-			height: 60px;
-			display: flex;
-			justify-content: space-around;
-			align-items: center;
-			.userHead-bot-item{
-				text-align: center;
-				color:#fff;
-				h2{
-					font-weight: normal;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 274
pages/user/recharge.vue

@@ -1,274 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充值">
-		</u-navbar>
-		<view class="recharge">
-			<view class="recharge-text">
-				<p>账户余额(元)</p>
-				<h1>{{detail.balance}}</h1>
-			</view>
-			<view 
-			 @click="gotoUrl('pages/user/rechargeList')"
-			class="recharge-btn">
-				账单
-			</view>
-		</view>
-		<view class="charge">
-			<view class="chargeTit">
-				选择充值金额
-			</view>
-			<view class="chargeMain">
-				<template v-for="(item,i) in list">
-				
-				<view  :key="i" :class="{
-					'active':chargingMarketingId==item.id
-				}"  @click="chargingMarketingId=item.id,selectItem=item"
-				class="chargeMain-item "><p>{{item.rechargeAmount}}元</p> <span v-if="item.giftAmount">赠{{item.giftAmount}}元</span></view>
-				
-				
-				</template>
-			</view>
-		</view>
-		<view style=" padding-bottom: 120px; ">
-			<view class="charge">
-			<view class="chargeRadio">
-				<view class="u-flex">
-					<u-icon name="weixinzhifu" custom-prefix="custom-icon" color="#22ac38" size="80"></u-icon>
-					<view class="chargeRadio-text">
-						<h4>微信支付</h4>
-						<p>推荐微信支付</p>
-					</view>
-				</view>
-				<u-radio-group>
-					<u-radio></u-radio>
-				</u-radio-group>
-			</view>
-		</view>
-			
-		</view>
-		
-		<view class="foot-btn">
-			<view class="foot-pirce">
-				<u-icon name="tikuan" custom-prefix="custom-icon" color="#FF9502" size="48"></u-icon>
-				<span>支付 ¥{{selectItem.rechargeAmount}}</span>
-			</view>
-			<u-button type="primary" @click="submit" :custom-style="customStyle" shape="square">确定充值</u-button>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as Pay from '@/apis/weixin.js'
-	import {
-		wxPayJs
-	} from '@/utils/wxpay'
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				isReady:false,
-				customStyle: {
-					background: '#1677ff'
-				},
-				detail:{},
-				chargingMarketingId:'',
-				selectItem:{},
-				list:[],
-			}
-		},
-		onReady() {
-			this.init();
-		},
-		methods: {
-			submit(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				Pay.wxpay(this.chargingMarketingId).then((response) => {
-					if(!response.result){		
-						uni.showToast({
-							title:  response.message
-						})
-						return
-					}
-					var data = response.data
-					uni.hideLoading()
-					console.log("Pay+"+new Date().getTime())		
-					wxPayJs(data);
-						
-				}).catch(error => {
-					this.$refs.common.showLoading(false, error);
-						
-				})
-			},
-			init1(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-			
-				API.personalCenter().then((res) => {
-					this.detail = res.data
-						this.isReady=true;
-					uni.hideLoading()
-					
-				}).catch(error => {
-					uni.showToast({
-						title: error
-					})
-				})
-			},
-			init(){
-				
-				
-				
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				var data = {
-					
-				};
-				
-				
-				API.marketingData(data).then((res) => {
-						
-					this.list = res.data.chargingMarketingList
-					if(this.list.length>0){
-						this.selectItem=this.list[0];
-						this.chargingMarketingId=this.list[0].id
-					}
-					uni.hideLoading()
-					this.init1()
-				}).catch(error => {
-					uni.showToast({
-						
-						title: error
-					})
-				})
-			}
-		},onShow(){
-			if(this.isReady){
-				this.init1()
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	.recharge{
-		padding: 15px;
-		background-color: #1677FF;
-		margin-bottom: 10px;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		.recharge-text{
-			color:#fff;
-		}
-		.recharge-btn{
-			width: 60px;
-			height: 30px;
-			text-align: center;
-			line-height: 30px;
-			background-color: #589EFF;
-			color:#fff;
-			border-radius: 15px;
-		}
-	}
-	.charge{
-		padding: 15px;
-		background-color: #fff;
-		margin-bottom: 10px;
-	}
-	.chargeRadio{
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		width: 100%;
-		.chargeRadio-text{
-			margin-left: 5px;
-			h4{
-				font-weight: normal;
-				font-size: 15px;
-			}
-			p{
-				font-size: 12px;
-				color:#999;
-				margin-top: 5px;
-			}
-		}
-	}
-	.chargeTit{
-		border-bottom: 1px solid #f7f7f7;
-		padding-bottom: 10px;
-		font-size: 15px;
-	}
-	.chargeMain{
-		display: flex;
-		flex-wrap: wrap;
-		justify-content: space-between;
-		margin-top: 20px;
-		.chargeMain-item{
-			width: 48%;
-			text-align: center;
-			padding: 25px 10px;
-			border: 2px solid #cacaca;
-			margin-bottom: 10px;
-			border-radius: 10px;
-			color:#333;
-			position: relative;
-			p{
-				font-size: 20px;
-			}
-			span{
-				background-color: #ff8d00;
-				color:#fff;
-				padding: 2px 10px;
-				border-radius:0 10px 0 10px;
-				position: absolute;
-				font-size: 12px;
-				right: -2px;
-				top: -2px;
-			}
-		}
-		.active{
-			border-color:#ff8d00;
-			color:#ff8d00;
-		}
-		.fault{
-			background-color:#e1e1e1;
-			color:#666;
-			border: 1px solid #ccc;
-		}
-		.occupy{
-			color:#FF4F3F;
-			border: 1px solid #FF4F3F;
-		}
-	}
-	.foot-btn{
-		padding: 10px;
-		position: fixed;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		background-color: #fff;
-		.foot-pirce{
-			display: flex;
-			align-items: center;
-			span{
-				margin-left: 5px;
-				font-size: 16px;
-			}
-			padding-bottom: 10px;
-			border-bottom: 1px solid #f7f7f7;
-			margin-bottom: 10px;
-		}
-	}
-</style>

+ 0 - 92
pages/user/rechargeDeatils.vue

@@ -1,92 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="充值详情">
-		</u-navbar>
-		<view class="chargeDetails">
-			<view class="chargeDetails-item">
-				<span>金额</span>
-				<p class="price">{{detail.orderInfo.totalFee}}元</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>类型</span>
-				<p>{{detail.orderInfo.payNameStr}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>时间</span>
-				<p>{{detail.orderInfo.createTime}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>订单号</span>
-				<p>{{detail.orderInfo.outOrderNo}}</p>
-			</view>
-			<view class="chargeDetails-item">
-				<span>交易号</span>
-				<p>{{detail.orderInfo.transactionId}}</p>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				id:'',
-				detail:{
-					accountRecord:{},
-					orderInfo:{},
-				}
-			}
-		},
-		onLoad(op){
-			this.id=op.id;
-			this.getInfo()
-		},
-		methods: {
-			getInfo(){
-				uni.showLoading({
-					title:"加载中",mask:true,
-				})
-				API.accountDetail(this.id).then((res) => {
-					this.detail=res.data	 
-					
-					uni.hideLoading()
-					 
-				}).catch(error => {
-						uni.showToast({
-							
-							title:error
-						})
-				})
-			}
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #f7f7f7;
-	}
-</style>
-<style lang="scss" scoped>
-	.chargeDetails{
-		background-color: #FFFFFF;
-		.chargeDetails-item{
-			margin:0 10px;
-			border-bottom: 1px solid #F7F7F7;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			padding: 15px;
-			span{
-				color:#999;
-			}
-		}
-		.price{
-			font-size: 20px;
-			color:#FF3D00;
-			font-weight: bold;
-		}
-	}
-</style>

+ 0 - 152
pages/user/rechargeList-test.vue

@@ -1,152 +0,0 @@
-
-<template>
-	<view>
-		<u-navbar title="充值记录"></u-navbar>
-		<view class="rechargeTime" @click="show = true">
-			<u-picker mode="time" v-model="show" :params="params" @confirm="confirmTime" @cancel="cancelTime"></u-picker>
-			<span>{{month}}月</span>
-			<u-icon name="arrow-down-s-fill" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-		</view>
-		<view style="text-align: center;margin-top: 100px" v-if="!accountList.length">
-		
-			<img src="@/assets/img/blankpage.png">
-			<p>暂无充值记录</p>
-		</view>
-	<!-- 	<view class="carNone" v-if="accountList.length == 0">
-			<img src="static/img/暂无数据-缺省页.png" alt="">
-			<p>暂无充值记录</p>
-		</view> -->
-		<view class="rechargeList" v-if="accountList.length > 0">
-			<view class="rechargeList-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?id=' + item.id)">
-				<view class="rechargeList-row"><span>充值金额</span><h4>{{item.amount}}</h4></view>
-				<view class="rechargeList-row"><p>{{item.payNameStr}}</p><p>{{item.createTime}}</p></view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				userId: '',
-				params: {
-					year: true,
-					month: true,
-					day: false,
-					hour: false,
-					minute: false,
-					second: false,
-					timestamp: true,
-				},
-				show: false,
-				month: '',
-				dateMonth: '',
-				accountList: [],
-			}
-		},
-		onReady() {			
-			if(this.carhelp.getPersonInfo()) {
-				this.userId = this.carhelp.getPersonInfo().id;
-			}
-			
-			var date = new Date();
-			this.month = date.getMonth() + 1;
-			
-			var year = date.getFullYear();
-			var monthN = this.month;
-			if(monthN >= 1 && monthN <= 9) {
-				monthN = "0" + monthN;
-			}
-			this.dateMonth = year + '-' + monthN + '-01';
-					
-			this.getAccountRecordData();
-		},
-		methods: {
-			getAccountRecordData() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})		
-				API.accountRecordData({
-					queryDate: this.dateMonth,
-				}).then((res) => {
-					uni.hideLoading();
-					
-					this.accountList = res.data.data;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			confirmTime(params) {
-				this.dateMonth = params.year + '-' + params.month + '-01';
-				if(params.month.slice(0,1) == '0') {
-					this.month = params.month.slice(1);
-				} else {
-					this.month = params.month;
-				}
-				this.getAccountRecordData();
-				this.show = false;
-			},
-			cancelTime() {
-				this.show = false;
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.carNone{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		img{
-			width: 100%;
-			height: 100%;
-		}
-		p{
-			margin-top: -60px;
-		}
-	}
-	.rechargeTime{
-		background-color: #fff;
-		height: 44px;
-		display: flex;
-		align-items: center;
-		padding: 12px 16px;
-		border-bottom: 1px solid #f7f7f7;
-		span{
-			margin-right: 4px;
-		}
-	}
-	.rechargeList{
-		background-color: #fff;
-		padding-left: 16px;
-		.rechargeList-item{
-			padding: 12px 16px 12px 0;
-			border-bottom: 1px solid #f7f7f7;
-			&:last-child{
-				border-bottom: none;
-			}
-		}
-		.rechargeList-row{
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			h4{
-				font-size: 16px;
-			}
-			p{
-				font-size: 12px;
-				margin-top: 4px;
-				color:#888;
-			}
-		}
-	}
-</style>

+ 0 - 152
pages/user/rechargeList.vue

@@ -1,152 +0,0 @@
-
-<template>
-	<view>
-		<u-navbar title="充值记录"></u-navbar>
-		<view class="rechargeTime" @click="show = true">
-			<u-picker mode="time" v-model="show" :params="params" @confirm="confirmTime" @cancel="cancelTime"></u-picker>
-			<span>{{month}}月</span>
-			<u-icon name="arrow-down-s-fill" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
-		</view>
-		<view style="text-align: center;margin-top: 100px" v-if="!accountList.length">
-		
-			<img src="@/assets/img/blankpage.png">
-			<p>暂无充值记录</p>
-		</view>
-	<!-- 	<view class="carNone" v-if="accountList.length == 0">
-			<img src="static/img/暂无数据-缺省页.png" alt="">
-			<p>暂无充值记录</p>
-		</view> -->
-		<view class="rechargeList" v-if="accountList.length > 0">
-			<view class="rechargeList-item" v-for="(item,index) in accountList" :key="item.id" @click="gotoUrl('pages/user/finance/rechargeDet?id=' + item.id)">
-				<view class="rechargeList-row"><span>充值金额</span><h4>{{item.amount}}</h4></view>
-				<view class="rechargeList-row"><p>{{item.payNameStr}}</p><p>{{item.createTime}}</p></view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/index.js'
-	
-	export default {
-		data() {
-			return {
-				userId: '',
-				params: {
-					year: true,
-					month: true,
-					day: false,
-					hour: false,
-					minute: false,
-					second: false,
-					timestamp: true,
-				},
-				show: false,
-				month: '',
-				dateMonth: '',
-				accountList: [],
-			}
-		},
-		onReady() {			
-			if(this.carhelp.getPersonInfo()) {
-				this.userId = this.carhelp.getPersonInfo().id;
-			}
-			
-			var date = new Date();
-			this.month = date.getMonth() + 1;
-			
-			var year = date.getFullYear();
-			var monthN = this.month;
-			if(monthN >= 1 && monthN <= 9) {
-				monthN = "0" + monthN;
-			}
-			this.dateMonth = year + '-' + monthN + '-01';
-					
-			this.getAccountRecordData();
-		},
-		methods: {
-			getAccountRecordData() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})		
-				API.accountRecordData({
-					queryDate: this.dateMonth,
-				}).then((res) => {
-					uni.hideLoading();
-					
-					this.accountList = res.data.data;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			confirmTime(params) {
-				this.dateMonth = params.year + '-' + params.month + '-01';
-				if(params.month.slice(0,1) == '0') {
-					this.month = params.month.slice(1);
-				} else {
-					this.month = params.month;
-				}
-				this.getAccountRecordData();
-				this.show = false;
-			},
-			cancelTime() {
-				this.show = false;
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.carNone{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		img{
-			width: 100%;
-			height: 100%;
-		}
-		p{
-			margin-top: -60px;
-		}
-	}
-	.rechargeTime{
-		background-color: #fff;
-		height: 44px;
-		display: flex;
-		align-items: center;
-		padding: 12px 16px;
-		border-bottom: 1px solid #f7f7f7;
-		span{
-			margin-right: 4px;
-		}
-	}
-	.rechargeList{
-		background-color: #fff;
-		padding-left: 16px;
-		.rechargeList-item{
-			padding: 12px 16px 12px 0;
-			border-bottom: 1px solid #f7f7f7;
-			&:last-child{
-				border-bottom: none;
-			}
-		}
-		.rechargeList-row{
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			h4{
-				font-size: 16px;
-			}
-			p{
-				font-size: 12px;
-				margin-top: 4px;
-				color:#888;
-			}
-		}
-	}
-</style>

+ 1 - 1
pagesFinance/login/index.vue

@@ -3,7 +3,7 @@
 		<view class="login-logo">
 			<u-image width="120rpx" height="120rpx" src="../../assets/img/logo.png" border-radius="20"></u-image>
 			<h3>51充电联盟</h3>
-			<p>合伙收益通</p>
+			<p>运管中心</p>
 		</view>
 		<view class="login-form">
 			<u-form :model="form" ref="uForm">

+ 56 - 34
pagesFinance/statistics/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 
-		<view class="navbar-tit">{{title}}</view>
+		<view class="navbar-tit">{{title}}运管中心</view>
 
 		<view class="statisticsData">
 		<!-- 	<view class="statisticsData-item">
@@ -11,33 +11,45 @@
 				<view class="detailsline"  >
 						<view class="details-row ">
 							
-							<view class="span1">今日充电流水</view>
+							<view class="span1">今日收入</view>
 							<view class="span2">{{indexData.todayAmount?indexData.todayAmount.toFixed(2):0}}<span >元</span></view>
 						</view>
-						<view class="details-row">
-							<view class="span1">今日充电笔数</view>
+						<view class="details-row" style="width: 40%;">
+							<view class="span1">今日利润</view>
+							<view class="span2">{{indexData.todayProfit?indexData.todayProfit.toFixed(2):0}}<span >元</span></view>
+						</view>
+						<view class="details-row" style="width: 40%;">
+							<view class="span1">今日笔数</view>
 							<view class="span2">{{indexData.todayEQNum?indexData.todayEQNum:0}}<span >笔</span></view>
 						</view>
 					</view>
 					<view class="detailsline"  >
 							<view class="details-row ">
 								
-								<view class="span1">昨日充电流水</view>
+								<view class="span1">昨日收入</view>
 								<view class="span2">{{indexData.yesterdayAmount?indexData.yesterdayAmount.toFixed(2):0}}<span>元</span></view>
 							</view>
-							<view class="details-row">
-								<view class="span1">昨日充电笔数</view>
+							<view class="details-row" style="width: 40%;">
+								<view class="span1">昨日利润</view>
+								<view class="span2">{{indexData.yesterdayProfit?indexData.yesterdayProfit.toFixed(2):0}}<span >元</span></view>
+							</view>
+							<view class="details-row" style="width: 40%;">
+								<view class="span1">昨日笔数</view>
 								<view class="span2">{{indexData.yesterdayEQNum?indexData.yesterdayEQNum:0}}<span >笔</span></view>
 							</view>
 						</view>
 						<view class="detailsline—bottom"  >
 								<view class="details-row ">
 									
-									<view class="span1">本月充电流水</view>
+									<view class="span1">本月收入</view>
 									<view class="span2">{{indexData.thisMonthAmount?indexData.thisMonthAmount.toFixed(2):0}}<span >元</span></view>
 								</view>
-								<view class="details-row">
-									<view class="span1">本月充电笔数</view>
+								<view class="details-row" style="width: 40%;">
+									<view class="span1">本月利润</view>
+								<view class="span2">{{indexData.thisMonthProfit?indexData.thisMonthProfit.toFixed(2):0}}<span >元</span></view>
+								</view>
+								<view class="details-row" style="width: 40%;">
+									<view class="span1">本月笔数</view>
 								<view class="span2">{{indexData.thisMonthEQNum?indexData.thisMonthEQNum:0}}<span >笔</span></view>
 								</view>
 							</view>
@@ -79,7 +91,19 @@
 					 <u-icon name="arrow-up" color="#b0b8c8" size="32" v-show="popupShow4"></u-icon>
 					 </p>
 
-
+				<view class="detailsline detailslineHead" v-if="stationFlowList.length>1" >
+				
+				
+						<view class="details-row ">
+							
+							<view class="span1">总收入</view>
+							<view class="span2">{{(allMoneySum).toFixed(2)}}<span>元</span></view>
+						</view>
+						<view class="details-row">
+							<view class="span1">总利润<span>(服务费+月卡)</span></view>
+							<view class="span2">{{(serviceMoneySum).toFixed(2)}}<span>元</span></view>
+						</view>
+					</view>
  					<u-collapse  :style="changeitemBl?' border-Bottom: 1px solid #000205':''"
 					 
 					 :headStyle="{
@@ -91,7 +115,7 @@
 							}"
 					v-if="stationFlowList.length">
 							<u-collapse-item   @change="changeitem" 
-							v-for="(item, index) in stationFlowList"  :index="index" :open="index==0"  :key="index">
+							v-for="(item, index) in stationFlowList"  :index="index"   :key="index">
 							<view slot="title" class="u-collapse-title u-line-1" style="width: 100%;">
 								{{item.stationName}} <span style="float:right;"><span style="font-size: 24rpx;margin-right: 8rpx;font-weight: normal;">总收入</span>{{item.actualMoney.toFixed(2)}}元</span>
 							</view>
@@ -162,21 +186,8 @@
 							</u-collapse-item>
 						</u-collapse>
 				
-				<view class="detailsline" v-if="stationFlowList.length>1" >
-				
-				
-						<view class="details-row details-row-1">
-							
-							<view class="span1">合计总收入</view>
-							<view class="span2">{{(allMoneySum).toFixed(2)}}<span>元</span></view>
-						</view>
-						<view class="details-row">
-							<view class="span1">合计总利润</view>
-							<view class="span2">{{(serviceMoneySum).toFixed(2)}}<span>元</span></view>
-						</view>
-					</view>
-					<view  
-					 >合计总利润=服务费收益+月卡收益</view>
+			
+				
 
 			</view>
 
@@ -821,7 +832,7 @@
 
 <style lang="scss" scoped>
 	.detailstable{
-		padding: 20px 15px !important;
+		padding: 40rpx 30rpx !important;
 	}
 	.detailstableHead{
 		.span2{
@@ -833,6 +844,16 @@
 				font-size: 24rpx !important;
 			}
 		}
+	}
+	.detailslineHead{
+		border-top:  1px solid #ededed;;
+		.details-row{
+			padding-left: 8rpx!important;
+		}
+		font-size: 12px;
+		.span1 span{
+			font-size: 10px;
+		}
 	}
 	.detailstable,.detailstableHead {
 		font-size: 16px;
@@ -853,15 +874,15 @@
 			display: flex;
 
 			.details-row {
-				width: 48%;
+				width: 50%;
 				display: flex;
 				justify-content: space-between;
 				flex-direction: column;
-				padding-left: 10px;
-				margin-bottom: 10px;
+				padding-left: 16rpx;
+				margin-bottom: 20rpx;
 				.span1 {
 					color: rgba(136, 136, 136, 100);
-					font-size: 14px;
+					font-size:14px;
 					width: 100%;
 				}
 				.span2{
@@ -876,6 +897,7 @@
 		}
 
 		.details-row-1 {
+			width: 47%;
 			padding-left: 0px !important;
 			border-right: 1px solid #ededed;
 		}
@@ -1016,9 +1038,9 @@
 
 	.statisticsData {
 		background-color: #fff;
-		margin: 12px 12px;
+		margin: 24rpx 24rpx;
 
-		padding: 12px 16px;
+		padding: 24rpx 32rpx;
 		border-radius: 8px;
 
 		margin-top: 60px;

+ 1 - 1
utils/request.js

@@ -75,7 +75,7 @@ const request = (options) => {
 			} else  if(res.data.code == 415||(res.data.code == 200&&!res.data.result)||res.data.code == 400){
 				
 				var backurl=window.location.href.split("#")[1]
-				var url="/pages/login/index"
+				//var url="/pages/login/index"
 				if(options&&options.jp_identity){
 					url="/pagesFinance/login/index"
 				}

+ 1 - 1
utils/requestWhite.js

@@ -43,7 +43,7 @@ const request = (options) => {
 				carhelp.signOut()
 			
 				var backurl=window.location.href.split("#")[1]
-				var url="/pages/login/index"
+				//var url="/pages/login/index"
 				if(options&&options.jp_identity){
 					url="/pagesFinance/login/index"
 				}