Commit 2339ae31 by 展昭

update

parent f8876c7b
...@@ -2,4 +2,6 @@ VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id" ...@@ -2,4 +2,6 @@ VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id"
VUE_APP_API_BASEURL = 'http://organization.test.hrs100.cn:18080/' VUE_APP_API_BASEURL = 'http://organization.test.hrs100.cn:18080/'
VUE_APP_API_TEAMMIXURL='http://106.120.107.150:5000/'
VUE_APP_PUBLIC_DIR='/' VUE_APP_PUBLIC_DIR='/'
...@@ -18,8 +18,16 @@ export default { ...@@ -18,8 +18,16 @@ export default {
return AjaxRequest.get(url); return AjaxRequest.get(url);
}, },
async getAccessToken(authcode) { async getAccessToken(authcode) {
const url = urls.getAccessTokenUrl(authcode); const url = urls.getAccessTokenUrl();
return AjaxRequest.get(url); let params={
"client_id":"hrs-bill-web-mobile",
"client_secret":"123456",
"grant_type":"auth_code",
"scope":"openid offline_access",
"code":authcode
}
return AjaxRequest.post(url,params);
} }
}; };
var VUE_APP_API_BASEURL = process.env.VUE_APP_API_BASEURL var VUE_APP_API_BASEURL = process.env.VUE_APP_API_BASEURL;
var TEAMMIXURL = process.env.VUE_APP_API_TEAMMIXURL;
export default { export default {
getMoreList() { getMoreList() {
...@@ -13,8 +14,8 @@ export default { ...@@ -13,8 +14,8 @@ export default {
let url = VUE_APP_API_BASEURL + 'api/common/pay/getPaymentUrl'; let url = VUE_APP_API_BASEURL + 'api/common/pay/getPaymentUrl';
return url; return url;
}, },
getAccessTokenUrl(authcode) { getAccessTokenUrl() {
let url = ''; let url = TEAMMIXURL + 'connect/token';
return url; return url;
} }
}; };
...@@ -85,7 +85,6 @@ router.beforeEach((to, from, next) => { ...@@ -85,7 +85,6 @@ router.beforeEach((to, from, next) => {
const authcode = to.query.authCode || to.query.authcode; const authcode = to.query.authCode || to.query.authcode;
const appid = to.query.appId || to.query.appid; const appid = to.query.appId || to.query.appid;
if (!!authcode && !!appid) { if (!!authcode && !!appid) {
getAccessToken(authcode).then(res => { getAccessToken(authcode).then(res => {
const token = res; const token = res;
getToken(token, appid, next); getToken(token, appid, next);
......
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