mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 16:33:49 +00:00
fix: template
This commit is contained in:
@@ -31,7 +31,7 @@ const queryClient = new QueryClient({
|
||||
function App({ Component, pageProps }: AppProps) {
|
||||
const {
|
||||
loadInitData,
|
||||
initData: { googleVerKey }
|
||||
initData: { googleVerKey, baiduTongji }
|
||||
} = useGlobalStore();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -52,7 +52,7 @@ function App({ Component, pageProps }: AppProps) {
|
||||
<Script src="/js/qrcode.min.js" strategy="afterInteractive"></Script>
|
||||
<Script src="/js/pdf.js" strategy="afterInteractive"></Script>
|
||||
<Script src="/js/html2pdf.bundle.min.js" strategy="afterInteractive"></Script>
|
||||
<Script src="/js/baidutongji.js" strategy="afterInteractive"></Script>
|
||||
{baiduTongji && <Script src="/js/baidutongji.js" strategy="afterInteractive"></Script>}
|
||||
{googleVerKey && (
|
||||
<>
|
||||
<Script
|
||||
|
@@ -5,13 +5,15 @@ import { jsonRes } from '@/service/response';
|
||||
export type InitDateResponse = {
|
||||
beianText: string;
|
||||
googleVerKey: string;
|
||||
baiduTongji: boolean;
|
||||
};
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
jsonRes<InitDateResponse>(res, {
|
||||
data: {
|
||||
beianText: process.env.SAFE_BEIAN_TEXT || '',
|
||||
googleVerKey: process.env.CLIENT_GOOGLE_VER_TOKEN || ''
|
||||
googleVerKey: process.env.CLIENT_GOOGLE_VER_TOKEN || '',
|
||||
baiduTongji: process.env.BAIDU_TONGJI === '1'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -19,7 +19,8 @@ export const useGlobalStore = create<State>()(
|
||||
immer((set, get) => ({
|
||||
initData: {
|
||||
beianText: '',
|
||||
googleVerKey: ''
|
||||
googleVerKey: '',
|
||||
baiduTongji: false
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user