mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 09:34:31 +08:00
支持非根目录部署
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
const baseUrl = window.__ENV__QlBaseUrl || '/';
|
||||
|
||||
export function modifyClientRenderOpts(memo: any) {
|
||||
return {
|
||||
...memo,
|
||||
publicPath: baseUrl,
|
||||
basename: baseUrl,
|
||||
};
|
||||
}
|
||||
|
||||
export function modifyContextOpts(memo: any) {
|
||||
return {
|
||||
...memo,
|
||||
basename: baseUrl,
|
||||
};
|
||||
}
|
||||
@@ -332,8 +332,14 @@ select:-webkit-autofill:focus {
|
||||
}
|
||||
|
||||
.ant-pro-sider-logo {
|
||||
h1 {
|
||||
margin-left: 5px !important;
|
||||
.title {
|
||||
height: 32px;
|
||||
margin: 0 5px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
animation: pro-layout-title-hide 0.3s;
|
||||
}
|
||||
|
||||
img {
|
||||
|
||||
@@ -280,11 +280,10 @@ export default function () {
|
||||
selectedKeys={[location.pathname]}
|
||||
loading={loading}
|
||||
ErrorBoundary={Sentry.ErrorBoundary}
|
||||
logo={<Image preview={false} src="https://qn.whyour.cn/logo.png" />}
|
||||
// @ts-ignore
|
||||
title={
|
||||
logo={
|
||||
<>
|
||||
<span style={{ fontSize: 16, marginRight: 5 }}>青龙</span>
|
||||
<Image preview={false} src="https://qn.whyour.cn/logo.png" />
|
||||
<span className="title">青龙</span>
|
||||
<a
|
||||
href={systemInfo?.changeLogLink}
|
||||
target="_blank"
|
||||
@@ -313,6 +312,7 @@ export default function () {
|
||||
</a>
|
||||
</>
|
||||
}
|
||||
title={false}
|
||||
menuItemRender={(menuItemProps: any, defaultDom: any) => {
|
||||
if (
|
||||
menuItemProps.isUrl ||
|
||||
|
||||
@@ -17,9 +17,9 @@ const Error = () => {
|
||||
needLoading && setLoading(true);
|
||||
request
|
||||
.get(`${config.apiPrefix}public/health`)
|
||||
.then(({ error, status }) => {
|
||||
if (status === 1) {
|
||||
return reloadUser();
|
||||
.then(({ error, data }) => {
|
||||
if (data?.status === 1) {
|
||||
return;
|
||||
}
|
||||
if (retryTimes.current > 3) {
|
||||
setData(error?.details);
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
const baseUrl = window.__ENV__QlBaseUrl || '/';
|
||||
|
||||
export default {
|
||||
siteName: '青龙',
|
||||
apiPrefix: '/api/',
|
||||
apiPrefix: `${baseUrl}api/`,
|
||||
authKey: 'token',
|
||||
|
||||
/* Layout configuration, specify which layout to use for route. */
|
||||
|
||||
Reference in New Issue
Block a user