接入第三方登录--前端页面兼容多个第三方登录

This commit is contained in:
weir
2021-08-14 21:16:20 +08:00
parent 133cb49c42
commit 384b4a5cf1
4 changed files with 52 additions and 22 deletions

View File

@ -40,9 +40,9 @@ export function getCodeImg() {
}
// 接入第三方登录
export function giteeLogin() {
export function oAuthLogin(provider) {
return request({
url: '/auth2/authorization/gitee',
url: '/auth2/authorization/' + provider,
method: 'get'
})
}
@ -50,7 +50,7 @@ export function giteeLogin() {
export function getToken(path) {
console.log({path});
return request({
url: '/auth2/login/gitee' + path,
url: '/auth2/login/github' + path,
method: 'get'
})
}