Переглянути джерело

Merge branch 'master' of http://47.92.161.104:10080/zkx/jp-charge

zxz 3 роки тому
батько
коміт
02f5f2184f

+ 2 - 2
.env.dev.js

@@ -5,8 +5,8 @@ const UNI_APP = {
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
 	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
-	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
-	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	openId:"1000",
+	//openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
 	//小鹏管家appid
 	VUE_APP_WXAPPID:"wx7e70eb62a8459869"
 }  

+ 1 - 1
.env.js

@@ -1,5 +1,5 @@
 (function() {  
-    const NODE_ENV = 'test'; // dev:开发环境 | test:测试环境  
+    const NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境  
     let ENV_VAR = null;  
 	 
 	var NODE_NAME=  process.env['NODE_NAME']

+ 2 - 1
.env.prod.js

@@ -1,4 +1,5 @@
-const UNI_APP = {  	
+const UNI_APP = {
+  	
     BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,

+ 6 - 4
.env.test.js

@@ -1,7 +1,8 @@
 const UNI_APP = {  
+
     // 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/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+    BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
    
 
 	NODE_ENV :"test",
@@ -11,9 +12,10 @@ const UNI_APP = {
 	//小鹏管家appid
 	VUE_APP_WXAPPID:"wx7e70eb62a8459869",
 	//zkx的测试openId
-	//openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	//openId:"oHjCawsJ5blME36lHaSpSVfEhleU",
+	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
 	//zq的测试openId
-	openId:"oHjCawsxTJkxixR74OVp7aCKahj8",
+	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",
 }  
 
 module.exports = UNI_APP;

+ 163 - 0
apis/finance.js

@@ -0,0 +1,163 @@
+import request from '../utils/request.js';
+import requestWhite from '../utils/requestWhite.js';
+
+import Qs from 'qs';
+
+
+export function findByOpenId(data) {
+	var url='/mobile/merchantUser/findByOpenId';
+	return requestWhite({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function validateCode(data) {
+	 
+	return requestWhite({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: '/mobile/merchantUser/validateCode'
+	})
+} 
+
+export function getVerifyCode(tel) {
+	 
+	return requestWhite({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:{
+			telephone:tel
+		} ,
+		url: '/mobile/merchantUser/getVerifyCode'
+	})
+} 
+
+
+
+export function applyWithdraw(data) {
+	var url='/mobile/roleSharing/applyWithdraw';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function deviceDetail(data) {
+	var url='/mobile/roleSharing/deviceDetail';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function devicesList(data) {
+	var url='/mobile/roleSharing/devicesList';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function homePage(data) {
+	var url='/mobile/roleSharing/homePage';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function incomeDetails(data) {
+	var url='/mobile/roleSharing/incomeDetails';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function incomeList(data) {
+	var url='/mobile/roleSharing/incomeList';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function withdrawRecord(data) {
+	var url='/mobile/roleSharing/withdrawRecord';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function devicesByStation(data) {
+	var url='/mobile/dataDictionary/devicesByStation';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function stationList(data) {
+	var url='/mobile/dataDictionary/stationList';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+export function logout(data) {
+	var url='/mobile/merchantUser/logout';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+
+export function spIncomeStatistics (bl,data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: '/mobile/roleSharing/'+(bl?"costIncomeStatistics":"spIncomeStatistics")
+	})
+} 
+
+export function helpList (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: '/mobile/roleSharing/helpList'
+	})
+} 
+
+

+ 73 - 68
bobo-router/index.js

@@ -1,68 +1,73 @@
- 
-// import  carhelp from '@/utils/mixin.js'
-
-import Vue from 'vue'
-import uniCrazyRouter from "uni-crazy-router";
-Vue.use(uniCrazyRouter)
-//** 有bug, 第一次直接敲链接访问, 是访问bobo-router 前置守卫
-//**  后续操作,访问的是 uniCrazyRouter的前置守卫
-
-
-uniCrazyRouter.beforeEach(async (to, from, next) => {
-
-
-	routerBeforeEach(to, from, next);
-	
-})
-
-uniCrazyRouter.afterEach((to, from) => {
-	// 逻辑代码
-	console.log("afterEach")
-	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
-		    uni.setNavigationBarTitle({
-		       		title:'智能充电系统('+process.car.NODE_ENV+')',
-		    						
-		    }) 
-		}
-	
-})
-
-uniCrazyRouter['on' + 'Error']((to, from) => {
-	// 逻辑代码
-	console.log("Error+start")
-	console.log(to)
-	console.log(from)
-	console.log("Error+end")
-	
-})
-
-import Router from './bobo-router'
-
-Vue.use(Router)
-
-// 路由配置 页面中全部使用this.$Router来操作路由,以实现路由的全局管理
-const router = new Router()
-
-// 路由全局拦截器 在这里处理登录、授权等相关操作
-router.beforeEach(function(to, from, next) {
-	
-	console.log('前置守卫')
-	routerBeforeEach(to, from, next);
-
-})
- 
-
-function routerBeforeEach(to, from, next) {
-	next();
-}
-// 路由后置拦截器
-router.afterEach(function(to, from) {
-	console.log('后置守卫')
-})
-
-// 路由跳转出错处理
-router.onError(function(e) {
-	console.log('错误:', e.message || '路由跳转失败')
-})
-
-export default router
+// import  carhelp from '@/utils/mixin.js'
+
+ import Vue from 'vue'
+ import uniCrazyRouter from "uni-crazy-router";
+ Vue.use(uniCrazyRouter)
+ //** 有bug, 第一次直接敲链接访问, 是访问bobo-router 前置守卫
+ //**  后续操作,访问的是 uniCrazyRouter的前置守卫
+
+
+ uniCrazyRouter.beforeEach(async (to, from, next) => {
+
+
+ 	routerBeforeEach(to, from, next);
+
+ })
+
+ 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 ,
+	
+	})
+ })
+
+ uniCrazyRouter['on' + 'Error']((to, from) => {
+ 	// 逻辑代码
+ 	console.log("Error+start")
+ 	console.log(to)
+ 	console.log(from)
+ 	console.log("Error+end")
+
+ })
+
+ import Router from './bobo-router'
+
+ Vue.use(Router)
+
+ // 路由配置 页面中全部使用this.$Router来操作路由,以实现路由的全局管理
+ const router = new Router()
+
+ // 路由全局拦截器 在这里处理登录、授权等相关操作
+ router.beforeEach(function(to, from, next) {
+
+ 	console.log('前置守卫')
+ 	routerBeforeEach(to, from, next);
+
+ })
+
+
+ function routerBeforeEach(to, from, next) {
+ 	next();
+ }
+ // 路由后置拦截器
+ router.afterEach(function(to, from) {
+ 	console.log('后置守卫')
+ })
+
+ // 路由跳转出错处理
+ router.onError(function(e) {
+ 	console.log('错误:', e.message || '路由跳转失败')
+ })
+
+ export default router

+ 86 - 0
components/TabbarFinance.vue

@@ -0,0 +1,86 @@
+<template >
+	<view>
+		<u-tabbar v-model="myCurrent" :list="tabbarList" 
+		:before-switch="beforeSwitch"
+		 active-color="#1677ff"></u-tabbar>
+		
+	</view>
+</template>
+
+<script>
+ 	
+ 	export default {
+		name:"tabbarJob",
+		props:{
+			current: 0
+			
+		},
+		data() {
+			return {
+				activeColor:"#5098FF",
+				oldindex:this.current,
+				 myCurrent:this.current,
+				 tabbarList: [{
+				 		iconPath: "bar-chart-box-fill",
+				 		selectedIconPath: "bar-chart-box-fill",
+				 		text: '统计',
+				 		count: 0,
+				 		isDot: true,
+				 		customIcon: true,
+						pagePath2:"/pagesFinance/statistics/index",
+						
+				 	},
+				 	{
+				 		iconPath: "article-fill",
+				 		selectedIconPath: "article-fill",
+				 		text: '明细',
+				 		midButton: true,
+				 		customIcon: true,
+						pagePath2:"/pagesFinance/detailed/index",
+						
+				 	},
+				 	{
+				 		iconPath: "account-pin-box-fill",
+				 		selectedIconPath: "account-pin-box-fill",
+				 		text: '我的',
+				 		count: 0,
+				 		isDot: false,
+				 		customIcon: true,
+						pagePath2:"/pagesFinance/user/index",
+						
+				 	}
+				 ], 
+			};
+			
+		},methods:{
+			beforeSwitch(index){
+			
+				
+				if(index==this.current){
+					return false
+				}
+				var url =this.tabbarList[index].pagePath2;
+				
+				uni.navigateTo({
+					url: url
+				})
+				if(index==1){
+					this.myCurrent=this.oldindex;
+					return false;
+				}else{
+					return true;
+				}
+				
+			},
+			
+		},mounted(){
+			
+		},destroyed(){
+		}
+		
+	}
+</script>
+
+<style>
+	 
+</style>

+ 0 - 472
console.js

@@ -1,472 +0,0 @@
- var list =[ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages	
-		
-		{
-			"name":"IndexIndex",
-			"path": "pages/index/index",
-			"style": {
-	
-				//"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-		}
-
-      
-        ,{//微信登录
-            "path" : "pages/login/wxLogin/wxLogin",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "微信登录",
-                
-            }
-            
-        }
-        ,{//手机号登录
-            "path" : "pages/login/phoneLogin/phoneLogin",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "手机号登录",
-                
-            }
-            
-        }
-        ,{//填写验证码
-            "path" : "pages/login/vCode/vCode",
-            "style" :                                                                                    
-            {           
-                "navigationBarTitleText": "填写验证码",
-                
-            }
-            
-        }
-        ,{//密码登录
-            "path" : "pages/login/passwordLogin/passwordLogin",
-            "style" :                                                                                    
-            {              
-                "navigationBarTitleText": "密码登录",
-                
-            }
-            
-        }
-      
-        ,{
-            "path" : "pages/job/index/index",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "求职主页",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/index/recruitInfo/recruitInfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "招聘详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/index/companyInfo/companyInfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "企业详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/query/query",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "搜索",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/query/queryResult/queryResult",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "搜索结果",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsIndex",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "分类消息",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsList/newsList",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "消息列表",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsRecommend/newsRecommend",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "推荐职位",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsInvitationPhone/newsInvitationPhone",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "沟通邀请通知",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsInvitationBefore/newsInvitationBefore",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "面试邀请通知",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/newsIndex/newsEntry/newsEntry",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "录用意向书详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/personal",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "个人中心",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/my/my",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-     
-        ,{
-            "path" : "pages/job/personal/my/resumeMy/resumeMy",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的简历",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/my/resumeAdd/resumeAdd",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "创建简历",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/job/personal/my/resumeAdd/resumeSelect/resumeSelect",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "选择职位输入",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/job/personal/my/resumeAdd/resumeEdit/resumeEdit",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "编辑自我介绍",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/job/personal/my/resumeAdd/resumeSucc/resumeSucc",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "简历提交成功",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        ,{
-            "path" : "pages/job/personal/my/resumeList/resumeList",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "投递记录",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/my/resumeLook/resumeLook",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "看过的职位",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/my/resumeCollect/resumeCollect",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "职位收藏",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/my/resumeAuth/resumeAuth",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "个人认证",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/job/personal/install/install",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "设置",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        ,{
-            "path" : "pages/job/personal/install/myInfo/myInfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "个人信息",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/account",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "账号管理",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/passwordA/passwordA",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "忘记密码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/passwordB/passwordB",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "验证码找回",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/passwordC/passwordC",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "重设密码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/phoneA/phoneA",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "填写验证码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/phoneB/phoneB",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "绑定手机号",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/install/account/phoneC/phoneC",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "绑定验证码 Copy",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/job/personal/about/about",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "关于我们",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/index/index",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "招聘主页",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/index/resumeInfo/resumeInfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "简历详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/query/query",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "搜索",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/query/queryResult/queryResult",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "搜索结果",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/newsIndex/newsIndex",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "消息分类",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/newsIndex/newsList/newsList",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "消息列表",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/newsIndex/newsRecommend/newsRecommend",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "推荐简历",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-       
-        ,{
-            "path" : "pages/hr/newsIndex/servicesList/servicesList",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "劳务对接列表",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/newsIndex/servicesInfo/servicesInfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "劳务对接详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/my/my",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/my/position/position",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "职位管理",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/my/follow/follow",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "对您感兴趣",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/my/enroll/enroll",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "求职管理",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/hr/my/collection/collection",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "收藏简历",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ];
-	var my=[];
-	for(var i in list){
-		var obj=list[i];
-		my.push(obj.style.navigationBarTitleText);
-	}
-	console.log(my);

+ 29 - 28
package.json

@@ -7,6 +7,7 @@
  },
  "dependencies": {
   "compression-webpack-plugin": "^8.0.1",
+  "echarts": "^5.3.2",
   "uni-crazy-router": "0.0.31",
   "uni-simple-router": "^2.0.1",
   "uview-ui": "^1.8.4",
@@ -17,40 +18,40 @@
   "weixin-js-sdk": "^1.6.0"
  },
  "devDependencies": {
-  "node-sass": "^5.0.0",
-  "sass-loader": "^11.0.1",
   "@vue/cli-plugin-babel": "^4.0.0",
   "@vue/cli-plugin-eslint": "^4.0.0",
   "@vue/cli-service": "^4.0.0",
   "babel-eslint": "^10.0.3",
   "eslint": "^5.16.0",
   "eslint-plugin-vue": "^5.0.0",
+  "node-sass": "^5.0.0",
+  "sass-loader": "^11.0.1",
   "vue-template-compiler": "^2.6.10"
  },
-   "uni-app": {
-         "scripts": {
-             "test-platform": { 
-                 "title":"test", 
-                 "BROWSER":"Chrome", 
-                 "env": {
-                     "UNI_PLATFORM": "h5",  
-                     "NODE_NAME": "test"
-                  },
-                 "define": { 
-                     "CUSTOM-CONST": true 
-                 }
-             },
-			 "production-platform": {
-			     "title":"production", 
-			     "BROWSER":"Chrome", 
-			     "env": {
-			         "UNI_PLATFORM": "h5",  
-			         "NODE_NAME": "production"
-			      },
-			     "define": { 
-			         "CUSTOM-CONST": true 
-			     }
-			 }
-         }    
-     }
+ "uni-app": {
+  "scripts": {
+   "test-platform": {
+    "title": "test",
+    "BROWSER": "Chrome",
+    "env": {
+     "UNI_PLATFORM": "h5",
+     "NODE_NAME": "test"
+    },
+    "define": {
+     "CUSTOM-CONST": true
+    }
+   },
+   "production-platform": {
+    "title": "production",
+    "BROWSER": "Chrome",
+    "env": {
+     "UNI_PLATFORM": "h5",
+     "NODE_NAME": "production"
+    },
+    "define": {
+     "CUSTOM-CONST": true
+    }
+   }
+  }
+ }
 }

+ 10 - 1
pages.json

@@ -145,7 +145,16 @@
 			
 				//"navigationStyle": "custom" // 隐藏系统导航栏
 			}
-		},
+		},
+		{
+			"name":"申请结果",
+			"path": "pagesFinance/user/chargingDetails",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		
 		{
 			"name":"帮助中心",
 			"path": "pagesFinance/user/help",

+ 6 - 2
pages/charge/index.vue

@@ -193,7 +193,11 @@
 				this.carhelp.set("qr-default-id",op.id);
 			}else{
 				//用于支付后返回系统  -- 点金计划
-				this.id =this.carhelp.get("qr-default-id");
+				var  id=this.carhelp.get("qr-default-id")
+				if(id){
+					this.id =this.carhelp.get("qr-default-id");
+					
+				}
 			}
 			
 			
@@ -205,7 +209,7 @@
 			switchCharge(){
 			
 				uni.redirectTo({
-					url:'/pages/charge/switchCharge?id='+this.detail.id
+					url:'/pages/charge/switchCharge?id='+this.id
 				})
 			},
 			init(){

+ 2 - 2
pages/charge/switchCharge.vue

@@ -3,10 +3,10 @@
 		<u-navbar title="切换充电桩"
 		    :autoBack="false"
 			:custom-back="selectBtn">
-			<view class="slot-wrap">
+		<!-- 	<view class="slot-wrap">
 				<view class="navbar-left"></view>				
 				<view class="navbar-right" @click="selectBtn"><span>确定</span></view>
-			</view>
+			</view> -->
 		</u-navbar>
 		<view class="chargeList">
 			<template v-for="(item,i) in list">

+ 5 - 1
pages/login/index.vue

@@ -124,7 +124,9 @@
 				}).then((response) => {
 					var token = response ? response.data.token : '';
 					this.carhelp.setToken(token);
-					this.carhelp.setPersonInfo(response.data.regUser);
+					this.carhelp.setPersonInfo(response.data.regUser);
+					this.carhelp.setPersonInfoPlus(response.data.data  )
+					
 					//this.gotoUrl("pages/user/index")
 					uni.redirectTo({
 						url: '/pages/index/index'
@@ -211,6 +213,8 @@
 					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'
 					})

+ 2 - 0
pages/user/index.vue

@@ -117,6 +117,8 @@
 					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
 					})

+ 70 - 16
pagesFinance/detailed/details.vue

@@ -1,49 +1,103 @@
 <template>
 	<view>
-		<u-navbar title="收益详情"></u-navbar>
+		<u-navbar :title="title"></u-navbar>
 		<view class="details">
 			<view class="details-head">
 				<u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
-				<h4>荆鹏软件园充电站/A0001</h4>
+				<h4>{{detail.stationName}}/{{detail.deviceNo}}</h4>
 			</view>
 			<view class="details-main">
 				<view class="details-price">
-					<span>¥</span><h3>15.00</h3><span>元</span>
+					<span>¥</span><h3>{{iswuye?detail.costAmount:detail.shareProfitAmount}}</h3><span>元</span>
 				</view>
 				<p>本单收益</p>
 			</view>
-			<view class="details-row"><p>电费(元)</p><span>¥400.00</span></view>
-			<view class="details-row"><p>服务费(元)</p><span>¥100.00</span></view>
-			<view class="details-row"><p>桩号</p><span>A0001</span></view>
-			<view class="details-row"><p>分润标准</p><span>15%</span></view>
+			<view class="details-row" v-if="!iswuye" ><p>电费(元)</p><span>¥{{detail.costAmount}}</span></view>
+			<view class="details-row" v-if="!iswuye"><p>服务费(元)</p><span>¥{{detail.surplusAmount}}</span></view>
+			<view class="details-row" v-if="!iswuye"><p>桩号</p><span>{{detail.deviceNo}}</span></view>
+			<view class="details-row" v-if="!iswuye"><p>分润标准</p><span>{{detail.disProportion}}%</span></view>
 		</view>
 		<view class="details">
 			<view class="details-title">
 				<h4>充电详情</h4>
 			</view>
-			<view class="details-row"><p>电费(元)</p><span>¥400.00</span></view>
-			<view class="details-row"><p>服务费(元)</p><span>¥100.00</span></view>
-			<view class="details-row"><p>桩号</p><span>A0001</span></view>
-			<view class="details-row"><p>分润标准</p><span>15%</span></view>
+			<view class="details-row"><p>消费电量(kW-h)</p><span>{{detail.electricQuantity/10000}}</span></view>
+			<view class="details-row"><p>开始时间</p><span>{{detail.startTime}}</span></view>
+			<view class="details-row"><p>结束时间</p><span>{{detail.endTime}}</span></view>
+			<view class="details-row"><p>充电时长</p><span>{{getPercent(detail.chargingMinute)}}</span></view>
 		</view>
 		<view class="detailsBtn">
-			<u-button class="detailsBtn-btn" type="primary" plain>返回</u-button>
+			<u-button class="detailsBtn-btn" @click="back" type="primary" plain>返回</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
-				form: {
-					name: '',
-					intro: '',
+				id:'',
+				
+				detail:{
+					
 				},
+				title:"",
+				iswuye:false
 			}
 		},
+		onLoad(op){
+			
+			this.title="收益详情"
+			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
+			if(obj&&obj.role){
+				var  role=obj.role;
+				if(role.id=="4"){
+					this.title="电费详情"
+					this.iswuye=true;
+				}
+			}
+			
+			this.id=op.id;
+			this.getInfo()
+		},
 		methods: {
-
+			getPercent(estimateMinute) {
+				var value="";
+				 
+				var ms =estimateMinute
+				if (ms > 0) {
+					var Hour = parseInt(Math.floor(ms / 60 ));
+					var Fen = parseInt(Math.floor(ms % 60 ));	
+					value = Hour + "小时"  + Fen+"分钟"
+				}
+			
+				return value;
+			},
+			back(){
+				uni.navigateBack({
+					
+				})
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.incomeDetails({
+					detailId:this.id
+				}).then((res) => {
+					this.detail=res.data.detail	 
+					
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
 		}
 	}
 </script>

+ 239 - 87
pagesFinance/detailed/index.vue

@@ -2,7 +2,7 @@
 	<view>
 		<u-navbar :is-back="false">
 			<view class="navbar">
-				<view class="navbar-tit">收益明细</view>
+				<view class="navbar-tit" v-text="title" >收益明细</view>
 				<view class="navbar-screen" @click="popupShow = true"><span>筛选</span><u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon></view>
 			</view>
 		</u-navbar>
@@ -12,125 +12,144 @@
 					<view class="screen-item">
 						<view class="screen-head">查询日期</view>
 						<view class="screen-main">
-							<u-input v-model="value" :type="type" :border="border" @click="show = true" />
+							
+							<u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
+							
+							<u-input :value="startTime?startTime+'至'+endTime:'选择时间筛选'" :type="type" :border="border" @click="showdate = true" />
+						<!-- 	
 							<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>
-						</view>
+						 --></view>
 					</view>
 					<view class="screen-item">
 						<view class="screen-head">充电桩类型</view>
 						<view class="screen-main">
-							<view class="screen-entry active">全部</view>
-							<view class="screen-entry">自行车充电</view>
-							<view class="screen-entry">交流慢充</view>
-							<view class="screen-entry">直流快充</view>
+							<view 
+							:class="{
+								active:selecttype==''
+							}" @click="selecttype=''"
+							class="screen-entry ">全部</view>
+							<view 
+							:class="{
+								active:selecttype=='0'
+							}" @click="selecttype='0'"
+							
+							class="screen-entry type1">自行车充电</view>
+							<view 
+							:class="{
+								active:selecttype=='2'
+							}" @click="selecttype='2'"
+							class="screen-entry type3">交流慢充</view>
+							<view 
+							:class="{
+								active:selecttype=='1'
+							}" @click="selecttype='1'"
+							class="screen-entry type2">直流快充</view>
 						</view>
 					</view>
 					<view class="screen-item">
 						<view class="screen-head">站点</view>
 						<view class="screen-main">
-							<view class="screen-entry active">全部</view>
-							<view class="screen-entry">荆鹏</view>
-							<view class="screen-entry">长大</view>
+							<view class="screen-entry  "
+							:class="{
+								active:selectstationId==''
+							}"
+							 @click="selectstationId=''"
+							>全部</view>
+							<view 
+							v-for="(item,i) in stationList" :key="i"
+							:class="{
+								active:selectstationId==item.id
+							}"
+							 @click="selectstationId=item.id,selectdeviceNo=''"
+							class="screen-entry" >{{item.name}}</view>
+						
 						</view>
 					</view>
 					<view class="screen-item">
 						<view class="screen-head">桩号</view>
 						<view class="screen-main">
-							<view class="screen-entry active">全部</view>
-							<view class="screen-entry">A0001</view>
-							<view class="screen-entry">B0001</view>
-							<view class="screen-entry">A0003</view>
+							 
+							<view class="screen-entry  "
+							:class="{
+								active:selectdeviceNo==''
+							}"
+							 @click="selectdeviceNo=''"
+							>全部</view>
+							<view 
+							v-for="(item,i) in stationListSon" :key="i"
+							v-show="selectstationId?(selectstationId==item.stationId):true"
+							:class="{
+								active:selectdeviceNo==item.id
+							}"
+							
+							 @click="selectdeviceNo=item.id"
+							class="screen-entry" >{{item.name}}</view>
 						</view>
 					</view>
 				</view>
 				<view class="screen-foot">
-					<view class="screen-btn-l">重置</view>
-					<view class="screen-btn-r">确定</view>
+					<view class="screen-btn-l" @click="resetBtn" >重置</view>
+					<view class="screen-btn-r" @click="okbtn" >确定</view>
 				</view>
 			</view>
 		</u-popup>
 		<view class="detailed">
-			<view class="detailed-time">
-				<p>2020年5月1日</p>
-				<p>共收入 178.00</p>
-			</view>
-			<view class="detailed-list">
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-					</view>
-				</view>
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-					</view>
+			
+				
+				<view class="detailed-list" v-for="(item ,index) in list"
+				@click="gotoUrl('pagesFinance/detailed/details?id='+item.id)"
+				:key="index">
+				<view class="detailed-time"    v-if="item.show">
+					<p>{{item.showtime}}</p>
+					<p>共收入 {{showMap.get(item.showtime)}}</p>
 				</view>
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-					</view>
-				</view>
-			</view>
-			<view class="detailed-time">
-				<p>2020年5月1日</p>
-				<p>共收入 178.00</p>
-			</view>
-			<view class="detailed-list">
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-					</view>
-				</view>
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-					</view>
-				</view>
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<h4>荆鹏软件园充电站/A0001</h4>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>61.50</h2>
-						<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
+				
+					<view class="detailed-item">
+						<view class="detailed-item-name">
+							<h4>{{item.stationName}}/{{item.deviceNo}}</h4>
+							<p>{{item.createTime}}</p>
+						</view>
+						<view class="detailed-item-num">
+							<h2>{{iswuye?item.costAmount:item.shareProfitAmount}}</h2>
+							<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
+						</view>
 					</view>
 				</view>
-			</view>	
+			
+			 
 		</view>
-		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
-	</view>
+		<Tabbar :current="1"></Tabbar>
+ 	</view>
 </template>
 
 <script>
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	// import {
+	// 	beforeTimeStamp,
+	// 	currentTimeStamp,
+	// 	parseUnixTime
+	// } from '@/utils'
+	
 	export default {
 		data() {
 			return {
+				showdate: false,
+				startTime: "",
+							
+				endTime: "",
+				selecttype:"",
+				selectstationId:"",
+				selectdeviceNo:"",
+				title:"",
+				iswuye:false,
+				form:{
+					
+				},
+				 
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
 				popupShow: false,
 				tabbarList: [{
 						iconPath: "bar-chart-box-fill",
@@ -156,11 +175,14 @@
 						customIcon: true,
 					},
 				],
+				showMap:null,
 				current: 0,
 				value: '',
 				type: 'select',
 				show: false,
 				border: true,
+				stationList:[],
+				stationListSon:[],
 				actionSheetList: [
 					{
 						text: '男'
@@ -174,7 +196,137 @@
 				],
 			}
 		},
+		components: {
+			Tabbar
+		
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onLoad() {
+			this.title="收益明细"
+			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
+			if(obj&&obj.role){
+				var  role=obj.role;
+				if(role.id=="4"){
+					this.title="电费明细"
+					this.iswuye=true;
+				}
+			}
+		},
+		onReady() {
+			// this.startDate=parseUnixTime(beforeTimeStamp(5),"{y}-{m}-{d}")
+			// this.endDate=parseUnixTime(new Date(),"{y}-{m}-{d}")
+			
+			this.getList()
+			this.getStation()
+			
+		},
 		methods: {
+			changedate(e) {
+				this.startTime = e.startDate
+				this.endTime = e.endDate
+				
+			},
+			resetBtn(){
+				this.startTime=""
+				this.endTime=""
+				this.selecttype=""
+				this.selectstationId=""
+				this.selectdeviceNo=""
+				this.pageIndex = 1;
+				this.form = {
+					startDate:"",
+					endDate:"",
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.popupShow=false;
+				this.list = [];
+				this.getList()
+				
+			},
+			okbtn(){
+				this.popupShow=false;
+				this.pageIndex = 1;
+				
+				this.form = {
+					startDate:this.startTime,
+					endDate:this.endTime,
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.list = [];
+				this.getList()
+			},
+			getList() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				this.form.pageIndex=this.pageIndex
+				
+				API.incomeList(this.form).then((res) => {
+					
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+					var showMap=new Map()
+					this.list.forEach(item=>{
+						var ktime=item.createTime.split(" ")[0]
+						if(showMap.has(ktime)){
+							item.show=false;
+						
+							
+						}else{
+							var Amount=this.iswuye?item.todayCostAmount:item.todaySPAmount
+							
+							showMap.set(ktime,Amount)
+							
+							item.show=true;
+							item.showtime=ktime;
+						}
+					})
+					
+					this.showMap=showMap;
+					this.recordsTotal = res.data.recordsTotal
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+		
+			getStation(bl) {
+				
+				API.stationList().then((res) => {
+					
+					this.stationList = res.data.stationList
+					this.stationListSon=res.data.deviceList	
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			myLoadmore() {
+					
+				this.pageIndex += 1;
+				this.getList()
+				
+			},
 			// 点击actionSheet回调
 			actionSheetCallback(index) {
 				this.value = this.actionSheetList[index].text;

+ 197 - 7
pagesFinance/login/index.vue

@@ -10,38 +10,228 @@
 				<view class="login-form-row">
 					<u-icon name="user-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="40"></u-icon>
 					<u-line color="#d9e0ec" length="20" direction="col" margin="10px"/>
-					<u-form-item label="" prop="name"  :border-bottom="false">
-						<u-input v-model="form.name" />
+					<u-form-item label="" prop="phone"  :border-bottom="false">
+						<u-input  v-model="form.phone" placeholder="请输入手机号"  />
 					</u-form-item>
 				</view>
 				<view class="login-form-row">
 					<u-icon name="message-3-fill" custom-prefix="custom-icon" color="#b0b8c8" size="40"></u-icon>
 					<u-line color="#d9e0ec" length="20" direction="col" margin="10px"/>
-					<u-form-item label="" prop="intro"  :border-bottom="false">
-						<u-input v-model="form.intro" />
+					<u-form-item label="" prop="code"  :border-bottom="false">
+						<u-input v-model="form.code"  placeholder="请输入验证码" />
 					</u-form-item>
 				</view>
-				<view class="login-code">
+				<view class="login-code"  @click="getCode">
 					<span>获取验证码</span>
 				</view>
 			</u-form>
-			<u-button class="login-btn" @click="submit">提交</u-button>
+			<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start">
+			</u-verification-code>
+			<u-button class="login-btn" @click="finish">提交</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	import {
+		checkPhone
+	} from '@/utils'
 	export default {
 		data() {
 			return {
 				form: {
 					name: '',
 					intro: '',
+				
+					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
+				}).then((response) => {
+					this.loginset(response)
+		
+				}).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 (false && checkPhoneResult !== true) {
+					uni.showToast({
+						title: checkPhoneResult,
+		
+					})
+					return;
+				}
+				this.$refs.uCode.start();
+			},
+			loginset(response){
+				var token = response ? response.data.token : '';
+				this.carhelp.setToken(token,"merchantUser");
+				this.carhelp.setPersonInfo(response.data.user,"merchantUser");
+				this.carhelp.setPersonInfoPlus(response.data, "merchantUser")
+				//this.gotoUrl("pages/user/index")
+				uni.redirectTo({
+					url: '/pagesFinance/statistics/index'
+				})
+			},
+			query(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.findByOpenId({
+					
+					openId: this.carhelp.getOpenId(),
+					
+				}).then((response) => {
+					this.loginset(response)
+					
+				
+				}).catch(error => {
+					uni.hideLoading();
+					if (!this.carhelp.getOpenId()) {
+						uni.showToast({
+							title: "请使用“微信”访问本系统登录"
+						})
+						return
+					}
+					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>

+ 322 - 150
pagesFinance/statistics/index.vue

@@ -1,173 +1,345 @@
-<template>
-	<view>
-		<u-navbar :is-back="false" :border-bottom="false" :background="background"><view class="navbar-tit">收益统计</view></u-navbar>
-		<view class="statisticsData">
+<template>
+	<view>
+		<u-navbar :is-back="false" :border-bottom="false" :background="background">
+			<view class="navbar-tit">{{title}}</view>
+		</u-navbar>
+		<view class="statisticsData" v-if="!iswuye">
+			<view class="statisticsData-item">
+				<view class="statisticsData-head" @click="gotoUrl('pagesFinance/detailed/index')">
+					<p>今日充电收益(元)</p>
+					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="24"></u-icon>
+					
+				</view>
+				<view class="statisticsData-main">
+					<h2>{{indexData.todayAmount}}</h2>
+				</view>
+				<view class="statisticsData-foot">
+					<p>昨日收益</p>
+					<h4>{{indexData.yesterdayAmount}}</h4>
+				</view>
+			</view>
+			<view class="statisticsData-item">
+				<view class="statisticsData-head">
+					<p>今日充电单量(笔)</p>
+				</view>
+				<view class="statisticsData-main">
+					<h2>{{indexData.todayNum}}</h2>
+				</view>
+				<view class="statisticsData-foot">
+					<p>累计收益</p>
+					<h4>{{indexData.withdrawnAmount}}</h4>
+				</view>
+			</view>
+		</view>
+		
+		<view class="statisticsData" v-if="iswuye">
 			<view class="statisticsData-item">
-				<view class="statisticsData-head">
-					<p>今日充电收益(元)</p><u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
+				<view class="statisticsData-head"  @click="gotoUrl('pagesFinance/detailed/index')" >
+					<p>今日充电电费(元)</p>
+					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="24"></u-icon>
 				</view>
 				<view class="statisticsData-main">
-					<h2>1141.00</h2>
+					<h2>{{indexData.todayCost}}</h2>
 				</view>
 				<view class="statisticsData-foot">
-					<p>昨日收益</p><h4>1024.00</h4>
+					<p>昨日电费</p>
+					<h4>{{indexData.yesterdayCost}}</h4>
 				</view>
 			</view>
 			<view class="statisticsData-item">
 				<view class="statisticsData-head">
-					<p>今日充电单量(笔)</p>
+					<p>今日充电度数(kW/h)</p>
 				</view>
 				<view class="statisticsData-main">
-					<h2>230</h2>
+					<h2>{{indexData.todayElectricity/10000}}</h2>
 				</view>
 				<view class="statisticsData-foot">
-					<p>累计收益</p><h4>10691.00</h4>
+					<p>累计收益</p>
+					<h4>{{indexData.withdrawnAmount}}</h4>
 				</view>
 			</view>
 		</view>
-		<view class="statisticsChart">
-			<view class="statisticsChart-head">
-				<h4>充电桩收益占比</h4>
-				<view class="statisticsChart-time">
-					<p>2022-04-30 至 2022-05-01</p>
-					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
-				</view>
-			</view>
-			<view class="statisticsChart-main">
-				<u-subsection :list="subsection" :current="1" button-color="#2E7Dff" active-color="#fff"></u-subsection>
-			</view>
+		
+		<view class="statisticsChart">
+			<view class="statisticsChart-head">
+				<h4 v-if="!iswuye">充电桩收益占比</h4>
+				<h4 v-if="iswuye">充电桩电费占比</h4>
+				<view class="statisticsChart-time">
+					<u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
+					<p @click="showdate = true">{{startTime}} 至 {{endTime}}</p>
+					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
+
+				</view>
+			</view>
+			<view class="statisticsChart-main">
+				<u-subsection :list="subsection" @change="changesub" :current="current" button-color="#2E7Dff"
+					active-color="#fff"></u-subsection>
+				<view id="pieEcharts" style="min-height:250px;">
+
+				</view>
+			</view>
 		</view>
-		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
-	</view>
-</template>
-
+			<Tabbar :current="0"></Tabbar>
+<!-- 		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
+ -->	</view>
+</template>
+
 <script>
-	export default {
-		data() {
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	
+	import * as echarts from "echarts";
+	import {
+		beforeTimeStamp,
+		currentTimeStamp,
+		parseUnixTime
+	} from '@/utils'
+	export default {
+		data() {
 			return {
-				subsection: [
-					{
-						name: '金额'
-					}, 
-					{
-						name: '单量'
-					}
-				],
-				tabbarList: [{
-						iconPath: "bar-chart-box-fill",
-						selectedIconPath: "bar-chart-box-fill",
-						text: '统计',
-						count: 0,
-						isDot: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "article-fill",
-						selectedIconPath: "article-fill",
-						text: '明细',
-						midButton: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "account-pin-box-fill",
-						selectedIconPath: "account-pin-box-fill",
-						text: '我的',
-						count: 0,
-						isDot: false,
-						customIcon: true,
-					},
-				],
-				current: 0,
-				background:{
-					background: 'none'
+				title:"",
+				showdate: false,
+				startTime: "",
+				indexData:{},
+				endTime: "",
+				myChart: null,
+				subsection: [{
+						name: '金额'
+					},
+					{
+						name: '单量'
+					}
+				],
+				tabbarList: [{
+						iconPath: "bar-chart-box-fill",
+						selectedIconPath: "bar-chart-box-fill",
+						text: '统计',
+						count: 0,
+						isDot: true,
+						customIcon: true,
+					},
+					{
+						iconPath: "article-fill",
+						selectedIconPath: "article-fill",
+						text: '明细',
+						midButton: true,
+						customIcon: true,
+					},
+
+					{
+						iconPath: "account-pin-box-fill",
+						selectedIconPath: "account-pin-box-fill",
+						text: '我的',
+						count: 0,
+						isDot: false,
+						customIcon: true,
+					},
+				],
+				current: 0,
+				background: {
+					background: 'none'
 				},
-			}
+				iswuye:false,
+			}
+		},
+		onLoad() {
+			this.title="收益统计"
+			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
+			if(obj&&obj.role){
+				var  role=obj.role;
+				if(role.id=="4"){
+					this.title="电费统计"
+					this.iswuye=true;
+				}
+			}
 		},
+		components: {
+			Tabbar
+		
+		},
+		onReady() {
+			this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+			this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+			this.getData()
+		},
 		methods: {
-
-		}
-	}
-</script>
-<style>
-	page{
-		background:url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
-		background-size: 100%;
-	}
-</style>
-<style lang="scss" scoped>
-	.navbar-tit{
-		color:#fff;
-		font-size: 20px;
-		padding-left: 15px;
-	}
-	.statisticsData{
-		background-color: #fff;
-		margin: 16px;
-		padding: 16px;
-		border-radius: 8px;
-		display: flex;
-		margin-top:80px;
-	}
-	.statisticsData-item{
-		flex: 1;
-		.statisticsData-head{
-			display: flex;
-			align-items: center;
-			p{
-				color:#637AA2;
-				font-size: 12px;
-			}
-		}
-		.statisticsData-main{
-			margin-top: 4px;
-			font-size: 20px;
-		}
-		.statisticsData-foot{
-			display: flex;
-			align-items: center;
-			margin-top: 16px;
-			p{
-				color:#637AA2;
-			}
-			h4{
-				margin-left: 8px;
-			}
-		}
-	}
-	.statisticsChart{
-		margin: 16px;
-		.statisticsChart-head{
-			margin-bottom: 5px;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			h4{
-				font-weight: normal;
-				font-size: 16px;
-				position: relative;
-				padding-left:10px;
-				&::after{
-					content: '';
-					position: absolute;
-					height: 12px;
-					width: 4px;
-					background-color: #4E8DF6;
-					left: 0;
-					top:5px;
-				}
-			}
-			.statisticsChart-time{
-				display: flex;
-				align-items: center;
-				p{
-					color:#666;
-				}
-			}
-		}
-		.statisticsChart-main{
-			background-color: #fff;
-			padding: 16px;
-			border-radius: 8px;
-		}
-	}
+			getData(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				//this.form.pageIndex=this.pageIndex
+				
+				API.spIncomeStatistics(this.iswuye,{
+					startDate:this.startTime,
+					endDate:this.endTime 
+				}).then((res) => {
+					
+					this.indexData = res.data
+					this.getPie()
+					
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			changesub(e){
+				console.log(e)
+				this.current=e
+				this.getPie()
+			},
+			changedate(e) {
+				this.startTime = e.startDate
+				this.endTime = e.endDate
+				this.getData()
+				 
+			},
+			getPie() {
+				var list=this.indexData.pieChart;
+				var getData=[];
+				list.forEach(item=>{
+					 var value=(this.iswuye?(item.electricity/10000):item.amountNums)
+					getData.push({
+						value: this.current?value:item.amount,
+						name: item.deviceName
+					})
+				})
+				
+				if (!this.myChart) {
+					this.myChart = echarts.init(document.getElementById('pieEcharts'));
+
+				}
+				// 指定图表的配置项和数据
+				var option = {
+
+					tooltip: {
+						trigger: 'item'
+					},
+					legend: {
+
+						bottom: '0%',
+						left: 'center'
+					},
+					series: [{
+						//name: 'Access From',
+						type: 'pie',
+						radius: '50%',
+						data: getData,
+						emphasis: {
+							itemStyle: {
+								shadowBlur: 10,
+								shadowOffsetX: 0,
+								shadowColor: 'rgba(0, 0, 0, 0.5)'
+							}
+						}
+					}]
+				};
+
+				// 使用刚指定的配置项和数据显示图表。
+				this.myChart.setOption(option);
+			}
+		}
+	}
+</script>
+<style>
+	page {
+		background: url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
+		background-size: 100%;
+	}
+</style>
+<style lang="scss" scoped>
+	.navbar-tit {
+		color: #fff;
+		font-size: 20px;
+		padding-left: 15px;
+	}
+
+	.statisticsData {
+		background-color: #fff;
+		margin: 16px;
+		padding: 16px;
+		border-radius: 8px;
+		display: flex;
+		margin-top: 80px;
+	}
+
+	.statisticsData-item {
+		flex: 1;
+
+		.statisticsData-head {
+			display: flex;
+			align-items: center;
+
+			p {
+				color: #637AA2;
+				font-size: 12px;
+			}
+		}
+
+		.statisticsData-main {
+			margin-top: 4px;
+			font-size: 20px;
+		}
+
+		.statisticsData-foot {
+			display: flex;
+			align-items: center;
+			margin-top: 16px;
+
+			p {
+				color: #637AA2;
+			}
+
+			h4 {
+				margin-left: 8px;
+			}
+		}
+	}
+
+	.statisticsChart {
+		margin: 16px;
+
+		.statisticsChart-head {
+			margin-bottom: 5px;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			h4 {
+				font-weight: normal;
+				font-size: 16px;
+				position: relative;
+				padding-left: 10px;
+
+				&::after {
+					content: '';
+					position: absolute;
+					height: 12px;
+					width: 4px;
+					background-color: #4E8DF6;
+					left: 0;
+					top: 5px;
+				}
+			}
+
+			.statisticsChart-time {
+				display: flex;
+				align-items: center;
+
+				p {
+					color: #666;
+				}
+			}
+		}
+
+		.statisticsChart-main {
+			background-color: #fff;
+			padding: 16px;
+			border-radius: 8px;
+		}
+	}
 </style>

+ 2 - 0
pagesFinance/user/about.vue

@@ -18,6 +18,8 @@
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {

+ 12 - 3
pagesFinance/user/applyResult.vue

@@ -4,7 +4,7 @@
 		<view class="applyResult">
 			<u-icon name="chenggong" custom-prefix="custom-icon" color="#27B148" size="150"></u-icon>
 			<h3>申请成功</h3>
-			<p>申请提现 ¥1000.00元</p>
+			<p v-if="value">申请提现 ¥{{value}}元</p>
 		</view>
 		<view class="applySpeed">
 			<view class="applySpeed-item">
@@ -17,23 +17,32 @@
 			</view>
 		</view>
 		<view class="applyBtn">
-			<u-button class="applyBtn-btn" type="primary">完成</u-button>
+			<u-button class="applyBtn-btn" type="primary" @click="back">完成</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
+				value:0,
 				form: {
 					name: '',
 					intro: '',
 				},
 			}
+		},onLoad(op) {
+			if(op.value){
+				this.value=op.value
+			}
 		},
 		methods: {
-
+			back(){
+				uni.navigateBack()
+			}
 		}
 	}
 </script>

+ 299 - 0
pagesFinance/user/chargingDetails.vue

@@ -0,0 +1,299 @@
+<template>
+	<view >
+		<u-navbar title="充电价格详情"></u-navbar>
+		
+ <!-- 主体 -->
+<!-- 充电桩信息 -->
+       <view class="main">
+		   
+	    <!-- 收费标准 -->
+		<view class="rates">
+			<view class="rates-title">
+				<view class="title-left">
+					收费标准
+				</view>
+				<view class="title-right">
+					峰谷平电价计费
+				</view>
+				
+			</view>
+			<!-- 时段分类 -->
+		<view class="time-rates">
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						00:00-07:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						00:70-09:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						09:00-15:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						15:00-20:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						20:00-22:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						22:00-23:00
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			<view class="time-part">
+				<view class="part-top">
+					<view class="time">
+						23:00-23:59
+					</view>
+					<view class="price">
+						
+						<text class="price-number">1.2500</text>
+						<text class="price-unit">元/度</text>
+					</view>
+				</view>
+				<view class="part-bottom">
+					<view class="unitPrice-servicePrice">
+						充电单价:¥1.0000 | 服务费:¥0.2500
+					</view>
+				</view>
+			</view>
+			
+			
+		</view>
+
+		</view >
+			
+		 
+	   </view>
+<!-- 底部按钮 -->
+ 
+	</view>
+	
+	
+</template>
+<script>
+	export default {
+		data() {
+		return{
+			
+			description: '温馨提示:充电前请确保您的车辆已与充电桩连接!并关闭车内电源。'
+		}
+		}
+	}
+</script>
+
+
+<style lang="scss">
+	// 头部
+	.title {
+		width: 100%;
+		line-height: 44px;
+		background-color: rgba(255, 255, 255, 100);
+		text-align: center;
+		border: 1px solid rgba(242, 242, 242, 100);
+		position: fixed;
+		top: 0;
+		
+	}
+	
+	// 主体
+	.main{
+		width: 100%;
+		margin-top: 44px;
+		// margin-bottom: 64px;
+		//padding-bottom: 234px;
+		.main-detail{
+			display: flex;
+			justify-content: space-between;
+			padding: 14px 16px 0 0;
+			height: 48px;
+			line-height: 48px;
+			background-color: #fff;
+			border-bottom: 1px solid rgba(242, 242, 242, 100);
+			.detail-name{
+               margin-left: 16px;
+				height: 20px;
+				line-height: 23px;
+				color: rgba(102, 102, 102, 100);
+				font-size: 14px;
+				
+			}
+			.detail-content{
+				height: 23px;
+				line-height: 23px;
+				color: rgba(51, 51, 51, 100);
+				font-size: 14px;
+				
+			}
+		}
+		// 收费标准
+	   .rates{
+		   width: 100%;
+		   background-color: #fff;
+		   margin-top: 12px;
+		   .rates-title{
+			   display: flex;
+			   justify-content: space-between;
+			   height: 48px;
+			   line-height: 48px;
+			   padding: 0px 16px 0 ;
+			   border-bottom: 1px solid rgba(242, 242, 242, 100);
+		   }
+		   .time-part{
+			   width: 100%;
+			   .part-top{
+				   display: flex;
+				   justify-content: space-between;
+				   padding: 16px;
+				   .time{
+					   color: rgba(16, 16, 16, 100);
+					   font-size: 16px;
+				   }
+				   .price{
+					   .price-number{
+						   color: rgba(255, 61, 0, 100);
+						   font-size: 18px;
+						   text-align: right;
+						   font-family: Roboto-regular;
+						   display: inline-block;
+						   height: 20px;
+						   font-weight: 600;
+					   }
+					   .price-unit{
+						   color: rgba(102, 102, 102, 100);
+						   font-size: 14px;
+						   text-align: right;
+						   margin-left: 4px;
+						   display: inline-block;
+						   height: 20px;
+					   }
+				   }
+			   }
+			   .part-bottom{
+				   .unitPrice-servicePrice{
+					   eight: 18px;
+					   color: rgba(136, 136, 136, 100);
+					   font-size: 12px;
+					   text-align: right;
+					   padding-right: 16px;
+					   padding-bottom: 18px;
+				   }
+			   }
+		   }
+	   }
+	 .tips{
+		
+		 font-size: 12px;
+		 margin-top: 24px;
+		 /deep/.u-alert-desc[data-v-4d234687]{
+		 			 font-size: 12px
+		 }
+	 }
+	}
+	
+	// 尾部
+	.bottom{
+		background-color: #fff;;
+		width: 100%;
+		height: 64px;
+		line-height: 64px;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index:999;
+		padding: 12px 16px;
+		.botton{
+			width: 343px;
+			height: 40px;
+			line-height: 40px;
+			border-radius: 50px;
+			background-color: rgba(0, 185, 98, 100);
+			color: rgba(255, 255, 255, 100);
+			font-size: 16px;
+			text-align: center;
+			margin: 0 auto;
+		}
+		
+	}
+</style>

+ 65 - 11
pagesFinance/user/deviceDetails.vue

@@ -5,40 +5,94 @@
 			<view class="details-title">
 				<h4>充电桩分润信息</h4>
 			</view>
-			<view class="details-row"><p>所属站点</p><span>荆鹏软件园充电站</span></view>
-			<view class="details-row"><p>桩号</p><span>A0001</span></view>
-			<view class="details-row"><p>充电桩类型</p><span>直流快充</span></view>
-			<view class="details-row"><p>设备状态</p><span>正常运行</span></view>
-			<view class="details-row"><p>我的身份</p><span>市场服务</span></view>
-			<view class="details-row"><p>分润标准</p><span>15%</span></view>
+			<view class="details-row"><p>所属站点</p><span>{{detail.stationName}}</span></view>
+			<view class="details-row"><p>桩号</p><span>{{detail.deviceNo}}</span></view>
+			<view class="details-row"><p>充电桩类型</p><span v-if="detail.type">{{options0[detail.type].label}}</span></view>
+			<view class="details-row"><p>设备状态</p><span>{{detail.online?'在线':'离线'}}</span></view>
+			<view class="details-row"><p>我的身份</p><span>{{detail.roleName}}</span></view>
+			<view class="details-row"><p>分润标准</p><span>{{detail.disProportion}}%</span></view>
+		<view class="details-row"><p>收费标准(元/度)</p><span
+		 style="
+		     color: #5a8eef;
+		 "
+		 @click="gotoUrl('pagesFinance/user/chargingDetails?id='+id)" >查看详情</span></view>
+		
+		
 		</view>
-		<view class="details">
+		<!-- <view class="details">
 			<view class="details-title">
 				<h4>设备相关信息</h4>
 			</view>
 			<view class="details-row"><p>设备型号</p><span>HCD0001-A</span></view>
 			<view class="details-row"><p>初次安装时间</p><span>2022-05-01</span></view>
-			<view class="details-row"><p>收费标准(元/度)</p><span>1.5</span></view>
 			<view class="details-row"><p>输出功率范围(瓦)</p><span>100-400</span></view>
-		</view>
+		</view> -->
 		<view class="detailsBtn">
-			<u-button class="detailsBtn-btn" type="primary" plain>返回</u-button>
+			<u-button class="detailsBtn-btn" type="primary" @click="back" plain>返回</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
+				id:'',
+				
+				detail:{
+					
+				},
+				options0: [
+					
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					
+					{
+						label: '直流快充',
+						value: 1,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					},
+				],
 				form: {
 					name: '',
 					intro: '',
 				},
 			}
 		},
+		onLoad(op){
+			
+			this.id=op.id;
+			this.getInfo()
+		},
 		methods: {
-
+			back(){
+				uni.navigateBack()
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.deviceDetail({
+					deviceId:this.id
+				}).then((res) => {
+					this.detail=res.data.device	 
+					
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
 		}
 	}
 </script>

+ 158 - 30
pagesFinance/user/deviceList.vue

@@ -3,22 +3,34 @@
 		<u-navbar title="我的设备"></u-navbar>
 		<view class="deviceDropdown">
 			<u-dropdown>
-				<u-dropdown-item v-model="value1" title="充电桩类型" :options="options1"></u-dropdown-item>
-				<u-dropdown-item v-model="value2" title="所属站点" :options="options2"></u-dropdown-item>
-				<u-dropdown-item v-model="value3" title="运行状态" :options="options3"></u-dropdown-item>
+				<u-dropdown-item v-model="value1" @change="change1" title="充电桩类型" :options="options1"></u-dropdown-item>
+				<u-dropdown-item v-model="value2" @change="change2" title="所属站点" :options="options2"></u-dropdown-item>
+				<u-dropdown-item v-model="value3" @change="change3" title="运行状态" :options="options3"></u-dropdown-item>
 			</u-dropdown>
 		</view>
-		<view class="deviceList">
-			<view class="deviceList-item deviceList-bg1">
-				<view class="deviceList-head">荆鹏软件园充电站</view>
-				<view class="deviceList-main">A0001</view>
+		<view class="deviceList"
+		
+		>
+			<view v-for="(item ,index) in list" :key="item.id"
+			@click="gotoUrl('pagesFinance/user/deviceDetails?id='+item.id)"
+			:class="{
+				'deviceList-bg1':item.type==1,
+				'deviceList-bg2':item.type==2,
+				'deviceList-bg3':item.type==0
+				
+			}"
+			class="deviceList-item " >
+				<view class="deviceList-head">{{item.name}}</view>
+				<view class="deviceList-main">{{item.deviceNo}}</view>
 				<view class="deviceList-foot">
-					<view class="deviceList-label">直流快充</view>
-					<view class="deviceList-label">正常运行</view>
-					<view class="deviceList-label">市场服务 70%</view>
+					<view class="deviceList-label">{{ options0[item.type].label}}</view>
+					<view class="deviceList-label" 
+					:style="item.online?'':'color:red'"
+					>{{item.online?'在线':'离线'}}</view>
+					<view class="deviceList-label">{{item.roleName}}</view>
 				</view>
 			</view>
-			<view class="deviceList-item deviceList-bg2">
+		<!-- 	<view class="deviceList-item deviceList-bg2">
 				<view class="deviceList-head">荆鹏软件园充电站</view>
 				<view class="deviceList-main">A0001</view>
 				<view class="deviceList-foot">
@@ -35,53 +47,169 @@
 					<view class="deviceList-label">正常运行</view>
 					<view class="deviceList-label">市场服务 70%</view>
 				</view>
-			</view>
+			</view> -->
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
-				value1: 1,
-				value2: 2,
-				value3: 3,
-				options1: [{
-						label: '默认排序',
-						value: 1,
+				form: {
+				
+				},
+				startDate:'',
+				endDate:'',
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				value1: -1,
+				value2: -1,
+				value3: -1,
+				stationList:[],
+				options0: [
+					{
+							label: '全部',
+							value: -1,
+						},
+					{
+						label: '自行车充电',
+						value: 0,
 					},
 					{
-						label: '距离优先',
+						label: '交流慢充',
 						value: 2,
 					},
 					{
-						label: '价格优先',
-						value: 3,
+						label: '直流快充',
+						value: 1,
 					}
 				],
-				options2: [{
-						label: '去冰',
-						value: 1,
+				options1: [{
+						label: '全部',
+						value: '-1',
 					},
 					{
-						label: '加冰',
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '交流慢充',
 						value: 2,
 					},
+					{
+						label: '直流快充',
+						value: 1,
+					}
 				],
-				options3: [{
-						label: '去冰',
+				options2: [
+				],
+				options3: [
+					{
+						label: '全部',
+						value: -1,
+					},
+					{
+						label: '在线',
 						value: 1,
 					},
 					{
-						label: '加冰',
-						value: 2,
+						label: '离线',
+						value: 0,
 					},
 				],
 			}
 		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
 		methods: {
-
+			change1(e){
+				this.form.type=e
+				if(e==-1){
+					this.form.type=""
+				}
+				this.getList(true)
+			},
+			change2(e){
+				this.form.stationId=e
+				if(e==-1){
+					this.form.stationId=""
+				}
+				this.getList(true)
+			},
+			change3(e){
+				this.form.onlineStatus=e
+				if(e==-1){
+					this.form.onlineStatus=""
+				}
+				this.getList(true)
+			},
+			getStation() {
+				
+				API.stationList().then((res) => {
+					this.options2.push({
+						label: '全部',
+						value:-1,
+					})
+					this.stationList = res.data.stationList
+					this.stationList.forEach(item=>{
+						this.options2.push({
+							label: item.name,
+							value: item.id,
+						})
+					})
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+		myLoadmore() {
+
+				this.pageIndex += 1;
+				this.getList()
+			},
+			getList(bl) {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				if (bl) {
+					this.list = [];
+					this.pageIndex = 1;
+				}
+				this.form.pageIndex= this.pageIndex
+				
+				API.devicesList(this.form).then((res) => {
+
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal
+					uni.hideLoading()
+
+				}).catch(error => {
+					uni.showToast({
+
+						title: error
+					})
+				})
+			},
+			onReady() {
+				this.getStation()
+				this.getList()
+				
+			}
 		}
 	}
 </script>

+ 26 - 18
pagesFinance/user/help.vue

@@ -2,9 +2,9 @@
 	<view>
 		<u-navbar title="帮助中心"></u-navbar>
 		<view class="collapse">
-			<u-collapse>
-				<u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">
-					{{item.body}}
+			<u-collapse v-if="itemList.length">
+				<u-collapse-item :title="item.title" v-for="(item, index) in itemList" :key="index">
+					{{item.content}}
 				</u-collapse-item>
 			</u-collapse>
 		</view>
@@ -12,27 +12,35 @@
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
-				itemList: [{
-					head: "赏识在于角度的转换",
-					body: "只要我们正确择取一个合适的参照物乃至稍降一格去看待他人,值得赏识的东西便会扑面而来",
-					open: true,
-					disabled: true
-				},{
-					head: "生活中不是缺少美,而是缺少发现美的眼睛",
-					body: "学会欣赏,实际是一种积极生活的态度,是生活的调味品,会在欣赏中发现生活的美",
-					open: false,
-				},{
-					head: "周围一些不起眼的人、事、物,或许都隐藏着不同凡响的智慧",
-					body: "但是据说雕刻大卫像所用的这块大理石,曾被多位雕刻家批评得一无是处,有些人认为这块大理石采凿得不好,有些人嫌它的纹路不够美",
-					open: false,
-				}],
+				itemList: [],
 			}
 		},
+		onReady() {
+			this.getHomePage()
+		},
 		methods: {
-
+		getHomePage(){
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+					API.helpList().then((res) => {
+						this.itemList = res.data.helpList
+					
+					
+						uni.hideLoading()
+						
+					}).catch(error => {
+						uni.showToast({
+							title: error
+						})
+					})
+				}
 		}
 	}
 </script>

+ 131 - 48
pagesFinance/user/index.vue

@@ -5,77 +5,77 @@
 				<u-avatar src="../../assets/img/head.png" size="140"></u-avatar>
 			</view>
 			<view class="userHead-text">
-				<h3>张建军</h3>
+				<h3>{{info.realName}}</h3>
 				<view class="userHead-text-position">
 					<u-icon name="account-pin-box-fill" custom-prefix="custom-icon" color="#fff" size="32"></u-icon>
-					<p>市场服务</p>
+					<p>{{role.name}}</p>
 				</view>
 			</view>
 		</view>
 		<view class="userData">
 			<view class="userData-item">
-				<view class="userData-data">15</view>
-				<view class="userData-foot">我的充电桩</view>
+				<view class="userData-data">{{home.deviceNumbers}}</view>
+				<view class="userData-foot" @click="gotoUrl('pagesFinance/user/deviceList')" >我的充电桩</view>
 			</view>
 			<u-line color="#d9e0ec" length="60" direction="col" margin="10px"/>
 			<view class="userData-item">
-				<view class="userData-name">微信商家账户</view>
-				<view class="userData-foot">提现账户</view>
+				<view class="userData-name">银行账户</view>
+				<view class="userData-foot" @click="showModel"  >提现账户</view>
 			</view>
 		</view>
 		
 		<view class="userInfo">
 			<view class="userInfo-head"><p>可提现金额</p></view>
 			<view class="userInfo-main">
-				<h2>19854.14</h2>
-				<view class="userInfo-btn">帐户提现</view>
+				<h2>{{home.accountBalance}}</h2>
+				<view class="userInfo-btn" @click="gotoUrl('pagesFinance/user/withdraw')">帐户提现</view>
 			</view>
 			<view class="userInfo-foot">
-				<view class="userInfo-item">
+				<!-- <view class="userInfo-item">
 					<p>今日收益</p>
-					<h4>957.00</h4>
-				</view>
+					<h4>{{home.todayAmount}}</h4>
+				</view> -->
 				<view class="userInfo-item">
-					<p>累计收益</p>
-					<h4>11957.00</h4>
+					<p>冻结金额(提现中)</p>
+					<h4>{{home.waitingAmount}}</h4>
 				</view>
 				<view class="userInfo-item">
 					<p>已提现</p>
-					<h4>10000.00</h4>
+					<h4>{{home.withdrawnAmount}}</h4>
 				</view>
 			</view>
 		</view>
 		
 		<view class="userCell">
-			<view class="userCell-item">
+			<view class="userCell-item" @click="gotoUrl('pagesFinance/user/withdrawRecord')">
 				<view class="userCell-title">
 					<u-icon name="refund-fill" custom-prefix="custom-icon" color="#9EAAC6" 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">
+			<view class="userCell-item" @click="gotoUrl('pagesFinance/user/help')" >
 				<view class="userCell-title">
 					<u-icon name="question-fill" custom-prefix="custom-icon" color="#9EAAC6" 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">
+			<view class="userCell-item"  @click="phone()" >
 				<view class="userCell-title">
 					<u-icon name="customer-service-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
 					<p>联系客服</p>
 				</view>
-				<span>0716-8123456</span>
+				<span>{{tel}}</span>
 			</view>
-			<view class="userCell-item">
+			<!-- <view class="userCell-item"  @click="gotoUrl('pagesFinance/user/about')">
 				<view class="userCell-title">
 					<u-icon name="information-fill" custom-prefix="custom-icon" color="#9EAAC6" 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">
+			</view> -->
+			<view class="userCell-item" @click="logout" >
 				<view class="userCell-title">
 					<u-icon name="logout-box-r-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
 					<p>帐号登出</p>
@@ -84,46 +84,129 @@
 			</view>
 		</view>
 		
-		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
-	</view>
+			<Tabbar :current="2"></Tabbar>
+ 	</view>
 </template>
 
 <script>
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	import {
+		substrMb
+	} from '@/utils'
+	
 	export default {
 		data() {
 			return {
-				tabbarList: [{
-						iconPath: "bar-chart-box-fill",
-						selectedIconPath: "bar-chart-box-fill",
-						text: '统计',
-						count: 0,
-						isDot: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "article-fill",
-						selectedIconPath: "article-fill",
-						text: '明细',
-						midButton: true,
-						customIcon: true,
-					},
-					{
-						iconPath: "account-pin-box-fill",
-						selectedIconPath: "account-pin-box-fill",
-						text: '我的',
-						count: 0,
-						isDot: false,
-						customIcon: true,
-					},
-				],
+				
+				tel:'400-8899-619',
+				role:{},
+				info:{},
+				home:{},
 				current: 0,
 				background:{
 					background: 'none'
 				},
 			}
 		},
+		components: {
+			Tabbar
+		
+		},
+		onLoad() {
+			this.info=this.carhelp.getPersonInfo("merchantUser")
+			var obj=this.carhelp.getPersonInfoPlus("merchantUser");
+			if(obj&&obj.role){
+				this.role=obj.role;
+			}
+			
+			
+			console.log(this.info)
+		},
+		onReady() {
+			this.getHomePage()
+		},
+		onShow() {
+			this.getHomePage()
+		},
 		methods: {
-
+			showModel(){
+				var bankCard="";
+				if(this.home.bankCard){
+					bankCard=substrMb(this.home.bankCard,0,4)+"****"+substrMb(this.home.bankCard,8,4)
+				}
+				var code=this.home.bank+":"+bankCard;
+				if(this.home.bank==null&&this.home.bankCard==null){
+					code="未绑定"
+				}
+				uni.showModal({
+					showCancel:false,
+					content:code,
+					
+				})
+			},
+			logoutApi(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var data = {
+					
+				};
+				 
+				API.logout(data).then((res) => {
+					this.carhelp.setToken("","merchantUser");
+					this.carhelp.set("merchantUser_token_tdate","")
+					this.carhelp.setPersonInfo("","merchantUser");
+					this.carhelp.setPersonInfoPlus("" ,"merchantUser" )
+					
+					uni.reLaunch({
+						url:"/pagesFinance/login/index?phone="+this.info.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 //仅为示例
+				});
+			},
+			getHomePage(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.homePage().then((res) => {
+					this.home = res.data
+				
+				
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			}
 		}
 	}
 </script>

+ 72 - 6
pagesFinance/user/withdraw.vue

@@ -3,7 +3,7 @@
 		<u-navbar title="提现"></u-navbar>
 		<view class="withdraw">
 			<view class="withdraw-head">
-				<p>提现至</p><span>微信商家账户</span>
+				<p>提现至</p><span>{{code}}</span>
 			</view>
 			<view class="withdraw-main">
 				<p>申请提现金额(元)</p>
@@ -13,12 +13,12 @@
 				</view>
 			</view>
 			<view class="withdraw-foot">
-				<p>可提现余额 ¥1000</p>
-				<span>全部提现</span>
+				<p>可提现余额 ¥{{home.accountBalance}}</p>
+				<span @click="value=home.accountBalance">全部提现</span>
 			</view>
 		</view>
 		<view class="applyBtn">
-			<u-button class="applyBtn-btn" type="primary">申请提现,7日内到账</u-button>
+			<u-button class="applyBtn-btn" @click="submit()" type="primary">申请提现,7日内到账</u-button>
 		</view>
 		<view class="withdraw-tips">
 			<h4>提现说明:</h4>
@@ -28,15 +28,81 @@
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	import {
+		substrMb
+	} from '@/utils'
 	export default {
 		data() {
 			return {
+				code:"",
 				value: '',
-				type: 'text',
+				type: 'number',
+					home:{
+						accountBalance:0
+					},
 			}
 		},
+		onReady() {
+			
+			this.getHomePage()
+		},
+		onShow(){
+			this.getHomePage()
+		},
 		methods: {
-
+			submit(){
+				if(this.value>0&&this.value<this.home.accountBalance){
+					
+				}else{
+					uni.showToast({
+						title: "请输入正确的金额"
+					})
+					return 
+				}
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.applyWithdraw({
+					amount:this.value
+				}).then((res) => {
+					
+						uni.redirectTo({
+							url:"/pagesFinance/user/applyResult?value="+this.value
+						})
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			getHomePage(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.homePage().then((res) => {
+					this.home = res.data
+					var bankCard="";
+					if(this.home.bankCard){
+						bankCard=substrMb(this.home.bankCard,0,4)+"****"+substrMb(this.home.bankCard,8,4)
+					}
+					this.code=this.home.bank+":"+bankCard;
+					if(this.home.bank==null&&this.home.bankCard==null){
+						this.code="未绑定"
+					}
+					
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			}
 		}
 	}
 </script>

+ 73 - 47
pagesFinance/user/withdrawRecord.vue

@@ -2,78 +2,104 @@
 	<view>
 		<u-navbar title="提现记录"></u-navbar>
 		<view class="detailed">
-			<view class="detailed-time">
-				<p>2020年5月1日</p>
-				<p>共提现 3000.00</p>
-			</view>
-			<view class="detailed-list">
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<view class="u-flex">
-							<h4>提现</h4> <span class="success">(提现成功)</span>
-						</view>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>1000.00</h2>
-					</view>
+		
+			<view class="detailed-list"  
+			:key="index" 
+			v-for="(item ,index) in list" >
+				<view class="detailed-time"  v-if="item.show">
+					<p>{{item.showtime}}</p>
+					<p>共提现 {{showMap.get(item.showtime)}}</p>
 				</view>
 				<view class="detailed-item">
 					<view class="detailed-item-name">
 						<view class="u-flex">
-							<h4>提现</h4> <span class="error">(待转账)</span>
+							<h4>提现</h4>
+							 <span v-if="item.status==1" class="success">(提现成功)</span>
+							 <span v-if="item.status==0" class="error">(待转账)</span>
 						</view>
-						<p>05-01 12:00</p>
+						<p>{{item.createTime}}</p>
 					</view>
 					<view class="detailed-item-num">
-						<h2>2000.00</h2>
-					</view>
-				</view>
-			</view>
-			<view class="detailed-time">
-				<p>2020年5月1日</p>
-				<p>共提现 3000.00</p>
-			</view>
-			<view class="detailed-list">
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<view class="u-flex">
-							<h4>提现</h4> <span class="success">(提现成功)</span>
-						</view>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>1000.00</h2>
-					</view>
-				</view>
-				<view class="detailed-item">
-					<view class="detailed-item-name">
-						<view class="u-flex">
-							<h4>提现</h4> <span class="error">(待转账)</span>
-						</view>
-						<p>05-01 12:00</p>
-					</view>
-					<view class="detailed-item-num">
-						<h2>2000.00</h2>
+						<h2>{{item.applicationAmount}}</h2>
 					</view>
 				</view>
+			
 			</view>
+			
+		 
 		</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	
 	export default {
 		data() {
 			return {
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
 				form: {
 					name: '',
 					intro: '',
 				},
+				showMap:null,
+			 
+			}
+		},
+		onReady() {
+			this.getList()
+		},
+		
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
 			}
 		},
 		methods: {
-
+			getList() {
+			
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				
+				API.withdrawRecord({
+					pageIndex:this.pageIndex
+				}).then((res) => {
+					
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+					
+					var showMap=new Map()
+					this.list.forEach(item=>{
+						var ktime=item.createTime.split(" ")[0]
+						if(showMap.has(ktime)){
+							item.show=false;
+							var m=showMap.get(ktime)+item.applicationAmount;
+							showMap.set(ktime,m)
+						}else{
+							showMap.set(ktime,item.applicationAmount)
+							
+							item.show=true;
+							item.showtime=ktime;
+						}
+					})
+					this.showMap=showMap;
+					this.recordsTotal = res.data.recordsTotal
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
 		}
 	}
 </script>

+ 62 - 12
utils/mixin.js

@@ -7,24 +7,74 @@ var app = {
 
 	set : (key, value) => uni.setStorageSync(prefix + key, value),
 	remove: key =>  uni.removeStorageSync(prefix + key),
-	
-	getPersonInfo : () => {
-		 return uni.getStorageSync(prefix + 'personInfo')
+	getPersonInfoPlus : (jp_identity) => {
+		if(jp_identity){
+			 return uni.getStorageSync(prefix +jp_identity+ '_personInfoPlus')
+		}else{
+			 return uni.getStorageSync(prefix + 'personInfoPlus')
+		}
+		
+	},
+	getPersonInfo : (jp_identity) => {
+		if(jp_identity){
+			
+			 return uni.getStorageSync(prefix +jp_identity+ '_personInfo')
+			
+		}else{
+			 return uni.getStorageSync(prefix + 'personInfo')
+			
+		}
+		
 	},
 	signOut:()=>  uni.removeStorageSync(prefix  + 'personInfo'),
 	getOpenId : () =>   uni.getStorageSync(prefix + 'wx_openId'),
 
-	setOpenId : (value) => uni.setStorageSync(prefix + 'wx_openId', value),
-	setPersonInfo : (value) => uni.setStorageSync(prefix + 'personInfo', value),
-	
-	getToken : () =>  uni.getStorageSync(prefix + 'token'),
-	setToken : (value) => {
-		uni.setStorageSync(prefix + 'token', value)
+	setOpenId: (value) => uni.setStorageSync(prefix + 'wx_openId', value),
+	setPersonInfo : (value,jp_identity) =>{
 		
-		if(value){
-			var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
-			uni.setStorageSync(prefix + 'token_tdate', tdate)
+		if(jp_identity){
+			uni.setStorageSync(prefix + jp_identity+'_personInfo', value)
+			
+		}else{
+			uni.setStorageSync(prefix + 'personInfo', value)
+			
 		}
+	},
+	setPersonInfoPlus : (value,jp_identity) =>{
+		
+		if(jp_identity){
+			uni.setStorageSync(prefix + jp_identity+'_personInfoPlus', value)
+			
+		}else{
+			uni.setStorageSync(prefix + 'personInfoPlus', value)
+			
+		}
+	},
+	getToken : (options) => {
+		//不同权限 ,不同token
+		if(options&&options.jp_identity){
+			return uni.getStorageSync(prefix+options.jp_identity+ '_token')
+		}else{
+			return uni.getStorageSync(prefix + 'token')
+			
+		}
+	},
+	setToken : (value,jp_identity) => {
+		if(jp_identity){
+			uni.setStorageSync(prefix +jp_identity + '_token', value)
+			if(value){
+				var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
+				uni.setStorageSync(prefix + jp_identity+'_token_tdate', tdate)
+			}
+		}else{
+			uni.setStorageSync(prefix + 'token', value)
+			if(value){
+				var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
+				uni.setStorageSync(prefix + 'token_tdate', tdate)
+			}
+		}
+		
+		
 	}
 	,
 	

+ 37 - 8
utils/request.js

@@ -6,9 +6,15 @@ import requestNum from './requestNum.js';
 const request = (options) => {
 	//记录请求次数和响应次数
 	var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
-	var token_tdate=carhelp.get("token_tdate");//每10分钟存储一次token
+	var token_tdate=null//每10分钟存储一次token
+	if(options&&options.jp_identity){
+		token_tdate=carhelp.get(options.jp_identity+"_token_tdate");
+	}else{
+		token_tdate=carhelp.get("token_tdate");
+	}
+	
 	
-	var token=carhelp.getToken();
+	var token=carhelp.getToken(options);
 	
 	 if(token_tdate&&token_tdate==tdate){
 	 	return requestSon(options);
@@ -25,11 +31,15 @@ const request = (options) => {
 	}
 	
 	return new Promise((resolve, reject) => {
+		 var loginurl="/mobile/regUser/findByOpenId"
 		 
+		 if(options&&options.jp_identity){
+		 	 loginurl="/mobile/"+options.jp_identity+"/findByOpenId"
+		 }
 		 
 		uni.request({
 			method:'get',
-			url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
+			url: process.car.BASE_URL + loginurl,
 			data: {
 				openId:openId,
 			
@@ -46,9 +56,15 @@ const request = (options) => {
 			if (res.data.code == 200&&res.data.result) {
 				
 				var token = res ? res.data.data.token : '';
-				carhelp.setPersonInfo(res.data.data.regUser );
-				
-				carhelp.setToken(token);
+				 if(options&&options.jp_identity){
+					 carhelp.setPersonInfo(res.data.data.user ,options.jp_identity );
+					 
+				 }else{
+					 carhelp.setPersonInfo(res.data.data.regUser );
+					 
+				 }
+				 carhelp.setPersonInfoPlus(res.data.data ,options.jp_identity )
+				carhelp.setToken(token,options.jp_identity);
 				
 				options.token=token
 				
@@ -58,8 +74,21 @@ const request = (options) => {
 				 
 			} else  if(res.data.code == 415||(res.data.code == 200&&!res.data.result)||res.data.code == 400){
 				
-				var url=window.location.href.split("#")[1]
-				window.location.href="#/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
+				var backurl=window.location.href.split("#")[1]
+				var url="/pages/login/index"
+				if(options&&options.jp_identity){
+					url="/pagesFinance/login/index"
+				}
+				
+				url+="?message=请登录&back="+ backurl
+				if(options.data.phone){
+					url+="&phone="+options.data.phone
+					
+				}
+				carhelp.signOut()
+				uni.redirectTo({
+					url:url
+				})
 				
 			 
 				

+ 1 - 1
utils/requestNum.js

@@ -5,7 +5,7 @@ let reqCount = 0,
 	resCount = 0;
 var baseUrl=process.car.BASE_URL;
 const request = (options) => {
-	var token=carhelp.getToken();
+	var token=carhelp.getToken(options);
 	
 	reqCount++;
 	 

+ 1 - 1
utils/requestSon.js

@@ -9,7 +9,7 @@ if (process.env.NODE_ENV === "development") {
 	//baseUrl="http://192.168.33.230:8086/jp-employment-server";
 }
 const request = (options) => {
-	var token=carhelp.getToken();
+	var token=carhelp.getToken(options);
 	
 	reqCount++;
 	 

+ 17 - 8
utils/requestWhite.js

@@ -10,7 +10,7 @@ if (process.env.NODE_ENV === "development") {
 	//baseUrl="http://192.168.33.90:8086/jp-employment-server";
 }
 const request = (options) => {
-	var token=carhelp.getToken();
+	var token=carhelp.getToken(options);
 	
 	reqCount++;
 	 
@@ -41,8 +41,17 @@ const request = (options) => {
 			
 			if (res.data.code == 415&&res.data.message=='请先注册信息') {
 				carhelp.signOut()
+			
+				var backurl=window.location.href.split("#")[1]
+				var url="/pages/login/index"
+				if(options&&options.jp_identity){
+					url="/pagesFinance/login/index"
+				}
+				
+				url+="?message=请登录&back="+ backurl+"&phone="+options.data.phone
+			
 				uni.redirectTo({
-					url: '/pages/login/index'
+					url:url
 				})
 				return;
 			}
@@ -50,12 +59,12 @@ const request = (options) => {
 			if (res.data.code != 200) {
 				reject(res.data.message)
 			} else {
-				if(!res.data.result){
-					uni.showToast({
-						title: res.data.message,
-						position:'bottom'
-					})
-				}
+				// if(!res.data.result){
+				// 	uni.showToast({
+				// 		title: res.data.message,
+				// 		position:'bottom'
+				// 	})
+				// }
 				resolve(res.data);
 			}
 		}).catch(error => {

+ 3 - 0
vue.config.js

@@ -1,3 +1,5 @@
+if(process.env.NODE_ENV === "production"){
+
 const path = require('path');
 const webpack = require('webpack')
 
@@ -87,3 +89,4 @@ module.exports = {
 		}
 	}
 };
+}