feat(projects): add request exception example page

This commit is contained in:
Soybean
2024-03-24 06:23:56 +08:00
parent 11a6a3bd80
commit 41e8bc44f8
11 changed files with 175 additions and 16 deletions

30
src/typings/env.d.ts vendored
View File

@ -27,6 +27,36 @@ declare namespace Env {
readonly VITE_ICON_LOCAL_PREFIX: 'local-icon';
/** backend service base url */
readonly VITE_SERVICE_BASE_URL: string;
/**
* success code of backend service
*
* when the code is received, the request is successful
*/
readonly VITE_SERVICE_SUCCESS_CODE: string;
/**
* logout codes of backend service
*
* when the code is received, the user will be logged out and redirected to login page
*
* use "," to separate multiple codes
*/
readonly VITE_SERVICE_LOGOUT_CODES: string;
/**
* modal logout codes of backend service
*
* when the code is received, the user will be logged out by displaying a modal
*
* use "," to separate multiple codes
*/
readonly VITE_SERVICE_MODAL_LOGOUT_CODES: string;
/**
* token expired codes of backend service
*
* when the code is received, it will refresh the token and resend the request
*
* use "," to separate multiple codes
*/
readonly VITE_SERVICE_EXPIRED_TOKEN_CODES: string;
/**
* other backend service base url
*