Browse Source

登录移除invitecode

lwei 11 months ago
parent
commit
467ca8a44c
2 changed files with 5 additions and 9 deletions
  1. 2 6
      src/Login2p/Login2p.tsx
  2. 3 3
      src/NewPageHeader.tsx

+ 2 - 6
src/Login2p/Login2p.tsx

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

+ 3 - 3
src/NewPageHeader.tsx

@@ -164,7 +164,7 @@ const NewPage: React.FC = props => {
                 onClick={() => setIsShowMenu(!isShowMenu)}
               />
             ) : (
-              <Link to={`/login2p?next=${location.pathname + location.search}`}>
+              <Link to={`/login2p?next=${location.pathname}`}>
                 <Button type="primary" className="mobile-login2p-btn">
                   登录
                 </Button>
@@ -227,7 +227,7 @@ const NewPage: React.FC = props => {
               ) : null}
               {/* (
               <div className="mobile-header-item" onClick={login2p.logout}>
-                <Link to={`/login2p?next=${location.pathname+ location.search}`}>
+                <Link to={`/login2p?next=${location.pathname}`}>
                   <Button type="primary" className="mobile-login2p-btn">
                     登录
                   </Button>
@@ -351,7 +351,7 @@ const NewPage: React.FC = props => {
                 </div>
               </div>
             ) : (
-              <Link to={`/login2p?next=${location.pathname + location.search}`}>
+              <Link to={`/login2p?next=${location.pathname}`}>
                 <Button type="primary" className={styles['login2p-btn']}>
                   登录
                 </Button>