Ver Fonte

fix jwt in web (#545)

zxhlyh há 1 ano atrás
pai
commit
9af0da4450

+ 2 - 1
web/app/components/share/chat/index.tsx

@@ -310,7 +310,8 @@ const Main: FC<IMainProps> = ({
   }
 
   const fetchInitData = async () => {
-    await checkOrSetAccessToken()
+    if (!isInstalledApp)
+      await checkOrSetAccessToken()
 
     return Promise.all([isInstalledApp
       ? {

+ 2 - 1
web/app/components/share/text-generation/index.tsx

@@ -255,7 +255,8 @@ const TextGeneration: FC<IMainProps> = ({
   }
 
   const fetchInitData = async () => {
-    await checkOrSetAccessToken()
+    if (!isInstalledApp)
+      await checkOrSetAccessToken()
 
     return Promise.all([isInstalledApp
       ? {