RuoYi
2024-12-17 b25a280ebbfc5ca2ea334f2c7e337376e4ffd1cd
ruoyi-ui/src/api/login.js
@@ -1,15 +1,27 @@
import request from '@/utils/request'
const client_id = 'web'
const client_secret = '123456'
const scope = 'server'
// 登录方法
export function login(username, password, code, uuid) {
  return request({
    url: '/auth/login',
    headers: {
      isToken: false,
      repeatSubmit: false
    },
    method: 'post',
    data: { username, password, code, uuid }
  })
}
// 注册方法
export function register(data) {
  return request({
    url: '/auth/register',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}
@@ -41,6 +53,10 @@
export function getCodeImg() {
  return request({
    url: '/code',
    method: 'get'
    headers: {
      isToken: false
    },
    method: 'get',
    timeout: 20000
  })
}