From fd3ab6f713de946a04548206cc5ad8284e48b945 Mon Sep 17 00:00:00 2001 From: yinweiwen Date: Sun, 3 Jul 2022 19:57:43 +0800 Subject: [PATCH] (*) little bug --- code/web/client/src/sections/auth/containers/login.js | 2 +- code/web/client/src/sections/search/containers/searchRes.js | 4 ++-- code/web/client/src/utils/webapi.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/web/client/src/sections/auth/containers/login.js b/code/web/client/src/sections/auth/containers/login.js index bfcc85c..0e758d0 100644 --- a/code/web/client/src/sections/auth/containers/login.js +++ b/code/web/client/src/sections/auth/containers/login.js @@ -27,7 +27,7 @@ const Login = props => { useEffect(() => { if (user && user.authorized) { - dispatch(push('/search')); + dispatch(push('/')); } }, [user]) diff --git a/code/web/client/src/sections/search/containers/searchRes.js b/code/web/client/src/sections/search/containers/searchRes.js index 758021e..6f33583 100644 --- a/code/web/client/src/sections/search/containers/searchRes.js +++ b/code/web/client/src/sections/search/containers/searchRes.js @@ -114,11 +114,11 @@ const searchRes = (props) => { } > {getHighlightedText(item.title, keyword)}} + title={
} description={item.ext?.desc ? item.ext.desc : undefined} // description={item.content} /> - {getHighlightedText(item.content, keyword)} +
)} /> : diff --git a/code/web/client/src/utils/webapi.js b/code/web/client/src/utils/webapi.js index 4fb4175..6c54864 100644 --- a/code/web/client/src/utils/webapi.js +++ b/code/web/client/src/utils/webapi.js @@ -2,8 +2,8 @@ import request from 'superagent'; export const ApiTable = { - login: 'login', - logout: 'logout', + login: 'v1/login', + logout: 'v1/logout', search: 'v1/search/{wd}',