mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-12 10:05:07 +08:00
优化管理后台的社交登录
This commit is contained in:
@ -3,12 +3,15 @@ import {getRefreshToken} from "@/utils/auth";
|
||||
import service from "@/utils/request";
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
export function login(username, password, code, uuid,
|
||||
socialType, socialCode, socialState) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
uuid,
|
||||
// 社交相关
|
||||
socialType, socialCode, socialState
|
||||
}
|
||||
return request({
|
||||
url: '/system/auth/login',
|
||||
@ -51,9 +54,9 @@ export function socialAuthRedirect(type, redirectUri) {
|
||||
}
|
||||
|
||||
// 社交快捷登录,使用 code 授权码
|
||||
export function socialQuickLogin(type, code, state) {
|
||||
export function socialLogin(type, code, state) {
|
||||
return request({
|
||||
url: '/system/auth/social-quick-login',
|
||||
url: '/system/auth/social-login',
|
||||
method: 'post',
|
||||
data: {
|
||||
type,
|
||||
@ -63,21 +66,6 @@ export function socialQuickLogin(type, code, state) {
|
||||
})
|
||||
}
|
||||
|
||||
// 社交绑定登录,使用 code 授权码 + + 账号密码
|
||||
export function socialBindLogin(type, code, state, username, password) {
|
||||
return request({
|
||||
url: '/system/auth/social-bind-login',
|
||||
method: 'post',
|
||||
data: {
|
||||
type,
|
||||
code,
|
||||
state,
|
||||
username,
|
||||
password
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取登录验证码
|
||||
export function sendSmsCode(mobile, scene) {
|
||||
return request({
|
||||
|
Reference in New Issue
Block a user