cont.
This commit is contained in:
parent
743271fa19
commit
e058321490
|
@ -29,7 +29,7 @@ const options = (target) => {
|
|||
};
|
||||
}
|
||||
|
||||
let proxy = createProxyMiddleware(options(`http://localhost:${ rubyPort }`));
|
||||
let proxy
|
||||
|
||||
if (process.env.NODE_ENV === 'dev') {
|
||||
// 本地调试用设置代理
|
||||
|
@ -42,6 +42,7 @@ if (process.env.NODE_ENV === 'dev') {
|
|||
proxy(req, res);
|
||||
});
|
||||
} else {
|
||||
proxy = createProxyMiddleware(options(`http://localhost:${ rubyPort }`));
|
||||
// 设置代理
|
||||
app.use(['/api', '/admins', '/attachments', '/oauth', '/competitions', '/projects', '/auth'], (req, res) => {
|
||||
proxy(req, res);
|
||||
|
|
|
@ -982,10 +982,13 @@ Detail.preFetch = ({ store, match, query }) => {
|
|||
});
|
||||
};
|
||||
|
||||
export default withRouter(connect(
|
||||
export default __CLIENT__ ? withRouter(connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(ImageLayerOfCommentHOC({
|
||||
imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
|
||||
parentSelector: ".newContainer",
|
||||
})(Detail)));
|
||||
})(Detail))) : withRouter(connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Detail));
|
|
@ -14,6 +14,15 @@ const axiosInstance = axios.create({
|
|||
withCredentials: true
|
||||
});
|
||||
|
||||
axiosInstance.interceptors.response.use(
|
||||
response => {
|
||||
return response;
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
//
|
||||
export async function getProjectFunc (owner, projectsId) {
|
||||
|
|
Loading…
Reference in New Issue