123456789101112131415161718192021222324 |
- import axios from 'axios';
- import type { RouteRecordNormalized } from 'vue-router';
- import { UserState } from '@/store/modules/user/types';
- export interface LoginData {
- account: string;
- password: string;
- }
- export interface LoginRes {
- token: string;
- [key: string]: any;
- }
- export function login(data: LoginData) {
- return axios.post<LoginRes>('/login', data);
- }
- export function logout() {
- return axios.get<LoginRes>('/logout');
- }
- export function getMenuList() {
- return axios.post<RouteRecordNormalized[]>('/api/user/menu');
- }
|