2024-08-21 10:37:56 +08:00
|
|
|
import request from '@/utils/request'
|
2024-08-21 21:51:06 +08:00
|
|
|
import { CLIENT_TYPE, CLIENT_NAME, CLIENT_VERSION, CLIENT_ID } from '@/const/userConst'
|
2024-08-21 10:37:56 +08:00
|
|
|
|
|
|
|
|
export const userRegisterService = ({ username, password }) => {
|
2024-08-21 21:51:06 +08:00
|
|
|
return request.post('/user/register', {
|
2024-08-21 10:37:56 +08:00
|
|
|
account: username,
|
|
|
|
|
nickName: '',
|
|
|
|
|
password: password,
|
|
|
|
|
clientType: CLIENT_TYPE,
|
|
|
|
|
clientName: CLIENT_NAME,
|
|
|
|
|
clientVersion: CLIENT_VERSION
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-08-21 21:51:06 +08:00
|
|
|
|
|
|
|
|
export const userLoginService = ({ username, password }) => {
|
|
|
|
|
return request.post('/user/login', {
|
|
|
|
|
account: username,
|
|
|
|
|
password: password,
|
|
|
|
|
clientId: CLIENT_ID,
|
|
|
|
|
clientType: CLIENT_TYPE,
|
|
|
|
|
clientName: CLIENT_NAME,
|
|
|
|
|
clientVersion: CLIENT_VERSION
|
|
|
|
|
})
|
|
|
|
|
}
|