zhuangpeimespda/api/login.js
赵正易 a8dbe84e25 feat: 新增油漆件叫料与收料功能及相关页面
refactor: 优化首页菜单图标显示方式

fix: 修复SignalR连接初始化问题

style: 更新manifest.json版本号至2.0.0

chore: 新增多个SVG图标资源

perf: 为登录接口添加超时处理

docs: 更新API接口文档

test: 添加油漆件叫料相关测试用例

build: 更新依赖版本
2025-08-06 10:25:23 +08:00

62 lines
903 B
JavaScript

import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid, clientId) {
const data = {
username,
password,
code,
uuid,
clientId
}
return request({
'url': '/login',
headers: {
isToken: false,
userName: username
},
timeout: 3000,
'method': 'post',
'data': data
})
}
// 注册方法
export function register(data) {
return request({
url: '/register',
headers: {
isToken: false
},
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
'url': '/getInfo',
'method': 'get'
})
}
// 退出方法
export function logout() {
return request({
'url': '/logout',
'method': 'post'
})
}
// 获取验证码
export function getCodeImg() {
return request({
'url': '/captchaImage',
headers: {
isToken: false
},
method: 'get',
timeout: 20000
})
}