zhengkaixin 3 years ago
commit
8588b74b76
100 changed files with 13012 additions and 0 deletions
  1. 16 0
      .env.dev.js
  2. 35 0
      .env.js
  3. 13 0
      .env.prod.js
  4. 26 0
      .env.test.js
  5. 64 0
      App.vue
  6. 72 0
      README.md
  7. 184 0
      apis/common.js
  8. 273 0
      apis/finance.js
  9. 114 0
      apis/index.js
  10. 50 0
      apis/login.js
  11. 101 0
      apis/my.js
  12. 36 0
      apis/weixin.js
  13. 0 0
      assets/css/style.css
  14. 211 0
      assets/font/iconfont.css
  15. 7 0
      assets/font/jptime.css
  16. BIN
      assets/font/jptime.otf
  17. BIN
      assets/img/Frame 201.png
  18. BIN
      assets/img/Withdrawal_bg.png
  19. BIN
      assets/img/bgbg.png
  20. BIN
      assets/img/blankpage.png
  21. BIN
      assets/img/booked.png
  22. BIN
      assets/img/canc.png
  23. BIN
      assets/img/charge-0.png
  24. BIN
      assets/img/charge-1.png
  25. BIN
      assets/img/charge-2.png
  26. BIN
      assets/img/charge-3.png
  27. BIN
      assets/img/charging_type_1.png
  28. BIN
      assets/img/charging_type_3.png
  29. BIN
      assets/img/charging_type_bike.png
  30. BIN
      assets/img/charging_type_fast.png
  31. BIN
      assets/img/charging_type_slow.png
  32. BIN
      assets/img/ddc.png
  33. BIN
      assets/img/f.png
  34. BIN
      assets/img/finished.png
  35. BIN
      assets/img/head.png
  36. BIN
      assets/img/icon_success.png
  37. BIN
      assets/img/index_header_bg.png
  38. BIN
      assets/img/logo.png
  39. BIN
      assets/img/logo_xiaopengguanjia.png
  40. BIN
      assets/img/min_button_select.png
  41. BIN
      assets/img/mine_header_bg.png
  42. BIN
      assets/img/shenhe.png
  43. BIN
      assets/img/暂无数据-缺省页.png
  44. BIN
      assets/img/电桩管理.png
  45. 153 0
      bobo-router/README.md
  46. 362 0
      bobo-router/bobo-router.js
  47. 73 0
      bobo-router/index.js
  48. 92 0
      components/Tabbar.vue
  49. 99 0
      components/TabbarFinance.vue
  50. 25 0
      font.js
  51. 225 0
      iconfont/iconfont.css
  52. 75 0
      jpsoft.vue
  53. 51 0
      main.js
  54. 87 0
      manifest.json
  55. 57 0
      package.json
  56. 269 0
      pages.json
  57. 106 0
      pages/charge/chargeDetails.vue
  58. 181 0
      pages/charge/chargeList.vue
  59. 511 0
      pages/charge/index.vue
  60. 158 0
      pages/charge/switchCharge.vue
  61. 529 0
      pages/index/index.vue
  62. 87 0
      pages/index/none.vue
  63. 283 0
      pages/login/index.vue
  64. 271 0
      pages/user/index.vue
  65. 274 0
      pages/user/recharge.vue
  66. 92 0
      pages/user/rechargeDeatils.vue
  67. 152 0
      pages/user/rechargeList-test.vue
  68. 152 0
      pages/user/rechargeList.vue
  69. 281 0
      pagesFinance/detailed/details.vue
  70. 466 0
      pagesFinance/detailed/index.vue
  71. 287 0
      pagesFinance/login/index.vue
  72. 336 0
      pagesFinance/preengaged/preengaged.vue
  73. 461 0
      pagesFinance/preengaged/preengagedListDetails.vue
  74. 283 0
      pagesFinance/share/details.vue
  75. 529 0
      pagesFinance/share/index.vue
  76. 570 0
      pagesFinance/statistics/index.vue
  77. 63 0
      pagesFinance/user/about.vue
  78. 99 0
      pagesFinance/user/applyResult.vue
  79. 298 0
      pagesFinance/user/chargingDetails.vue
  80. 195 0
      pagesFinance/user/deviceDetails.vue
  81. 269 0
      pagesFinance/user/deviceList.vue
  82. 60 0
      pagesFinance/user/help.vue
  83. 345 0
      pagesFinance/user/index.vue
  84. 476 0
      pagesFinance/user/myPile.vue
  85. 505 0
      pagesFinance/user/pileManagement.vue
  86. 268 0
      pagesFinance/user/stationsList.vue
  87. 212 0
      pagesFinance/user/withdraw.vue
  88. 157 0
      pagesFinance/user/withdrawRecord.vue
  89. BIN
      static/img/min_button_select.png
  90. 77 0
      uni.scss
  91. 386 0
      utils/index.js
  92. 64 0
      utils/init.js
  93. 84 0
      utils/mixin.js
  94. 105 0
      utils/request.js
  95. 59 0
      utils/requestNum.js
  96. 71 0
      utils/requestSon.js
  97. 79 0
      utils/requestWhite.js
  98. 209 0
      utils/wxJsApi.js
  99. 60 0
      utils/wxpay.js
  100. 92 0
      vue.config.js

+ 16 - 0
.env.dev.js

@@ -0,0 +1,16 @@
+const UNI_APP = {  
+	 BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	
+	 //BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
+	NODE_ENV :"dev",
+	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
+	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
+	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
+	//openId:"1000",
+	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
+	//小鹏管家appid
+	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",
+		VUE_APP_WXAPPID:"wx3afdb1b60188c1e5",
+}  
+
+module.exports = UNI_APP;

+ 35 - 0
.env.js

@@ -0,0 +1,35 @@
+(function() {  
+    const NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境  
+    let ENV_VAR = null;  
+	 
+	var NODE_NAME=  process.env['NODE_NAME']
+	console.log(NODE_NAME)
+    if (process.env.NODE_ENV === "development") {  
+
+        if (NODE_ENV === 'dev') {  
+            ENV_VAR = require('.env.dev.js');  
+        } else if (NODE_ENV === 'test') {  
+			ENV_VAR = require('.env.test.js'); 
+        } else{
+			 ENV_VAR = require('.env.dev.js');  
+		}
+		
+    } else if (process.env.NODE_ENV === "production") {  
+		
+		if(NODE_NAME=="test"){
+			ENV_VAR = require('.env.test.js'); 
+		}else if(NODE_NAME=="production"){
+			ENV_VAR = require('.env.prod.js');
+		} else  {  
+			ENV_VAR = require('.env.prod.js');  
+		} 
+      
+    }  
+
+    if (ENV_VAR) {  
+		process.car = {};  
+        for (let key in ENV_VAR) {  
+			process.car[key] = ENV_VAR[key];			
+        }  
+    }  
+})();

+ 13 - 0
.env.prod.js

@@ -0,0 +1,13 @@
+const UNI_APP = {
+  	
+    BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+	NODE_ENV :"prod",
+	SIMPLE_RUN:false,
+	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//测试用openId
+	VUE_APP_WXAPPID:"wx3afdb1b60188c1e5",
+	
+	//小鹏管家appid
+	//VUE_APP_WXAPPID:"wx7e70eb62a8459869"
+}  
+
+module.exports = UNI_APP;

+ 26 - 0
.env.test.js

@@ -0,0 +1,26 @@
+const UNI_APP = {  
+   // BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+
+   //  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/',
+   
+
+	NODE_ENV :"test",
+	SIMPLE_RUN:false,
+	//openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",//测试用openId
+	//openId:"oHjCawmHqG44pqUW54iBlenaHYB8",
+	//小鹏管家appid
+	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",
+	VUE_APP_WXAPPID:"wx3afdb1b60188c1e5",
+	//zkx的测试openId
+	//openId:"oHjCawsJ5blME36lHaSpSVfEhleU",
+		//openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	 //	   oK9Wr54VbEh3xvWYmD_zT5NbH4AY
+	 openId:"10000",
+	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
+	//zq的测试openId
+	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",
+}  
+
+module.exports = UNI_APP;

+ 64 - 0
App.vue

@@ -0,0 +1,64 @@
+<script>
+	import '.env.js'
+	import 'font.js'
+	export default {
+		onLaunch: function() {
+			
+			
+		},
+		onShow: function() {
+			
+		
+		},
+		onReady: function() {
+			console.log("aaa")
+		},
+		onHide: function() {
+			
+		},
+		methods:{
+			
+		} 
+	}
+</script>
+<style lang="scss">
+	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
+	@import "uview-ui/index.scss";
+	//
+	/*每个页面公共css */
+	//@import 'static/css/style.css';
+	@import '@/iconfont/iconfont.css';
+	@import '@/assets/font/iconfont.css';
+	.uni-icon-success-no-circle:before {
+	    content: "" !important ;
+		display: none;
+	}
+	.uni-toast .uni-toast__content{
+		margin: -10px 1px 10px 1px;
+	}
+	.uni-modal .uni-modal__btn{
+		flex: 1;
+		height: 43px;
+		line-height: 43px !important;;
+		font-size: 13px !important;
+		box-sizing: border-box;
+		cursor: pointer;
+		text-align: center;
+		border-radius: 1px;
+	}
+	@media screen and (min-width: 320px) {
+	   /deep/.u-tabbar__content {
+			height: 42px!important;
+	   }
+	}
+	@media screen and (min-width: 375px) {
+	   /deep/.u-tabbar__content {
+			height: 52px!important;
+	   }
+	}
+	@media screen and (min-width: 425px) {
+	   /deep/.u-tabbar__content {
+			height: 62px!important;
+	   }
+	}
+</style>

+ 72 - 0
README.md

