user.ts 537 B

1234567891011121314151617181920212223
  1. import request from "@/config/axios";
  2. // 钉钉扫码登录
  3. export async function socialLogin(type: string, code: string, state: string) {
  4. return await request.post({
  5. url: "/admin-api/system/auth/social-login",
  6. data: {
  7. type,
  8. code,
  9. state,
  10. },
  11. });
  12. }
  13. // 登出
  14. export const loginOut = () => {
  15. return request.post({ url: "/admin-api/system/auth/logout" });
  16. };
  17. // 获取用户权限信息
  18. export const getUserInfo = () => {
  19. return request.get({ url: "/admin-api/system/auth/get-permission-info" });
  20. };