lwei 11 сар өмнө
parent
commit
6df90a8869

+ 6 - 2
src/Login2p/Login2p.tsx

@@ -55,7 +55,9 @@ const Login2p: React.FC = () => {
         // wx.miniProgram.navigateBack()
       }
     } else if (login2p.isWechat && !wechatToken) {
-      login2p.loginWechatLaunch(`${process.env.REACT_APP_URL}login2p/wechat?next=${next ? next : '/'}`)
+      login2p.loginWechatLaunch(
+        `${process.env.REACT_APP_URL}login2p/wechat?next=${next ? encodeURIComponent(next) : '/'}`
+      )
     }
   }
   const handleLoginegByCode = (value: any) => {
@@ -151,7 +153,9 @@ const Login2p: React.FC = () => {
               <Button
                 icon={<WechatOutlined style={{ color: '#60C84D' }} />}
                 onClick={() =>
-                  login2p.loginWechatLaunch(`${process.env.REACT_APP_URL}login2p/wechat?next=${next ? next : '/'}`)
+                  login2p.loginWechatLaunch(
+                    `${process.env.REACT_APP_URL}login2p/wechat?next=${next ? encodeURIComponent(next) : '/'}`
+                  )
                 }
                 shape="circle"
                 size="large"

+ 1 - 1
src/Material/components/Research.container.tsx

@@ -23,7 +23,7 @@ const ResearchContainer: React.FC<ResearchContainerProps> = props => {
 
   const { data: hotList, run } = useRequest(MaterialService.getArcticleHotList, {
     manual: true,
-    formatResult: response => response.data.Data.List
+    formatResult: response => response.data.Data?.List
   })
   const media = useMedia()
   const login2p = useLogin2p()