Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2339ae31
authored
Jun 16, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
f8876c7b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
.env.development
src/api/More/index.js
src/api/More/urls.js
src/router/index.js
.env.development
View file @
2339ae31
...
@@ -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='/'
src/api/More/index.js
View file @
2339ae31
...
@@ -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
);
}
}
};
};
src/api/More/urls.js
View file @
2339ae31
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
;
}
}
};
};
src/router/index.js
View file @
2339ae31
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment