import { PropsWithChildren } from "react"; import { useLaunch } from "@tarojs/taro"; import { RecoilRoot } from "recoil"; import { getGlobalConfig } from "@/apis"; import "@/styles/tailwind.basic.css"; function App({ children }: PropsWithChildren) { useLaunch(() => { loadGlobalConfig(); console.log("App launched."); }); // 初始化全局配置 const loadGlobalConfig = async () => { const res = await getGlobalConfig(); console.log(res); }; return {children}; } export default App;