Jelajahi Sumber

Merge branch '3.5' into debug

bding 1 bulan lalu
induk
melakukan
82f8eb8040

+ 2 - 1
src/Login2p/Login2pContext.tsx

@@ -59,7 +59,8 @@ const Login2pProvider: React.FC<ContextProviderProps> = ({ children }: ContextPr
     if (inviteCode) {
       sessionStorage.setItem('invite_code', inviteCode)
     }
-    history.push(next)
+    window.location.href = next
+    // history.push(next)
   }
 
   const logout = (): void => {

+ 6 - 4
src/NewPageHeader.tsx

@@ -154,7 +154,7 @@ const NewPage: React.FC = props => {
   // 设置修改密码
   const handlePassword = () => {
     // eslint-disable-next-line @typescript-eslint/no-unused-expressions
-    login2p.userInfo?.IsSetPassword ? setVisibleModifyPassword(true) : setVisiblePassword(false)
+    login2p.userInfo?.IsSetPassword ? setVisibleModifyPassword(true) : setVisiblePassword(true)
   }
   return (
     <div className={styles['newpage-header']} style={{ minWidth: isShowMobileMenu ? 'auto' : '1024px' }}>
@@ -372,9 +372,11 @@ const NewPage: React.FC = props => {
                   <div className="person-line person-center-link" onClick={handleToMy}>
                     个人中心
                   </div>
-                  <div className="person-line person-center-link" onClick={handlePassword}>
-                    {login2p.userInfo?.IsSetPassword ? '修改登录密码' : '设置登录密码'}
-                  </div>
+                  {login2p.userInfo && login2p.userInfo.IsAuthor && (
+                    <div className="person-line person-center-link" onClick={handlePassword}>
+                      {login2p.userInfo?.IsSetPassword ? '修改登录密码' : '设置登录密码'}
+                    </div>
+                  )}
                   <div className="person-line person-exit" onClick={login2p.logout}>
                     退出
                   </div>

+ 1 - 1
src/Service/NewAxiosInstance.ts

@@ -2,7 +2,7 @@ import Axios, { AxiosError, AxiosInstance, AxiosResponse } from 'axios'
 import { getQueryString } from 'utils/getQueryString'
 import { Cookie } from 'utils/cookie'
 import { Modal } from 'antd'
-import { useHistory } from 'react-router-dom'
+
 import styles from 'styles/CommonGlobal.module.scss'
 
 // const history = useHistory()

+ 3 - 3
src/styles/NewPage.module.scss

@@ -422,7 +422,7 @@
 
 .custom-style-divider {
   width: 224px;
-  margin: 62px auto 0;
+  margin: 38px auto 0;
   color: #999999;
   .divider-text {
     color: #999999 !important;
@@ -564,7 +564,7 @@
 .input-set-password-forget {
   text-align: right;
   margin-top: -15px;
-  margin-bottom: 25px;
+  margin-bottom: 10px;
   color: #999;
   span {
     cursor: pointer;
@@ -655,7 +655,7 @@
   }
   .login-content-box-mobile {
     width: 100%;
-    height: 100vh;
+    height: 100%;
     padding: 230px 30px 0;
     height: auto;
     box-sizing: border-box;