123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * @Author:
- * @Date: 2023-09-27 14:33:29
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2024-01-03 14:16:53
- * @Description: tel files
- * @filePath:
- */
- // 根据角色动态生成路由
- import { MockMethod } from "vite-plugin-mock";
- export default [
- {
- url: "/login",
- method: "post",
- response: () => {
- return {
- status: '1',
- data: {
- SysAdminId: "1",
- realName: "admin",
- // 一个用户可能有多个角色
- roles: ["1"],
- accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
- refreshToken: "eyJhbGciOiJIUzUxMiJ9.adm inRefresh",
- expires: "2023/10/30 00:00:00",
- rightList: [],
- }
- };
- }
- },
- {
- url: "/refreshtoken",
- method: "post",
- response: () => {
- return {
- status: '1',
- data: {
- SysAdminId: "1",
- realName: "admin",
- // 一个用户可能有多个角色
- roles: ["1"],
- accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
- refreshToken: "eyJhbGciOiJIUzUxMiJ9.adm inRefresh",
- expires: "2023/10/30 00:00:00",
- rightList: [],
- }
- };
- }
- }
- ] as MockMethod[];
|