diff --git a/src/components/Header/components/User/index.less b/src/components/Header/components/User/index.less index 86c49ea1b..9d2cc1e28 100644 --- a/src/components/Header/components/User/index.less +++ b/src/components/Header/components/User/index.less @@ -6,22 +6,32 @@ border-radius: 34px; cursor: pointer; } -.currentMenu{ +.currentMenu { width: 120px; text-align: center; padding: 0; - [class~='currentName']{ + [class~='currentName'] { padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; } - li{ + li { + height: 40px; + line-height: 30px; + font-size: 14px; + color: #333; + padding: 5px 8px; + a { + color: #333; + } + } + li:first-child { border-bottom: 1px solid #eee; - } - li:last-child{ - border-top: none; + } + li:last-child { + border-top: 1px solid #eee; } } .rightMenu { diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index f47c3470e..e26470807 100755 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -250,7 +250,7 @@ const HeaderComponents: FC = ({ } { globalSetting.setting?.nav_logo_url && - + } {!checkIsClientExam() && globalSetting.setting && globalSetting.setting.navbar.map(function ( @@ -310,7 +310,7 @@ const HeaderComponents: FC = ({ {!isLogin && !!user?.userInfo?.login && } { - !!user?.userInfo?.login && {user?.userInfo?.message_unread_total && {user?.userInfo?.message_unread_total}} + !!user?.userInfo?.login && {user?.userInfo?.message_unread_total && } } } diff --git a/src/utils/env.ts b/src/utils/env.ts index d0602ab9c..7b47f6d98 100755 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -109,13 +109,13 @@ export const GlobalConfig: ConfigProps = { FORGE_SERVER:"https://testforgeplus.trustie.net" }, preBuild: { - API_SERVER: 'https://data.educoder.net', + API_SERVER: 'https://pre-data.educoder.net', IMG_SERVER: 'https://preali-cdn.educoder.net', REPORT_SERVER: "http://192.168.1.57:3001", FORGE: "https://forge.educoder.net/", SSH_SERVER: "wss://pre-webssh.educoder.net", QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net"), - FORGE_SERVER:"https://pre.gitlink.org.cn" + FORGE_SERVER:"https://pre.gitlink.org.cn", }, newWeb: { API_SERVER: 'https://test-newweb.educoder.net', diff --git a/src/utils/fetch.ts b/src/utils/fetch.ts index 5bc389b75..abb304120 100755 --- a/src/utils/fetch.ts +++ b/src/utils/fetch.ts @@ -246,8 +246,8 @@ export default function request(url: string, option: any, flag?: boolean) { let prefixUrl = ENV.API_SERVER; if (window.ENV === 'dev') prefixUrl = ''; - return fetch(prefixUrl + url, newOptions) - .then((response: any) => checkStatus(response, { url: ENV.API_SERVER + url, ...newOptions })) + return fetch(url.indexOf("https") > -1 ? url : prefixUrl + url, newOptions) + .then((response: any) => checkStatus(response, { url: url.indexOf("https") > -1 ? url : ENV.API_SERVER + url, ...newOptions })) .then((response: any) => cachedSave(response, hashcode)) .then(async (response: any) => { if (response.status === 204) {