zhengkaixin преди 3 години
родител
ревизия
d0c75c8c3c
променени са 11 файла, в които са добавени 261 реда и са изтрити 578 реда
  1. 47 0
      apis/finance.js
  2. 73 68
      bobo-router/index.js
  3. 0 472
      console.js
  4. 29 28
      package.json
  5. 78 2
      pagesFinance/statistics/index.vue
  6. 9 1
      utils/mixin.js
  7. 19 4
      utils/request.js
  8. 1 1
      utils/requestNum.js
  9. 1 1
      utils/requestSon.js
  10. 1 1
      utils/requestWhite.js
  11. 3 0
      vue.config.js

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

+ 73 - 68
bobo-router/index.js

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

+ 0 - 472
console.js

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

+ 29 - 28
package.json

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

+ 78 - 2
pagesFinance/statistics/index.vue

@@ -29,12 +29,17 @@
 			<view class="statisticsChart-head">
 				<h4>充电桩收益占比</h4>
 				<view class="statisticsChart-time">
-					<p>2022-04-30 至 2022-05-01</p>
+					<u-calendar v-model="showdate" mode="range" @change="changedate"></u-calendar>
+					<p @click="showdate = true" >{{startTime}} 至 {{endTime}}</p>
 					<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="36"></u-icon>
+					
 				</view>
 			</view>
 			<view class="statisticsChart-main">
-				<u-subsection :list="subsection" :current="1" button-color="#2E7Dff" active-color="#fff"></u-subsection>
+				<u-subsection :list="subsection"  @change="changedate" :current="1" button-color="#2E7Dff" active-color="#fff"></u-subsection>
+				<view  id="pieEcharts" style="min-height:250px;" >
+					
+				</view>
 			</view>
 		</view>
 		<u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
@@ -42,9 +47,19 @@
 </template>
 
 <script>
+	import * as echarts from "echarts";
+	import {
+			beforeTimeStamp	,
+			currentTimeStamp,
+			parseUnixTime
+		} from '@/utils'
 	export default {
 		data() {
 			return {
+				showdate:false,
+				startTime:"",
+				myChart:null,
+				endTime:"",
 				subsection: [
 					{
 						name: '金额'
@@ -68,6 +83,7 @@
 						midButton: true,
 						customIcon: true,
 					},
+					
 					{
 						iconPath: "account-pin-box-fill",
 						selectedIconPath: "account-pin-box-fill",
@@ -83,8 +99,68 @@
 				},
 			}
 		},
+		onLoad() {
+			
+		},onReady() {
+			this.startTime=parseUnixTime(beforeTimeStamp(7), '{y}-{m}-{d}')
+			this.endTime=parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
+			this.getPie( [
+        { value: 1048, name: '数据1' },
+        { value: 735, name: '数据2' },
+        { value: 580, name: '数据3' },
+        { value: 484, name: '数据4' },
+        { value: 300, name: '数据5' }
+      ])
+		},
 		methods: {
+			changedate(e){
+				this.startTime=e.startDate
+				this.endTime=e.endDate
+				
+				this.getPie( [
+				  { value: 48, name: '数据1' },
+				  { value: 35, name: '数据2' },
+				  { value: 80, name: '数据3' },
+				  { value: 84, name: '数据4' },
+				  { value: 100, name: '数据5' }
+				])
+			},
+			getPie(getData){
+				if(!this.myChart){
+					this.myChart = echarts.init(document.getElementById('pieEcharts'));
+					
+				}
+				// 指定图表的配置项和数据
+				var option =   {
 
+  tooltip: {
+    trigger: 'item'
+  },
+  legend: {
+  
+	 bottom: '0%',
+	    left: 'center'
+  },
+  series: [
+    {
+      name: 'Access From',
+      type: 'pie',
+      radius: '50%',
+      data:getData,
+      emphasis: {
+        itemStyle: {
+          shadowBlur: 10,
+          shadowOffsetX: 0,
+          shadowColor: 'rgba(0, 0, 0, 0.5)'
+        }
+      }
+    }
+  ]
+};
+				
+				// 使用刚指定的配置项和数据显示图表。
+				this.myChart.setOption(option);
+			}
 		}
 	}
 </script>

+ 9 - 1
utils/mixin.js

@@ -17,7 +17,15 @@ var app = {
 	setOpenId : (value) => uni.setStorageSync(prefix + 'wx_openId', value),
 	setPersonInfo : (value) => uni.setStorageSync(prefix + 'personInfo', value),
 	
-	getToken : () =>  uni.getStorageSync(prefix + 'token'),
+	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)
 		

+ 19 - 4
utils/request.js

@@ -8,7 +8,7 @@ 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();
+	var token=carhelp.getToken(options);
 	
 	 if(token_tdate&&token_tdate==tdate){
 	 	return requestSon(options);
@@ -25,11 +25,15 @@ const request = (options) => {
 	}
 	
 	return new Promise((resolve, reject) => {
+		 var loginurl="/mobile/regUser/findByOpenId"
 		 
+		 if(options&&options.jp_identity){
+		 	 loginurl="/mobile/"+options.jp_identity+"/findByOpenId"
+		 }
 		 
 		uni.request({
 			method:'get',
-			url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
+			url: process.car.BASE_URL + loginurl,
 			data: {
 				openId:openId,
 			
@@ -58,8 +62,19 @@ const request = (options) => {
 				 
 			} else  if(res.data.code == 415||(res.data.code == 200&&!res.data.result)||res.data.code == 400){
 				
-				var url=window.location.href.split("#")[1]
-				window.location.href="#/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
+				//var 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'
+				})
 				
 			 
 				

+ 1 - 1
utils/requestNum.js

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

+ 1 - 1
utils/requestSon.js

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

+ 1 - 1
utils/requestWhite.js

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

+ 3 - 0
vue.config.js

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