FlowPacs/yudao-ui-app-v1/api/system/auth.js

34 lines
559 B
JavaScript
Raw Normal View History

2021-11-26 09:47:23 +08:00
import { request } from '@/common/js/request.js'
// 手机号 + 密码登陆
export function login(mobile, password) {
return request({
url: 'login',
method: 'post',
2021-11-28 20:48:41 +08:00
data: {
mobile, password
}
2021-11-26 09:47:23 +08:00
})
}
// 手机号 + 验证码登陆
export function smsLogin(mobile, code) {
return request({
url: 'sms-login',
method: 'post',
2021-11-28 20:48:41 +08:00
data: {
mobile, code
}
2021-11-26 09:47:23 +08:00
})
2021-11-28 20:48:41 +08:00
}
// 发送手机验证码
export function sendSmsCode(mobile, scene) {
return request({
url: 'send-sms-code',
method: 'post',
data: {
mobile, scene
}
})
2021-11-26 09:47:23 +08:00
}