mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 15:13:55 +08:00
* update:增加前端设计图 * 前端代码优化 * update:底部信息纠正 * 增加:flyio * update:去除org.quartz * update:登陆功能 --------- Co-authored-by: hrz <1710360675@qq.com> Co-authored-by: CGD <3030332422@qq.com>
21 lines
575 B
JavaScript
Executable File
21 lines
575 B
JavaScript
Executable File
import RequestService from '../httpRequest'
|
|
import {getServiceUrl} from '../api'
|
|
|
|
|
|
export default {
|
|
// 登录
|
|
login(loginForm, callback) {
|
|
RequestService.sendRequest().url(`${getServiceUrl()}/api/v1/user/login`).method('POST')
|
|
.data(loginForm)
|
|
.success((res) => {
|
|
RequestService.clearRequestTime()
|
|
callback(res)
|
|
})
|
|
.fail(() => {
|
|
RequestService.reAjaxFun(() => {
|
|
this.login(loginForm, callback)
|
|
})
|
|
}).send()
|
|
}
|
|
}
|