add 404 page

This commit is contained in:
Dawn1Ocean
2024-03-29 22:09:53 +08:00
parent aad95000a8
commit 2cd401409e
9 changed files with 77 additions and 20 deletions
+1 -17
View File
@@ -2,29 +2,13 @@ import { PropsWithChildren } from 'react';
import { useLaunch } from '@tarojs/taro';
import 'taro-ui/dist/style/index.scss';
import './app.scss';
import { checkLogin, checkToken } from './service/checkLogin';
import wechatUser from './wechat';
import { loginAte } from './service/login';
import { getInfo } from './service/getInfo';
import { pingAte } from './service/pingAte';
function App({ children }: PropsWithChildren<any>) {
useLaunch(() => {
console.log('App launched.');
pingAte((res) => {
if (res) {
checkLogin((success) => {
if (success) {
wechatUser.setToken(checkToken());
getInfo();
} else {
loginAte();
}
});
}
});
pingAte();
});
// children 是将要会渲染的页面
return children;
}