20 lines
451 B
TypeScript
20 lines
451 B
TypeScript
import { post } from '@/utils/request';
|
|
import type { LoginResult } from './types';
|
|
|
|
export type { LoginResult } from './types';
|
|
|
|
export const login = (params: { phone: string; password: string }) => {
|
|
return post(`/op/login`, params) as Promise<{
|
|
code: number | string;
|
|
msg: string;
|
|
data: LoginResult;
|
|
}>;
|
|
};
|
|
|
|
export const logout = () => {
|
|
return post(`/op/logout`) as Promise<{
|
|
code: number | string;
|
|
msg: string;
|
|
}>;
|
|
};
|