update upload way

This commit is contained in:
2025-03-31 21:18:39 +08:00
parent 0f03491a84
commit 122fbec7da
17 changed files with 188 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ export const App = () => {
<Route path='/container/*' element={<ContainerApp />} />
<Route path='/map/*' element={<MapApp />} />
<Route path='/user/*' element={<UserApp />} />
<Route path='/user1/*' element={<UserApp />} />
<Route path='/user-center/*' element={<UserApp />} />
<Route path='/org/*' element={<OrgApp />} />
<Route path='/config/*' element={<ConfigApp />} />
<Route path='/app/*' element={<UserAppApp />} />

View File

@@ -1,6 +1,7 @@
import { QueryClient } from '@kevisual/query';
import { QueryLoginBrowser } from '@kevisual/query-login';
import { toastLogin } from '@kevisual/resources/pages/message/ToastLogin.tsx';
import { toast } from 'react-toastify';
export const query = new QueryClient({
io: true,
});
@@ -25,6 +26,15 @@ query.afterResponse = async (res, ctx) => {
afterAlso401: () => {
toastLogin();
},
afterCheck: (res) => {
if (res.code === 200) {
// console.log('afterCheck');
toast.success('刷新登陆信息');
setTimeout(() => {
window.location.reload();
}, 1000);
}
},
});
return newRes as any;