@@ -0,0 +1,72 @@
+#   智能充电系统
+发行方式, uniapp  点击”发行“ -”自定义发行“   prod 正式环境| test 测试环境
+
+运行方式  uniapp正常运行方式
+
+
+## 运行与安装
+建议使用uniapp的官方推荐开发工具HBuilder最新版本
+
+## 目录结构
+~~~
+www  WEB部署目录(或者子目录)
+├─apis             接口目录
+├─components       组件目录
+├─config           配置目录
+├─pages            页面目录
+├─static           静态文件目录
+├─utils            工具模块目录
+├─App.vue          主入口组件
+├─main.js          主入口模块
+├─mainifest.json   项目配置
+├─pages.json       页面及其他公共配置
+├─uni.scss         控制应用的风格样式文件
+├─vue.config.js    vue配置,多不可用,具体参见文档https://uniapp.dcloud.io/collocation/vue-config
+~~~
+
+## 编码风格
+- 文件命名建议使用驼峰命名,其中首字母小写,名字要语义清晰
+- data内参数或者函数参数使用驼峰命名,关键参数或者有歧义的参数应该有参考备注
+- 页面的命名使用驼峰命名,而组件的命名则使用中划线命名,将两者能够更好的分别
+- 在页面内定义函数和参数需要有备注,定义此方法的含义及其使用, 生命周期函数推荐使用uni-app的内置自带函数,不推荐使用vue的生命函数
+- 在页面中使用this 推荐在全局置顶设置_this 这样会保持风格统一 且节省代码
+- 在页面头部起一行注释,表明这个页面是什么页面 
+- 以前的html标签改了很多,请参照官方文档使用
+`div 改成 view`
+`span、font 改成 text`
+`a 改成 navigator`
+`img 改成 image`
+`input 还在,但type属性改成了confirmtype`
+`form、button、checkbox、radio、label、textarea、canvas、video 这些还在。`
+`select 改成 picker`
+`iframe 改成 web-view`
+`ul、li没有了,都用view替代`
+
+##插件引用
+#控制台
+yarn add vconsole
+###uniapp 路由站
+npm install uni-simple-router uni-read-pages(取消使用, 存在h5 刷新白屏问题)
+//双路由   uni-crazy-router 直接链接访问, 无法触发前置占点
+[uni-crazy-router](https://ext.dcloud.net.cn/plugin?id=1658)
+[bobo-router ](https://ext.dcloud.net.cn/plugin?id=904)
+
+
+
+[vue-router-uni ](https://ext.dcloud.net.cn/plugin?id=605)
+[mac80端口问题无法使用](https://blog.csdn.net/weixin_41047933/article/details/97765502)
+sudo pfctl -ef /etc/pf-tomcat.conf
+
+
+redirectTo
+npm install echarts@3.6.2 --save
+
+
+
+u-loadmore//加载更多
+
+[在线示例 uview](https://h5.uviewui.com/)
+
+	uni.showLoading({
+					    title: '加载中'
+					});

+ 184 - 0
apis/common.js

@@ -0,0 +1,184 @@
+import request from '@/utils/request'
+ 
+import Qs from 'qs';
+
+
+export function getBannerInfo(formData) {
+	return request({
+		url: '/mobile/bannerInfo/getBannerInfo',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+export function readMessageNum() {
+	return request({
+		url: '/mobile/messageApi/readMessageNum',
+		//data: formData,
+		method: 'post',
+		
+	})
+}
+
+export function getScreenList(formData) {
+	return request({
+		url: '/mobile/recruitmentApi/getScreenList',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+
+//字典表
+export function getData(id) {
+	return request({
+		url: '/sys/dataDictionary/queryChildrenApi',
+		data: {
+			parentId:id
+		},
+		method: 'post',
+		timeout: 60000,
+	})
+}
+//上传图片
+export function upload(formData) {
+	return request({
+		url: '/mobile/jobUserApi/upload',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+
+//上传图片
+export function uploadBase64(formData) {
+	var localData = formData.photoFile?formData.photoFile:formData.photoBase64Data;
+	
+	if (localData.indexOf('data:image') != 0) {
+	    //判断是否有这样的头部
+	    localData = 'data:image/jpeg;base64,' + localData
+	}
+	formData.photoBase64Data = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
+	
+	
+	return request({
+		url: '/mobile/jobUserApi/uploadBase64',
+		data: formData,
+		method: 'post',
+		timeout: 60000,
+	})
+}
+
+
+export function getSchoolServeList(params) {
+	return request({
+		url: '/mobile/companyInfoApi/schoolServeList',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+
+
+//综合订单
+export function mergeInfo(id) {
+	return request({
+		url: '/mobile/passengerApi/mergeInfo',
+		data: Qs.stringify({
+			outOrderNo: id
+		}),
+		method: 'post',
+	})
+}
+//发送短信
+export function sendMsg(params) {
+	return request({
+		url: '/mobile/personInfoApi/getVerifyCode',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//验证验证码并登录
+export function validateCode(params) {
+	return request({
+		url: '/mobile/personInfoApi/validateCode',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//验证验证码并登录
+export function submitAuthentication(params) {
+	return request({
+		url: '/mobile/jobUserApi/submitAuthentication',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+
+export function messageClassify(formData) {
+	return request({
+		url: '/mobile/messageApi/messageClassify',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+
+export function messageList(formData) {
+	return request({
+		url: '/mobile/messageApi/messageList',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+
+
+export function messageDetail(id) {
+	return request({
+		url: '/mobile/messageApi/messageDetail',
+		data: Qs.stringify({
+			messageId: id
+		}),
+		method: 'post',
+	})
+}
+
+export function messageClassifyHR(formData) {
+	return request({
+		url: '/mobile/messageApi/messageClassifyHR',
+		data:formData,
+		method: 'post',
+	})
+}
+
+
+export function changeAgree(formData) {
+	return request({
+		url: '/mobile/messageApi/changeAgree',
+		data:formData,
+		method: 'post',
+	})
+}
+
+
+//推荐简历
+export function positionResumeList(formData) {
+	return request({
+		url: '/mobile/resumeApi/positionResumeList',
+		data:formData,
+		method: 'post',
+	})
+}
+
+//推荐职位
+export function positionRecruitmentList(formData) {
+	return request({
+		url: '/mobile/recruitmentApi/positionRecruitmentList',
+		data:formData,
+		method: 'post',
+	})
+}

+ 273 - 0
apis/finance.js

@@ -0,0 +1,273 @@
+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 queryWithdrawInfo(data) {
+	var url='/mobile/roleSharing/queryWithdrawInfo';
+	return request({
+		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 gunShareDetail(data) {
+	var url='/mobile/roleSharing/gunShareDetail';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function saveGunShare(data) {
+	var url='/mobile/roleSharing/saveGunShare';
+	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 (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/spIncomeStatistics"
+	})
+} 
+
+export function helpList (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: '/mobile/roleSharing/helpList'
+	})
+} 
+
+
+
+
+export function priceList(data) {
+	var url='/mobile/chargingPrice/priceList';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+export function recordMonthData (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordMonthData"
+	})
+} 
+
+export function recordMonthDetailData (data) {
+	 
+	return request({
+		method: 'get',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordMonthDetailData"
+	})
+} 
+
+
+export function recordData (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordData"
+	})
+} 
+
+export function recordDetailData (data) {
+	 
+	return request({
+		method: 'get',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/recordDetailData"
+	})
+} 
+
+
+export function stationsList (data) {
+	 
+	return request({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: "/mobile/roleSharing/stationsList"
+	})
+} 
+
+
+
+export function carDeviceDetail(data) {
+	var url='/mobile/roleSharing/carDeviceDetail';
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 114 - 0
apis/index.js

@@ -0,0 +1,114 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+
+export function test(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/test/post'
+	})
+}
+
+
+export function chargingData(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/charging/chargingData'
+	})
+}
+
+export function marketingData(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/charging/marketingData'
+	})
+}
+export function findChargeData(data) {
+	return request({
+		method: 'get',
+		data: data,
+		url: '/mobile/regUser/findChargeData'
+	})
+}
+
+
+export function personalCenter(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/regUser/personalCenter'
+	})
+}
+export function logout(data) {
+	return request({
+		method: 'get',
+		data: data,
+		url: '/mobile/regUser/logout'
+	})
+}
+
+
+export function stopCharging(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/command/stopCharging'
+	})
+}
+export function startCharging(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/command/startCharging'
+	})
+}
+export function accountRecordData(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/accountRecord/accountRecordData'
+	})
+}
+export function accountDetail(id) {
+	return request({
+		method: 'get',
+		 
+		url: '/mobile/accountRecord/accountDetail?id='+id
+	})
+}
+
+
+export function chargingRecordData(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/chargingRecord/chargingRecordData'
+	})
+}
+export function chargingDetail(id) {
+	return request({
+		method: 'get',
+		 
+		url: '/mobile/chargingRecord/chargingDetail?id='+id
+	})
+}
+
+export function passengerMessageNoReadNum(data) {
+	
+	return request({
+		url: '/mobile/passengerApi/passengerMessageNoReadNum',
+		data:data,
+		method: 'post',
+	})
+}
+  
+  export function chargingDeviceData(data) {
+  	return request({
+  		method: 'post',
+  		data: data,
+  		url: '/mobile/charging/chargingDeviceData'
+  	})
+  }

+ 50 - 0
apis/login.js

@@ -0,0 +1,50 @@
+ import requestWhite from '../utils/requestWhite.js';
+import Qs from 'qs';
+
+ 
+export function findByOpenId(data) {
+	var url='/mobile/regUser/findByOpenId';
+	return requestWhite({
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+export function validateCode(data) {
+	 
+	return requestWhite({
+		method: 'post',
+		data:data ,
+		url: '/mobile/regUser/validateCode'
+	})
+} 
+
+export function getVerifyCode(tel) {
+	 
+	return requestWhite({
+		method: 'post',
+		data:{
+			telephone:tel
+		} ,
+		url: '/mobile/regUser/getVerifyCode'
+	})
+} 
+
+export function passwordLogin(data) {
+	 
+	 var url=""
+	 if(data.form=="job"){
+	 	url='/mobile/jobUserApi/passwordLogin';
+	 }else if(data.form=="hr"){
+	 	url='/mobile/sysUserApi/passwordLogin';
+	 }else{
+	 	return 
+	 }
+	 
+	return requestWhite({
+		method: 'post',
+		data:data ,
+		url: url
+	})
+} 

+ 101 - 0
apis/my.js

@@ -0,0 +1,101 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+export function passengerRecordList(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/passengerRecordList'
+	})
+}
+
+export function updateUserInfo(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/updateUserInfo'
+	})
+}
+
+
+export function problemFeedback(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/problemFeedback'
+		
+	})
+}
+
+export function userPhone(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/userPhone'
+		
+	})
+}
+
+export function userUpdatePhone(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/userUpdatePhone'
+		
+	})
+}
+
+
+
+export function passengerRecordDetail(id) {
+	return request({
+		method: 'post',
+		data: {
+			id:id
+		},
+		url: '/mobile/passengerApi/passengerRecordDetail'
+		
+	})
+}
+
+
+
+export function helpCenterList() {
+	return request({
+		method: 'post',
+	
+		url: '/mobile/passengerApi/helpCenterList'
+	})
+}
+
+export function merchantAppointmentList(data) {
+
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: data,
+		url: '/mobile/chargingAppointment/merchantAppointmentList'
+	})
+}
+
+export function merchantAppointmentDetail(id) {
+
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: {
+			id:id
+		},
+		url: '/mobile/chargingAppointment/merchantAppointmentDetail'
+	})
+}
+
+export function merchantChangeStatus(data) {
+
+	return request({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: data,
+		url: '/mobile/chargingAppointment/merchantChangeStatus'
+	})
+}

+ 36 - 0
apis/weixin.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+ 
+import Qs from 'qs';
+
+//微信支付
+export function wxpay(orderId) {
+	return request({
+		url: '/wxPay/wxJsapiPay',
+		data: {
+			chargingMarketingId: orderId
+		},
+		method: 'post',
+	})
+}
+//根据code换取openid
+export function getDataByCode(code) {
+	return request({
+		url: '/wechat/findUserInfo/' + code,
+		params: {},
+		method: 'get',
+	})
+}
+
+
+
+//获得配置
+export function getConfig() {
+	
+	return request({
+		url: '/wechat/getConfig',
+		data: {
+			url: window.location.href.split('#')[0]
+		},
+		method: 'get',
+	})
+}

+ 0 - 0
assets/css/style.css


+ 211 - 0
assets/font/iconfont.css

@@ -0,0 +1,211 @@
+
+@font-face {
+  font-family: 'custom-icon';  /* Project id 3365301 */
+  src: url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.woff2?t=1653536218510') format('woff2'),
+       url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.woff?t=1653536218510') format('woff'),
+       url('//at.alicdn.com/t/font_3365301_kdd2kr5j2qg.ttf?t=1653536218510') format('truetype');
+}
+.custom-icon {
+  font-family: "custom-icon" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.custom-icon-money-cny-box-fill:before {
+  content: "\e627";
+}
+
+.custom-icon-jiagebaohu:before {
+  content: "\e61e";
+}
+
+.custom-icon-iconfontscan:before {
+  content: "\e61f";
+}
+
+.custom-icon-31wode:before {
+  content: "\e620";
+}
+
+.custom-icon-weixinzhifu:before {
+  content: "\e62a";
+}
+
+.custom-icon-kefu:before {
+  content: "\e621";
+}
+
+.custom-icon-dian:before {
+  content: "\e64d";
+}
+
+.custom-icon-tikuan:before {
+  content: "\e622";
+}
+
+.custom-icon-bofangjilu:before {
+  content: "\e8ad";
+}
+
+.custom-icon-shuaxin:before {
+  content: "\e8b9";
+}
+
+.custom-icon-tuichu:before {
+  content: "\e623";
+}
+
+.custom-icon-dizhi:before {
+  content: "\e67e";
+}
+
+.custom-icon-chongdianzhuang:before {
+  content: "\e653";
+}
+
+.custom-icon-qichexiangguan-chongdianzhan:before {
+  content: "\e637";
+}
+
+.custom-icon-shoujichongdian:before {
+  content: "\e624";
+}
+
+.custom-icon-juli:before {
+  content: "\e625";
+}
+
+.custom-icon-motuoche-diandongche:before {
+  content: "\e626";
+}
+
+.custom-icon-xiayiye:before {
+  content: "\e77c";
+}
+
+.custom-icon-car-fill:before {
+  content: "\e61d";
+}
+
+.custom-icon-chenggong:before {
+  content: "\e668";
+}
+
+.custom-icon-arrow-drop-up-line:before {
+  content: "\e600";
+}
+
+.custom-icon-arrow-left-s-line:before {
+  content: "\e601";
+}
+
+.custom-icon-arrow-up-s-fill:before {
+  content: "\e602";
+}
+
+.custom-icon-arrow-right-s-line:before {
+  content: "\e603";
+}
+
+.custom-icon-article-fill:before {
+  content: "\e604";
+}
+
+.custom-icon-bar-chart-box-fill:before {
+  content: "\e605";
+}
+
+.custom-icon-charging-pile-fill:before {
+  content: "\e606";
+}
+
+.custom-icon-filter-2-fill:before {
+  content: "\e607";
+}
+
+.custom-icon-arrow-up-s-line:before {
+  content: "\e608";
+}
+
+.custom-icon-close-circle-fill:before {
+  content: "\e609";
+}
+
+.custom-icon-information-fill:before {
+  content: "\e60a";
+}
+
+.custom-icon-logout-box-r-fill:before {
+  content: "\e60b";
+}
+
+.custom-icon-message-3-fill:before {
+  content: "\e60c";
+}
+
+.custom-icon-money-cny-circle-line:before {
+  content: "\e60d";
+}
+
+.custom-icon-user-2-fill:before {
+  content: "\e60e";
+}
+
+.custom-icon-question-fill:before {
+  content: "\e60f";
+}
+
+.custom-icon-customer-service-fill:before {
+  content: "\e610";
+}
+
+.custom-icon-time-line:before {
+  content: "\e611";
+}
+
+.custom-icon-refund-fill:before {
+  content: "\e612";
+}
+
+.custom-icon-account-pin-box-fill:before {
+  content: "\e613";
+}
+
+.custom-icon-arrow-down-s-fill:before {
+  content: "\e614";
+}
+
+.custom-icon-arrow-drop-down-fill:before {
+  content: "\e615";
+}
+
+.custom-icon-arrow-drop-down-line:before {
+  content: "\e616";
+}
+
+.custom-icon-arrow-drop-up-fill:before {
+  content: "\e617";
+}
+
+.custom-icon-arrow-drop-right-fill:before {
+  content: "\e618";
+}
+
+.custom-icon-arrow-drop-left-fill:before {
+  content: "\e619";
+}
+
+.custom-icon-arrow-drop-right-line:before {
+  content: "\e61a";
+}
+
+.custom-icon-arrow-down-s-line:before {
+  content: "\e61b";
+}
+
+.custom-icon-arrow-drop-left-line:before {
+  content: "\e61c";
+}
+

+ 7 - 0
assets/font/jptime.css

@@ -0,0 +1,7 @@
+@font-face {
+	font-family: "JPTIME";
+	src:url("@/assets/font/jptime.otf");
+}
+.JPTIME {
+    font-family: JPTIME
+}

BIN
assets/font/jptime.otf


BIN
assets/img/Frame 201.png


BIN
assets/img/Withdrawal_bg.png


BIN
assets/img/bgbg.png


BIN
assets/img/blankpage.png


BIN
assets/img/booked.png


BIN
assets/img/canc.png


BIN
assets/img/charge-0.png


BIN
assets/img/charge-1.png


BIN
assets/img/charge-2.png


BIN
assets/img/charge-3.png


BIN
assets/img/charging_type_1.png


BIN
assets/img/charging_type_3.png


BIN
assets/img/charging_type_bike.png


BIN
assets/img/charging_type_fast.png


BIN
assets/img/charging_type_slow.png


BIN
assets/img/ddc.png


BIN
assets/img/f.png


BIN
assets/img/finished.png


BIN
assets/img/head.png


BIN
assets/img/icon_success.png


BIN
assets/img/index_header_bg.png


BIN
assets/img/logo.png


BIN
assets/img/logo_xiaopengguanjia.png


BIN
assets/img/min_button_select.png


BIN
assets/img/mine_header_bg.png


BIN
assets/img/shenhe.png


BIN
assets/img/暂无数据-缺省页.png


BIN
assets/img/电桩管理.png


+ 153 - 0
bobo-router/README.md

@@ -0,0 +1,153 @@
+# bobo-router
+
+bobo-router 是一个基于uni-app框架的路由拦截插件,本项目借鉴了[uni-simple-router](https://github.com/SilurianYang/uni-simple-router)的思路,并对其进行简化,简化的原因是因为自己比较懒,不想每次新增页面就定义两遍路由表,所以`bobo-router`的特点就是纯粹的路由拦截,不再**定义两遍路由表**。
+
+当然,由于不再定义路由表,也损失了一些能力,比如不能使用命名路由,不能在路由表中自定义路由元信息等。
+
+> 本人不是大神,插件可能会存在各种各样的问题,望大家谨慎使用,并多多担待。
+
+## 安装
+
+下载插件后,在`main.js`中导入即可。
+
+```js
+// main.js
+
+import router from './utils/bobo-router'
+```
+
+## 基本使用
+
+同`uni-simple-router`一样,项目中的路由跳转要全部弃用`uni.navigateTo()`这样的系统跳转方法,转而使用插件提供的`this.$Router.push()`这样的方法。
+
+```js
+// *.vue
+
+// 跳转页面,保留当前页到页面栈,等同于 uni.navigateTo()
+this.$Router.push({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转页面,替换当前页到页面栈,等同于 uni.redirectTo()
+this.$Router.replace({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转页面,清空页面栈,等同于 uni.reLaunch()
+this.$Router.replaceAll({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转 Tabbar,等同于 uni.switchTab()
+this.$Router.pushTab({
+	page: '/pages/index/index',
+	params: {}
+})
+```
+
+> Tips: 
+> 如果不需要传递参数,可以直接使用 this.$Router.push('/pages/index/index')
+
+> 注意:
+> pushTab传递的参数可通过this.$Route.params获取,但h5页面刷新之后就会丢失数据
+
+## 路由拦截
+
+支持路由前置守卫和路由后置守卫,并且提供一个路由跳转失败的回调,可以重写以实现自己的逻辑。
+
+在`bobo-router/index.js`中添加自己的拦截逻辑。
+
+```js
+// ./utils/bobo-router/index.js
+
+// 路由全局拦截器 在这里处理登录、授权等相关操作
+router.beforeEach(function(to, from, next) {
+	console.log('前置守卫')
+	// to.page不存在表示此次路由跳转仅为了执行路由守卫,若不需处理则直接放行,就不会执行任何路由操作了
+	if (from.page === '/pages/plugin/routers/r3' && !to.page) {
+	// 测试小程序跳转
+	// if (from.page === '/pages/index/index' && !to.page) {
+		next({page: '/pages/plugin/routers/r4', params: {
+			message: '我是从路由3刷新跳过来的'
+		}, method: 'redirectTo'})
+	} else {
+		next()
+	}
+})
+
+// 路由后置拦截器 在这里处理用户高频操作信息
+router.afterEach(function (to, from) {
+	console.log('后置守卫')
+})
+
+// 路由跳转出错处理
+router.onError(function(e) {
+	console.log('错误:', e.message || '路由跳转失败')
+})
+```
+
+参数解释:
+
+**to**:目标路由信息,包含`method`路由跳转方式、`page`页面地址和`params`页面参数
+
+> 注:在进入应用的第一个页面或h5刷新页面后会执行路由前置守卫,此时 to 中的属性均为 undefined
+
+**from**:当前路由信息,包含`page`页面地址和`params`页面参数
+
+**next**:下一步操作
+
+- `next(false)` 中断路由跳转
+- `next('/pages/index/index')` 执行指定页面的路由前置守卫,若当前操作指定过跳转方式,则使用该跳转方式,否则使用默认的push进行跳转
+- `next({page:'/pages/index/index',params:{},method:''})` 执行指定页面的路由前置守卫,method传入跳转方式,也可以不指定,效果同直接传入页面地址
+- `next()` 放行 执行跳转操作
+
+## 参数解析
+
+使用本插件的方法去跳转路由,会将对象的第一级属性转换到URL中,深层对象则转为json串放在对应的属性中。
+
+例如:
+
+```js
+// 转换前对象
+{
+	num: 19,
+	numStr: '19',
+	testParams: true,
+	deepObj: {
+		str: 'hahaha'
+	},
+	ignoreFun: function() {
+		console.log('i\'m hide.')
+	},
+	testUndefined: undefined,
+	testNull: null
+}
+
+// 转换后URL
+?num=19&numStr=19&testParams=true&deepObj=%7B"str"%3A"hahaha"%7D&testUndefined=&testNull=
+```
+
+如果要获取当前路由信息,可通过`this.$Route`获取。
+
+```js
+{
+    "path": "/pages/plugin/router?num=19&numStr=19&testParams=true&deepObj={\"str\":\"hahaha\"}&testUndefined=&testNull=",
+    "params": {
+        "num": 19,
+        "numStr": "19",
+        "testParams": true,
+        "deepObj": {
+            "str": "hahaha"
+        },
+        "testNull": null
+    },
+    "page": "/pages/plugin/router",
+    "pageTitle": "路由拦截插件"
+}
+```
+
+> 页面标题 pageTitle 是在页面中的 data(){}代码块中定义了之后才能正常显示,且只能在onload生命周期之后使用。
+> h5端则不需要定义pageTitle,插件可直接获取当前网页标题。

+ 362 - 0
bobo-router/bobo-router.js

@@ -0,0 +1,362 @@
+class Router {
+	constructor(arg) {
+		if (arg && arg.constructor !== Object) {
+			return console.error(`Routing configuration must be an Object`)
+		}
+		Router.$root = this;
+	}
+
+	// 路由跳转方法映射
+	routeMap = {
+		push: 'navigateTo',
+		replace: 'redirectTo',
+		replaceAll: 'reLaunch',
+		pushTab: 'switchTab'
+	}
+
+	/**
+	 * 执行路由跳转
+	 */
+	_pushTo() {
+		return new Promise((resolve, reject) => {
+			let {
+				page,
+				params,
+				method
+			} = this.tempRoute
+			// 对首次进入页面执行路由守卫时如果放行,method page params都为空 此时应该直接中断流程,无需抛出异常
+			if (!method && !page && !params) {
+				return
+			}
+
+			let urlParams = '?'
+			if (!page) {
+				reject(new Error('参数page未填写'))
+				return
+			} else if (params && typeof(params) === 'object') {
+				// 处理参数,转换为url字符串
+				Object.keys(params).forEach(k => {
+					// 深度对象转为json字符串(包含数组)
+					if (typeof(params[k]) === 'object') {
+						if (params[k]) {
+							const json = JSON.stringify(params[k])
+							urlParams += `${k}=${json}&`
+						} else {
+							urlParams += `${k}=&`
+						}
+					} else if (typeof(params[k]) === 'number' || typeof(params[k]) === 'string' || typeof(params[k]) ===
+						'boolean') {
+						// 基础值直接写入
+						urlParams += `${k}=${params[k]}&`
+					} else if (typeof(params[k]) === 'undefined') {
+						urlParams += `${k}=&`
+					}
+				})
+			}
+
+			// 参数组装
+			if (urlParams.length === 1) {
+				urlParams = ''
+			} else {
+				urlParams = urlParams.substr(0, urlParams.length - 1)
+			}
+
+			// 设置路由跳转方式
+			if (!method) {
+				method = 'navigateTo'
+			}
+			if (this.routeMap[method]) {
+				method = this.routeMap[method]
+			}
+
+			// 调用系统跳转方法
+			uni[method]({
+				url: page + urlParams,
+				success: () => {
+					// 执行路由后置守卫
+					if (this._afterEach && typeof(this._afterEach) === 'function') {
+						this._afterEach.call(this, this.tempRoute, this.route)
+					}
+
+					// 更新路由信息
+					this.route = {
+						path: page + urlParams,
+						params: params || {},
+						page
+					}
+					this.tempRoute = null
+					resolve()
+				},
+				fail: (e) => {
+					reject(new Error('路由跳转失败!'))
+				}
+			})
+		})
+	}
+
+	/**动态的导航到一个新 URL 保留浏览历史
+	 * navigateTo
+	 * @param {Object} rule
+	 */
+	push(arg) {
+		const rule = {
+			method: 'navigateTo'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/**动态的导航到一个新 URL 关闭当前页面,跳转到的某个页面。
+	 * redirectTo
+	 * @param {Object} rule
+	 */
+	replace(arg) {
+		const rule = {
+			method: 'redirectTo'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/**动态的导航到一个新 URL 关闭所有页面,打开到应用内的某个页面
+	 * 	reLaunch
+	 * @param {Object} rule
+	 */
+	replaceAll(arg) {
+		const rule = {
+			method: 'reLaunch'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/** 跳转Tabbar
+	 * 	switchTab
+	 * @param {Object} rule
+	 */
+	pushTab(arg) {
+		const rule = {
+			method: 'switchTab'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+
+	/**
+	 * 返回到指定层级页面上
+	 */
+	back(delta = 1) {
+		// 返回上级
+		if (delta.constructor != Number) {
+			this._errorHandler(new Error('返回层级参数必须是一个Number类型且必须大于0:'))
+			return
+		}
+		uni.navigateBack({
+			delta
+		})
+	}
+
+	/**
+	 * 分发路由
+	 * @param {Object} args
+	 */
+	_next() {
+		return new Promise((resolve, reject) => {
+			if (this._beforeEach && typeof(this._beforeEach) === 'function') {
+				// 需要传给守卫 to from next
+				this._beforeEach.call(this, this.tempRoute, this.route, resolve)
+			} else {
+				this._pushTo().catch(e => {
+					reject(e)
+				})
+			}
+		})
+	}
+
+	next(args) {
+		if (args) {
+			// 保存临时数据
+			if (typeof(args) === 'object') {
+				this.tempRoute = {
+					// 第一次调用next一定存在method,后续循环调用可能不会存在,不存在时使用上次缓存的method
+					method: args.method || this.tempRoute.method,
+					page: args.page,
+					params: args.params
+				}
+			} else if (typeof(args) === 'string') {
+				this.tempRoute = {
+					page: args
+				}
+			} else if (!args) {
+				// 中断路由 args = false
+				this.tempRoute = null
+				return
+			}
+
+			if (!this.route) {
+				this.route = {
+					page: '/' + getCurrentPages()[0].route
+				}
+			}
+
+			this._next().then(args => {
+				this.next(args)
+			}).catch(e => {
+				this.tempRoute = null
+				this._errorHandler(e)
+			})
+		} else {
+			this._pushTo().catch(e => {
+				this.tempRoute = null
+				this._errorHandler(e)
+			})
+		}
+	}
+
+	/**
+	 * 应用启动时执行一次路由检查(前置守卫,若通过则不做事情)
+	 */
+	doBeforeHooks() {
+		this.tempRoute = {}
+		this.next({})
+	}
+
+	// 设置路由前置/后置守卫
+	beforeEach(fn) {
+		this._beforeEach = fn
+	}
+	afterEach(fn) {
+		this._afterEach = fn
+	}
+	// 设置路由跳转错误处理
+	onError(fn) {
+		if (fn && typeof(fn) === 'function') {
+			this._errorHandler = fn
+		}
+	}
+
+	// 获取当前路由信息
+	getCurrentRoute() {
+		return this.route
+	}
+
+}
+
+// 路由对象属性定义
+Router.$root = null
+// 当前路由内容
+Router.route = null
+// 临时路由信息
+Router.tempRoute = null
+// 路由前置后置守卫
+Router._beforeEach = null
+Router._afterEach = null
+// 路由跳转错误处理
+Router._errorHandler = function(e) {
+	console.error(e)
+}
+
+Router.install = function(Vue) {
+	Vue.mixin({
+		onLaunch: function() {},
+		onLoad: function(props) {
+			// 首次进入页面时,缓存中不存在当前路由信息,需要初始化路由信息
+			if (!Router.$root.getCurrentRoute()) {
+				const rt = {
+					params: {},
+					page: '/' + getCurrentPages()[0].route
+				}
+				if (props) {
+					Object.keys(props).forEach(k => {
+						// url转的对象全部都是字符串,需要识别其中的对象和基本数据类型
+						try {
+							const obj = JSON.parse(props[k])
+							if (typeof(obj) === 'string') {
+								// 只有字符串还会是字符串,数字、布尔、数组均会转换为正常类型
+								rt.params[k] = props[k]
+							} else {
+								rt.params[k] = obj
+							}
+						} catch (e) {
+							rt.params[k] = props[k]
+						}
+					})
+				}
+				Router.$root.route = rt
+
+				// 执行路由前置守卫
+				Router.$root.doBeforeHooks()
+			}
+
+			// 自动获取页面标题(app端可能获取不到)
+			const pages = getCurrentPages()
+			let pageTitle = pages[pages.length - 1].pageTitle
+			// #ifdef H5
+			if (!pageTitle) {
+				pageTitle = document.title
+			}
+			// #endif
+			Router.$root.route.pageTitle = pageTitle
+		},
+
+		onShow() {
+			if (!getCurrentPages().length) {
+				return
+			}
+			// 获取当前路由信息
+			const pages = getCurrentPages()
+			const page = pages[pages.length - 1]
+			let pageTitle = page.pageTitle
+			const rt = {
+				params: {},
+				page: '/' + page.route,
+			}
+			if (!pageTitle) {
+				// #ifdef H5
+				rt.pageTitle = document.title
+				// #endif
+			} else {
+				rt.pageTitle = pageTitle
+			}
+			
+			const route = Router.$root.route
+			// 若当前页面地址不等于缓存中地址,则更新缓存路由信息
+			if (!route || route.page !== rt.page) {
+				Router.$root.route = rt
+			}
+		}
+	})
+	Object.defineProperty(Vue.prototype, "$Router", {
+		get: function() {
+			return Router.$root
+		}
+	})
+	Object.defineProperty(Vue.prototype, "$Route", {
+		get: function() {
+			return Router.$root.getCurrentRoute()
+		}
+	})
+}
+
+export default Router

+ 73 - 0
bobo-router/index.js

@@ -0,0 +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) => {
+ 	// 逻辑代码
+
+ 	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

+ 92 - 0
components/Tabbar.vue

@@ -0,0 +1,92 @@
+<template >
+	<view>
+		<u-tabbar v-model="myCurrent" :list="tabbarList" 
+		:before-switch="beforeSwitch"
+		:mid-button="true" active-color="#1677ff"></u-tabbar>
+		
+	</view>
+</template>
+
+<script>
+ 	
+ 	export default {
+		name:"tabbarJob",
+		props:{
+			current: 0,
+			id: 0
+		},
+		data() {
+			return {
+				activeColor:"#5098FF",
+				oldindex:this.current,
+				 myCurrent:this.current,
+				 tabbarList: [{
+				 		iconPath: "motuoche-diandongche",
+				 		selectedIconPath: "motuoche-diandongche",
+				 		text: '充电中',
+				 		count: 0,
+				 		isDot: true,
+				 		customIcon: true,
+						pagePath2:"/pages/index/index?k=1",
+						
+				 	},
+				 	{
+				 		iconPath: "/static/img/min_button_select.png",
+				 		selectedIconPath: "/static/img/min_button_select.png",
+				 		text: '充电',
+				 		midButton: true,
+				 		customIcon: true,
+						pagePath2:"/pages/charge/index",
+				 	},
+				 	{
+				 		iconPath: "31wode",
+				 		selectedIconPath: "31wode",
+				 		text: '我的',
+				 		count: 0,
+				 		isDot: false,
+				 		customIcon: true,
+						pagePath2:"/pages/user/index",
+				 	},
+				 ],
+			};
+			
+		},methods:{
+			setcount(c){
+				this.myCurrent=c
+			},
+			beforeSwitch(index){
+			
+				
+				if(index==this.current){
+					return false
+				}
+				var url =this.tabbarList[index].pagePath2;
+				if(index==1){
+						var id =this.carhelp.get("qr-default-id");
+						if(!id){
+							url="/pages/charge/switchCharge?index=1"
+						}
+				}
+				uni.navigateTo({
+					url: url
+				})
+				if(index==1){
+					this.myCurrent=this.oldindex;
+					return false;
+				}else{
+					return true;
+				}
+				
+			},
+			
+		},mounted(){
+			
+		},destroyed(){
+		}
+		
+	}
+</script>
+
+<style>
+	 
+</style>

+ 99 - 0
components/TabbarFinance.vue

@@ -0,0 +1,99 @@
+<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: "money-cny-box-fill",
+						selectedIconPath: "money-cny-box-fill",
+						text: '分润',
+						midButton: true,
+						customIcon: true,
+						pagePath2:"/pagesFinance/share/index",
+						
+					},
+				 	{
+				 		iconPath: "account-pin-box-fill",
+				 		selectedIconPath: "account-pin-box-fill",
+				 		text: '我的',
+				 		count: 0,
+				 		isDot: false,
+				 		customIcon: true,
+						pagePath2:"/pagesFinance/user/index",
+						
+				 	}
+				 ], 
+			};
+			
+		},methods:{
+			setcount(c){
+				this.myCurrent=c
+			},
+			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>

+ 25 - 0
font.js

@@ -0,0 +1,25 @@
+(function() {
+				if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
+					handleFontSize();
+				} else {
+					if (document.addEventListener) {
+						document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
+					} else if (document.attachEvent) {
+						document.attachEvent("WeixinJSBridgeReady", handleFontSize);
+						document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
+					}
+				}
+
+				function handleFontSize() {
+					/*设置网页字体为默认大小*/
+					WeixinJSBridge.invoke('setFontSizeCallback', {
+						'fontSize': 0
+					});
+					/*重写设置网页字体大小的事件*/
+					WeixinJSBridge.on('menu:setfont', function() {
+						WeixinJSBridge.invoke('setFontSizeCallback', {
+							'fontSize': 0
+						});
+					});
+				}
+			})();

+ 225 - 0
iconfont/iconfont.css

@@ -0,0 +1,225 @@
+@font-face {
+ 	font-family: 'iconfont';
+ 	/* project id 3394761 */
+ 	src:
+ 		url('http://at.alicdn.com/t/font_3394761_gttmqpiz6ov.woff2?t=1653637499858') format('woff2'),
+ 		url('http://at.alicdn.com/t/font_3394761_gttmqpiz6ov.woff?t=1653637499858') format('woff'),
+ 		url('http://at.alicdn.com/t/font_3394761_gttmqpiz6ov.ttf?t=1653637499858') format('truetype');
+ }
+
+
+ .iconfont {
+ 	font-family: "iconfont" !important;
+ 	font-size: 16px;
+ 	font-style: normal;
+ 	-webkit-font-smoothing: antialiased;
+ 	-moz-osx-font-smoothing: grayscale;
+ }
+
+ .icon-chongzhi:before {
+ 	content: "\e633";
+ }
+
+ .icon-arrow-right-s-line:before {
+ 	content: "\e600";
+ }
+
+ .icon-arrow-drop-right-line:before {
+ 	content: "\e601";
+ }
+
+ .icon-arrow-left-s-line:before {
+ 	content: "\e602";
+ }
+
+ .icon-arrow-drop-up-fill:before {
+ 	content: "\e603";
+ }
+
+ .icon-arrow-drop-up-line:before {
+ 	content: "\e604";
+ }
+
+ .icon-arrow-up-s-fill:before {
+ 	content: "\e605";
+ }
+
+ .icon-charging-pile-fill:before {
+ 	content: "\e606";
+ }
+
+ .icon-arrow-up-s-line:before {
+ 	content: "\e607";
+ }
+
+ .icon-camera-fill:before {
+ 	content: "\e608";
+ }
+
+ .icon-close-line:before {
+ 	content: "\e609";
+ }
+
+ .icon-charging-pile-line:before {
+ 	content: "\e60a";
+ }
+
+ .icon-close-circle-fill:before {
+ 	content: "\e60b";
+ }
+
+ .icon-compass-3-fill:before {
+ 	content: "\e60c";
+ }
+
+ .icon-customer-service-2-line:before {
+ 	content: "\e60d";
+ }
+
+ .icon-compass-discover-line:before {
+ 	content: "\e60e";
+ }
+
+ .icon-error-warning-line:before {
+ 	content: "\e60f";
+ }
+
+ .icon-home-3-fill:before {
+ 	content: "\e610";
+ }
+
+ .icon-feedback-fill:before {
+ 	content: "\e611";
+ }
+
+ .icon-eye-fill:before {
+ 	content: "\e612";
+ }
+
+ .icon-list-check-2:before {
+ 	content: "\e613";
+ }
+
+ .icon-parking-box-fill:before {
+ 	content: "\e614";
+ }
+
+ .icon-navigation-fill:before {
+ 	content: "\e615";
+ }
+
+ .icon-customer-service-fill:before {
+ 	content: "\e616";
+ }
+
+ .icon-information-fill:before {
+ 	content: "\e617";
+ }
+
+ .icon-plug-line:before {
+ 	content: "\e618";
+ }
+
+ .icon-home-3-line:before {
+ 	content: "\e619";
+ }
+
+ .icon-qr-scan-2-line:before {
+ 	content: "\e61a";
+ }
+
+ .icon-qr-scan-line:before {
+ 	content: "\e61b";
+ }
+
+ .icon-parking-box-line:before {
+ 	content: "\e61c";
+ }
+
+ .icon-question-line:before {
+ 	content: "\e61d";
+ }
+
+ .icon-question-fill:before {
+ 	content: "\e61e";
+ }
+
+ .icon-search-2-line:before {
+ 	content: "\e61f";
+ }
+
+ .icon-road-map-fill:before {
+ 	content: "\e620";
+ }
+
+ .icon-store-3-line:before {
+ 	content: "\e621";
+ }
+
+ .icon-road-map-line:before {
+ 	content: "\e622";
+ }
+
+ .icon-settings-4-fill:before {
+ 	content: "\e623";
+ }
+
+ .icon-user-2-fill:before {
+ 	content: "\e624";
+ }
+
+ .icon-todo-line:before {
+ 	content: "\e625";
+ }
+
+ .icon-todo-fill:before {
+ 	content: "\e626";
+ }
+
+ .icon-user-5-line:before {
+ 	content: "\e627";
+ }
+
+ .icon-user-5-fill:before {
+ 	content: "\e628";
+ }
+
+ .icon-wallet-3-line:before {
+ 	content: "\e629";
+ }
+
+ .icon-arrow-drop-down-fill:before {
+ 	content: "\e62a";
+ }
+
+ .icon-arrow-down-s-fill:before {
+ 	content: "\e62b";
+ }
+
+ .icon-arrow-down-s-line:before {
+ 	content: "\e62c";
+ }
+
+ .icon-wechat-pay-fill:before {
+ 	content: "\e62d";
+ }
+
+ .icon-arrow-drop-down-line:before {
+ 	content: "\e62e";
+ }
+
+ .icon-arrow-drop-left-fill:before {
+ 	content: "\e62f";
+ }
+
+ .icon-alipay-fill:before {
+ 	content: "\e630";
+ }
+
+ .icon-arrow-drop-left-line:before {
+ 	content: "\e631";
+ }
+
+ .icon-arrow-drop-right-fill:before {
+ 	content: "\e632";
+ }

+ 75 - 0
jpsoft.vue

@@ -0,0 +1,75 @@
+<template>
+	<view>
+		openId:<u-input v-model="openId" :border="true"></u-input>
+		<u-button @click="submit" >提交</u-button>
+	</view>
+</template>
+
+<script>
+
+	
+	export default {
+		data() {
+			return {
+				openId:"",
+				form: {
+					phone: '',
+					code: '',
+				},
+				
+			}
+		},
+		onLoad(op) {
+		
+		},
+		methods: {
+			submit(){
+				var NODE_NAME=  process.env['NODE_NAME']
+				if(NODE_NAME=="production"){
+					
+					alert("该功能只支持测试环境")
+				}else{
+					this.carhelp.setOpenId(this.openId);
+					this.carhelp.setToken("");
+					this.carhelp.set("token_tdate","")
+					uni.showToast({
+						title:"修改成功"
+					})
+				}
+				
+				
+			}
+		},
+		onReady() {
+			this.openId=this.carhelp.getOpenId();
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.login-title {
+		display: flex;
+		align-items: center;
+		margin: 25px 30px;
+
+		h3 {
+			font-size: 20px;
+			margin-left: 10rpx;
+			color: #1677ff;
+			font-weight: normal;
+		}
+	}
+
+	.login-main {
+		margin: 0 30px;
+	}
+
+	.login-btn {
+		margin: 30px;
+	}
+
+	.login-code {
+		color: #1677ff;
+	}
+</style>

+ 51 - 0
main.js

@@ -0,0 +1,51 @@
+import Vue from 'vue'
+import App from './App'
+//import MyCommon from '@/components/Common.vue'
+//import CarLoading from '@/components/Loading.vue'
+import  getOpenId from './utils/init.js'
+getOpenId.init()
+
+
+import  mixin from './utils/mixin.js'
+
+Vue.config.ignoredElements.push("wx-open-subscribe") ;
+Vue.prototype.carhelp=mixin
+
+import Vconsole from 'vconsole'
+ //import './router' // 引入路由
+import router from './bobo-router'
+
+window.wx = {}
+
+// main.js
+import uView from "uview-ui";
+Vue.use(uView);
+
+Vue.config.productionTip = false
+App.mpType = 'app'
+
+const app = new Vue({
+
+    ...App
+})
+//Vue.component('my-common',MyCommon)
+//Vue.component('car-loading',CarLoading)
+//Vue.use(mixin)
+Vue.mixin({ 
+    onLoad( option){  
+        if (option.test == 'test') {
+        	let vConsole = new Vconsole()
+        }
+		
+    } ,methods:{
+	
+		gotoUrl(url){
+			uni.navigateTo({
+				url:"/"+url
+			})
+		}
+	}
+})
+
+
+app.$mount()

+ 87 - 0
manifest.json

@@ -0,0 +1,87 @@
+{
+    "name" : "51Parking",
+    "appid" : "__UNI__CA0F0FC",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wxa8954f417fa7c32f",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "devServer" : {
+            "port" : 8080,
+            "https" : false,
+            "disableHostCheck" : true
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
+            }
+        },
+        "title" : "智能充电系统",
+        "router" : {
+            "base" : "./"
+        }
+    }
+}

+ 57 - 0
package.json

@@ -0,0 +1,57 @@
+{
+ "scripts": {
+  "test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
+  "serve": "vue-cli-service serve",
+  "build": "vue-cli-service build",
+  "test": "vue-cli-service build --mode test"
+ },
+ "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",
+  "vconsole": "^3.4.0",
+  "vue-cli": "^2.9.6",
+  "vue-cropper": "^0.5.6",
+  "vuex": "^3.6.2",
+  "weixin-js-sdk": "^1.6.0"
+ },
+ "devDependencies": {
+  "@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
+    }
+   }
+  }
+ }
+}

+ 269 - 0
pages.json

@@ -0,0 +1,269 @@
+{
+	"easycom": {
+			"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+		},
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages	
+		{
+			"name":"充电中",
+			"path": "pages/index/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"充电中",
+			"path": "jpsoft",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"充电",
+			"path": "pages/charge/index",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		
+		
+		{
+			"name":"切换充电桩",
+			"path": "pages/charge/switchCharge",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"充电记录",
+			"path": "pages/charge/chargeList",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"充电详情",
+			"path": "pages/charge/chargeDetails",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"我的",
+			"path": "pages/user/index",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"余额充值",
+			"path": "pages/user/recharge",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		
+		{
+			"name":"充值记录",
+			"path": "pages/user/rechargeList",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},{
+			"name":"充值详情",
+			"path": "pages/user/rechargeDeatils",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"登录",
+			"path": "pages/index/none",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"登录",
+			"path": "pages/login/index",
+			"style": {
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"登录",
+			"path": "pagesFinance/login/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"收益明细",
+			"path": "pagesFinance/detailed/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"收益详情",
+			"path": "pagesFinance/detailed/details",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"分润明细",
+			"path": "pagesFinance/share/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"分润详情",
+			"path": "pagesFinance/share/details",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"收益统计",
+			"path": "pagesFinance/statistics/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"个人中心",
+			"path": "pagesFinance/user/index",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"提现",
+			"path": "pagesFinance/user/withdraw",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"提现记录",
+			"path": "pagesFinance/user/withdrawRecord",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"申请结果",
+			"path": "pagesFinance/user/applyResult",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"申请结果",
+			"path": "pagesFinance/user/chargingDetails",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		
+		{
+			"name":"帮助中心",
+			"path": "pagesFinance/user/help",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"关于我们",
+			"path": "pagesFinance/user/about",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"我的设备",
+			"path": "pagesFinance/user/deviceList",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"我的站点",
+			"path": "pagesFinance/user/stationsList",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+	
+		
+		
+		{
+			"name":"设备详情",
+			"path": "pagesFinance/user/deviceDetails",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"电桩管理",
+			"path": "pagesFinance/user/pileManagement",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"充电枪设置",
+			"path": "pagesFinance/user/myPile",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"我被预约",
+			"path": "pagesFinance/preengaged/preengaged",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
+		{
+			"name":"预约单详情",
+			"path": "pagesFinance/preengaged/preengagedListDetails",
+			"style": {
+			
+				//"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		}
+		
+		
+
+    ],
+	"globalStyle": {
+			"navigationStyle": "custom", // 隐藏系统导航栏
+			"navigationBarTitleText": "智能充电系统",
+			"enablePullDownRefresh": false
+			
+	}
+  
+}

+ 106 - 0
pages/charge/chargeDetails.vue

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

+ 181 - 0
pages/charge/chargeList.vue

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

+ 511 - 0
pages/charge/index.vue

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

+ 158 - 0
pages/charge/switchCharge.vue

@@ -0,0 +1,158 @@
+<template>
+	<view>
+		<u-navbar title="选择充电桩"
+		    :autoBack="false"
+			>
+			
+			<view class="slot-wrap">
+				<view class="navbar-left"></view>				
+				<view class="navbar-right" @click="selectBtn"><span>确定</span></view>
+			</view>
+		</u-navbar>
+		<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+		
+			<img src="@/assets/img/blankpage.png">
+			<p>暂无充电记录</p>
+		</view>
+		<view class="chargeList">
+			<template v-for="(item,i) in list">
+			
+			<view class="chargeList-item " 
+			@click="select=item.id"
+			:class="{
+				'active':item.id==select,
+			}"
+			
+			:key="i">
+				<view class="chargeList-item-row">
+					<u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
+					<p>名称</p>
+					<span>{{item.stationName}} {{item.name}}</span>
+				</view>
+				<view class="chargeList-item-row">
+					<u-icon name="shoujichongdian" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
+					<p>空闲</p>
+					<span>{{item.availableNumOfChannel}}</span>
+				</view>
+			<!-- 	<view class="chargeList-item-row">
+					<u-icon name="juli" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
+					<p>距离</p>
+					<span>荆鹏软件园1号充电桩</span>
+				</view>
+				<view class="chargeList-item-row">
+					<u-icon name="dizhi" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
+					<p>地址</p>
+					<span>荆鹏软件园1号充电桩</span>
+				</view> -->
+			</view>
+				</template>
+				
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/index.js'
+	
+	export default {
+		data() {
+			return {
+				list:[
+					
+				],
+				select:'',
+				selectBtnId:'',
+				index:false,
+			}
+		},
+		onLoad(op) {
+			if(op.id){
+				this.select=op.id;
+				
+			}
+			if(op.index){
+				this.index=true;
+			}
+		},
+		methods: {
+			
+			selectBtn(){
+				this.selectBtnId=this.select;
+				this.carhelp.set("qr-default-id",this.selectBtnId);
+				uni.redirectTo({
+					url:'/pages/charge/index?id='+this.selectBtnId
+				})
+				
+				
+			},
+			getList(){
+				
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+			
+				var data={
+					deviceId:this.select
+				};
+				API.chargingDeviceData(data).then((res) => {
+						 console.log(res)
+					this.list=[
+						...this.list,
+						...res.data.data
+					];
+					this.recordsTotal=res.data.recordsTotal
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		},onReady(){
+			
+			 this.getList()
+		},
+	}
+</script>
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style lang="scss" scoped>
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		flex: 1;
+	}
+	.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+		align-items: center;
+		color:#1677ff;
+	}
+	.chargeList-item{
+		background-color: #fff;
+		padding: 15px;
+		margin: 10px;
+		border-radius: 10px;
+		.chargeList-item-row{
+			display: flex;
+			align-items: center;
+			margin-bottom: 10px;
+			&:last-child{
+				margin-bottom: 0;
+			}
+			p{
+				color:#999;
+				margin: 0 10px;
+			}
+		}
+	}
+	.chargeList-item.active{
+		border: 1px solid #1677ff;
+	}
+</style>

+ 529 - 0
pages/index/index.vue

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

+ 87 - 0
pages/index/none.vue

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

+ 283 - 0
pages/login/index.vue

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

+ 271 - 0
pages/user/index.vue

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

+ 274 - 0
pages/user/recharge.vue

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

+ 92 - 0
pages/user/rechargeDeatils.vue

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

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

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

+ 152 - 0
pages/user/rechargeList.vue

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

+ 281 - 0
pagesFinance/detailed/details.vue

@@ -0,0 +1,281 @@
+<template>
+	<view>
+		<u-navbar >  充电详情</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>{{detail.record&&detail.record.flowNo?detail.record.flowNo:'无充电单号'}}</h4>
+				
+			</view>
+			<view class="details-main">
+				<view class="details-price">
+					<h3>{{detail.income?detail.income:0}}</h3><span>元</span>
+				</view>
+				<p>本单收益</p>
+			</view>
+			<view class="details-row"  v-if="detail.deviceType!='0'" ><p>电费 </p><span>{{detail.electricityAmount?detail.electricityAmount:0}}元</span></view>
+		
+			
+ 			<view class="details-row" v-if="detail.deviceType!='0'" >
+ 				<p>服务费</p>
+   				
+				<span>{{detail.surplusAmount-detail.record.discountAmount}}元
+				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.record.discountAmount}})</span>
+				
+ 				</span>
+ 			</view>
+ 			<view class="details-row" v-if="couponObj&&couponObj.status=='1'" >
+ 				<p>优惠券 </p>
+ 				<span>
+ 					{{couponObj.useText}}	
+ 				</span>
+ 			</view>
+			
+		
+ 		</view>
+		
+	
+	<view class="details">
+		<view class="details-title">
+			<h4>用电明细</h4>
+		</view>
+		<view class="details-row" >
+			<p>总充电量</p>
+			<span>{{detail.electricQuantity/10000}}度</span>
+		</view>
+		<view class="details-row"><p>开始时间</p><span>{{detail.startTime?detail.startTime:detail.endTime}}</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 class="details-row" v-if="detail.unitPrice" >
+			<p>电费单价</p>
+			<span>{{detail.unitPrice}}元/小时</span>
+		</view>
+		
+				
+			<view v-for="(item,i) in chargeDetails" :key="i">
+				<view class="details-row" style=" margin-top: 18px;" >
+					<p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
+					<span >{{item.kwh }}度</span>
+				</view>
+				
+				<view class="details-row" style="display: block;" >
+					<p>
+						<span style="    color: #37393c;">区间定价</span>
+						
+						<span style="float: right; color: #333;font-weight: normal;">{{(item.electricityPrice*100+item.servicePrice*100)/100}}元/度</span>
+						
+					</p>
+						<span class="details-row-sum">{{item.electricityPrice}}元/度(电费)+{{item.servicePrice}}元/度(服务费) </span>
+										
+				</view>
+			</view>
+	</view>
+		
+		
+		<view class="details" v-if="sprList&&sprList.length">
+			<view class="details-title">
+				<h4>分润明细</h4>
+			</view>
+			<view class="details-row" v-for="(item,i) in sprList" :key="i" v-if="item.disProportion">
+				<p>{{item.merchantAccountName}}({{(item.disProportion*100).toFixed(2)}}%)</p>
+				<span>{{item.shareProfitAmount}}元</span>
+			</view>
+		
+		</view>
+		
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>更多信息</h4>
+			</view>
+		
+			<view class="details-row"><p>来源站点</p><span>{{detail.stationName}}</span></view>
+			<view class="details-row"><p>来源充电桩</p><span>{{detail.deviceName}}</span></view>
+			<view class="details-row" ><p>桩号</p><span>{{detail.deviceNo}}</span></view>
+			
+			
+		</view>
+		
+		
+		
+		
+		
+		<view class="detailsBtn">
+			<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 {
+				chargeDetails:[],
+				id:'',
+				sprList:[
+					
+				],
+				detail:{
+					
+				},
+				title:"",
+				 couponObj:null,
+			}
+		},
+		onLoad(op){
+			
+			 		
+			
+			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 ));
+					if(Hour){
+						value += Hour + "小时" 
+					}
+						
+					if(Fen){
+						value += Fen+"分钟"
+					}
+					 
+					
+				}else{
+					value="0分钟";
+				}
+			
+				return value;
+			},
+			back(){
+				uni.navigateBack({
+					
+				})
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.incomeDetails({
+					recordId:this.id
+				}).then((res) => {
+					this.detail=res.data	 
+					//this.sprList=res.data.cdmList	
+					this.couponObj=res.data.userCoupon;
+					this.chargeDetails=JSON.parse(res.data.ChargeDetails)
+					this.sprList=res.data.detailList	
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.detailsBtn{
+		margin: 16px;
+		.detailsBtn-btn{
+			border-color:#185AC6!important;
+			border-radius: 8px!important;
+			background: none!important;
+			color:#185AC6!important;
+		}
+	}
+	.details-title{
+		margin-bottom: 16px;
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			position: relative;
+			padding-left:10px;
+			&::after{
+				content: '';
+				position: absolute;
+				height: 12px;
+				width: 4px;
+				background-color: #27B148;
+				left: 0;
+				top:5px;
+			}
+		}
+	}
+	.details-row{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-top: 15px;
+		
+		p{
+			color: #37393c;
+			font-weight: bold;	
+		}
+	}
+	.details{
+		margin: 16px;
+		padding: 20px;
+		background-color: #fff;
+		border-radius: 8px;
+		.details-head{
+			text-align: center;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			h4{
+				font-size: 18px;
+				font-weight: normal;
+				margin-left: 4px;
+			}
+		}
+		.details-price{
+			margin-top: 28px;
+			display: flex;
+			align-items: flex-end;
+			justify-content: center;
+			h3{
+				font-size: 36px;
+				color:#27B148;
+				line-height: 36px;
+				margin: 0  4px;
+				font-weight: normal;
+			}
+			span{
+				font-size: 20px;
+				color:#27B148;
+			}
+		}
+		.details-main{
+			text-align: center;
+			margin-bottom: 20px;
+			p{
+				color:#777;
+				margin-top: 4px;
+			}
+		}
+	}
+	.details-row-sum{
+		float: right;
+		color: #888;
+		font-size: 12px;
+	
+	}
+</style>

+ 466 - 0
pagesFinance/detailed/index.vue

@@ -0,0 +1,466 @@
+<template>
+	<view>
+		<u-navbar :is-back="false">
+			<view class="navbar">
+				<view class="navbar-tit"  >充电明细</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>
+		<u-popup v-model="popupShow" mode="top" height="80%" >
+			<view class="popup-screen">
+				<view class="screen">
+					<view class="screen-item">
+						<view class="screen-head">查询日期</view>
+						<view class="screen-main2">
+							
+							<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 class="screen-item">
+						<view class="screen-head">充电桩类型</view>
+						<view class="screen-main">
+							<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  "
+							: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  "
+							: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.deviceNo
+							}"
+							
+							 @click="selectdeviceNo=item.deviceNo"
+							class="screen-entry" >{{item.name}}</view>
+						</view>
+					</view>
+				</view>
+				<view class="screen-foot">
+					<view class="screen-btn-l" @click="resetBtn" >重置</view>
+					<view class="screen-btn-r" @click="okbtn" >确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<view class="detailed">
+				<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+					<img src="@/assets/img/blankpage.png">
+					<view>查询为空</view>
+				</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">
+						<h2>{{item.flowNo?item.flowNo:'无充电单号'}}</h2>
+						<p>{{item.stationName}}/{{item.deviceName}}</p>
+					</view>
+					<view class="detailed-item-name"  style="
+							width: 80px;
+						">
+						
+						<h2 style="   text-align: end;">{{item.actualFee?item.actualFee:0}}元</h2>
+						<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(11,16):''}}</p>
+					</view>
+				</view>
+				
+					
+				</view>
+			<u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
+			
+			 
+		</view>
+		<Tabbar :current="1" ref="tabbarMain"></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:"",
+			 
+				form:{
+					
+				},
+				 
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				popupShow: false,
+				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,
+					},
+				],
+				showMap:null,
+				current: 0,
+				value: '',
+				type: 'select',
+				show: false,
+				border: true,
+				stationList:[],
+				stationListSon:[],
+				actionSheetList: [
+					{
+						text: '男'
+					},
+					{
+						text: '女'
+					},
+					{
+						text: '保密'
+					}
+				],
+			}
+		},
+		components: {
+			Tabbar
+		
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onShow() {
+			if(this.$refs.tabbarMain){
+				this.$refs.tabbarMain.setcount(1);
+			}
+		},
+		onLoad() {
+			
+		},
+		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
+				this.form.pageSize=20
+				
+				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=item.totalAmount 
+							
+							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;
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.popup-screen{
+		padding: 20px;
+		position: relative;
+		.screen{
+			padding-bottom: 30px;
+		}
+		.screen-item{
+			margin-bottom: 20px;
+			.screen-head{
+				margin-bottom: 8px;
+				font-size: 16px;
+			}
+			.screen-main{
+				display: flex;
+				//    display: -webkit-box;
+				flex-wrap: wrap;
+			
+			}
+			.screen-entry{
+				width: 29%;
+				padding:6px 0;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+
+
+				background-color: #F2F5FA ;
+				text-align: center;
+				margin-bottom: 10px;
+				border-radius: 3px;
+			
+				margin-right: 6px;
+
+			}
+			.screen-entry.active{
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+		.screen-foot{
+			position: fixed;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			display: flex;
+			height:50px;
+			border-top: 1px solid #ededed;
+			.screen-btn-l{
+				 background-color: #fff;
+				flex: 0.2;
+				text-align: center;
+				line-height: 50px;
+			}
+			.screen-btn-r{
+				flex: 0.8;
+				text-align: center;
+				line-height: 50px;
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+	}
+	.navbar{
+		display: flex;
+		justify-content: space-between;
+		flex: 1;
+		padding: 0 15px;
+	}
+	.navbar-tit{
+		font-size: 20px;
+	}
+	.navbar-screen{
+		display: flex;
+		align-items: center;
+		span{
+			margin-right: 2px;
+			color:#999;
+		}
+	}
+	.detailed-time{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 10px 20px;
+		font-size: 16px;
+		p{
+			color:#666;
+			
+		}
+	}
+	.detailed-item{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 10px 20px;
+		border-bottom: 1px solid #ededed;
+		.detailed-item-name{
+			h4{
+				font-weight: normal;
+			}
+			p{
+				font-size: 15px;
+				margin-top: 4px;
+				color:#A2A9B5;
+				  
+			}
+		}
+		.detailed-item-num{
+			display: flex;
+			align-items: center;
+			h2{
+				margin-right: 4px;
+			}
+		}
+	}
+</style>

+ 287 - 0
pagesFinance/login/index.vue

@@ -0,0 +1,287 @@
+<template>
+	<view>
+		<view class="login-logo">
+			<u-image width="120rpx" height="120rpx" src="../../assets/img/logo.png" border-radius="20"></u-image>
+			<h3>51充电联盟</h3>
+			<p>合伙收益通</p>
+		</view>
+		<view class="login-form">
+			<u-form :model="form" ref="uForm">
+				<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="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="code"  :border-bottom="false">
+						<u-input v-model="form.code"  placeholder="请输入验证码" />
+					</u-form-item>
+				</view>
+				<view class="login-code" >
+					<span  @click="getCode" >{{codeTips}}</span>
+				</view>
+			</u-form>
+			<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start">
+			</u-verification-code>
+			<u-button  style="    margin-top: 30px;"
+			 :class="{
+			 	'login-btn':!(form.phone&&form.code)
+			 }" type="primary"
+			 @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 (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>
+<style>
+	page{
+		background: url(../../assets/img/bgbg.png) no-repeat;
+		background-size: 100%;
+	}
+</style>
+<style lang="scss" scoped>
+	.login-logo{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding-top: 20%;
+		h3{
+			margin:15px 0;
+		}
+	}
+	/deep/.u-form-item{
+		padding: 0;
+		flex: 1;
+	}
+	.login-form{
+		width: 80%;
+		margin:50px auto 0;
+	}
+	.login-form-row{
+		height: 40px;
+		border: 1px solid #c7d1e2;
+		background-color: #fff;
+		border-radius: 10px;
+		display: flex;
+		align-items: center;
+		padding: 2px 10px;
+		margin-bottom: 15px;
+	}
+	.login-code{
+		text-align: right;
+		span{
+			color:#005AD9;
+		}
+	}
+	.login-btn{
+		background-color: #cdd7e8;
+		border-color:#cdd7e8 ;
+		color:#fff;
+		margin-top: 30px;
+	}
+</style>

+ 336 - 0
pagesFinance/preengaged/preengaged.vue

@@ -0,0 +1,336 @@
+<template>
+	<view>
+		<u-navbar title="我被预约">
+			<view class="screen" @click="screenClick">筛选</view>
+		</u-navbar>
+		<view>
+			<view v-if="screenShow" class="preference" :style="screenShow ? 'z-index:1024;top:'+navBarHeight+'px;' : 'z-index:0'"
+				style="width: 100%;">
+				<view class="content-s">
+					<view class="preference_group">
+						<view class="preference_group_item" :class="statusClass == index ? 'active' : ''" v-for="(item,index) in statusList" :key="item.id" @click="statusClick(index,item)">{{item.name}}</view>
+					</view>
+				</view>
+			</view>
+			<u-mask :show="screenShow" @click="screenShow = false" z-index="100"></u-mask>
+		</view>
+		<view class="carNone" v-if="appointmentList.length == 0">
+			<img src="@/assets/img/暂无数据-缺省页.png" alt="">
+			<p>暂无预约</p>
+		</view>
+		<view class="reservation-items" v-for="(item,index) in appointmentList" :key="item.id" @click="gotoUrl('pagesFinance/preengaged/preengagedListDetails?id='+item.id)">
+			<view class="station-name">
+				预约{{item.reserveMinutes}}分钟后充电
+				<view class="toBe-confirmed btn" v-if="item.status == '0'">{{item.statusText}}</view>
+				<view class="confirmed btn" v-if="item.status == '1'">{{item.statusText}}</view>
+				<view class="canceled btn" v-if="item.status == '3'">{{item.statusText}}</view>
+				<view class="have-expired btn" v-if="item.status == '9'">{{item.statusText}}</view>
+				<view class="finished btn" v-if="item.status == '2'">{{item.statusText}}</view>
+				<view class="refused btn" v-if="item.status == '4'">{{item.statusText}}</view>
+				<view class="have-expired btn" v-if="item.status == '5'">已过期</view>
+				<view class="have-expired btn" v-if="item.status == '6'">已过期</view>
+			</view>
+			<view class="details-items">
+				<view class="items">
+					<view class="items-name">
+						预留截止时间
+					</view>
+					<view class="items-content">
+						{{item.endTime}}
+					</view>
+				</view>
+				<view class="items">
+					<view class="items-name">				
+						预计充电时长
+					</view>
+					<view class="items-content">
+						{{item.estimateMinutes != null ? (item.estimateMinutes/60).toFixed(1)+'小时' : '0'}}
+					</view>
+				</view>
+				<view class="items">
+					<view class="items-name">					
+						预约站点
+					</view>
+					<view class="items-content">
+						{{item.stationName}}
+					</view>
+				</view>
+				<view class="items">
+					<view class="items-name">	
+						预约桩号
+					</view>
+					<view class="items-content">
+						{{item.deviceName}}
+					</view>
+				</view>
+				<view class="items">
+					<view class="items-name">
+						充电桩类型
+					</view>
+					<view class="items-content">
+						{{item.typeText}}
+					</view>
+				</view>
+			</view>
+			<view class="button" v-if="item.status == '0'">
+				<u-button class="affirm" shape="circle" @click="sureClick(item)">确认</u-button>
+				<u-button class="refuse" shape="circle" @click="refuseClick(item)">拒绝</u-button>
+			</view>
+		</view>
+		<u-divider  v-if="appointmentList.length == recordsTotal && recordsTotal != 0" style="margin-top: 10px;">已经到底了</u-divider>
+	</view>
+</template>
+
+<script>
+	import * as myApi from '@/apis/my.js'
+	
+	export default {
+		data() {
+			return {
+				screenShow: false,
+				navBarHeight:44,
+				statusList: [
+					{id:"",name:"全部预约单"},
+					{id:"0",name:"待确认"},
+					{id:"1",name:"已预约"},
+					{id:"2",name:"已完成"},
+					{id:"3",name:"已取消"},
+					{id:"4",name:"已拒绝"},
+					{id:"9",name:"已过期"},
+				],
+				statusClass: '',
+				pageIndex: 1,
+				recordsTotal: 0,
+				appointmentList: [],
+				status: '',
+			}
+		},
+		onShow() {
+			this.getAppointmentList(true);
+		},
+		onReachBottom() {
+			if (this.appointmentList.length < this.recordsTotal) {			
+				this.myLoadmore();
+			}
+		},
+		methods: {
+			screenClick() {
+				this.screenShow = !this.screenShow;
+			},
+			statusClick(index,item) {
+				this.statusClass = index;
+				this.status = item.id;
+				this.screenShow = false;
+				this.getAppointmentList(true);
+			},
+			getAppointmentList(bl) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				if (bl) {
+					this.appointmentList = [];
+					this.pageIndex = 1;
+				}
+				myApi.merchantAppointmentList({
+					pageIndex: this.pageIndex,
+					status: this.status
+				}).then((res) => {
+					uni.hideLoading();
+					
+					this.appointmentList = [
+						...this.appointmentList,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			myLoadmore() {
+				this.pageIndex += 1;
+				this.getAppointmentList()
+			},
+			sureClick(item) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				myApi.merchantChangeStatus({
+					id: item.id,
+					status: '1'
+				}).then((res) => {
+					uni.hideLoading();
+					this.getAppointmentList(true);
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			refuseClick(item) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				myApi.merchantChangeStatus({
+					id: item.id,
+					status: '4'
+				}).then((res) => {
+					uni.hideLoading();
+					this.getAppointmentList(true);
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.carNone{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		img{
+			width: 100%;
+			height: 100%;
+		}
+		p{
+			margin-top: -60px;
+		}
+	}
+	.preference {
+		background-color: #ffffff;
+		left: 0rpx;
+		position: absolute
+	
+	}
+	.preference_group_item {
+		padding: 15rpx;
+		text-align: center;
+		color: #777777;
+	}
+	.active {
+		color: #00B962;
+	}
+	.preference_group {
+		padding-bottom: 20rpx;
+	}
+	.content-s{
+		height: 240px;
+		overflow-y:scroll;
+	}
+	page{
+		padding-bottom: 155px;
+	}
+	.screen {
+		margin-left: 85.3%;
+		color: rgba(119, 119, 119, 100);
+		font-size: 12px
+	}
+
+	.btn {
+		width: 60px;
+		height: 24px;
+		line-height: 20px;
+		border-radius: 4px;
+		background-color: rgba(255, 255, 255, 100);
+		font-size: 14px;
+		text-align: center;
+		float: right;
+		margin-right: 24px;
+		margin-top: 12px;
+	}
+// 待确认按钮
+	.toBe-confirmed {
+
+		color: rgba(78, 141, 246, 100);
+		border: 1px solid rgba(78, 141, 246, 100);
+
+	}
+// 已确认按钮
+	.confirmed {
+		border: 1px solid rgba(0, 185, 98, 100);
+		color: rgba(0, 185, 98, 100);
+
+	}
+// 已取消按钮
+	.canceled {
+		border: 1px solid rgba(153, 153, 153, 100);
+		color: rgba(153, 153, 153, 100);
+		;
+	}
+// 已过期/已完成按钮
+	.have-expired,.finished{
+		color: rgba(162, 169, 181, 100);
+		border: 1px solid rgba(162, 169, 181, 100);
+	}
+	
+	// 已拒绝
+	.refused{
+		color: rgba(255, 79, 63, 100);
+		border: 1px solid rgba(255, 79, 63, 100);
+	}
+	.reservation-items {
+		width: 100%;
+		background-color: #fff;
+		padding-left: 14px;
+		margin-bottom: 12px;
+
+		.station-name {
+			line-height: 48px;
+			color: rgba(16, 16, 16, 100);
+			font-size: 20px
+		}
+
+		.details-items {
+			border: 1px solid rgba(238, 242, 240, 100);
+			border-left: none;
+			padding-bottom: 13px;
+
+			.items {
+				display: flex;
+				justify-content: space-between;
+				padding: 12px 14px 0px 0;
+				line-height: 20px;
+			}
+
+		}
+
+		
+
+		.button {
+			height: 56px;
+			padding: 12px 0;
+
+			/deep/.u-btn {
+				height: 32px;
+				line-height: 32px;
+				background-color: rgba(255, 255, 255, 100);
+				color: rgba(153, 153, 153, 100);
+				font-size: 16px;
+				text-align: center;
+				float: right;
+				margin-right: 16px;
+			}
+      .refuse,.delete{
+		  color: #999999;
+	  }
+		.contact,.affirm{
+			color: #00b962;
+		}
+			
+
+			
+		}
+	}
+</style>

+ 461 - 0
pagesFinance/preengaged/preengagedListDetails.vue

@@ -0,0 +1,461 @@
+<template>
+	<view>
+		<u-navbar title="预约单详情" :custom-back="customback"  >
+
+		</u-navbar>
+		
+		<u-alert-tips type="warning" v-if="detail.chargingAppointment.status == '0'" :description="description"></u-alert-tips>
+		<view class="reverse-time">
+			<view class="time" v-if="detail.chargingAppointment.status == '0'">
+				预留{{detail.chargingAppointment.reserveMinutes}}分钟
+			</view>
+			<view class="time" v-if="detail.chargingAppointment.status == '1'">
+				预留{{detail.chargingAppointment.reserveMinutes}}分钟
+				<view class="img-box">
+					<img src="../../assets/img/finished.png" alt="">
+				</view>
+			</view>
+			<view class="time" v-if="detail.chargingAppointment.status == '3'">
+				预留{{detail.chargingAppointment.reserveMinutes}}分钟
+				<view class="img-box">
+					<img src="../../assets/img/canc.png" alt="">
+				</view>
+			</view>
+			<view class="time" v-if="detail.chargingAppointment.status == '2'">
+				预留{{detail.chargingAppointment.reserveMinutes}}分钟
+				<view class="img-box">
+					<img src="../../assets/img/f.png" alt="">
+				</view>
+			</view>
+			<view class="time refused" v-if="detail.chargingAppointment.status == '4'">
+				{{detail.chargingAppointment.statusText}}
+			</view>
+			<view class="time refused" v-if="detail.chargingAppointment.status == '5'">
+				{{detail.chargingAppointment.statusText}}
+			</view>
+			<view class="time refused" v-if="detail.chargingAppointment.status == '6'">
+				{{detail.chargingAppointment.statusText}}
+			</view>
+			<view class="details-item">
+				<view class="item">
+					<view class="item-name">
+						预约单号
+					</view>
+					<view class="item-content">
+						{{detail.chargingAppointment.flowNo}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="item-name">
+						预计开始充电
+					</view>
+					<view class="item-content">
+						{{detail.chargingAppointment.endTime}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="item-name">
+						预计充电时长
+					</view>
+					<view class="item-content">
+						{{(detail.chargingAppointment.estimateMinutes/60).toFixed(1)}}小时
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 充电桩详情 -->
+		<view class="charge-pile">
+			<view class="tel">
+			
+			</view>
+			<view class="box">
+				<view class="name ellipsis">
+					{{detail.chargingDevice.stationName}}/{{detail.chargingDevice.name}}
+				</view>
+				<view class="address ellipsis">
+					{{detail.chargingDevice.address}}
+				</view>
+			</view>
+			<view class="tel">
+
+			</view>
+			<view class="details-item">
+				<view class="item">
+					<view class="item-name">
+						预约单生成时间
+					</view>
+					<view class="item-content">
+						{{detail.chargingAppointment.createTime}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="item-name">
+						电费单价
+					</view>
+					<view class="item-content">
+						{{detail.price.electricityPrice}}元/度
+					</view>
+				</view>
+				<view class="item">
+					<view class="item-name">
+						充电服务费
+					</view>
+					<view class="item-content">
+						{{detail.price.servicePrice}}元/度
+					</view>
+				</view>
+				<view class="item" v-if="detail.chargingAppointment.status == '2'">
+					<view class="item-name">
+						充电订单信息
+					</view>
+					<view class="item-content" @click="gotoUrl('pages/charge/chargeDetails?id='+detail.chargingRecord.id)" style="color: #00B962;">
+						查看
+					</view>
+				</view>
+				<view class="item" v-if="detail.chargingAppointment.status == '4'">
+					<view class="item-name">
+						拒绝时间
+					</view>
+					<view class="item-content">
+						{{detail.chargingAppointment.confirmTime}}
+					</view>
+				</view>
+				<view v-if="detail.chargingAppointment.status == '3'">
+					<view class="item">
+						<view class="item-name">
+							取消时间
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.confirmTime}}
+						</view>
+					</view>
+					<view class="item">
+						<view class="item-name">
+							取消类型
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.remark}}
+						</view>
+					</view>
+				</view>
+				<view v-if="detail.chargingAppointment.status == '5'">
+					<view class="item">
+						<view class="item-name">
+							过期时间
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.confirmTime}}
+						</view>
+					</view>
+					<view class="item">
+						<view class="item-name">
+							过期原因
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.remark}}
+						</view>
+					</view>
+				</view>
+				<view v-if="detail.chargingAppointment.status == '6'">
+					<view class="item">
+						<view class="item-name">
+							过期时间
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.confirmTime}}
+						</view>
+					</view>
+					<view class="item">
+						<view class="item-name">
+							过期原因
+						</view>
+						<view class="item-content">
+							{{detail.chargingAppointment.remark}}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 底部按钮 -->
+		<view class="bottom">
+			<u-button shape='circle' class="refuse-btn" v-if="detail.chargingAppointment.status == '0'" @click="refuseClick(detail.chargingAppointment)">拒绝</u-button>
+			<u-button type="success" shape='circle' v-if="detail.chargingAppointment.status == '0'" @click="sureClick(detail.chargingAppointment)">确认</u-button>
+			<!-- <u-button shape='circle' class="cancel-btn" v-if="detail.chargingAppointment.status == '4' || detail.chargingAppointment.status == '9'">删除订单</u-button> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as myApi from '@/apis/my.js'
+	import {
+		hourDistanceArr,
+		currentTimeStamp,
+		parseUnixTime
+	} from '@/utils'
+	
+	export default {
+		data() {
+			return {
+				description: '等待桩主确认预约单,剩余时间04:59:59',
+				id: '',
+				isback:false,
+				detail: {},
+				estimateMinutes: '',
+			}
+		},
+		onLoad(op) {
+			if(op.notice){
+				this.isback=true
+			}
+			if(op.id) {
+				this.id = op.id;
+				this.getAppointmentDetail();
+			}
+		},
+		methods: {
+			customback(){
+				if(this.isback){
+					uni.reLaunch({
+						url:"/pagesFinance/user/index"
+					})
+				}else{
+					uni.navigateBack({
+						
+					})
+				}
+				
+			},
+			getAppointmentDetail(bl) {
+				if(!bl){
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})	
+				}
+				myApi.merchantAppointmentDetail(this.id).then((res) => {
+					if(!bl){
+						uni.hideLoading()
+					}
+					
+					this.detail = res.data;
+					
+					if(this.detail.chargingAppointment.status=="0"){
+						//this.description= '等待桩主确认预约单,剩余时间'
+						var data=new Date(this.detail.chargingAppointment.createTime).getTime()
+						var c=hourDistanceArr(new Date(),new Date(data+5*60*1000))
+					
+						this.description= '等待桩主确认预约单,剩余时间'+c[1]+'分'+c[2]+"秒";		
+						
+						
+						setTimeout(()=>{
+							this.getAppointmentDetail(true);
+						},2000)
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			sureClick(item) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				myApi.merchantChangeStatus({
+					id: item.id,
+					status: '1'
+				}).then((res) => {
+					uni.hideLoading();
+					this.id = item.id;
+					this.getAppointmentDetail();
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			refuseClick(item) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				myApi.merchantChangeStatus({
+					id: item.id,
+					status: '4'
+				}).then((res) => {
+					uni.hideLoading();
+					this.id = item.id;
+					this.getAppointmentDetail();
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		padding-bottom: 151px;
+		background-color: #f6f8f6;
+	}
+	.tittle-font {
+
+		font-size: 24px;
+		position: fixed;
+		top: 12px;
+		right: 16px;
+		z-index: 99999;
+
+	}
+
+	/deep/.u-alert-desc {
+		width: 100vw;
+		text-align: center;
+		color: #ff5a00;
+	}
+
+	.reverse-time {
+		background-color: #fff;
+		padding: 36px 12px 16px 28px;
+
+		.time {
+			height: 36px;
+			color: rgba(0, 185, 98, 100);
+			font-size: 36px;
+			text-align: center;
+			position: relative;
+			.img-box{
+				width: 72px;
+				height: 72px;
+				img{
+					width: 72px;
+					height: 72px;
+					position: absolute;
+					top: -12px;
+					right: -2px;
+				}
+			}
+		}
+		.refused{
+			color: #666666;
+		}
+		
+
+	}
+
+	.details-item {
+		margin-top: 40px;
+		padding-right: 16px;
+		padding-bottom: 12px;
+
+		.item {
+			display: flex;
+			justify-content: space-between;
+			margin-top: 8px;
+		}
+	}
+
+	// 充电桩详情
+	.charge-pile {
+		background-color: #fff;
+		margin-top: 12px;
+		padding: 0 0 12px 16px;
+
+		.box {
+			position: relative;
+			height: 66px;
+			padding: 12px 0;
+
+			.more {
+				position: absolute;
+				top: 19px;
+				right: 12px;
+				font-size: 24px;
+				color: #b3b3b3;
+			}
+		}
+	
+		.name {
+			width: 90%;
+			line-height: 18px;
+			color: rgba(16, 16, 16, 100);
+			font-size: 18px;
+			font-weight: 600;
+		}
+		.ellipsis{
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			overflow: hidden;
+		}
+
+		.address {
+			width: 90%;
+			line-height: 20px;
+			color: rgba(51, 51, 51, 100);
+			margin-top: 4px;
+		}
+
+		// 联系电话
+		.tel {
+			line-height: 48px;
+			display: flex;
+			justify-content: space-between;
+			border: 1px solid #eef2f0;
+			border-left: none;
+			position: relative;
+
+			.tel-num {
+				width: 50%;
+			}
+
+			.more2 {
+				display: inline-block;
+				font-size: 24px;
+				color: #b3b3b3;
+				height: 48px;
+				position: absolute;
+				top: 1px;
+				right: 12px;
+
+			}
+		}
+
+		.item {
+			margin-top: 20px;
+		}
+	}
+
+
+// 按钮
+.bottom{
+	width: 100%;
+	height: 56px;
+	position: fixed;
+	bottom: 0;
+	background-color: #fff;
+	display: flex;
+	.refuse-btn{
+		background-color: #DBDBDB;
+	}
+	.u-btn{
+		width: 44%;
+		height: 40px;
+		margin: auto;
+		font-size: 18px;
+		
+	}
+	.cancel-btn{
+		width: 91.4%;
+		background-color: #dbdbdb;
+		color: #666666
+	}
+}
+</style>

+ 283 - 0
pagesFinance/share/details.vue

@@ -0,0 +1,283 @@
+<template>
+	<view>
+		<u-navbar >分润详情</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>{{detail.flowNo?detail.flowNo:'无充电单号'}}</h4>
+			</view>
+			<view class="details-main">
+				<view class="details-price">
+					<h3>{{detail.income}}元</h3>
+				</view>
+				<p>分润金额</p>
+			</view>
+	
+		
+			<view class="details-row" >
+				<p>订单金额</p>
+				<span>{{detail.actualFee  }}元</span>
+			</view>
+			<view class="details-row"  v-if="chargeDetails"  >
+				<p>电费金额</p>
+				<span>{{detail.electricityAmount }}元</span>
+			</view>
+			<view class="details-row"  v-if="chargeDetails"  >
+				<p>服务费</p>
+				<span>{{detail.surplusAmount-detail.discountAmount}}元
+				<span v-if="couponObj&&couponObj.status=='1'">({{detail.surplusAmount}}-{{detail.discountAmount}})</span>
+				
+				</span>
+			</view>
+			<view class="details-row" v-if="couponObj&&couponObj.status=='1'" >
+				<p>优惠券 </p>
+				<span>
+					{{couponObj.useText}}	
+				</span>
+			</view>
+			
+		
+			
+		</view>
+		<view class="details">
+			<view class="details-title">
+				<h4>用电明细</h4>
+			</view>
+			<view class="details-row" >
+				<p>总充电量</p>
+				<span>{{detail.electricQuantity/10000}}度</span>
+			</view>
+					<view class="details-row" v-if="!chargeDetails" >
+						<p>电费单价</p>
+						<span>{{detail.unitPrice}}元/小时</span>
+					</view>
+					<view class="details-row"><p>充电时长</p><span>{{getPercent(detail.chargingMinute)}}</span></view>
+					
+				<view v-for="(item,i) in chargeDetails" :key="i">
+					<view class="details-row" style=" margin-top: 18px;" >
+						<p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
+						<span >{{item.kwh }}度</span>
+					</view>
+					
+					<view class="details-row" style="display: block;" >
+						<p>
+							<span style="    color: #37393c;">区间定价</span>
+							
+							<span style="float: right; color: #333;font-weight: normal;">{{(item.electricityPrice*100+item.servicePrice*100)/100}}元/度</span>
+							
+						</p>
+							<span class="details-row-sum">{{item.electricityPrice}}元/度(电费)+{{item.servicePrice}}元/度(服务费) </span>
+											
+					</view>
+				</view>
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>分润明细</h4>
+			</view>
+			<view class="details-row" v-for="(item,i) in frmxList" :key="i" v-if="item.disProportion" >
+				<p>{{item.merchantAccountName}}({{(item.disProportion*100).toFixed(2)}}%)</p>
+				<span>{{item.shareProfitAmount}}元</span>
+			</view>
+		
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>更多信息</h4>
+			</view>
+			<view class="details-row"><p>来源站点</p><span>{{detail.stationName}}</span></view>
+			<view class="details-row"><p>来源充电桩</p><span>{{detail.deviceName}}</span></view>
+			<view class="details-row"><p>发放时间</p><span>{{detail.createTime}}</span></view>
+ 		</view>
+		<view class="detailsBtn">
+			<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 {
+				chargeDetails:[],
+				data:{},
+				id:'',
+				frmxList:[
+					
+				],
+				couponObj:null,
+				detail:{
+					
+				},
+				title:"",
+				 
+			}
+		},
+		onLoad(op){
+			
+			this.data.detailId=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+"分钟"
+					if(Hour){
+						value += Hour + "小时" 
+					}
+						
+					if(Fen){
+						value += Fen+"分钟"
+					}
+				}
+			
+				return value;
+			},
+			showDateMoth(date){
+				
+				var back=date;
+				if(date){
+					var k=	date.slice(5,6)
+					console.log(k)
+					if(k=='0'){
+						back=	date.slice(6,7)
+					}else{
+						back=	date.slice(5,7)
+					}
+					
+					
+				}
+				return back;
+			},
+		 
+			back(){
+				uni.navigateBack({
+					
+				})
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.recordDetailData(this.data).then((res) => {
+					this.detail=res.data
+						this.couponObj=res.data.userCoupon;
+						
+					 this.chargeDetails=JSON.parse(res.data.ChargeDetails)
+					 console.log( this.chargeDetails)
+					this.frmxList=res.data.detailList	 
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.detailsBtn{
+		margin: 16px;
+		.detailsBtn-btn{
+			border-color:#185AC6!important;
+			border-radius: 8px!important;
+			background: none!important;
+			color:#185AC6!important;
+		}
+	}
+	.details-title{
+		margin-bottom: 16px;
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			position: relative;
+			padding-left:10px;
+			&::after{
+				content: '';
+				position: absolute;
+				height: 12px;
+				width: 4px;
+				background-color: #27B148;
+				left: 0;
+				top:5px;
+			}
+		}
+	}
+	.details-row{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-top: 15px;
+	
+				p{
+					color: #37393c;
+					font-weight: bold;	
+				}
+
+	}
+	.details-row-sum{
+		float: right;
+		color: #888;
+		font-size: 12px;
+	
+	}
+	.details{
+		margin: 16px;
+		padding: 20px;
+		background-color: #fff;
+		border-radius: 8px;
+		.details-head{
+			text-align: center;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			h4{
+				font-size: 18px;
+				font-weight: normal;
+				margin-left: 4px;
+			}
+		}
+		.details-price{
+			margin-top: 28px;
+			display: flex;
+			align-items: flex-end;
+			justify-content: center;
+			h3{
+				font-size: 36px;
+				color:#27B148;
+				line-height: 36px;
+				margin: 0  4px;
+				font-weight: normal;
+			}
+			span{
+				font-size: 20px;
+				color:#27B148;
+			}
+		}
+		.details-main{
+			text-align: center;
+			margin-bottom: 20px;
+			p{
+				color:#777;
+				margin-top: 4px;
+			}
+		}
+	}
+</style>

+ 529 - 0
pagesFinance/share/index.vue

@@ -0,0 +1,529 @@
+<template>
+	<view>
+		<u-navbar :is-back="false">
+			<view class="navbar">
+				<view class="navbar-tit"  >分润记录</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>
+		<u-popup v-model="popupShow" mode="top" height="80%">
+			<view class="popup-screen">
+				<view class="screen">
+					<view class="screen-item">
+						<view class="screen-head">查询日期</view>
+						<view class="screen-main2">
+							
+							<u-calendar v-model="showdate" mode="date" @change="changedate"></u-calendar>
+							
+							<u-input :value="queryDate?queryDate:'选择时间筛选'" :type="type" :border="border" @click="showdate = true" />
+						<!-- 	
+							<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>
+						 --></view>
+					</view>
+					<view class="screen-item">
+						<view class="screen-head">充电桩类型</view>
+						<view class="screen-main">
+							<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  "
+							: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  "
+							: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.deviceNo
+							}"
+							
+							 @click="selectdeviceNo=item.deviceNo"
+							class="screen-entry" >{{item.name}}</view>
+						</view>
+					</view>
+				</view>
+				<view class="screen-foot">
+					<view class="screen-btn-l"
+					 @click="resetBtn" >重置</view>
+					<view class="screen-btn-r" @click="okbtn" >确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<view class="detailed">
+				<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+					<img src="@/assets/img/blankpage.png">
+					<view>查询为空</view>
+				</view>
+				
+				<view class="detailed-list" v-for="(item ,index) in list"
+				@click="gotoUrl('pagesFinance/share/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">
+							<h2>{{item.flowNo?item.flowNo:'无充电单号'}}</h2>
+							<p>{{item.stationName}}/{{item.deviceName}}</p>
+						</view>
+						<view class="detailed-item-name"  style="
+								width: 80px;
+							">
+							
+							<h2 style="   text-align: end;">{{item.shareProfitAmount}}元</h2>
+							<p style="   text-align: end;" >{{item.createTime?item.createTime.slice(10):''}}</p>
+						</view>
+						
+					</view>
+					<view  class="product_tip" v-if="item.status=='1'">
+						<view class="product_tip_bg"></view>
+						<p>已提现</p>
+					</view>
+				</view>
+			<u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
+			
+			 
+		</view>
+		<Tabbar  ref="tabbarMain" :current="2"></Tabbar>
+ 	</view>
+</template>
+
+<script>
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	import {
+		
+		currentTimeStamp,
+		parseUnixTime
+	} from '@/utils'
+	
+	export default {
+		data() {
+			return {
+				showdate: false,
+				startTime: "",
+				queryDate:"",		
+				endTime: "",
+				selecttype:"",
+				selectstationId:"",
+				selectdeviceNo:"",
+				title:"",
+				year:"",
+				startyear:"",
+				endyear:"",
+				params: {
+			 					year: true,
+			 					month: false,
+			 					day: false,
+			 					hour: false,
+			 					minute: false,
+			 					second: false,
+								// timestamp: true,
+			 	},
+				form:{
+					
+				},
+				 
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				popupShow: false,
+				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,
+					},
+				],
+				showMap:null,
+				current: 0,
+				value: '',
+				type: 'select',
+				show: false,
+				border: true,
+				stationList:[],
+				stationListSon:[],
+				actionSheetList: [
+					{
+						text: '男'
+					},
+					{
+						text: '女'
+					},
+					{
+						text: '保密'
+					}
+				],
+			}
+		},
+		components: {
+			Tabbar
+		},
+		onShow(){
+			if(this.$refs.tabbarMain){
+				this.$refs.tabbarMain.setcount(2);
+			}
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onLoad() {
+			// this.queryDate=parseUnixTime(new Date(),"{y}-{m}-{d}")
+			 
+			this.startyear=new Date().getFullYear()
+			console.log(this.startyear)
+			this.endyear=this.startyear-3
+			console.log(this.endyear)
+		},
+		onReady() {
+			
+			this.getList()
+			this.getStation()
+			
+		},
+		methods: {
+			showDateMoth(date){
+				
+				var back=date;
+				if(date){
+					var k=	date.slice(5,6)
+					console.log(k)
+					if(k=='0'){
+						back=	date.slice(6,7)
+					}else{
+						back=	date.slice(5,7)
+					}
+					
+					
+				}
+				return back;
+			},
+			changedate(e) {
+				console.log(e)
+				this.queryDate=e.result
+				
+				
+			},
+			resetBtn(){
+			//	this.queryDate=parseUnixTime(new Date(),"{y}-{m}-{d}")
+				
+				this.year=""
+				 this.startTime=""
+				 this.endTime=""
+				this.selecttype=""
+				this.selectstationId=""
+				this.selectdeviceNo=""
+				this.pageIndex = 1;
+				this.form = {
+					queryDate:"",
+				 
+					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 = {
+					queryDate:this.queryDate,
+					
+					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
+				this.form.pageSize=20
+				
+				API.recordData(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=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;
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	
+	.product_tip{
+		    position: relative;
+		    top: -75px;
+		    right: 0;
+		  
+		    text-align: right;
+	 
+	  p{
+	    font-size: 24rpx;
+	    color: #ffffff;
+	    transform: rotate(45deg);
+	    position: absolute;
+	    top: 10rpx;
+	    right: 0rpx;
+	  }
+	  .product_tip_bg{
+	    width: 0;
+	    height: 0;
+	    border-bottom: 52rpx solid #53b56d;
+	    border-right: 52rpx solid transparent;
+	    border-left: 52rpx solid transparent;
+	    transform: rotate(45deg);
+	    position: absolute;
+	    top: -7rpx;
+	    right: -29rpx;
+	  }
+	}
+	
+	
+	.popup-screen{
+		padding: 20px;
+		position: relative;
+		.screen{
+			padding-bottom: 30px;
+		}
+		.screen-item{
+			margin-bottom: 20px;
+			.screen-head{
+				margin-bottom: 8px;
+				font-size: 16px;
+			}
+			.screen-main{
+				 // display: -webkit-box;
+				display: flex;
+				flex-wrap: wrap;
+			}
+			.screen-entry{
+				width: 29%;
+				padding:6px 0;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background-color: #F2F5FA ;
+				text-align: center;
+				margin-bottom: 10px;
+				border-radius: 3px;
+				margin-right: 6px;
+			}
+			.screen-entry.active{
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+		.screen-foot{
+			position: fixed;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			display: flex;
+			height:50px;
+			border-top: 1px solid #ededed;
+			.screen-btn-l{
+				background-color: #fff;
+				flex: 0.2;
+				text-align: center;
+				line-height: 50px;
+			}
+			.screen-btn-r{
+				flex: 0.8;
+				text-align: center;
+				line-height: 50px;
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+	}
+	.navbar{
+		display: flex;
+		justify-content: space-between;
+		flex: 1;
+		padding: 0 15px;
+	}
+	.navbar-tit{
+		font-size: 20px;
+	}
+	.navbar-screen{
+		display: flex;
+		align-items: center;
+		span{
+			margin-right: 2px;
+			color:#999;
+		}
+	}
+	.detailed-time{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 10px 20px;
+		font-size: 16px;
+		p{
+			color:#666;
+		}
+	}
+	.detailed-item{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 10px 20px;
+		border-bottom: 1px solid #ededed;
+		.detailed-item-name{
+			h4{
+				font-weight: normal;
+			}
+			p{
+				font-size: 15px;
+				margin-top: 4px;
+				color:#A2A9B5;
+			}
+		}
+		.detailed-item-num{
+			display: flex;
+			align-items: center;
+			h2{
+				margin-right: 4px;
+			}
+		}
+	}
+</style>

+ 570 - 0
pagesFinance/statistics/index.vue

@@ -0,0 +1,570 @@
+<template>
+	<view>
+		<u-navbar :is-back="false" :border-bottom="false" :background="background">
+			<view class="navbar-tit">{{title}}</view>
+		</u-navbar>
+		<view class="statisticsData"  >
+			<view class="statisticsData-item">
+					<h3 style="font-size: 20px;">{{info.merchantAccountName}}</h3>
+			</view>
+			<view class="statisticsDataMain">
+				<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="#637AA2" size="36"></u-icon>
+						
+					</view>
+					<view class="statisticsData-main">
+						<h2>{{indexData.todayAmount}}元</h2>
+					</view>
+					<view class="statisticsData-foot">
+						<p>昨日流水</p>
+						<h2 style="margin-left: 10px;">{{indexData.yesterdayAmount}}元</h2>
+					</view>
+				</view>
+				<view class="statisticsData-item">
+					<view >
+						<h3>&nbsp;</h3>
+					</view>
+					<view class="statisticsData-head">
+						<p>今日充电笔数</p>
+					</view>
+					<view class="statisticsData-main">
+						<h2>{{indexData.todayEQNum}}笔</h2>
+					</view>
+					<view class="statisticsData-foot">
+						<p>本月流水</p>
+						<h2 style="margin-left: 10px;">{{indexData.thisMonthAmount}}元</h2>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-popup v-model="popupShow" mode="top" height="80%">
+			<view class="popup-screen">
+				<view class="screen">
+					<view class="screen-item">
+						<view class="screen-head">查询日期</view>
+						<view class="screen-main2">
+							
+							<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 class="screen-item">
+						<view class="screen-head">充电桩类型</view>
+						<view class="screen-main">
+							<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  "
+							: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  "
+							: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.deviceNo
+							}"
+							
+							 @click="selectdeviceNo=item.deviceNo"
+							class="screen-entry" >{{item.name}}</view>
+						</view>
+					</view>
+				</view>
+				<view class="screen-foot">
+					<view class="screen-btn-l"
+					 @click="resetBtn" >重置</view>
+					<view class="screen-btn-r" @click="okbtn" >确定</view>
+				</view>
+			</view>
+		</u-popup>
+		
+		<view class="statisticsChart">
+			<view class="statisticsChart-head">
+				<h4  >流水占比</h4>
+				 <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>
+			<view class="statisticsChart-main" >
+<!-- 				<u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
+ -->				
+				<view class="statisticsChart-time" style="
+    text-align: center; margin-bottom: 5px;
+">
+					<p >{{startTime}} 至 {{endTime}} </p>
+				
+				</view>
+					<u-subsection   :list="subsection" @change="changesub" :current="current" button-color="#2E7Dff"
+						active-color="#fff"></u-subsection>
+						
+				 
+		
+				<cover-view id="pieEcharts" style="min-height:250px;">
+
+				</cover-view>
+			</view>
+		</view>
+			<Tabbar :current="0"  ref="tabbarMain" ></Tabbar>
+<!-- 		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
+ -->	</view>
+</template>
+
+<script>
+	import Tabbar from '@/components/TabbarFinance.vue'
+	import * as API from '@/apis/finance.js'
+	 import * as echarts from "echarts";
+	//require("@/apis/echarts-5-3.min.js")
+	//import * as echarts from "@/apis/echarts-5-3.min.js";
+	 import {
+		beforeTimeStamp,
+		currentTimeStamp,
+		parseUnixTime
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				form:{},
+				selecttype:"",
+				selectstationId:"",
+				selectdeviceNo:"",
+				
+				popupShow:false,
+				info:{},
+				title:"",
+				showdate: false,
+				startTime: "",
+				indexData:{},
+				endTime: "",
+				myChart: null,
+				subsection: [{
+						name: '金额'
+					},
+					{
+						name: '笔数'
+					}
+				],
+			stationList:[],
+			stationListSon:[],
+				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'
+				},
+			 value: '',
+			 type: 'select',
+			 show: false,
+			 border: true,
+			}
+		},
+		onShow(){
+			if(this.$refs.tabbarMain){
+				this.$refs.tabbarMain.setcount(0);
+			}
+		},
+		onLoad() {
+			this.title="收益统计"
+			 this.info=this.carhelp.getPersonInfo("merchantUser")
+			 
+		},
+		components: {
+			Tabbar
+		
+		},
+		onReady() {
+			this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+			this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+			this.getData()
+			this.getStation()
+		},
+		methods: {
+			getStation(bl) {
+				
+				API.stationList().then((res) => {
+					
+					this.stationList = res.data.stationList
+					this.stationListSon=res.data.deviceList	
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			resetBtn(){
+				this.startTime = parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+				this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+				
+			 
+			 
+				this.selecttype=""
+				this.selectstationId=""
+				this.selectdeviceNo=""
+				this.pageIndex = 1;
+				this.form = {
+				 
+				 
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.popupShow=false;
+				this.list = [];
+					this.getData()
+				
+			},
+			okbtn(){
+				this.popupShow=false;
+				this.pageIndex = 1;
+				
+				this.form = {
+				 
+					
+					pageIndex: this.pageIndex,
+					type:this.selecttype,
+					stationId:this.selectstationId,
+					deviceNo:this.selectdeviceNo,
+				};
+				this.list = [];
+					this.getData()
+			},
+			getData(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				//this.form.pageIndex=this.pageIndex
+				
+				this.form.startDate=this.startTime,
+				this.form.endDate=this.endTime 
+				
+				API.spIncomeStatistics(this.form).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
+			
+				 
+			},
+			getPie() {
+				
+				var list=this.indexData.pieChart;
+				var getData=[];
+				var unit=this.current?'笔':'元'
+				list.forEach(item=>{
+					 var value=this.current?item.eqNum:item.amount
+					 if(value){
+						 getData.push({
+						 	value: value,
+						 	name: item.deviceName
+						 })
+					 }
+					
+				})
+				
+				if (!this.myChart) {
+					this.myChart = echarts.init(document.getElementById('pieEcharts'));
+
+				}
+				// 指定图表的配置项和数据
+				var option = {
+					tooltip: {
+						trigger: 'item',
+					  formatter: '{b} <br/> {c}'+unit,
+						position:function(point,params,dom,rect,size){
+							return ['10%','0%']
+						}
+
+					},
+					
+					series: [{
+						//name: 'Access From',
+						type: 'pie',
+						radius: '40%',
+						data: getData,
+						emphasis: {
+							itemStyle: {
+								shadowBlur: 10,
+								shadowOffsetX: 0,
+								shadowColor: 'rgba(0, 0, 0, 0.5)'
+							}
+						},
+						
+						label:{
+					
+							fontWeight:"bold",
+							fontSize:14,
+						}
+					}]
+				};
+
+				// 使用刚指定的配置项和数据显示图表。
+				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>
+	
+	 
+	.popup-screen{
+		padding: 20px;
+		position: relative;
+		.screen{
+			padding-bottom: 30px;
+		}
+		.screen-item{
+			margin-bottom: 20px;
+			.screen-head{
+				margin-bottom: 8px;
+				font-size: 16px;
+			}
+			.screen-main{
+				display: flex;
+				//    display: -webkit-box;
+				flex-wrap: wrap;
+			
+			}
+			.screen-entry{
+				width: 29%;
+				padding:6px 0;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+	
+	
+				background-color: #F2F5FA ;
+				text-align: center;
+				margin-bottom: 10px;
+				border-radius: 3px;
+			
+				margin-right: 6px;
+	
+			}
+			.screen-entry.active{
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+		.screen-foot{
+			position: fixed;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			display: flex;
+			height:50px;
+			border-top: 1px solid #ededed;
+			.screen-btn-l{
+				 background-color: #fff;
+				flex: 0.2;
+				text-align: center;
+				line-height: 50px;
+			}
+			.screen-btn-r{
+				flex: 0.8;
+				text-align: center;
+				line-height: 50px;
+				background-color: #185AC6;
+				color:#fff;
+			}
+		}
+	}
+	.navbar-tit {
+		color: #fff;
+		font-size: 20px;
+		padding-left: 15px;
+	}
+
+	.statisticsData {
+		background-color: #fff;
+		margin: 12px;
+	
+		padding: 12px;
+		border-radius: 8px;
+	
+		margin-top: 80px;
+	}
+
+	.statisticsDataMain {
+	
+		display: flex;
+	
+	}
+	.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:10px 16px 16px 16px;
+			border-radius: 8px;
+		}
+	}
+</style>

+ 63 - 0
pagesFinance/user/about.vue

@@ -0,0 +1,63 @@
+<template>
+	<view>
+		<u-navbar title="关于我们"></u-navbar>
+		<u-cell-group>
+			<u-cell-item title="平台介绍"></u-cell-item>
+			<u-cell-item title="用户注册协议"></u-cell-item>
+			<u-cell-item title="隐私协议"></u-cell-item>
+			<u-cell-item title="证照信息"></u-cell-item>
+		</u-cell-group>
+		<view class="code">
+			<h4>分享公众号给好友</h4>
+			<view class="code-img">
+				<img src="../../assets/img/logo.png" alt="">
+				<p>微信扫码关注</p>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				form: {
+					name: '',
+					intro: '',
+				},
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.code{
+		margin-top: 10px;
+		background-color: #fff;
+		padding: 16px;
+		.code-img{
+			text-align: center;
+			margin-top: 10px;
+			p{
+				
+			}
+		}
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+		}
+		img{
+			height: 120px;
+			width: 120px;
+		}
+	}
+</style>

+ 99 - 0
pagesFinance/user/applyResult.vue

@@ -0,0 +1,99 @@
+<template>
+	<view>
+		<u-navbar title="申请结果"></u-navbar>
+		<view class="applyResult">
+			<u-icon name="chenggong" custom-prefix="custom-icon" color="#27B148" size="150"></u-icon>
+			<h3>申请成功</h3>
+			<p v-if="value">申请提现 ¥{{value}}元</p>
+		</view>
+		<view class="applySpeed">
+			<view class="applySpeed-item">
+				<u-icon name="time-line" custom-prefix="custom-icon" color="#185AC6" size="48"></u-icon>
+				<p>预计3个工作日内确认提现金额</p>
+			</view>
+			<view class="applySpeed-item">
+				<u-icon name="money-cny-circle-line" custom-prefix="custom-icon" color="#185AC6" size="48"></u-icon>
+				<p>预计2个工作日内金额到账</p>
+			</view>
+		</view>
+		<view class="applyBtn">
+			<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>
+<style>
+	
+</style>
+<style lang="scss" scoped>
+	.applyResult{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		margin: 36px 0;
+		h3{
+			margin-top: 20px;
+		}
+		p{
+			color: #999;
+			margin-top: 4px;
+		}
+	}
+	.applySpeed{
+		margin: 0 72px;
+	}
+	
+	.applySpeed-item{
+		display: flex;
+		margin-bottom: 24px;
+		align-items: center;
+		position: relative;
+		&:after{
+			content: '';
+			position: absolute;
+			width: 1px;
+			height: 18px;
+			background-color: #185AC6;
+			left:12px;
+			top: 26px;
+		}
+		&:last-child:after{
+			background: none;
+		}
+		p{
+			margin-left: 8px;
+		}
+	}
+	.applyBtn{
+		margin: 36px;
+	}
+	.applyBtn-btn{
+		background-color: #185AC6;
+		border-color:#185AC6 ;
+		border-radius: 8px;
+	}
+</style>

+ 298 - 0
pagesFinance/user/chargingDetails.vue

@@ -0,0 +1,298 @@
+<template>
+	<view>
+		<u-navbar title="充电价格详情"></u-navbar>
+
+		<!-- 主体 -->
+		<!-- 充电桩信息 -->
+		<view class="main">
+			<!-- 收费标准 -->
+						<view class="rates" v-if="prices&&prices.length">
+							<view class="rates-title">
+								<view class="title-left">
+									收费标准
+								</view>
+								<view class="title-right">
+									充电功率计费
+								</view>
+			
+							</view>
+							<!-- 时段分类 -->
+							<view class="time-rates">
+								
+								<view class="time-part" v-for="(item,index) in prices" :key="index">
+									<view class="part-top">
+										<view class="time">
+											{{item.minPower}}W-{{item.maxPower}}W
+										</view>
+										<view class="price">
+			
+											<text class="price-number">{{item.price}}</text>
+											<text class="price-unit">元每小时</text>
+										</view>
+									</view>
+									<!-- <view class="part-bottom">
+										<view class="unitPrice-servicePrice">
+											充电单价:¥{{item.costPrice}} | 服务费:¥{{item.servicePrice}}
+										</view>
+									</view> -->
+								</view>
+							 
+								<view style="
+			    text-align: center;
+			    color: #999999;
+			">*充电费用仅供参考,请以充电桩上的费用为准。</view>
+			
+							</view>
+			
+						</view>
+						
+			<!-- 收费标准 -->
+			<view class="rates" v-if="carPrices&&carPrices.length">
+				<view class="rates-title">
+					<view class="title-left">
+						收费标准
+					</view>
+					<view class="title-right">
+						峰谷平电价计费
+					</view>
+
+				</view>
+				<!-- 时段分类 -->
+				<view class="time-rates">
+					
+					<view class="time-part" v-for="(item,index) in carPrices" :key="index">
+						<view class="part-top">
+							<view class="time">
+								{{item.startTime}}-{{item.endTime}}
+							</view>
+							<view class="price">
+
+								<text class="price-number">{{item.electricityPrice}}</text>
+								<text class="price-unit">元/度</text>
+							</view>
+						</view>
+						<view class="part-bottom">
+							<view class="unitPrice-servicePrice">
+								充电单价:¥{{item.costPrice}} | 服务费:¥{{item.servicePrice}}
+							</view>
+						</view>
+					</view>
+				 
+					<view style="
+    text-align: center;
+    color: #999999;
+">*充电费用仅供参考,请以充电桩上的费用为准。</view>
+
+				</view>
+
+			</view>
+
+
+		</view>
+		<!-- 底部按钮 -->
+
+	</view>
+
+
+</template>
+<script>
+	import * as API from '@/apis/finance.js'
+
+	export default {
+		data() {
+			return {
+				id:'',
+				carPrices: [],
+				device: [],
+				prices: null,
+				description: '温馨提示:充电前请确保您的车辆已与充电桩连接!并关闭车内电源。'
+			}
+		},
+		onLoad(op) {
+			if(op){
+				this.id=op.id
+					this.getInfo()
+			}
+		},
+		onReady() {
+		
+		},
+		methods: {
+			getInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.priceList({
+					deviceNo:this.id
+				}).then((res) => {
+				
+					this.carPrices=res.data.carPrices
+					this.device=res.data.device
+					this.prices=res.data.prices
+				
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			}
+		}
+	}
+</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;
+
+	}
+	.title-left,.title-right{
+			font-size: 18px;
+	}
+	
+	// 主体
+	.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 {
+						font-weight: bold;
+						color: rgba(16, 16, 16, 100);
+						font-size: 18px;
+					}
+
+					.price {
+						.price-number {
+							color: rgba(255, 61, 0, 100);
+							font-size: 24px;
+							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: 16px;
+							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: 18px;
+						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>

+ 195 - 0
pagesFinance/user/deviceDetails.vue

@@ -0,0 +1,195 @@
+<template>
+	<view>
+		<u-navbar title="设备详情"></u-navbar>
+		<view class="details">
+			<view class="details-title">
+				<h4>充电桩分润信息</h4>
+			</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='+detail.deviceNo)" >查看详情</span></view>
+		
+		
+		</view>
+		
+		<view class="details">
+			<view class="details-title">
+				<h4>分润明细</h4>
+			</view>
+			<view class="details-row" v-for="(item,i) in sprList" :key="i" v-if="item.describe!='0%'">
+				<p>{{item.name}}</p>
+				<span>{{item.describe}}</span>
+			</view>
+		
+		</view>
+		<!-- <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>100-400</span></view>
+		</view> -->
+		<view class="detailsBtn">
+			<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,
+					},
+				],
+				sprList:[],
+				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	 
+					this.sprList=res.data.sprList
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.detailsBtn{
+		margin: 16px;
+		.detailsBtn-btn{
+			border-color:#185AC6!important;
+			border-radius: 8px!important;
+			background: none!important;
+			color:#185AC6!important;
+		}
+	}
+	.details-title{
+		margin-bottom: 16px;
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			position: relative;
+			padding-left:10px;
+			&::after{
+				content: '';
+				position: absolute;
+				height: 12px;
+				width: 4px;
+				background-color: #27B148;
+				left: 0;
+				top:5px;
+			}
+		}
+	}
+	.details-row{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-top: 15px;
+		p{
+			color: #37393c;
+			font-weight: bold;	
+		}
+	}
+	.details{
+		margin: 16px;
+		padding: 20px;
+		background-color: #fff;
+		border-radius: 8px;
+		.details-head{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			h4{
+				font-size: 18px;
+				font-weight: normal;
+				margin-left: 4px;
+			}
+		}
+		.details-price{
+			margin-top: 28px;
+			display: flex;
+			align-items: flex-end;
+			justify-content: center;
+			h3{
+				font-size: 36px;
+				color:#27B148;
+				line-height: 36px;
+				margin: 0  4px;
+				font-weight: normal;
+			}
+			span{
+				font-size: 20px;
+				color:#27B148;
+			}
+		}
+		.details-main{
+			text-align: center;
+			margin-bottom: 20px;
+			p{
+				color:#777;
+				margin-top: 4px;
+			}
+		}
+	}
+</style>

+ 269 - 0
pagesFinance/user/deviceList.vue

@@ -0,0 +1,269 @@
+<template>
+	<view>
+		<u-navbar title="我的设备"></u-navbar>
+		<view class="deviceDropdown">
+			<u-dropdown>
+				<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 style="text-align: center;margin-top: 100px" v-if="!list.length">
+			<img src="@/assets/img/blankpage.png">
+			<view>查询为空</view>
+		</view>
+			<view v-for="(item ,index) in list" :key="item.id"
+			@click="gotoUrl('pagesFinance/user/'+(item.type!=0?'pileManagement':'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">{{ 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>
+			<u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
+			
+		<!-- 	<view class="deviceList-item deviceList-bg2">
+				<view class="deviceList-head">荆鹏软件园充电站</view>
+				<view class="deviceList-main">A0001</view>
+				<view class="deviceList-foot">
+					<view class="deviceList-label">直流快充</view>
+					<view class="deviceList-label">正常运行</view>
+					<view class="deviceList-label">市场服务 70%</view>
+				</view>
+			</view>
+			<view class="deviceList-item deviceList-bg3">
+				<view class="deviceList-head">荆鹏软件园充电站</view>
+				<view class="deviceList-main">A0001</view>
+				<view class="deviceList-foot">
+					<view class="deviceList-label">直流快充</view>
+					<view class="deviceList-label">正常运行</view>
+					<view class="deviceList-label">市场服务 70%</view>
+				</view>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				form: {
+				
+				},
+				startDate:'',
+				endDate:'',
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				value1: -1,
+				value2: -1,
+				value3: -1,
+				stationList:[],
+				options0: [
+				
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					}
+					
+				],
+				options1: [{
+						label: '全部',
+						value: '-1',
+					},
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					}
+				],
+				options2: [
+				],
+				options3: [
+					{
+						label: '全部',
+						value: -1,
+					},
+					{
+						label: '在线',
+						value: 1,
+					},
+					{
+						label: '离线',
+						value: 0,
+					},
+				],
+			}
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onLoad(op) {
+				this.form.stationId=op.id
+		},
+		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>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.deviceDropdown{
+		background-color: #fff;
+	}
+	.deviceList-item{
+		margin: 16px;
+		border-radius: 8px;
+		.deviceList-head{
+			font-size: 16px;
+			padding: 8px 16px;
+		}
+		.deviceList-main{
+			font-size: 28px;
+			padding: 0px 16px;
+			font-weight: bold;
+		}
+		.deviceList-foot{
+			display: flex;
+			align-items: center;
+			flex-wrap: wrap;
+			padding: 16px;
+			.deviceList-label{
+				background-color: #F0F2F4 ;
+				padding: 4px 10px;
+				margin: 1px;
+				border-radius: 4px;
+			}
+		}
+	}
+	.deviceList-bg1{
+		background:url(../../assets/img/charging_type_fast.png) no-repeat #fff;
+		background-size:100%;
+	}
+	.deviceList-bg2{
+		background:url(../../assets/img/charging_type_slow.png) no-repeat #fff;
+		background-size:100%;
+	}
+	.deviceList-bg3{
+		background:url(../../assets/img/charging_type_bike.png) no-repeat #fff;
+		background-size:100%;
+	}
+</style>

+ 60 - 0
pagesFinance/user/help.vue

@@ -0,0 +1,60 @@
+<template>
+	<view>
+		<u-navbar title="帮助中心"></u-navbar>
+		<view class="collapse">
+			<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>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				itemList: [],
+			}
+		},
+		onReady() {
+			this.getHomePage()
+		},
+		methods: {
+		getHomePage(){
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+					API.helpList({
+						category:3
+					}).then((res) => {
+						this.itemList = res.data.helpList
+					
+					
+						uni.hideLoading()
+						
+					}).catch(error => {
+						uni.showToast({
+							title: error
+						})
+					})
+				}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.collapse{
+		margin: 16px;
+		background-color: #fff;
+		padding:0 10px;
+	}
+</style>

+ 345 - 0
pagesFinance/user/index.vue

@@ -0,0 +1,345 @@
+<template>
+	<view>
+		<view class="userHead">
+			<view class="userHead-img">
+				<u-avatar src="../../assets/img/head.png" size="140"></u-avatar>
+			</view>
+			<view class="userHead-text">
+				<h3>{{info.merchantAccountName}}</h3>
+				<view class="userHead-text-position">
+					<u-icon name="account-pin-box-fill" custom-prefix="custom-icon" color="#fff" size="32"></u-icon>
+					<p>{{getPhone(info.phone)}}</p>
+				</view>
+			</view>
+		</view>
+		<view class="userData">
+			<view class="userData-item">
+				<view class="userData-data">{{home.deviceNumbers}}台</view>
+				<view class="userData-foot" @click="gotoUrl('pagesFinance/user/stationsList')" >我的设备<span style="color: #307af6; margin-left: 5px;">查看</span></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" v-if="!home.bank"  >未绑定</view>
+				
+				<view class="userData-foot" v-if="home.bank"  @click="showModel"  >提现账户<span style="color: #307af6; margin-left: 5px;">查看</span></view>
+			</view>
+		</view>
+		
+		<view class="userInfo">
+			<view class="userInfo-head"><p>可提现金额</p></view>
+			<view class="userInfo-main">
+				<h2>{{home.accountBalance}}元</h2>
+				<view class="userInfo-btn"  v-if="info.status" @click="gotoUrl('pagesFinance/user/withdraw')">帐户提现</view>
+			</view>
+			<view class="userInfo-foot">
+				<!-- <view class="userInfo-item">
+					<p>今日收益</p>
+					<h4>{{home.todayAmount}}</h4>
+				</view> -->
+				<view class="userInfo-item">
+					<p>冻结金额(提现中)</p>
+					<h4>{{home.waitingAmount}}元</h4>
+				</view>
+				<view class="userInfo-item">
+					<p>已提现</p>
+					<h4>{{home.withdrawnAmount}}元</h4>
+				</view>
+			</view>
+		</view>
+		
+		<view class="userCell">
+			<view class="userCell-item"  @click="gotoUrl('pagesFinance/preengaged/preengaged')">
+				<view class="userCell-title">
+					<img src="@/assets/img/booked.png" style="height:18px;width: 18px ;" >
+					<p>我被预约</p>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+			<view class="userCell-item" @click="gotoUrl('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" @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"  @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>{{tel}}</span>
+			</view>
+			<!-- <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" @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>
+				</view>
+				<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
+			</view>
+		</view>
+		
+			<Tabbar :current="3"  ref="tabbarMain"></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 {
+				
+				tel:'400-8899-619',
+				role:{},
+				info:{},
+				home:{},
+				current: 0,
+				background:{
+					background: 'none'
+				},
+			}
+		},
+		components: {
+			Tabbar
+		
+		},
+		onLoad() {
+			this.info=this.carhelp.getPersonInfo("merchantUser")
+			
+			
+			
+			console.log(this.info)
+		},
+		onReady() {
+			this.getHomePage()
+		},
+		onShow() {
+			if(this.$refs.tabbarMain){
+				this.$refs.tabbarMain.setcount(3);
+			}
+			this.getHomePage()
+		},
+		methods: {
+			getPhone(phone){
+				var backphone="";
+				if(phone){
+					backphone=substrMb(phone,0,3)+"****"+substrMb(phone,7,4)
+				}
+				
+				return backphone;
+			},
+			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>
+<style>
+	page{
+		background:url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
+		background-size: 100%;
+	}
+</style>
+<style lang="scss" scoped>
+	.userCell{
+		background-color: #fff;
+		border-radius: 8px;
+		margin: 16px;
+		.userCell-item{
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 16px;
+			.userCell-title{
+				display: flex;
+				align-items: center;
+				p{
+					margin-left: 8px;
+				}
+			}
+			span{
+				color:#999;
+			}
+		}
+	}
+	.userInfo{
+		background-color: #fff;
+		margin: 16px;
+		padding: 16px;
+		border-radius: 8px;
+		p{
+			color:#637AA2;
+		}
+		.userInfo-main{
+			display: flex;
+			justify-content: space-between;
+			margin-top: 4px;
+			align-items: center;
+			h2{
+				font-size: 32px;
+			}
+		}
+		.userInfo-btn{
+			padding: 6px 10px;
+			background-color: #FF8501;
+			color:#fff;
+			border-radius: 15px;
+		}
+		.userInfo-foot{
+			display: flex;
+			justify-content: space-between;
+			margin-top: 12px;
+			.userInfo-item{
+				flex: 1;
+				h4{
+					font-size: 16px;
+					margin-top: 4px;
+				}
+			}
+		}
+	}
+	.userHead{
+		display: flex;
+		align-items: center;
+		padding:40px 20px 0;
+		.userHead-img{
+		}
+		.userHead-text{
+			margin-left: 12px;
+			h3{
+				font-size: 24px;
+				color:#fff;
+				font-weight: normal;
+			}
+			.userHead-text-position{
+				display: flex;
+				align-items: center;
+				margin-top: 5px;
+				p{
+					color:#fff;
+					margin-left: 4px;
+				}
+			}
+		}
+	}
+	.userData{
+		background-color: #fff;
+		margin: 16px;
+		padding: 16px;
+		border-radius: 8px;
+		display: flex;
+	}
+	.userData-item{
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content:space-between;
+		.userData-data{
+			font-size: 24px;
+			font-weight: bold;
+		}
+		.userData-name{
+			font-size: 16px;
+		}
+		.userData-foot{
+			margin-top: 4px;
+			color:#637AA2;	
+		}
+	}
+	
+</style>

+ 476 - 0
pagesFinance/user/myPile.vue

@@ -0,0 +1,476 @@
+<template>
+	<view>
+		<u-navbar title="充电桩设置"></u-navbar>
+
+		<view class="options">
+
+			<u-cell-group>
+
+				<u-cell-item title="开放共享" :arrow="false">
+
+					<view class="">
+
+						<u-radio-group v-model="detail.enableShare" >
+
+							<u-radio  v-for="(item, index) in list2" :key="index+'a'" :name="item.value"
+								:disabled="item.disabled" active-color="#00b962">
+
+								{{item.name}}
+
+							</u-radio>
+
+						</u-radio-group>
+
+					</view>
+
+
+
+				</u-cell-item>
+
+				<u-cell-item title="开放预约" :arrow="false">
+					<view class="">
+
+						<u-radio-group  v-model="detail.enableAppointment" >
+
+							<u-radio  v-for="(item, index) in list2" :key="index+'b'" :name="item.value"
+								:disabled="item.disabled" active-color="#00b962">
+
+								{{item.name}}
+
+							</u-radio>
+
+						</u-radio-group>
+
+					</view>
+				</u-cell-item>
+
+				<u-cell-item title="预约自动确认" :arrow="false">
+					<view class="">
+
+						<u-radio-group  v-model="detail.autoConfirm" >
+
+							<u-radio   v-for="(item, index) in list2" :key="index+'c'" :name="item.value"
+								active-color="#00b962">
+
+								{{item.name}}
+
+							</u-radio>
+
+						</u-radio-group>
+
+					</view>
+				</u-cell-item>
+
+ 				
+				
+				<u-cell-item :arrow="false" class="time-cell border-bottom" title="允许预约日期">
+				
+				</u-cell-item>
+				
+				<view class="" style="padding-left: 16px;">
+					<u-checkbox-group  shape="square">
+				
+						<u-checkbox  
+						 	v-model="item.checked" 
+						 v-for="(item, index) in weekList" :key="index" :name="item.value"
+							:disabled="item.disabled" active-color="#00b962">
+				
+							{{item.name}}
+				
+						</u-checkbox>
+					</u-checkbox-group>
+				
+				</view>
+				
+				<u-picker mode="time" @confirm="confirm"  v-model="show" 
+				:defaultTime="showTime"
+				:params="params"></u-picker>
+
+
+				<u-cell-item title="预约开始时段" :value="detail.shareStartTime" @click="showTimeBtn(0)" ></u-cell-item>
+				<u-cell-item title="预约结束时段" :value="detail.shareEndTime" @click="showTimeBtn(1)" ></u-cell-item>
+
+				<u-cell-item :arrow="false" class="time-cell border-bottom" title="预约时长选项">
+
+
+
+
+				</u-cell-item>
+
+
+
+				<view class="" style="padding-left: 16px;">
+					<u-checkbox-group  shape="square">
+
+						<u-checkbox   v-for="(item, index) in timeList"
+						 	v-model="item.checked" 
+							:key="index" :name="item.value"
+							:disabled="item.disabled" active-color="#00b962">
+
+							{{item.name}}
+
+						</u-checkbox>
+					</u-checkbox-group>
+
+				</view>
+
+
+			</u-cell-group>
+
+		</view>
+		<!-- 底部按钮 -->
+		<view class="bottom">
+		<!-- 	<u-button shape='circle' class="refuse-btn">拒绝</u-button>
+			<u-button type="success" shape='circle'>确认</u-button> -->
+			<!-- 删除订单按钮 -->
+		 <u-button shape='circle' type="success" @click="submit"  >保存</u-button> 
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				showTimeType:"",
+				showTime:"",
+				show:false,
+				params: {
+									year: false,
+									month: false,
+									day: false,
+									hour: true,
+									minute: true,
+									second: false
+								},
+								
+				detail:{
+				
+				},
+				
+				list2: [{
+						value:"1",
+						name: "是"
+					},
+					{
+						value:"0",
+						name: "否"
+					}
+				],
+				weekList: [
+					{
+						value:"1",
+						name: "周一"
+					},
+					{
+						value:"2",
+						name: "周二"
+					},
+					{
+						value:"3",
+						name: "周三"
+					},
+				
+					{
+						value:"4",
+						name: "周四"
+					},
+					{
+						value:"5",
+						name: "周五"
+					},
+					{
+						value:"6",
+						name: "周六"
+					},
+				
+					{
+						value:"7",
+						name: "周日"
+					}
+				],
+				timeList: [
+					{
+						value:"10",
+						name: "10分钟"
+					},
+					{
+						value:"20",
+						name: "20分钟"
+					},
+					{
+						value:"30",
+						name: "30分钟"
+					}
+				]
+			}
+		},
+		onLoad(op){
+			
+			this.id=op.id;
+			this.getInfo()
+		},
+		methods: {
+			confirm(e){
+				
+				var type=this.showTimeType;
+				var time=e.hour+":"+e.minute;
+				if(type==0){
+					
+					if(this.detail.shareEndTime){
+						var time1=new Date("2020-1-1 "+time)
+						var time2=new Date("2020-1-1 "+this.detail.shareEndTime)
+						if(time1>time2){
+							this.detail.shareEndTime=null;
+						}
+					}
+					this.detail.shareStartTime=time
+				}
+				if(type==1){
+					
+					if(this.detail.shareStartTime){
+						var time1=new Date("2020-1-1 "+time)
+						var time2=new Date("2020-1-1 "+this.detail.shareStartTime)
+						if(time1<time2){
+							uni.showToast({
+								title:"结束时间不可小于开始时间"
+							})
+							return
+						}
+					}
+					
+					this.detail.shareEndTime=time
+				}
+			},
+			showTimeBtn(type){
+				this.showTimeType=type;
+				console.log(type)
+				if(type=="0"){
+					this.showTime=this.detail.shareStartTime
+				}
+				if(type=="1"){
+					this.showTime=this.detail.shareEndTime
+				}
+				if(!this.showTime){
+					this.showTime=new Date().getHours()+":"+new Date().getMinutes()
+				}
+				this.show=true;
+			},
+			submit(){
+				
+				var sz=[]
+				for(var i in this.weekList){
+					var item=this.weekList[i]
+					if(item.checked){
+						sz.push(item.value)
+					}
+				}
+				var weekDay=sz.join();
+				
+				
+				var sz2=[]
+				for(var i in this.timeList){
+					var item=this.timeList[i]
+					if(item.checked){
+						sz2.push(item.value)
+					}
+				}
+				var reserveMinutes=sz2.join();
+				if(!this.detail.shareStartTime){
+					this.detail.shareStartTime=""
+				}
+				if(!this.detail.shareEndTime){
+					this.detail.shareEndTime=""
+				}
+				var weekTime=[this.detail.shareStartTime,this.detail.shareEndTime]
+				
+				if(this.detail.enableAppointment){
+					if(weekDay==""){
+						uni.showToast({
+							title:"开放预约功能需要选择预约日期"
+						})
+						return
+					}
+					
+					if(!weekTime[0]){
+						uni.showToast({
+							title:"开放预约功能需要预约开始时间"
+						})
+						return
+					}
+					if(!weekTime[1]){
+						uni.showToast({
+							title:"开放预约功能需要预约结束时间"
+						})
+						return
+					}
+					if(reserveMinutes==""){
+						uni.showToast({
+							title:"开放预约功能需要选择预约时长"
+						})
+						return
+					}
+					
+						console.log(	this.detail	)
+				}
+				this.detail.weekDay=weekDay
+				
+				this.detail.weekTime=weekTime.join();
+				
+				this.detail.reserveMinutes=reserveMinutes
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.saveGunShare(this.detail).then((res) => {
+					
+					uni.hideLoading()
+					uni.showModal({
+						title:"提示",
+						content:"操作成功",
+						showCancel:false,
+						success:()=>{
+							uni.navigateBack({
+								
+							})
+						}
+					})
+					
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.gunShareDetail({
+					gunId:this.id
+				}).then((res) => {
+					this.detail={};
+					var obj=res.data.gunShare;
+					for(var i in obj){
+						
+						if(obj[i]===true){
+							this.detail[i]="1";
+						}else if(obj===false){
+							this.detail[i]="0";
+						}else {
+							this.detail[i]=obj[i];
+						}
+					}
+					if(this.detail.reserveMinutes){
+						var sz=this.detail.reserveMinutes.split(",")
+						for(var i in this.timeList){
+							var item=this.timeList[i]
+						
+							if(sz.indexOf(item.value)!=-1){
+								item.checked=true;
+							}
+						}
+					}
+					
+					if(this.detail.shareWeekDay){
+						var sz=this.detail.shareWeekDay.split(",")
+						for(var i in this.weekList){
+							var item=this.weekList[i]
+						
+							if(sz.indexOf(item.value)!=-1){
+								item.checked=true;
+							}
+						}
+					}
+					
+					console.log(this.detail)
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/deep/.u-cell_title {
+
+		width: 30% !important;
+	}
+
+	/deep/ .u-cell {
+		line-height: 20px;
+		padding: 12px 20px 12px 0;
+		margin-left: 12px;
+	}
+
+	/deep/.u-radio-group {
+		justify-content: start !important;
+	}
+
+	/deep/.u-radio-group:last-child {
+
+		justify-content: space-between !important;
+		padding: 0 0 10px 0px;
+	}
+
+
+	/deep/.u-cell__value {
+
+		text-align: left;
+
+		color: #101010;
+
+		font-size: 16px
+	}
+
+	/deep/.u-radio-group {
+		line-height: 30px;
+		width: 100%;
+		display: flex;
+		justify-content: space-around;
+
+	}
+
+
+
+	/deep/.border-bottom:after {
+		border-bottom-width: 0px !important;
+
+
+
+	}
+	
+	
+// 按钮
+.bottom{
+	width: 100%;
+	height: 56px;
+	position: fixed;
+	bottom: 0;
+	background-color: #fff;
+	display: flex;
+	.refuse-btn{
+		background-color: #DBDBDB;
+	}
+	.u-btn{
+		width: 91.4%;
+		height: 40px;
+		margin: auto;
+		font-size: 18px;
+		
+	}
+	.cancel-btn{
+		width: 91.4%;
+		background-color: #dbdbdb;
+		color: #666666
+	}
+}
+</style>

+ 505 - 0
pagesFinance/user/pileManagement.vue

@@ -0,0 +1,505 @@
+<template>
+	<view>
+		<u-navbar title="电桩管理">
+		
+		</u-navbar>
+		<view class="details">
+			<view class="name">
+				{{detail.stationName}}|	{{detail.name}}
+			</view>
+			
+			<view class="info">
+				<view class="info-text">
+					<p>{{detail.chargingType}} |<text class="dc-fast"> {{detail.interfaceType}} </text> | {{detail.chargingPower}}kW</p>
+					
+				</view>
+				<view class="info-img">
+					<img :src="detail.stationImage"
+					 style="
+					     width: 100px;
+					     height: 75px;
+					 "
+					 alt="">
+				</view>
+			</view>
+
+			<view class="station-address">
+				<img src="../../assets/img/Frame 201.png" alt="">
+				<view class="address-text">
+					{{detail.address}}
+				</view>
+
+				<view class="navigation" v-if="false">
+					<view class="iconfont address-font">
+						&#xe60c;
+
+					</view>
+					<view class="view-map">导航</view>
+
+				</view>
+
+			</view>
+			
+			<u-cell-group  >
+				<u-cell-item  v-if="price" title="电价" :arrow="false" :value="price.costPrice+'元/度('+price.firstTime+'-'+price.latestTime+')'"> </u-cell-item>
+				
+				<u-cell-item  v-if="deviceUser" title="联系人" :arrow="false" :value="deviceUser.realName+'  '+deviceUser.phone"></u-cell-item>
+				<view class="price-detail" v-if="price"
+				@click="gotoUrl('pagesFinance/user/chargingDetails?id='+detail.deviceNo)"
+				
+				>
+					价格详情
+				</view>
+<!-- 				<u-cell-item  title="停车费" :arrow="false" value="新能源车2小时停车费"></u-cell-item>
+ -->			</u-cell-group>
+
+		</view>
+
+<!-- 充电枪选项 -->
+<view class="gun-options">
+	<u-tabs :list="list1" :is-scroll="false" :current="current" @change="change" bar-width="125" inactive-color="#777777" active-color="#101010"></u-tabs>
+	
+	<view class="tab-equipment" v-show="current==0"  v-for="(item,i) in gunList" :key="i" >
+		<view class="equipment-top">
+			<text class="name">{{item.channelNo}}号充电枪</text>  
+			<!-- <text class="switch"><u-switch v-model="checked" size="40" active-color="#FF7300"></u-switch></text>
+			<text class="radio"> 	
+			开启共享</text> -->
+		</view>
+		<view class="state">
+			
+			<view class="state-item">
+				工作状态:{{item.workStatusText}} <text class="bot1 "
+				:class="{
+					bot2:!item.workStatus
+				}"
+				></text>
+			</view>
+			<view class="state-item">
+				开放共享:{{!item.enableShare?'关闭':'开启'}} <text class="bot1 "
+				:class="{
+					bot2:item.enableShare
+				}"
+				></text>
+			</view>
+			<view class="state-item">
+				开放预约:{{!item.enableAppointment ?'关闭':'开启'}} <text class="bot1 "
+				:class="{
+					bot2:item.enableAppointment
+				}"
+				></text>
+			</view>
+			<view class="state-item">
+				联网状态:{{!detail.online?'离线':'在线'}} <text class="bot1"
+				:class="{
+					bot2:detail.online
+				}"
+				></text>
+			</view>
+			
+			<view class="iconfont more"  v-if="isAllow"	
+				 @click="gotoUrl('pagesFinance/user/myPile?id='+item.id)" 
+			>
+				<text class="set" >设置</text>&#xe600;
+			</view>
+		</view>
+		
+	</view>	
+	
+	
+	<!-- 分润比例 -->
+	<view class="share" v-show="current==1">
+		<view class="title" >
+			<text class="line"></text>分润比列
+		</view>
+		<view class="item" v-for="(item,i) in sprList" :key="i" v-if="item.describe!='0%'" >
+			<view >
+				{{item.name}}
+			</view>
+			<view >
+				{{item.describe}}
+			</view>
+		</view>
+		 
+		
+	</view>
+	<!-- 设备信息 -->
+	<view class="equipment-info" v-show="current==2">
+	  <view class="title" >
+	  	<text class="line"></text>设备相关信息
+	  </view>
+	  <view class="item">
+		  <view class="">
+		  	设备型号
+		  </view>
+		  <view class="">
+		  	HCD0001-A
+		  </view>
+	  	
+	  </view>
+	  <view class="item">
+	  		  <view class="">
+	  		  	初次安装时间
+	  		  </view>
+	  		  <view class="">
+	  		  	2022-04-1
+	  		  </view>
+	  	
+	  </view>
+	  <view class="item">
+	  		  <view class="">
+	  		  	输出功率范围(瓦)
+	  		  </view>
+	  		  <view class="">
+	  		  	100-400
+	  		  </view>
+	  	
+	  </view>
+	
+
+	</view>
+	
+</view>
+
+
+	</view>
+</template>
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				gunList:[],
+				isAllow:false,
+				detail:{
+					
+
+				},
+				deviceUser:{
+					phone: "",
+					realName: ""
+				},
+				price:{
+					costPrice:"",
+					firstTime: "",
+					latestTime: ""
+				},
+				sprList:[],
+				
+				list1: [{
+					name: '设备列表'
+				}, {
+					name: '分润比例'
+				}],
+				list2: [{
+					name: '是'
+				}, {
+					name: '否'
+				}],
+				timeList:[{
+					name:"10分钟"
+				},
+				{
+					name:"20分钟"
+				},
+				{
+					name:"30分钟"
+				}],
+				current: 0,
+					checked: false,
+			}
+		},
+		onLoad(op){
+			
+			this.id=op.id;
+			this.getInfo()
+		},
+		methods: {
+			change(index) {
+				this.current = index;
+			},
+			getInfo(){
+				uni.showLoading({
+					title:"加载中",mask:true,
+				})
+				API.carDeviceDetail({
+					deviceId:this.id
+				}).then((res) => {
+					this.isAllow=res.data.isAllow	 
+					this.detail=res.data.device	 
+					this.sprList=res.data.sprList
+					this.gunList=res.data.gunList
+					this.price=res.data.price;
+					this.deviceUser=res.data.deviceUser;
+					uni.hideLoading()
+					 
+				}).catch(error => {
+						uni.showToast({
+							
+							title:error
+						})
+				})
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		padding-bottom: 233px;
+		background-color: #F6F8F8;
+		
+	}
+	.delete {
+		margin-left: 85.3%;
+		color: #cccccc;
+		font-size: 12px
+	}
+
+	.details {
+		width: 100%;
+		background-color: #fff;
+		padding: 16px 0 0px 16px;
+
+		.name {
+			height: 20px;
+			color: rgba(16, 16, 16, 100);
+			font-size: 20px;
+			font-weight: 600;
+		}
+
+		.info {
+			height: 75px;
+			line-height: 16px;
+			color: rgba(102, 102, 102, 100);
+			font-size: 16px;
+			margin-top: 12px;
+			display: flex;
+
+			// justify-content: space-between;
+			.dc-fast {
+
+				color: #CDC0FF;
+				margin: 0 4px;
+			}
+
+			.info-text {
+				width: 69%;
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.tag-items {
+					display: flex;
+					// justify-content: space-between;
+				}
+
+				.tag {
+					line-height: 26px;
+					border-radius: 4px;
+					background-color: rgba(255, 255, 255, 100);
+					color: rgba(119, 119, 119, 100);
+					text-align: center;
+					border: 1px solid rgba(119, 119, 119, 100);
+					padding: 0 4px;
+					margin-right: 8px;
+
+				}
+			}
+
+			.info-img {
+				// margin-left: 35px;
+			}
+		}
+
+		.station-address {
+			width: 100%;
+
+			margin-top: 17px;
+			position: relative;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+
+			.address-text {
+				line-height: 40px;
+				position: absolute;
+				top: 0px;
+				left: 0;
+				font-size: 16px
+			}
+
+			.navigation {
+				position: absolute;
+				top: 0;
+				right: 28px;
+			}
+
+			.address-font {
+				font-size: 28px;
+				color: #4e94ff;
+
+
+			}
+
+			.view-map {
+				font-size: 12px;
+				text-align: center;
+
+			}
+		}
+		/deep/.u-cell__value{
+			text-align: left;
+			//margin-left: 16px;
+			color: #101010;
+			 font-size: 16px;
+		}
+		/deep/.u-cell_title{
+			width: 15% !important;
+		    font-size: 16px;
+			color: #777777;
+		}
+		.u-cell{
+			position: relative;
+			    padding: 13px 16px 13px 0 ;
+		}
+		.price-detail{
+			width: 56px;
+			height: 20px;
+			color: rgba(22, 119, 255, 100);
+			font-size: 14px;
+			position: absolute;
+			top: 15px;
+			right: 20px;
+		}
+	}
+
+
+// 充电枪选项
+.gun-options{
+	background-color: #fff;
+	margin-top: 12px;
+	.tab-equipment{
+		background-color: #fff;
+		padding: 16px 16px 16px 0;
+		margin-left: 16px ;
+		border-bottom: 1px solid #E5E7EA;
+		position: relative;
+		.equipment-top{
+			line-height: 27px;
+			position: relative;
+		}
+		.name{
+			line-height: 20px;
+			line-height: 20px;
+			font-weight: 600;
+			color: rgba(16, 16, 16, 100);
+		}
+		.radio{
+			margin-left: 54px;
+			
+			
+		}
+		.switch{
+			position:absolute;
+			top: 3px;
+			left: 21%;
+		}
+		.state{
+			margin-top: 12px;
+			display: flex;
+			justify-content: space-between;
+			width: 75%;
+			flex-wrap: wrap;
+			.state-item{
+				height: 20px;
+				line-height: 20px;
+				margin-top: 4px;
+				color: rgba(16, 16, 16, 100);
+				.bot1{
+					display: inline-block;
+					width: 12px;
+					height: 12px;
+					margin-left: 2px;
+					background-color: rgba(255, 115, 0, 100);
+					border-radius: 999px;
+					
+				}
+				.bot2{
+					background-color: rgba(0, 185, 98, 100);
+				}
+				
+				
+			}
+			.more{
+				
+				line-height: 24px;
+				font-size: 24px;
+				color: #b3b3b3;
+				position: absolute;
+				right: 20px;
+				top: 16px;
+			
+				.set{
+					display: inline-block;
+					width: 30px;
+					font-size: 14px;
+					color: #1677ff;
+			        position: absolute;
+					top: 0;
+					left: -29px;
+					
+				}
+			}
+			
+		}
+	}
+	/deep/.u-tab-bar{
+		background-color: #00B962 !important;
+	}
+.share{
+	padding: 16px;
+    
+}
+	
+.equipment-info{
+	padding: 16px;
+}
+.title{
+	font-size: 16px;
+	font-weight: 600;
+	.line{
+		display: inline-block;
+		height:12px;
+		width: 4px;
+		background-color: #00B962;
+		margin-right: 8px;
+	}
+	
+	}
+	.item{
+			display: flex;
+			justify-content: space-between;
+			margin-top: 20px;
+		}
+}
+.bottom{
+	width: 100%;
+	height: 64px;
+	background-color: #fff;
+	position: fixed;
+	bottom: 0;
+	display: flex;
+	.u-btn{
+		width: 91.4%;
+		height: 40px;
+		margin: auto;
+	}
+}
+
+</style>

+ 268 - 0
pagesFinance/user/stationsList.vue

@@ -0,0 +1,268 @@
+<template>
+	<view>
+		<u-navbar title="我的站点"></u-navbar>
+	 
+		<view class="deviceList" 	>
+		<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+			<img src="@/assets/img/blankpage.png">
+			<view>查询为空</view>
+		</view>
+		
+		
+		
+			<view v-for="(item ,index) in list" :key="item.id"
+			@click="gotoUrl('pagesFinance/user/deviceList?id='+item.id)"
+		 
+			class="deviceList-item deviceList-bg1" >
+				<view class="deviceList-main">
+				 
+				<span class="btn12 " v-if="item.type=='1,2'" >快/慢</span>
+				<span class="btn12 btn1"  v-if="item.type=='1'"  >慢冲</span>
+				<span class="btn12 btn2" v-if="item.type=='2'" >快冲</span>
+				{{item.name}}</view>
+ 				<view class="deviceList-head">{{item.address}}<span style="float: right;">></span></view>
+				<view class="deviceList-foot">
+					
+					<view class="deviceList-label" style="color: #333333;"  >总数{{item.totalNum}}</view>
+					<view class="deviceList-label" style="color: #7a68f6;" v-if="item.fastNum"  >/直流{{item.fastNum}}</view>
+					
+					<view class="deviceList-label" style="color: #5cbe7d;"  v-if="item.slowNum" >/交流{{item.slowNum}}</view>
+					
+					
+				<!-- 	<view class="deviceList-label">{{item.roleName}}</view> -->
+				</view>
+			</view>
+			<u-divider v-if="list.length&&list.length==recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
+			
+		 
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	
+	export default {
+		data() {
+			return {
+				form: {
+				
+				},
+				startDate:'',
+				endDate:'',
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
+				value1: -1,
+				value2: -1,
+				value3: -1,
+				stationList:[],
+				options0: [
+					{
+							label: '全部',
+							value: -1,
+						},
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					}
+				],
+				options1: [{
+						label: '全部',
+						value: '-1',
+					},
+					{
+						label: '自行车充电',
+						value: 0,
+					},
+					{
+						label: '交流慢充',
+						value: 2,
+					},
+					{
+						label: '直流快充',
+						value: 1,
+					}
+				],
+				options2: [
+				],
+				options3: [
+					{
+						label: '全部',
+						value: -1,
+					},
+					{
+						label: '在线',
+						value: 1,
+					},
+					{
+						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.stationsList(this.form).then((res) => {
+					
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+				 
+					uni.hideLoading()
+
+				}).catch(error => {
+					uni.showToast({
+
+						title: error
+					})
+				})
+			},
+			onReady() {
+				//this.getStation()
+				this.getList()
+				
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.btn12{
+		color: #fff;
+		background-color: #449ca8;
+		font-size: 16px;
+		    border-radius: 50px;
+		    padding: 1px 5px;
+	}
+	.btn1{
+	
+		background-color: #5cbe7d;
+		
+	}
+	.btn2{
+	
+		background-color: #7a68f6;
+		
+	}
+	.deviceDropdown{
+		background-color: #fff;
+	}
+	.deviceList-item{
+		margin: 16px;
+		border-radius: 8px;
+		.deviceList-head{
+			color: #9e9e9e;
+			font-size: 16px;
+			padding: 8px 16px;
+		}
+		.deviceList-main{
+			font-size: 20px/*  */;
+			padding:5px 16px 0px 16px;
+			font-weight: bold;
+		}
+		.deviceList-foot{
+			display: flex;
+			align-items: center;
+			flex-wrap: wrap;
+			padding: 0 16px 16px;
+			.deviceList-label{
+				// background-color: #F0F2F4 ;
+				// padding: 4px 10px;
+				margin: 1px;
+				border-radius: 4px;
+			}
+		}
+	}
+	.deviceList-bg1{
+		//background:url(../../assets/img/charging_type_fast.png) no-repeat #fff;
+		background-size:100%;
+		background-color: #ffffff ;
+	}
+	.deviceList-bg2{
+		background:url(../../assets/img/charging_type_slow.png) no-repeat #fff;
+		background-size:100%;
+	}
+	.deviceList-bg3{
+		background:url(../../assets/img/charging_type_bike.png) no-repeat #fff;
+		background-size:100%;
+	}
+</style>

+ 212 - 0
pagesFinance/user/withdraw.vue

@@ -0,0 +1,212 @@
+<template>
+	<view>
+		<u-navbar title="提现"></u-navbar>
+		<view class="withdraw">
+			<view class="withdraw-head">
+				<b>提现至</b><span>{{code}}</span>
+			</view>
+			<view class="withdraw-head">
+				<b>上次提现时间</b><span>{{info.startTime}}</span>
+			</view>
+			<view class="withdraw-head">
+				<b>本次提现时间</b><span>{{info.endTime}}</span>
+			</view>
+			<view class="withdraw-head">
+				<b>此期间累计产生订单数</b><span>{{info.total}}笔</span>
+			</view>
+			<view class="withdraw-head">
+				<b>此期间总分润金额</b><span>{{info.amount?info.amount:0}}元</span>
+			</view>
+			
+			<view class="withdraw-main" v-if="false">
+				<p>申请提现金额(元)</p>
+				<view class="withdraw-input">
+					<span>¥</span>
+					<u-input v-model="value" :type="type" placeholder-style="font-size:28px;height:40px;line-height:40px;color:#ccc;" />
+				</view>
+			</view>
+			<view class="withdraw-foot"  v-if="false">
+				<p>可提现余额 ¥{{home.accountBalance}}</p>
+				<span @click="value=home.accountBalance">全部提现</span>
+			</view>
+		</view>
+		<view class="applyBtn">
+			<u-button :class="{
+				'applyBtn-btn':!info.amount
+			}" @click="submit()" type="primary">申请提现,7日内到账</u-button>
+		</view>
+		<view class="withdraw-tips">
+			<h4>提现说明:</h4>
+			<p>由于银行清算,提现申请将于次日内到账。如遇高峰期,可能延时到账,请耐心等待。</p>
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/finance.js'
+	import {
+		parseUnixTime,
+		substrMb
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				info:{},
+				code:"",
+				value: '',
+				type: 'number',
+				nowTime:"",
+					home:{
+						accountBalance:0
+					},
+			}
+		},
+		onReady() {
+		
+			//this.getHomePage()
+		},
+		onShow(){
+				this.nowTime=parseUnixTime(new Date())
+			this.getHomePage()
+		},
+		methods: {
+			submit(){
+				//this.value=this.info.amount
+				if(!this.info.amount){
+						uni.showToast({
+							title: "可提现金额为0"
+						})
+
+					return
+				}
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.applyWithdraw(this.info).then((res) => {
+					
+						uni.redirectTo({
+							url:"/pagesFinance/user/applyResult?value="+this.value
+						})
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			queryWithdrawInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.queryWithdrawInfo().then((res) => {
+					this.info=res.data;
+					
+					uni.hideLoading()
+					
+				}).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()
+					this.queryWithdrawInfo()
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	.withdraw-tips{
+		margin:24px 16px;
+		p{
+			color:#999;
+			margin-top: 4px;
+		}
+	}
+	.withdraw{
+		margin: 16px;
+		background-color: #fff;
+		padding: 16px;
+		.withdraw-head{
+			// margin: 16px 0;
+			padding: 16px 0;
+		
+			border-bottom: 1px solid #f7f7f7;
+			
+			align-items: center;
+			b{
+				color:#999;
+			}
+			span{
+				margin-left: 12px;
+				float: right;
+			}
+		}
+		.withdraw-main{
+			border-top: 1px solid #f7f7f7;
+		border-bottom: 1px solid #f7f7f7;
+		
+			margin: 16px 0;
+			padding: 16px 0;
+			.withdraw-input{
+				margin-top: 32px;
+				display: flex;
+				align-items: center;
+				font-size: 28px;
+				/deep/.uni-input-input{
+					font-size: 28px;
+				}
+			}
+		}
+		.withdraw-foot{
+			display: flex;
+			align-items: center;
+			p{
+				color:#999
+			}
+			span{
+				color:#2979FF;
+				margin-left: 16px;
+			
+			}
+		}
+	}
+	.applyBtn{
+		margin: 16px;
+	}
+	.applyBtn-btn{
+		background-color: #185AC6;
+		opacity: 0.5;
+		border-color:#185AC6 ;
+		border-radius: 8px;
+	}
+</style>

+ 157 - 0
pagesFinance/user/withdrawRecord.vue

@@ -0,0 +1,157 @@
+<template>
+	<view>
+		<u-navbar title="提现记录"></u-navbar>
+		<view class="detailed">
+			<view style="text-align: center;margin-top: 100px" v-if="!list.length">
+				<img src="@/assets/img/blankpage.png">
+				<view>没有提现记录</view>
+			</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 v-if="item.status==1" class="success">(提现成功)</span>
+							 <span v-if="item.status==0" class="error" >(待转账)</span>
+						<span v-if="item.status==2" >(已驳回)</span>
+						
+						</view>
+						<p>{{item.createTime}}</p>
+					</view>
+					<view class="detailed-item-num">
+						<h2>{{item.applicationAmount}}</h2>
+					</view>
+				</view>
+			
+			</view>
+			<u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
+			
+		 
+		</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)*100+item.applicationAmount*100;
+							showMap.set(ktime,m/100)
+						}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>
+<style>
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style lang="scss" scoped>
+	
+	.detailed-time{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 10px 20px;
+		p{
+			color:#666;
+		}
+	}
+	.detailed-item{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 10px 20px;
+		border-bottom: 1px solid #ededed;
+		.detailed-item-name{
+			h4{
+				font-weight: normal;
+			}
+			p{
+				font-size: 12px;
+				margin-top: 4px;
+				color:#A2A9B5;
+			}
+			span{
+				margin-left: 10px;
+			}
+			.success{color:#27b148}
+			.error{color:#FF6200;}
+		}
+		.detailed-item-num{
+			display: flex;
+			align-items: center;
+			h2{
+				margin-right: 4px;
+			}
+		}
+	}
+</style>

BIN
static/img/min_button_select.png


+ 77 - 0
uni.scss

@@ -0,0 +1,77 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+@import 'uview-ui/theme.scss';
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:24rpx;
+$uni-font-size-base:28rpx;
+$uni-font-size-lg:32rpx;
+
+/* 图片尺寸 */
+$uni-img-size-sm:40rpx;
+$uni-img-size-base:52rpx;
+$uni-img-size-lg:80rpx;
+
+/* Border Radius */
+$uni-border-radius-sm: 4rpx;
+$uni-border-radius-base: 6rpx;
+$uni-border-radius-lg: 12rpx;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 10px;
+$uni-spacing-row-base: 20rpx;
+$uni-spacing-row-lg: 30rpx;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 8rpx;
+$uni-spacing-col-base: 16rpx;
+$uni-spacing-col-lg: 24rpx;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:40rpx;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:36rpx;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:30rpx;

+ 386 - 0
utils/index.js

@@ -0,0 +1,386 @@
+export const currentTimeStamp = () => new Date().getTime()
+
+export const unixTimeStamp = (val) => new Date(val).getTime()
+
+//今天多少天之前的时间
+export const beforeTimeStamp = (dayCount,date) => {
+	
+	if (date) {
+		var dd = new Date(date);
+	} else {
+		var dd = new Date();
+	}
+	dd.setDate(dd.getDate() - dayCount)
+	let time = dd.getTime()
+	return time
+}
+
+//今天多少天之后的时间
+export const afterTimeStamp = (dayCount, date) => {
+	if (date) {
+		var dd = new Date(date);
+	} else {
+		var dd = new Date();
+	}
+	dd.setDate(dd.getDate() + dayCount)
+	let time = dd.getTime()
+	return time
+}
+
+//今天多少年之后的时间
+export const afterYearTimeStamp = (yearCount, date) => {
+	if (date) {
+		var dd = new Date(date);
+	} else {
+		var dd = new Date();
+	}
+	dd.setFullYear(dd.getFullYear() + yearCount)
+	let time = dd.getTime()
+	return time
+}
+
+//计算某日期距当前的时间秒数
+export const secondsDistance = (date) => {
+	var now = new Date().getTime();
+	date = new Date(date).getTime();
+	var seconds = parseInt((now - date) / 1000);
+	return seconds;
+}
+
+//计算两个时间的相差天数
+export const daysDistance = (date1, date2) => {
+	date1 = Date.parse(date1);
+	date2 = Date.parse(date2);
+	var ms = date2 - date1;
+	ms = ms < 0 ? 0 : ms;
+	var days = parseInt(Math.floor(ms / (24 * 3600 * 1000)));
+	return days;
+}
+//计算两个时间的相差小时数
+export const hourDistanceArr = (date1, date2) => {
+	if (!date1 || !date2) {
+		return '-';
+	}
+	date1 = Date.parse(date1);
+	date2 = Date.parse(date2);
+	var ms = date2 - date1;
+	ms = ms < 0 ? 0 : ms;
+	ms = ms / 1000; //s
+	var Hour = parseInt(Math.floor(ms / (60 * 60)));
+	var Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
+	var s = parseInt(Math.floor(ms % (60)));
+	//600000
+	return [Hour, Fen, s]
+}
+//计算两个时间的相差小时数
+export const hourDistance = (date1, date2) => {
+	if (!date1 || !date2) {
+		return '-';
+	}
+	date1 = Date.parse(date1);
+	date2 = Date.parse(date2);
+	var ms = date2 - date1;
+	ms = ms < 0 ? 0 : ms;
+	ms = ms / 1000; //s
+	var Hour = parseInt(Math.floor(ms / (60 * 60)));
+	var Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
+	var s = parseInt(Math.floor(ms % (60)));
+	//600000
+	return Hour + '小时' + Fen + '分钟' + s + '秒';
+}
+
+export const parseUnixTime = (time, cFormat) => {
+	if (arguments.length === 0) {
+		return null
+	}
+	const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
+	let date
+	if (typeof time === 'object') {
+		date = time
+	} else {
+		if (('' + time).length === 10) time = parseInt(time) * 1000
+		date = new Date(time)
+	}
+	const formatObj = {
+		y: date.getFullYear(),
+		m: date.getMonth() + 1,
+		d: date.getDate(),
+		h: date.getHours(),
+		i: date.getMinutes(),
+		s: date.getSeconds(),
+		a: date.getDay()
+	}
+	const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
+		let value = formatObj[key]
+		if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
+		if (result.length > 0 && value < 10) {
+			value = '0' + value
+		}
+		return value || 0
+	})
+
+	return time_str
+}
+
+//微信获取code
+export const getWeixinRedirectURI = (appid, url) =>
+	`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(url)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+
+ 
+
+//支付宝获取code
+export const getAlipayRedirectURI = (appid, url) =>
+	`https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${appid}&scope=auth_base&redirect_uri=${encodeURIComponent(url)}`
+
+
+//获取链接的?参数
+export const getUrlParam = (name) => {
+	var reg = new RegExp(name + "=([^&]*)(&|$)");
+	var r = window.location.href.match(reg);
+	var strValue = "";
+	if (r != null) {
+		strValue = unescape(r[1]);
+	}
+	return strValue;
+}
+
+
+//将base64图片码转file
+export const dataUrlToFile = (dataurl, filename) => {
+	var arr = dataurl.split(','),
+		mime = arr[0].match(/:(.*?);/)[1],
+		bstr = atob(arr[1]),
+		n = bstr.length,
+		u8arr = new Uint8Array(n);
+	while (n--) {
+		u8arr[n] = bstr.charCodeAt(n);
+	}
+	return new File([u8arr], filename, {
+		type: mime
+	});
+}
+
+//将canvas转换为image的src
+export const convertCanvasToImage = (canvas) => {
+	return canvas.toDataURL("image/png");;
+}
+
+//验证身份证
+export const checkIdCard = (value) => {
+	var identNumber = value;
+
+	if (identNumber != null) {
+		identNumber = (identNumber + "").toUpperCase();
+	}
+
+	if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identNumber))) {
+		return '身份证格式错误';
+	}
+	//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X。  
+	if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(identNumber))) {
+		return '身份证格式错误';
+	}
+	//校验位按照ISO 7064:1983.MOD 11-2的规定生成,X可以认为是数字10。
+	//下面分别分析出生日期和校验位
+	var len, re;
+	len = identNumber.length;
+	//判断18位身份证号码,现在在国家统一身份证为18位。
+	if (len == 18) {
+		re = new RegExp(/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/);
+		var arrSplit = identNumber.match(re);
+
+
+		//检查生日日期是否正确
+		var dtmBirth = new Date(arrSplit[2] + "/" + arrSplit[3] + "/" + arrSplit[4]);
+		var bGoodDay;
+		bGoodDay = (dtmBirth.getFullYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) &&
+			(dtmBirth.getDate() == Number(arrSplit[4]));
+		if (!bGoodDay) {
+			return '身份证号码日期不匹配';
+		} else {
+			//检验18位身份证的校验码是否正确。
+			//校验位按照ISO 7064:1983.MOD 11-2的规定生成,X可以认为是数字10。
+			var valnum;
+			var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
+			var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
+			var nTemp = 0,
+				i;
+			for (i = 0; i < 17; i++) {
+				nTemp += identNumber.substr(i, 1) * arrInt[i];
+			}
+			valnum = arrCh[nTemp % 11];
+			if (valnum != identNumber.substr(17, 1)) {
+				return '身份证号码校验位不正确';
+			}
+			return true;
+		}
+	} else {
+		return '身份证号码位数不足';
+	}
+}
+
+// 字符串截取 包含对中文处理,str需截取字符串,start开始截取位置,n截取长度
+export const substrMb = (str, start, n) => {
+	if (str.replace(/[\u4e00-\u9fa5]/g, '**').length <= n) {
+		return str;
+	}
+	let len = 0;
+	let tmpStr = '';
+	for (let i = start; i < str.length; i++) { // 遍历字符串
+		if (/[\u4e00-\u9fa5]/.test(str[i])) { // 中文 长度为两字节
+			len += 2;
+		} else {
+			len += 1;
+		}
+		if (len > n) {
+			break;
+		} else {
+			tmpStr += str[i];
+		}
+	}
+	return tmpStr;
+}
+
+//验证手机号
+export const checkPhone = (value) => {
+	if (!value) {
+		return '手机号不能为空';
+	} else {
+		const reg = /^1[3-9]\d{9}$/
+		var result = reg.test(value);
+
+		if (result) {
+			return true;
+		} else {
+			return '请输入正确的手机号';
+		}
+	}
+};
+
+//验证社会信用代码
+export const checkCreditCode = (value) => {
+	if (!value) {
+		return '社会信用代码不能为空';
+	} else {
+		const reg = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
+		var result = reg.test(value);
+
+		if (result) {
+			return true;
+		} else {
+			return '不是有效的统一社会信用编码';
+		}
+	}
+};
+
+//是否为微信浏览器
+export const isWeiXin = () => {
+	return /MicroMessenger/.test(window.navigator.userAgent)
+}
+
+//获取当前根链接
+export const getBaseUrl = () => {
+	return window.location.href.split("#")[0]
+}
+
+//获取指定日期是否在指定时间之间
+export const inDateBetwen = (d, d1, d2) => {
+	//如果时间格式是正确的,那下面这一步转化时间格式就可以不用了
+	var dateBegin = new Date(d1.replace(/-/g, "/")); //将-转化为/,使用new Date
+	var dateEnd = new Date(d2.replace(/-/g, "/")); //将-转化为/,使用new Date
+	//var dateBegin = new Date(d1);//将-转化为/,使用new Date
+	//var dateEnd = new Date(d2);//将-转化为/,使用new Date
+	var dateNow = new Date(d.replace(/-/g, "/")); //获取当前时间
+
+	var beginDiff = dateNow.getTime() - dateBegin.getTime(); //时间差的毫秒数       
+	var beginDayDiff = Math.floor(beginDiff / (24 * 3600 * 1000)); //计算出相差天数
+
+	var endDiff = dateEnd.getTime() - dateNow.getTime(); //时间差的毫秒数
+	var endDayDiff = Math.floor(endDiff / (24 * 3600 * 1000)); //计算出相差天数       
+	if (endDayDiff < 0) {
+		//已过期
+		return false
+	}
+	if (beginDayDiff < 0) {
+		//没到开始时间
+		return false;
+	}
+	return true;
+}
+
+//type为字符串类型,有两种选择,"s"代表开始,"e"代表结束,dates为数字类型,不传或0代表本周,-1代表上周,1代表下周
+export const getWeekTime = (type, dates) => {
+	var now = new Date();
+	var nowTime = now.getTime();
+	var day = now.getDay();
+	var longTime = 24 * 60 * 60 * 1000;
+	var n = longTime * 7 * (dates || 0);
+	if (type == "s") {
+		var dd = nowTime - (day) * longTime + n;
+	};
+	if (type == "e") {
+		var dd = nowTime + (7 - day - 1) * longTime + n;
+	};
+	dd = new Date(dd);
+	var y = dd.getFullYear();
+	var m = dd.getMonth() + 1;
+	var d = dd.getDate();
+	m = m < 10 ? "0" + m : m;
+	d = d < 10 ? "0" + d : d;
+	var day = y + "-" + m + "-" + d;
+	return day;
+}
+
+export const getDiffDate = (stime, etime) => {
+	//初始化日期列表,数组
+	var diffdate = new Array();
+	var i = 0;
+	//开始日期小于等于结束日期,并循环
+	while (stime <= etime) {
+		diffdate[i] = stime;
+
+		//获取开始日期时间戳
+		var stime_ts = new Date(stime).getTime();
+ 
+		//增加一天时间戳后的日期
+		var next_date = stime_ts + (24 * 60 * 60 * 1000);
+
+		//拼接年月日,这里的月份会返回(0-11),所以要+1
+		var next_dates_y = new Date(next_date).getFullYear() + '-';
+		var next_dates_m = (new Date(next_date).getMonth() + 1 < 10) ? '0' + (new Date(next_date).getMonth() + 1) + '-' : (
+			new Date(next_date).getMonth() + 1) + '-';
+		var next_dates_d = (new Date(next_date).getDate() < 10) ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
+
+		stime = next_dates_y + next_dates_m + next_dates_d;
+
+		//增加数组key
+		i++;
+	}
+	return diffdate;
+}
+
+export const isJSON = (str) => {
+	if (typeof str == 'string') {
+		try {
+			var obj = JSON.parse(str);
+			if (typeof obj == 'object' && obj) {
+				return true;
+			} else {
+				return false;
+			}
+		} catch (e) {
+			console.log('error:' + str + '!!!' + e);
+			return false;
+		}
+	}
+}
+
+
+const prefix = 'jp-employment-kfq_'+process.car.NODE_ENV;
+ 
+export const get = key => uni.getStorageInfoSync(prefix+key) 
+
+export const set = (key, value) => uni.setStorageInfoSync(prefix+key, value) 
+
+
+

+ 64 - 0
utils/init.js

@@ -0,0 +1,64 @@
+import carhelp from '@/utils/mixin.js'
+import * as API_WeiXin from '@/apis/weixin.js'
+
+import {
+	getUrlParam,
+	getWeixinRedirectURI,
+	isWeiXin
+} from '@/utils'
+var checkOpenId = true; //是否需要获取openId
+var openId = carhelp.getOpenId();
+
+var app = {
+	init: function() {
+		 
+		if(isWeiXin()|| !(process.env.NODE_ENV === "development") ){
+			if (isWeiXin()) {
+				if (checkOpenId) {
+					if (!openId) {
+						this.getOpenId();
+					} else {
+					 
+					}
+				}
+			} else{
+				var NODE_NAME=  process.env['NODE_NAME']
+				// if(NODE_NAME=="production"){
+				// 	alert("请使用微信打开本页面")
+				// }
+				
+			}
+		}else{
+			carhelp.setOpenId(process.car.openId)
+		}
+		
+		
+	},
+	 
+	getOpenId() {
+		
+		const code = getUrlParam('code');
+		var openId = carhelp.getOpenId()
+		if (!openId) {
+			if (!code) {
+				var url = document.URL;
+				var getUrl= getWeixinRedirectURI(process.car.VUE_APP_WXAPPID, url);
+				 
+				window.location.href = getUrl;
+			} else {
+				
+				API_WeiXin.getDataByCode(code).then(response => {
+					
+					carhelp.setOpenId(response.data.openid)
+					openId = response.data.openid;
+					carhelp.set("xpgj_wx_user_info",response.data)
+					
+					 location.reload();
+				}).catch(error => {
+					console.log(error);
+				});
+			}
+		}
+	}
+}
+module.exports = app

+ 84 - 0
utils/mixin.js

@@ -0,0 +1,84 @@
+var prefix = 'jp_charging_' + process.car.NODE_ENV + '_';
+
+var app = {
+	
+	getPrefix:()=> prefix,
+	get : key =>  uni.getStorageSync(prefix + key),
+
+	set : (key, value) => uni.setStorageSync(prefix + key, value),
+	remove: key =>  uni.removeStorageSync(prefix + key),
+	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'+process.car.VUE_APP_WXAPPID),
+
+	setOpenId: (value) => uni.setStorageSync(prefix + 'wx_openId'+process.car.VUE_APP_WXAPPID, value),
+	setPersonInfo : (value,jp_identity) =>{
+		
+		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)
+			}
+		}
+		
+		
+	}
+	,
+	
+	
+}
+
+module.exports = app

+ 105 - 0
utils/request.js

@@ -0,0 +1,105 @@
+import  carhelp from '@/utils/mixin.js'
+import requestSon from './requestSon.js';
+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=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(options);
+	
+	 if(token_tdate&&token_tdate==tdate){
+	 	return requestSon(options);
+	 }
+	 var openId=carhelp.getOpenId()
+	var  urlindex="/wechat/findUserInfo"
+	var k=options.url.indexOf(urlindex)==-1;
+	
+	 if(!openId&&k){
+		 return
+	 }
+	if(!k){
+		return requestSon(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 + loginurl,
+			data: {
+				openId:openId,
+			
+			},
+			
+			header: {
+				'Content-Type': 'application/x-www-form-urlencoded',
+				'X-Requested-With': 'XMLHttpRequest',
+				//'Authorization':token
+			}
+		}).then((response) => {
+ 			let [error, res] = response;
+ 		  
+			if (res.data.code == 200&&res.data.result) {
+				
+				var token = res ? res.data.data.token : '';
+				 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
+				
+				var isson= requestSon(options)
+				//requestNum(options);
+				resolve(isson);
+				 
+			} else  if(res.data.code == 415||(res.data.code == 200&&!res.data.result)||res.data.code == 400){
+				
+				var backurl=window.location.href.split("#")[1]
+				var url="/pages/login/index"
+				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
+				})
+				
+			 
+				
+			}else{
+				reject(res.data.message)
+			}
+		}).catch(error => {
+			
+			let [err, res] = error;
+			reject(err)
+		})
+	});
+}
+export default request

+ 59 - 0
utils/requestNum.js

@@ -0,0 +1,59 @@
+import  carhelp from '@/utils/mixin.js'
+
+//记录请求次数和响应次数
+let reqCount = 0,
+	resCount = 0;
+var baseUrl=process.car.BASE_URL;
+const request = (options) => {
+	var token=carhelp.getToken(options);
+	
+	reqCount++;
+	 
+	return new Promise((resolve, reject) => {
+		//如果特殊链接需要传入token
+		if(options&&options.token){
+			token=options.token;
+		}
+		uni.request({
+			method: 'post',
+			url: baseUrl + '/mobile/messageApi/readMessageNum',
+			//data: options.data?options.data:{},
+			
+			header: {
+				'Content-Type': 'application/x-www-form-urlencoded',
+				'X-Requested-With': 'XMLHttpRequest',
+				'Authorization':token
+			}
+		}).then((response) => {
+			//for(var t = Date.now(); Date.now() - t <= 2000;);
+			
+			resCount++
+			//防止连续请求多个接口时loading闪现
+			let [error, res] = response;
+			
+			
+			if (res.data.code != 200) {
+				reject(res.data.message)
+			} else {
+				if(!res.data.result){
+					uni.showToast({
+						title: res.data.message,
+						position:'bottom'
+					})
+					reject(res.data.message);
+				}else{
+					
+					carhelp.set("tabbar_show_num",res.data.data);
+					resolve(res.data);
+				}
+			
+			}
+		}).catch(error => {
+			resCount++
+		
+			let [err, res] = error;
+			reject(err)
+		})
+	});
+}
+export default request

+ 71 - 0
utils/requestSon.js

@@ -0,0 +1,71 @@
+import  carhelp from '@/utils/mixin.js'
+
+//记录请求次数和响应次数
+let reqCount = 0,
+	resCount = 0;
+var baseUrl=process.car.BASE_URL;
+
+if (process.env.NODE_ENV === "development") {
+	//baseUrl="http://192.168.33.230:8086/jp-employment-server";
+}
+const request = (options) => {
+	var token=carhelp.getToken(options);
+	
+	reqCount++;
+	 
+	return new Promise((resolve, reject) => {
+		//如果特殊链接需要传入token
+		if(options&&options.token){
+			token=options.token;
+		}
+		uni.request({
+			method: options.method?options.method:'get',
+			url: baseUrl + options.url,
+			data: options.data?options.data:{},
+			
+			header: options.header?{
+				...options.header,
+				'Authorization':token
+			}:{
+				'Content-Type': 'application/x-www-form-urlencoded',
+				'X-Requested-With': 'XMLHttpRequest',
+				'Authorization':token
+			}
+		}).then((response) => {
+			//for(var t = Date.now(); Date.now() - t <= 2000;);
+			
+			resCount++
+			//防止连续请求多个接口时loading闪现
+			let [error, res] = response;
+			
+			if (res.data.code == 415&&res.data.message=='请先注册信息') {
+				carhelp.signOut()
+				uni.redirectTo({
+					url: 'pages/login/index'
+				})
+				return;
+			}
+			
+			if (res.data.code != 200) {
+				reject(res.data.message)
+			} else {
+				if(!res.data.result){
+					uni.showToast({
+						title: res.data.message,
+						position:'bottom'
+					})
+					reject(res.data.message);
+				}else{
+					resolve(res.data);
+				}
+			
+			}
+		}).catch(error => {
+			resCount++
+		
+			let [err, res] = error;
+			reject(err)
+		})
+	});
+}
+export default request

+ 79 - 0
utils/requestWhite.js

@@ -0,0 +1,79 @@
+import  carhelp from '@/utils/mixin.js'
+
+//记录请求次数和响应次数
+let reqCount = 0,
+	resCount = 0;
+//var token=carhelp.getToken();
+var baseUrl=process.car.BASE_URL;
+
+if (process.env.NODE_ENV === "development") {
+	//baseUrl="http://192.168.33.90:8086/jp-employment-server";
+}
+const request = (options) => {
+	var token=carhelp.getToken(options);
+	
+	reqCount++;
+	 
+	return new Promise((resolve, reject) => {
+		//如果特殊链接需要传入token
+		if(options&&options.token){
+			token=options.token;
+		}
+		uni.request({
+			method: options.method?options.method:'get',
+			url: baseUrl + options.url,
+			data: options.data?options.data:{},
+			
+			header: options.header?{
+				...options.header,
+				'Authorization':token
+			}:{
+				'Content-Type': 'application/x-www-form-urlencoded',
+				'X-Requested-With': 'XMLHttpRequest',
+				'Authorization':token
+			}
+		}).then((response) => {
+			//for(var t = Date.now(); Date.now() - t <= 2000;);
+			
+			resCount++
+			//防止连续请求多个接口时loading闪现
+			let [error, res] = response;
+			
+			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:url
+				})
+				return;
+			}
+			
+			if (res.data.code == 200&&res.data.result) {
+				
+					resolve(res.data);
+			} else {
+				// if(!res.data.result){
+				// 	uni.showToast({
+				// 		title: res.data.message,
+				// 		position:'bottom'
+				// 	})
+				// }
+			reject(res.data.message)
+			}
+		}).catch(error => {
+			resCount++
+		
+			let [err, res] = error;
+			reject(err)
+		})
+	});
+}
+export default request

+ 209 - 0
utils/wxJsApi.js

@@ -0,0 +1,209 @@
+import wx from 'weixin-js-sdk'
+import * as API_WeiXin from '@/apis/weixin.js'
+import * as API_Common from '@/apis/common.js'
+
+import Qs from 'qs';
+import request from './request.js'
+export function addSysLog(message) {
+
+	return request({
+		url: '/mobile/sysLogApi/submit',
+		data: Qs.stringify({
+			message: JSON.stringify(message)
+		}),
+		method: 'post',
+	})
+}
+//获取微信配置
+export function getWxConfig(jsApiList) {
+	var jsApiList = jsApiList || ['chooseImage', 'getLocalImgData', 'scanQRCode'];
+	 
+	let promise = (jsApiList => {
+		return new Promise((resolve, reject) => {
+			console.log(jsApiList);
+			API_WeiXin.getConfig().then(response => {
+				var wxconfig = response.data.wxConfig;
+			
+				wx.config({
+					debug: false, // 开启调试模式,
+					appId: wxconfig.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
+					timestamp: wxconfig.timestamp, // 必填,生成签名的时间戳
+					nonceStr: wxconfig.nonceStr, // 必填,生成签名的随机串
+					signature: wxconfig.signature, // 必填,签名,见附录1
+					jsApiList: jsApiList, // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+					openTagList:['wx-open-subscribe']
+				});
+				wx.ready(function() {
+					resolve(response.data);
+				})
+				wx.error(function(res) {
+					reject('微信api配置出错');
+				});
+			}).catch(error => {
+				//mui.toast(error);
+				reject(error);
+			})
+		})
+	})(jsApiList)
+
+	return promise;
+}
+
+//选择图片,多图上传和单图上传的回调处理不一样
+export function chooseImage(count,islocalId) {
+	var count = count || 1;
+	let promise = new Promise((resolve, reject) => {
+		wx.chooseImage({
+			count: count,
+			sizeType: ['compressed'],
+			sourceType: ['album', 'camera'],
+			success: function(res) {
+				 
+				var localIds = res.localIds;
+				
+				if(islocalId){
+					
+					resolve(localIds);
+				}else{
+					if (count == 1) {
+						wx.getLocalImgData({
+							localId: localIds[0],
+							success: function(res) {
+								resolve(res);
+							}
+						});
+					} else {
+						resolve(localIds);
+					}
+				}
+				
+			}
+		});
+	});
+	return promise;
+}
+
+
+
+
+//获取图片,用于多图上传时的递归处理
+export function getLocalImgData(localId, fun) {
+	wx.getLocalImgData({
+		localId: localId,
+		success: function(res) {
+			fun(res);
+		}
+	});
+}
+
+//上传图片
+export function uploadPic(imgBase64) {
+	let promise = new Promise((resolve, reject) => {
+		var formData = new FormData();
+		formData.append('photoName', '1.jpg');
+		formData.append('photoBase64Data', imgBase64);
+
+	
+		API_Common.uploadBase64(formData).then(response => {
+			resolve(response);
+		}).catch(error => {
+			//mui.toast(error);
+			reject(error);
+		})
+	});
+	return promise;
+}
+
+//获取坐标
+export function getLocation() {
+	let promise = new Promise((resolve, reject) => {
+		wx.ready(function() {
+			wx.getLocation({
+				type: 'gcj02', // 默认为wgs84的gps坐标,可传入'gcj02'
+				success: function(res) {
+					resolve(res);
+				},
+				faile: function(res) {
+					reject(res);
+				},
+				fail: function(res) {
+					if (res.errMsg == 'getLocation:timeout') {
+						
+						res="定位超时,请检查是否开启'定位'"
+					} else if (res.errMsg == 'getLocation:ERROR_NETWORK') {
+						//mui.alert("网络异常");
+						res="定位超时,请检查是否开启'定位'"
+					} else if (res.errMsg == 'getLocation:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF') {
+						res="没开启系统定位"
+						//mui.alert("没开启系统定位");
+					} else if (res.errMsg == 'getLocation:system permission denied') {
+						res="未给微信位置授权"
+						//mui.alert("未给微信位置授权");
+					} else if (res.errMsg == 'getLocation:location permission') {
+						res="未给微信位置授权"
+						//mui.alert("未给微信位置授权");
+					} else if (res.errMsg == 'getLocation:auth denied') {
+						res="用户在小程序中未授权"
+						//mui.alert("用户在小程序中未授权");
+					} else if (res.errMsg == 'getLocation:fail authorize no response') {
+						res="用户在小程序中未授权"
+						//mui.alert("用户在小程序中未授权");
+					}
+					reject(res);
+				},
+				complete() {}
+			})
+		})
+	})
+	return promise;
+}
+
+//扫描二维码
+export function scanQRCode(needResult,obj) {
+	var needResult = needResult || 1;
+	let promise = new Promise((resolve, reject) => {
+		wx.scanQRCode({
+			needResult: needResult,
+			scanType: ["qrCode"],
+			success: function(res) {
+				var url = res.resultStr;
+				resolve(url);
+			},
+			faile: function(res) {
+				reject(res);
+			},
+			
+			fail: function(res) {
+
+				reject(res);
+			},
+			complete() {
+				if(obj){
+					obj.showLoading(false)	
+				}
+			}
+		})
+	});
+	return promise;
+}
+
+export function requestSubscribeMessage(sz) {
+	 
+	let promise = new Promise((resolve, reject) => {
+		wx.ready(function() {
+			wx.requestSubscribeMessage({
+			
+			tmplIds: sz,
+			
+				success(res) { 
+						resolve(res);
+				}
+				
+			})
+		})
+		
+
+	});
+	return promise;
+}
+

+ 60 - 0
utils/wxpay.js

@@ -0,0 +1,60 @@
+ 
+function onBridgeReady(params) {
+	console.log("onBridgeReady+"+new Date().getTime())
+	
+	uni.showLoading({
+		mask:true,title:'加载中...'
+	})
+	//记录要回跳的url
+	window.WeixinJSBridge.invoke(
+		'getBrandWCPayRequest', {
+			'appId': params.appId, // 公众号名称,由商户传入
+			'timeStamp': params.timeStamp, // 时间戳,自1970年以来的秒数
+			'nonceStr': params.nonceStr, // 随机串
+			'package': params.package,
+			'signType': params.signType, // 微信签名方式:
+			'paySign': params.paySign // 微信签名
+		},
+		(res) => {
+			//alert(JSON.stringify(res)); // 支付取消会执行 支付成功不会
+			if (res.err_msg == 'get_brand_wcpay_request:ok') {
+				//alert("支付成功") // 不会执行
+				//window.location.href = params.url
+			} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+				//alert("支付取消") // 会执行
+				 uni.hideLoading();
+			} else {
+				alert("支付失败")
+				 uni.hideLoading();
+			}
+		}
+	)
+}
+
+export const wxPayJs = (params) => {
+	console.log("wxPayJs+"+new Date().getTime())
+	
+	uni.showLoading({
+		mask:true,title:'加载中...'
+	})
+	if (!params.url) {
+		params.url = window.location.href.split("#")[0] + "/#/";
+	}
+
+	if (typeof window.WeixinJSBridge === 'undefined') {
+		if (document.addEventListener) {
+			document.addEventListener('WeixinJSBridgeReady', function() {
+				onBridgeReady(params)
+			}, false)
+		} else if (document.attachEvent) {
+			document.attachEvent('WeixinJSBridgeReady', function() {
+				onBridgeReady(params)
+			})
+			document.attachEvent('onWeixinJSBridgeReady', function() {
+				onBridgeReady(params)
+			})
+		}
+	} else {
+		onBridgeReady(params)
+	}
+}

+ 92 - 0
vue.config.js

@@ -0,0 +1,92 @@
+if(process.env.NODE_ENV === "production"){
+
+const path = require('path');
+const webpack = require('webpack')
+
+const CompressionWebpackPlugin = require("compression-webpack-plugin")
+const productionGzipExtensions = ['js', 'css']
+
+function resolve(dir) {
+	return path.join(__dirname, dir)
+}
+
+const Timestamp = new Date().getTime();
+module.exports = {
+	publicPath: './',
+	outputDir: 'dist/' ,
+	assetsDir: 'static',
+	lintOnSave: false,
+	devServer: {
+		host: 'localhost',
+		port: 8080,
+		//解析缓存
+		disableHostCheck: true,
+		//支持gzip
+		compress: true,
+	},
+	//不输出map
+	productionSourceMap: false,
+	chainWebpack: (config) => {
+		config.entry.app = ['babel-polyfill', './src/main.js']
+		config.resolve.alias
+			.set('@', resolve('./static/'))
+
+		config.plugins.delete('preload-index');
+		config.plugins.delete('prefetch-index');
+		
+		config.module.rule('images')
+		           .test(/\.(png|jpe?g|gif|webp)(\?.*)?$/)
+		           .use('url-loader')
+		           .loader('file-loader')
+		           .options({
+		               name: 'static/img/[name].[hash:8].[ext]'
+		           })
+				
+		config.optimization.minimize(true);
+	},
+	configureWebpack: config => {
+		/* //开启gzip压缩,需要配置Nginx服务器gzip选项开启
+		config.plugins.push(
+			new CompressionWebpackPlugin({
+				filename: '[path].gz[query]',
+				algorithm: 'gzip',
+				test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
+				threshold: 10240,
+				minRatio: 0.8
+			})
+		); */
+
+			config.plugins.push(new webpack.ProgressPlugin(percentage => {
+				percentage === 1 ? console.log('编译完成:100.00%') : console.log(`编译进度:${(percentage * 100).toFixed(2)}%`)
+			}));
+		config.output.filename = `./static/js/[name].${Timestamp}.js`
+		config.output.chunkFilename = `./static/js/[name].${Timestamp}.js`
+
+		config.performance = {
+			hints: 'warning',
+			//入口起点的最大体积 整数类型(以字节为单位)
+			maxEntrypointSize: 50000000,
+			//生成文件的最大体积 整数类型(以字节为单位 300k)
+			maxAssetSize: 30000000,
+			//只给出 js 文件的性能提示
+			assetFilter: function(assetFilename) {
+				return assetFilename.endsWith('.js');
+			}
+		}
+	},
+	css: {
+		extract: {
+			filename: `./static/css/[name].${Timestamp}.css`,
+			chunkFilename: `./static/css/[name].${Timestamp}.css`
+		},
+		sourceMap: false,
+		loaderOptions: {
+			// 给 sass-loader 传递选项
+			sass: {
+				// @/ 是 src/ 的别名
+				// prependData: `@import "@/assets/scss/base.scss";`
+			}
+		}
+	}
+};
+}