feat(C-01):路由/代理前缀冲突修复
SPA冲突路由改名+旧路径Navigate重定向(/api-docs→/open-api-docs、/api-detail→/open-api-detail、/article→/post、/user→/user-home);vite代理宽前缀改精确正则白名单;nginx.conf同步同口径;新增86路由回归脚本+Playwright 3项(86/86全绿)。
This commit is contained in:
@@ -78,7 +78,7 @@ const ArticleDetail: React.FC = () => {
|
||||
description: article.excerpt || "",
|
||||
image: article.image || "",
|
||||
category: article.category || "",
|
||||
link: `/article/${id}`,
|
||||
link: `/post/${id}`,
|
||||
} : null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -333,12 +333,12 @@ const ArticleDetail: React.FC = () => {
|
||||
src={article.author_avatar}
|
||||
size={32}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => navigate(`/user/${article.author_user_id}`)}
|
||||
onClick={() => navigate(`/user-home/${article.author_user_id}`)}
|
||||
/>
|
||||
<span
|
||||
className="author-name"
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => navigate(`/user/${article.author_user_id}`)}
|
||||
onClick={() => navigate(`/user-home/${article.author_user_id}`)}
|
||||
>
|
||||
{article.author_name}
|
||||
</span>
|
||||
@@ -419,7 +419,7 @@ const ArticleDetail: React.FC = () => {
|
||||
<div
|
||||
key={related.id}
|
||||
className="related-article-card"
|
||||
onClick={() => navigate(`/article/${related.id}`)}
|
||||
onClick={() => navigate(`/post/${related.id}`)}
|
||||
>
|
||||
<div className="related-article-cover">
|
||||
<img src={related.image} alt={related.title} />
|
||||
@@ -444,14 +444,14 @@ const ArticleDetail: React.FC = () => {
|
||||
src={article.author_avatar}
|
||||
size={64}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => navigate(`/user/${article.author_user_id}`)}
|
||||
onClick={() => navigate(`/user-home/${article.author_user_id}`)}
|
||||
/>
|
||||
</div>
|
||||
<div className="author-card-info">
|
||||
<div
|
||||
className="author-card-name"
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => navigate(`/user/${article.author_user_id}`)}
|
||||
onClick={() => navigate(`/user-home/${article.author_user_id}`)}
|
||||
>
|
||||
{article.author_name}
|
||||
</div>
|
||||
@@ -514,14 +514,14 @@ const ArticleDetail: React.FC = () => {
|
||||
src={comment.user_avatar}
|
||||
size={40}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => comment.user_id && navigate(`/user/${comment.user_id}`)}
|
||||
onClick={() => comment.user_id && navigate(`/user-home/${comment.user_id}`)}
|
||||
/>
|
||||
<div className="comment-content">
|
||||
<div className="comment-header">
|
||||
<span
|
||||
className="comment-author"
|
||||
style={{ cursor: comment.user_id ? "pointer" : "default" }}
|
||||
onClick={() => comment.user_id && navigate(`/user/${comment.user_id}`)}
|
||||
onClick={() => comment.user_id && navigate(`/user-home/${comment.user_id}`)}
|
||||
>
|
||||
{comment.user_name}
|
||||
</span>
|
||||
@@ -554,14 +554,14 @@ const ArticleDetail: React.FC = () => {
|
||||
src={reply.user_avatar}
|
||||
size={32}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => reply.user_id && navigate(`/user/${reply.user_id}`)}
|
||||
onClick={() => reply.user_id && navigate(`/user-home/${reply.user_id}`)}
|
||||
/>
|
||||
<div className="reply-content">
|
||||
<div className="reply-header">
|
||||
<span
|
||||
className="reply-author"
|
||||
style={{ cursor: reply.user_id ? "pointer" : "default" }}
|
||||
onClick={() => reply.user_id && navigate(`/user/${reply.user_id}`)}
|
||||
onClick={() => reply.user_id && navigate(`/user-home/${reply.user_id}`)}
|
||||
>
|
||||
{reply.user_name}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user