Commit 47043396 by xws

up

parent 9aed871f
......@@ -5,5 +5,7 @@ VUE_APP_BASE_URL= http://organization.test.hrs100.cn:18080
VUE_APP_USERINFO_URL=http://106.120.107.145:7778/v1/qqxb/user/api
VUE_APP_SALARY_URL=http://salary.test-api.qqxb.jinsehuaqin.com:8800
# https开关
VUE_APP_OPEN_HTTPS=false
......@@ -7144,7 +7144,8 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true
"dev": true,
"optional": true
},
"pify": {
"version": "4.0.1",
......
......@@ -31,7 +31,7 @@ export interface EmployeeInterface {
setFiles(params:any):Promise<any>;// 设置文件
delFiles(params:any):Promise<any>;// 删除文件
putFiles(params:any):Promise<any>;// 提交文件
tranFiles(params:any):Promise<any>;//上传文件转短连接
getAgileWorker(params: any): Promise<any>; //灵活用工
}
......@@ -11,7 +11,7 @@ class EmployeeService implements EmployeeInterface {
* 请求头信息
*/
private header: any;
private headerUp: any;
/**
* 当前版本
*/
......@@ -29,6 +29,7 @@ class EmployeeService implements EmployeeInterface {
// 获取登录token
store.getters.getAccessToken.then((res: any) => {
this.header = { Authorization: `Bearer ${res}` };
this.headerUp ={ Authorization: `Bearer ${res}`,'Content-Type':'multipart/form-data;charset=UTF-8'}
});
// store.getters.getUserInfo.then((res: any) => {
// // console.log(res);
......@@ -310,6 +311,16 @@ class EmployeeService implements EmployeeInterface {
/**
*
* base64转短连接
* @param params
*/
public tranFiles(params: any): Promise<any> {
let url = urls.salaryUrl + `/general/person/upload`;
return request.post(url, params, this.headerUp);
}
/**
*
* 提交文件
* @param params
*/
......
......@@ -9,10 +9,15 @@ class Urls {
employeeUrl: String = process.env.VUE_APP_BASE_URL;
/**
*
* 获取用户信息
*/
userInfoUrl: String = process.env.VUE_APP_USERINFO_URL;
/**
* 个人中心
*/
salaryUrl: String = process.env.VUE_APP_SALARY_URL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment