diff --git a/src/compenents/header/index.module.scss b/src/compenents/header/index.module.scss index 6d3956d..3fb38e2 100644 --- a/src/compenents/header/index.module.scss +++ b/src/compenents/header/index.module.scss @@ -29,7 +29,7 @@ display: flex; align-items: center; .nav-item { - width: 64px; + width: auto; height: 40px; font-size: 16px; font-weight: 400; @@ -47,7 +47,7 @@ } .nav-active-item { - width: 64px; + width: auto; height: 40px; font-size: 16px; font-weight: 600; diff --git a/src/compenents/user-info/index.tsx b/src/compenents/user-info/index.tsx index 22dc743..50fa17b 100644 --- a/src/compenents/user-info/index.tsx +++ b/src/compenents/user-info/index.tsx @@ -6,7 +6,7 @@ import { useDispatch } from "react-redux"; import { loginAction } from "../../store/user/loginUserSlice"; import type { UploadProps } from "antd"; import config from "../../js/config"; -import { getToken } from "../../utils/index"; +import { getToken, changeAppUrl } from "../../utils/index"; interface PropInterface { open: boolean; @@ -40,7 +40,7 @@ export const UserInfoModel: React.FC = ({ open, onCancel }) => { name: "file", multiple: false, method: "PUT", - action: config.app_url + "api/v1/user/avatar", + action: changeAppUrl(config.app_url) + "api/v1/user/avatar", headers: { Accept: "application/json", authorization: "Bearer " + getToken(), diff --git a/src/pages/login/index.module.scss b/src/pages/login/index.module.scss index 7da7581..48cd192 100644 --- a/src/pages/login/index.module.scss +++ b/src/pages/login/index.module.scss @@ -7,65 +7,71 @@ display: flex; flex-direction: column; justify-content: space-between; - .title { - width: 120px; - height: auto; - font-size: 30px; - font-weight: 600; - color: #333333; - line-height: 30px; - border-bottom: 4px solid #ff4d4f; - box-sizing: border-box; - padding-bottom: 10px; - margin: 0 auto; - margin-top: 100px; - } - .login-box { - width: 1200px; - height: 366px; - background: #ffffff; + .top-content { + width: 100%; display: flex; - margin: 0 auto; - margin-top: 80px; - .left-box { - width: 595px; - height: 100%; + flex-direction: column; + align-items: flex-start; + .title { + min-width: 125px; + height: auto; + font-size: 30px; + font-weight: 600; + color: #333333; + line-height: 30px; + border-bottom: 4px solid #ff4d4f; box-sizing: border-box; - padding: 33px 60px; - .icon { - width: 475px; - height: 300px; - } + padding-bottom: 10px; + margin: 0 auto; + margin-top: 100px; } - .right-box { - width: 520px; - height: 100%; - box-sizing: border-box; - border-left: 1px solid #d8d8d8; - padding: 0px 60px; + .login-box { + width: 1200px; + height: 366px; + background: #ffffff; display: flex; - flex-direction: column; - .captcha-box { - width: 125px; - height: 54px; - margin-left: 15px; - border-radius: 8px; - background-color: rgba(#ff4d4f, 0.1); - display: flex; - - .catpcha-loading-box { - width: 125px; - height: 54px; - line-height: 54px; - text-align: center; + margin: 0 auto; + margin-top: 80px; + .left-box { + width: 595px; + height: 100%; + box-sizing: border-box; + padding: 33px 60px; + .icon { + width: 475px; + height: 300px; } - - .captcha { + } + .right-box { + width: 520px; + height: 100%; + box-sizing: border-box; + border-left: 1px solid #d8d8d8; + padding: 0px 60px; + display: flex; + flex-direction: column; + .captcha-box { width: 125px; height: 54px; - border: none; - cursor: pointer; + margin-left: 15px; border-radius: 8px; + background-color: rgba(#ff4d4f, 0.1); + display: flex; + + .catpcha-loading-box { + width: 125px; + height: 54px; + line-height: 54px; + text-align: center; + } + + .captcha { + width: 125px; + height: 54px; + border: none; + cursor: pointer; + border-radius: 8px; + } } } } diff --git a/src/utils/index.ts b/src/utils/index.ts index 52657e3..7a18b20 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -95,3 +95,12 @@ export function setDepName(token: string) { export function clearDepName() { window.localStorage.removeItem("playedu-frontend-depatmentName"); } + +export function changeAppUrl(str: string) { + let key = str.slice(str.length - 1); + if (key === "/") { + return str; + } else { + return str + "/"; + } +}