From e9303d6f60d51e8f52c28dbc78e7755c3243ea27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 10 May 2024 14:07:21 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=86=B2=E7=AA=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/UrlTool.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 30dfbeec1..e520af722 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -3,7 +3,6 @@ import md5 from 'md5'; import {Input} from "antd"; import { url as ssrOrigin, host as ssrHost } from '../ssrUrl' const { Search } = Input; -import { url as ssrOrigin, host as ssrHost } from '../ssrUrl' if (!__SERVER__) { From 864a223466b4aad21c0b85e75c541db42ac5c2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Sat, 11 May 2024 15:19:21 +0800 Subject: [PATCH 2/6] cont. --- src/forge/Main/Detail.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 5c8996147..43617d788 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -991,7 +991,4 @@ export default __CLIENT__ ? withRouter(connect( })(Detail))) : withRouter(connect( mapStateToProps, mapDispatchToProps -)(ImageLayerOfCommentHOC({ - imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", - parentSelector: ".newContainer", -})(Detail))); \ No newline at end of file +)(Detail)); \ No newline at end of file From dace6705a3432acc3faf4438c21efe91f1d24850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Sat, 11 May 2024 16:18:22 +0800 Subject: [PATCH 3/6] settings --- server/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/index.js b/server/index.js index 233a12859..2f64ed945 100644 --- a/server/index.js +++ b/server/index.js @@ -38,13 +38,13 @@ if (process.env.NODE_ENV === 'dev') { const proxy = createProxyMiddleware(options(zoneUrl)); proxy(req, res); }); - app.use(['/api', '/images', '/system', '/favicon', '/robots.txt', '/sitemap*.xml', '/sitemap*.txt', '/favicon.ico', '/admins', '/assets', '/attachments', '/oauth'], (req, res) => { + app.use(['/api', '/images', '/system', '/favicon', '/robots.txt', '/sitemap*.xml', '/sitemap*.txt', '/favicon.ico', '/admins', '/assets', '/attachments', '/oauth', '/settings'], (req, res) => { proxy(req, res); }); } else { proxy = createProxyMiddleware(options(`http://localhost:${ rubyPort }`)); // 设置代理 - app.use(['/api', '/admins', '/attachments', '/oauth', '/competitions', '/projects', '/auth'], (req, res) => { + app.use(['/api', '/admins', '/attachments', '/oauth', '/competitions', '/projects', '/auth', '/settings'], (req, res) => { proxy(req, res); }); } From 036cb14d29910806be8abdf338673c041d899795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Sat, 11 May 2024 16:41:41 +0800 Subject: [PATCH 4/6] update --- src/modules/tpm/TPMIndexHOC.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index bccb749c3..2f3f6dc3f 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -61,13 +61,12 @@ export function TPMIndexHOC(WrappedComponent) { window.removeEventListener('keyup', this.keyupListener) } componentWillMount() { - this.setState({ - current_user: {} - }) if (!__SERVER__) { this.fetchUsers(); - } else { - + } else if (['/:OIdentifier', '/:username'].includes(this.props.match.path)) { + this.setState({ + current_user: {} + }) } } From d61b0709c47f0ce977995f8d77e51da5d403669b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Sat, 11 May 2024 16:47:28 +0800 Subject: [PATCH 5/6] update --- src/modules/tpm/TPMIndexHOC.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 2f3f6dc3f..b62237e0a 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -61,13 +61,14 @@ export function TPMIndexHOC(WrappedComponent) { window.removeEventListener('keyup', this.keyupListener) } componentWillMount() { - if (!__SERVER__) { - this.fetchUsers(); - } else if (['/:OIdentifier', '/:username'].includes(this.props.match.path)) { + if (['/:OIdentifier', '/:username'].includes(this.props.match.path)) { this.setState({ current_user: {} }) } + if (!__SERVER__) { + this.fetchUsers(); + } } componentDidMount() { From efec44cf965ae3b370c9e8187f068cbb65376865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Mon, 13 May 2024 16:08:13 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=BD=AC=E5=8F=91=E4=B8=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 2f64ed945..61f3de042 100644 --- a/server/index.js +++ b/server/index.js @@ -15,7 +15,7 @@ app.use('/build', express.static('build')); const options = (target) => { return { target: target, - changeOrigin: true, // 允许在请求头中更改主机 + changeOrigin: false, // 不允许在请求头中更改主机 timeout: 30000, onProxyRes: (proxyRes, req, res) => { // 代理成功后输出日志