🐞 fix: 优化login-redirect;添加redirectToAuth接口
This commit is contained in:
parent
94d56d71be
commit
1b5cca52ca
|
@ -66,3 +66,11 @@ export function getAccountName(data) {
|
|||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function redirectToAuth(data) {
|
||||
return request({
|
||||
url: '/redirectToAuth',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ export default {
|
|||
return {
|
||||
authorizeUrl: "https://iam.sd-port.com:18010/idp/oauth2/authorize",
|
||||
clientId: "hfxyjwzxjc",
|
||||
redirectUri: "http://10.167.96.13/prod-api/redirectToAuth&response_type=code&state=123",
|
||||
redirectUri: `${window.location.origin}/prod-api/redirectToAuth&response_type=code&state=123`,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -17,7 +17,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
loginRedirect() {
|
||||
window.location = `${this.authorizeUrl}?client_id=${this.clientId}&redirect_uri=${this.redirectUri}`
|
||||
window.location = `${this.authorizeUrl}?client_id=${this.clientId}&redirect_uri=${this.redirectUri}`;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue