Commit 69e484e6 by 展昭

对接数据,修改对接方法.

parent 92743715
VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id": "teamix-personal-center-web-pc", "client_secret": "123456", "redirect_uri": "http://localhost:8080/callback.html", "response_type": "id_token token", "scope": "openid workapps.client api.workapps.user","post_logout_redirect_uri":"http://localhost:8080", "silent_redirect_uri": "http://localhost:8080/silent-renew.html", "automaticSilentRenew": true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true,"loadUserInfo":true }' VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id": "teamix-personal-center-web-pc", "client_secret": "123456", "redirect_uri": "http://localhost:8080/callback.html", "response_type": "id_token token", "scope": "openid workapps.client api.workapps.user","post_logout_redirect_uri":"http://localhost:8080", "silent_redirect_uri": "http://localhost:8080/silent-renew.html", "automaticSilentRenew": true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true,"loadUserInfo":true }'
VUE_APP_BASE_URL= "http://organization.test.hrs100.cn:18080/" VUE_APP_BASE_URL= http://organization.test.hrs100.cn:18080
VUE_APP_USERINFO_URL=http://106.120.107.145:7778/v1/qqxb/user/api
# https开关 # https开关
VUE_APP_OPEN_HTTPS=false VUE_APP_OPEN_HTTPS=false
VUE_APP_OIDC_CONFIG = '{ "authority": "https://passport.teammix.com", "client_id": "qqxb-activity-web-mobile", "client_secret": "qqxb#teammix#2019", "redirect_uri": "https://invite.activity.h5.hrs100.com/callback.html", "response_type": "id_token token", "scope": "workapps.client api.workapps.user api.workapps.org api.workapps.open openid","post_logout_redirect_uri":"https://invite.activity.h5.hrs100.com", "silent_redirect_uri": "https://invite.activity.h5.hrs100.com/silent-renew-oidc.html", "automaticSilentRenew": true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true }' VUE_APP_OIDC_CONFIG = '{ "authority": "https://passport.teammix.com", "client_id": "qqxb-activity-web-mobile", "client_secret": "qqxb#teammix#2019", "redirect_uri": "https://invite.activity.h5.hrs100.com/callback.html", "response_type": "id_token token", "scope": "workapps.client api.workapps.user api.workapps.org api.workapps.open openid","post_logout_redirect_uri":"https://invite.activity.h5.hrs100.com", "silent_redirect_uri": "https://invite.activity.h5.hrs100.com/silent-renew-oidc.html", "automaticSilentRenew": true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true }'
#VUE_APP_API_BASEURL = 'https://apiplus.qinqinxiaobao.com/v1/qqxb/user/api' VUE_APP_USERINFO_URL="";
VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id": "qqxb-activity-web-mobile", "client_secret": "123456", "redirect_uri": "http://106.120.107.150:7774/callback.html", "response_type": "id_token token", "scope": "workapps.client api.workapps.user api.workapps.org api.workapps.open openid","post_logout_redirect_uri":"http://106.120.107.150:7774", "silent_redirect_uri": "http://106.120.107.150:7774/silent-renew-oidc.html", "automaticSilentRenew": true,"automaticSilentSignin":true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true }' VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id": "qqxb-activity-web-mobile", "client_secret": "123456", "redirect_uri": "http://106.120.107.150:7774/callback.html", "response_type": "id_token token", "scope": "workapps.client api.workapps.user api.workapps.org api.workapps.open openid","post_logout_redirect_uri":"http://106.120.107.150:7774", "silent_redirect_uri": "http://106.120.107.150:7774/silent-renew-oidc.html", "automaticSilentRenew": true,"automaticSilentSignin":true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true }'
#VUE_APP_API_BASEURL = 'http://106.120.107.145:7778/v1/qqxb/user/api' VUE_APP_BASE_URL= http://organization.test.hrs100.cn:18080
VUE_APP_USERINFO_URL=http://106.120.107.145:7778/v1/qqxb/user/api
...@@ -16,7 +16,7 @@ export default [ ...@@ -16,7 +16,7 @@ export default [
component: () => import("@/views/SelectIdentity.vue"), component: () => import("@/views/SelectIdentity.vue"),
meta: { meta: {
title: '身份选择', title: '身份选择',
requiresAuth: false requiresAuth: true
} }
}, },
{ {
......
...@@ -3,6 +3,7 @@ import store from '@/store'; ...@@ -3,6 +3,7 @@ import store from '@/store';
import { EmployeeInterface } from '@/services/employee/employeeService'; import { EmployeeInterface } from '@/services/employee/employeeService';
import urls from '@/utils/urls'; import urls from '@/utils/urls';
/** /**
* 员工服务类 * 员工服务类
*/ */
...@@ -42,13 +43,8 @@ class EmployeeService implements EmployeeInterface { ...@@ -42,13 +43,8 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public async getUserInfo(params: any): Promise<any> { public async getUserInfo(params: any): Promise<any> {
console.log(this.header); const url = urls.userInfoUrl + `/userAuthDetails`;
// let result = await request.get("http://qinqinxiaobao.com", "", this.header); return request.postWithAuthHeader(url, params, this.header)
// console.log(result);
return {
id: 1,
name: "333"
}
} }
/** /**
...@@ -56,7 +52,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -56,7 +52,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getWorkInfoList(params: any): Promise<any> { public getWorkInfoList(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/work`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/work`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -66,7 +62,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -66,7 +62,7 @@ class EmployeeService implements EmployeeInterface {
*/ */
public getWorkInfoDetail(params: any): Promise<any> { public getWorkInfoDetail(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/work/detail`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/work/detail`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -75,7 +71,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -75,7 +71,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getPersonInfo(params: any): Promise<any> { public getPersonInfo(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/info`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/info`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -84,7 +80,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -84,7 +80,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public savePersonInfo(params: any): Promise<any> { public savePersonInfo(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/info`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/info`;
return request.post(url, params, this.header) return request.post(url, params, this.header)
} }
...@@ -93,7 +89,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -93,7 +89,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getContactInfo(params: any): Promise<any> { public getContactInfo(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/contact/info`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/contact/info`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -102,7 +98,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -102,7 +98,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public saveContactInfo(params: any): Promise<any> { public saveContactInfo(params: any): Promise<any> {
let url = `/api/user/contact/${params.edId}/info`; let url = urls.employeeUrl + `/api/user/contact/${params.edId}/info`;
return request.post(url, params, this.header) return request.post(url, params, this.header)
} }
...@@ -111,7 +107,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -111,7 +107,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getSocialInfo(params: any): Promise<any> { public getSocialInfo(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/unit/relation`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/unit/relation`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -120,7 +116,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -120,7 +116,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public saveSocialInfo(params: any): Promise<any> { public saveSocialInfo(params: any): Promise<any> {
let url = `/api/user/employee/unit/relation/save`; let url = urls.employeeUrl + `/api/user/employee/unit/relation/save`;
return request.post(url, params, this.header) return request.post(url, params, this.header)
} }
...@@ -129,7 +125,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -129,7 +125,7 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getWageCardInfo(params: any): Promise<any> { public getWageCardInfo(params: any): Promise<any> {
let url = `/api/user/contact/${params.edId}/salary/card/info`; let url = urls.employeeUrl + `/api/user/contact/${params.edId}/salary/card/info`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -138,7 +134,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -138,7 +134,7 @@ class EmployeeService implements EmployeeInterface {
* @params params * @params params
*/ */
public saveWageCardInfo(params: any): Promise<any> { public saveWageCardInfo(params: any): Promise<any> {
let url = `/api/user/contact/salary/card/info`; let url = urls.employeeUrl + `/api/user/contact/salary/card/info`;
return request.post(url, params, this.header) return request.post(url, params, this.header)
} }
...@@ -147,17 +143,17 @@ class EmployeeService implements EmployeeInterface { ...@@ -147,17 +143,17 @@ class EmployeeService implements EmployeeInterface {
* @param params 请求参数 * @param params 请求参数
*/ */
public getEduExperience(params: any): Promise<any> { public getEduExperience(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/education`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/education`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
/** /**
* 获取教育信息详细 * 获取教育信息详细
* @param params * @param params
*/ */
public getEduExperienceDetial(params: any): Promise<any> { public getEduExperienceDetial(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/education/detial`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/education/detial`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -166,7 +162,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -166,7 +162,7 @@ class EmployeeService implements EmployeeInterface {
* @param params * @param params
*/ */
public addEduExperience(params: any): Promise<any> { public addEduExperience(params: any): Promise<any> {
let url = `/api/user/employee/edu/info`; let url = urls.employeeUrl + `/api/user/employee/edu/info`;
return request.post(url, params, this.header) return request.post(url, params, this.header)
} }
...@@ -175,7 +171,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -175,7 +171,7 @@ class EmployeeService implements EmployeeInterface {
* @param params * @param params
*/ */
public updateEduExperience(params: any): Promise<any> { public updateEduExperience(params: any): Promise<any> {
let url = `/api/user/employee/edu/info`; let url = urls.employeeUrl + `/api/user/employee/edu/info`;
return request.put(url, params, this.header) return request.put(url, params, this.header)
} }
...@@ -184,7 +180,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -184,7 +180,7 @@ class EmployeeService implements EmployeeInterface {
* @param params * @param params
*/ */
public getTechnologyExperience(params: any): Promise<any> { public getTechnologyExperience(params: any): Promise<any> {
let url = `/api/user/employee/${params.edId}/expertise/info`; let url = urls.employeeUrl + `/api/user/employee/${params.edId}/expertise/info`;
return request.get(url, params, this.header) return request.get(url, params, this.header)
} }
...@@ -193,7 +189,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -193,7 +189,7 @@ class EmployeeService implements EmployeeInterface {
* @param params * @param params
*/ */
public updateTechnologyExperience(params: any): Promise<any> { public updateTechnologyExperience(params: any): Promise<any> {
let url = `/api/user/employee/expertise/info`; let url = urls.employeeUrl + `/api/user/employee/expertise/info`;
return request.put(url, params, this.header) return request.put(url, params, this.header)
} }
......
...@@ -4,7 +4,6 @@ import { ResponseData } from '@/types/index'; ...@@ -4,7 +4,6 @@ import { ResponseData } from '@/types/index';
let http: AxiosInstance | any; let http: AxiosInstance | any;
http = axios.create({ http = axios.create({
baseURL: process.env.VUE_APP_BASE_URL,
timeout: 60000, timeout: 60000,
}); });
......
...@@ -37,6 +37,23 @@ class Request { ...@@ -37,6 +37,23 @@ class Request {
/** /**
* *
* POST 请求
* @param url 请求链接
* @param params 请求参数
* @param headers 请求头信息
*/
public postWithAuthHeader(url: string, params: any = {}, headers: any = {}) {
let options: any = {};
if (headers) {
options.headers = headers;
}
return new Promise((resolve, reject) => {
resolve(http.post(`${url}?${GetCommonPms(true)}`, params, options));
})
}
/**
*
* PUT 请求 * PUT 请求
* @param url 请求链接 * @param url 请求链接
* @param params 请求参数 * @param params 请求参数
......
...@@ -8,10 +8,10 @@ class Urls { ...@@ -8,10 +8,10 @@ class Urls {
*/ */
employeeUrl: String = process.env.VUE_APP_BASE_URL; employeeUrl: String = process.env.VUE_APP_BASE_URL;
// /** /**
// * 认证中心 * 获取用户信息
// */ */
// tokenUrl: String = process.env.VUE_APP_LOGIN_URL; userInfoUrl: String = process.env.VUE_APP_USERINFO_URL;
} }
......
...@@ -27,14 +27,28 @@ ...@@ -27,14 +27,28 @@
<script lang='ts'> <script lang='ts'>
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
@Component @Component({
components: {}
})
export default class SelectIdentity extends Vue { export default class SelectIdentity extends Vue {
private id_no: string = "";
private toFlex(): void { private toFlex(): void {
this.$router.push({ name: "FlexEmployee" }); this.$router.push({ name: "FlexEmployee", query: { id_no: this.id_no } });
} }
private toIndex(): void { private toIndex(): void {
this.$router.push({ name: "Index" }); this.$router.push({ name: "Index", query: { id_no: this.id_no } });
}
created() {
this.$server.EmployeeService.getUserInfo({}).then(res => {
if (res.data && res.data.uthStatus && res.data.uthStatus > 2) {
this.id_no = res.data.personalIdCardNo;
} else {
//TODO: 跳转到实名认证
}
});
} }
} }
</script> </script>
......
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