Browse Source

初始化

zhengkaixin 3 năm trước cách đây
commit
99580b1942
60 tập tin đã thay đổi với 3450 bổ sung0 xóa
  1. 14 0
      .env.dev.js
  2. 35 0
      .env.js
  3. 11 0
      .env.prod.js
  4. 21 0
      .env.test.js
  5. 49 0
      App.vue
  6. 75 0
      README.md
  7. 184 0
      apis/common.js
  8. 47 0
      apis/finance.js
  9. 114 0
      apis/index.js
  10. 50 0
      apis/login.js
  11. 70 0
      apis/my.js
  12. 36 0
      apis/weixin.js
  13. 0 0
      assets/css/style.css
  14. 130 0
      assets/font/iconfont.css
  15. 7 0
      assets/font/jptime.css
  16. BIN
      assets/font/jptime.otf
  17. BIN
      assets/img/Withdrawal_bg.png
  18. BIN
      assets/img/bgbg.png
  19. BIN
      assets/img/blankpage.png
  20. BIN
      assets/img/charge-0.png
  21. BIN
      assets/img/charge-1.png
  22. BIN
      assets/img/charge-2.png
  23. BIN
      assets/img/charge-3.png
  24. BIN
      assets/img/charging_type_1.png
  25. BIN
      assets/img/charging_type_3.png
  26. BIN
      assets/img/charging_type_bike.png
  27. BIN
      assets/img/charging_type_fast.png
  28. BIN
      assets/img/charging_type_slow.png
  29. BIN
      assets/img/ddc.png
  30. BIN
      assets/img/head.png
  31. BIN
      assets/img/icon_success.png
  32. BIN
      assets/img/index_header_bg.png
  33. BIN
      assets/img/logo.png
  34. BIN
      assets/img/logo_xiaopengguanjia.png
  35. BIN
      assets/img/min_button_select.png
  36. BIN
      assets/img/mine_header_bg.png
  37. BIN
      assets/img/shenhe.png
  38. 153 0
      bobo-router/README.md
  39. 362 0
      bobo-router/bobo-router.js
  40. 69 0
      bobo-router/index.js
  41. 84 0
      components/Tabbar.vue
  42. 472 0
      console.js
  43. 25 0
      font.js
  44. 50 0
      main.js
  45. 87 0
      manifest.json
  46. 57 0
      package.json
  47. 23 0
      pages.json
  48. 8 0
      pages/index/index.vue
  49. BIN
      static/img/min_button_select.png
  50. 77 0
      uni.scss
  51. 386 0
      utils/index.js
  52. 60 0
      utils/init.js
  53. 42 0
      utils/mixin.js
  54. 91 0
      utils/request.js
  55. 59 0
      utils/requestNum.js
  56. 71 0
      utils/requestSon.js
  57. 69 0
      utils/requestWhite.js
  58. 209 0
      utils/wxJsApi.js
  59. 60 0
      utils/wxpay.js
  60. 93 0
      vue.config.js

+ 14 - 0
.env.dev.js

@@ -0,0 +1,14 @@
+const UNI_APP = {  
+	ProjectName :"51充电联盟",
+    BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
+	NODE_ENV :"dev",
+	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
+	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
+	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
+	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
+	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	//小鹏管家appid
+	VUE_APP_WXAPPID:"wx7e70eb62a8459869"
+}  
+
+module.exports = UNI_APP;

+ 35 - 0
.env.js

@@ -0,0 +1,35 @@
+(function() {  
+    const NODE_ENV = 'test'; // 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];			
+        }  
+    }  
+})();

+ 11 - 0
.env.prod.js

@@ -0,0 +1,11 @@
+const UNI_APP = {  	
+		ProjectName :"51充电联盟",
+    BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
+	NODE_ENV :"prod",
+	SIMPLE_RUN:false,
+	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",//测试用openId
+	//小鹏管家appid
+	VUE_APP_WXAPPID:"wx7e70eb62a8459869"
+}  
+
+module.exports = UNI_APP;

+ 21 - 0
.env.test.js

@@ -0,0 +1,21 @@
+const UNI_APP = {  
+		ProjectName :"51充电联盟",
+    // 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",
+	//zkx的测试openId
+	//openId:"oHjCawsJ5blME36lHaSpSVfEhleU",
+	openId:"oHjCawigqi8SEAwutwkQ-VEgdp3k",
+	//zq的测试openId
+	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",
+}  
+
+module.exports = UNI_APP;

+ 49 - 0
App.vue

@@ -0,0 +1,49 @@
+<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 '@/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;
+	}
+</style>

+ 75 - 0
README.md

@@ -0,0 +1,75 @@
+#   智能充电系统
+#   
+#   先运行yarn 初始化
+#   
+#   
+#   
+发行方式, 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
+
+
+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',
+	})
+}

+ 47 - 0
apis/finance.js

@@ -0,0 +1,47 @@
+import request from '../utils/request.js';
+import requestWhite from '../utils/requestWhite.js';
+
+import Qs from 'qs';
+
+export function merchantUser(data) {
+	return requestWhite({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/merchantUser'
+	})
+}
+
+export function findByOpenId(data) {
+	var url='/mobile/merchantUser/findByOpenId';
+	return requestWhite({
+		jp_identity:"merchantUser",// 分润接口
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function validateCode(data) {
+	 
+	return requestWhite({
+		method: 'post',
+			jp_identity:"merchantUser",// 分润接口
+		data:data ,
+		url: '/mobile/merchantUser/validateCode'
+	})
+} 
+
+export function getVerifyCode(tel) {
+	 
+	return requestWhite({
+		method: 'post',
+		jp_identity:"merchantUser",// 分润接口
+		data:{
+			telephone:tel
+		} ,
+		url: '/mobile/merchantUser/getVerifyCode'
+	})
+} 

+ 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
+	})
+} 

+ 70 - 0
apis/my.js

@@ -0,0 +1,70 @@
+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'
+	})
+}
+

+ 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


+ 130 - 0
assets/font/iconfont.css

@@ -0,0 +1,130 @@
+@font-face {
+  font-family: "custom-icon"; /* Project id 3365301 */
+  src: url('//at.alicdn.com/t/font_3365301_1pu1kbsjza1.woff2?t=1652165872934') format('woff2'),
+       url('//at.alicdn.com/t/font_3365301_1pu1kbsjza1.woff?t=1652165872934') format('woff'),
+       url('//at.alicdn.com/t/font_3365301_1pu1kbsjza1.ttf?t=1652165872934') 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-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/Withdrawal_bg.png


BIN
assets/img/bgbg.png


BIN
assets/img/blankpage.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/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


+ 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

+ 69 - 0
bobo-router/index.js

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

+ 84 - 0
components/Tabbar.vue

@@ -0,0 +1,84 @@
+<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
+			
+		},
+		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:{
+			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>

+ 472 - 0
console.js

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

+ 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
+						});
+					});
+				}
+			})();

+ 50 - 0
main.js

@@ -0,0 +1,50 @@
+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
+//  先运行yarn  初始化
+import Vconsole from 'vconsole'
+ //import './router' // 引入路由
+import router from './bobo-router'
+
+
+// main.js
+//  先运行yarn  初始化
+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" : "jp-charge",
+    "appid" : "__UNI__2D3A5D0",
+    "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
+    }
+   }
+  }
+ }
+}

+ 23 - 0
pages.json

@@ -0,0 +1,23 @@
+{
+	"easycom": {
+			"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+		},
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages	
+		{
+			"name":"充电中",
+			"path": "pages/index/index",
+			"style": {
+			
+			}
+		}
+		
+
+    ],
+	"globalStyle": {
+			"navigationStyle": "custom", // 隐藏系统导航栏
+			"navigationBarTitleText": "智能充电系统",
+			"enablePullDownRefresh": false
+			
+	}
+  
+}

+ 8 - 0
pages/index/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</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) 
+
+
+

+ 60 - 0
utils/init.js

@@ -0,0 +1,60 @@
+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{
+				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

+ 42 - 0
utils/mixin.js

@@ -0,0 +1,42 @@
+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),
+	
+	getPersonInfo : () => {
+		 return uni.getStorageSync(prefix + 'personInfo')
+	},
+	signOut:()=>  uni.removeStorageSync(prefix  + 'personInfo'),
+	getOpenId : () =>   uni.getStorageSync(prefix + 'wx_openId'),
+
+	setOpenId : (value) => uni.setStorageSync(prefix + 'wx_openId', value),
+	setPersonInfo : (value) => uni.setStorageSync(prefix + 'personInfo', value),
+	
+	getToken : (options) => {
+		//不同权限 ,不同token
+		if(options&&options.jp_identity){
+			return uni.getStorageSync(prefix+options.jp_identity+ '_token')
+		}else{
+			return uni.getStorageSync(prefix + 'token')
+			
+		}
+	},
+	setToken : (value) => {
+		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

+ 91 - 0
utils/request.js

@@ -0,0 +1,91 @@
+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=carhelp.get("token_tdate");//每10分钟存储一次token
+	
+	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 : '';
+				carhelp.setPersonInfo(res.data.data.regUser );
+				
+				carhelp.setToken(token);
+				
+				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 url=window.location.href.split("#")[1]
+				if(options&&options.jp_identity){
+					
+				}else{
+					
+					
+				}
+				
+				var url="/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
+				carhelp.signOut()
+				uni.redirectTo({
+					url: '/pages/login/index'
+				})
+				
+			 
+				
+			}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

+ 69 - 0
utils/requestWhite.js

@@ -0,0 +1,69 @@
+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()
+				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'
+					})
+				}
+				resolve(res.data);
+			}
+		}).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)
+	}
+}

+ 93 - 0
vue.config.js

@@ -0,0 +1,93 @@
+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";`
+				}
+			}
+		}
+	};
+	
+}