feat: 将整体logo视觉替换为ai生成的logo
parent
6825193266
commit
6559b3eff2
@ -1,42 +1,42 @@
|
||||
// 根据角色动态生成路由
|
||||
import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
||||
import { defineFakeRoute } from 'vite-plugin-fake-server/client';
|
||||
|
||||
export default defineFakeRoute([
|
||||
{
|
||||
url: "/login",
|
||||
method: "post",
|
||||
url: '/login',
|
||||
method: 'post',
|
||||
response: ({ body }) => {
|
||||
if (body.username === "admin") {
|
||||
if (body.username === 'admin') {
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
nickname: "小铭",
|
||||
avatar: '/user_small.png',
|
||||
username: 'admin',
|
||||
nickname: 'Levi',
|
||||
// 一个用户可能有多个角色
|
||||
roles: ["admin"],
|
||||
roles: ['admin'],
|
||||
// 按钮级别权限
|
||||
permissions: ["*:*:*"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||
expires: "2030/10/30 00:00:00"
|
||||
}
|
||||
permissions: ['*:*:*'],
|
||||
accessToken: 'eyJhbGciOiJIUzUxMiJ9.admin',
|
||||
refreshToken: 'eyJhbGciOiJIUzUxMiJ9.adminRefresh',
|
||||
expires: '2030/10/30 00:00:00',
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||
username: "common",
|
||||
nickname: "小林",
|
||||
roles: ["common"],
|
||||
permissions: ["permission:btn:add", "permission:btn:edit"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
|
||||
expires: "2030/10/30 00:00:00"
|
||||
}
|
||||
avatar: 'https://avatars.githubusercontent.com/u/52823142',
|
||||
username: 'common',
|
||||
nickname: '小林',
|
||||
roles: ['common'],
|
||||
permissions: ['permission:btn:add', 'permission:btn:edit'],
|
||||
accessToken: 'eyJhbGciOiJIUzUxMiJ9.common',
|
||||
refreshToken: 'eyJhbGciOiJIUzUxMiJ9.commonRefresh',
|
||||
expires: '2030/10/30 00:00:00',
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 96 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 235 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 96 KiB |
Loading…
Reference in New Issue