feat(projects): add auth example

This commit is contained in:
Soybean
2024-03-24 15:39:41 +08:00
parent 41e8bc44f8
commit c11d56da29
20 changed files with 269 additions and 22 deletions

View File

@ -60,6 +60,7 @@ declare namespace Api {
userId: string;
userName: string;
roles: string[];
buttons: string[];
}
}

View File

@ -458,6 +458,13 @@ declare namespace App {
routeParam: string;
backTab: string;
};
toggleAuth: {
toggleAccount: string;
authHook: string;
superAdminVisible: string;
adminVisible: string;
adminOrUserVisible: string;
};
};
manage: {
common: {

View File

@ -32,7 +32,9 @@ declare module "@elegant-router/types" {
"function_hide-child_two": "/function/hide-child/two";
"function_multi-tab": "/function/multi-tab";
"function_request": "/function/request";
"function_super-page": "/function/super-page";
"function_tab": "/function/tab";
"function_toggle-auth": "/function/toggle-auth";
"home": "/home";
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
"manage": "/manage";
@ -119,7 +121,9 @@ declare module "@elegant-router/types" {
| "function_hide-child_two"
| "function_multi-tab"
| "function_request"
| "function_super-page"
| "function_tab"
| "function_toggle-auth"
| "home"
| "manage_menu"
| "manage_role"

View File

@ -57,6 +57,8 @@ declare namespace Env {
* use "," to separate multiple codes
*/
readonly VITE_SERVICE_EXPIRED_TOKEN_CODES: string;
/** when the route mode is static, the defined super role */
readonly VITE_STATIC_SUPER_ROLE: string;
/**
* other backend service base url
*