Browse Source

(*) little bug

master
yinweiwen 2 years ago
parent
commit
fd3ab6f713
  1. 2
      code/web/client/src/sections/auth/containers/login.js
  2. 4
      code/web/client/src/sections/search/containers/searchRes.js
  3. 4
      code/web/client/src/utils/webapi.js

2
code/web/client/src/sections/auth/containers/login.js

@ -27,7 +27,7 @@ const Login = props => {
useEffect(() => { useEffect(() => {
if (user && user.authorized) { if (user && user.authorized) {
dispatch(push('/search')); dispatch(push('/'));
} }
}, [user]) }, [user])

4
code/web/client/src/sections/search/containers/searchRes.js

@ -114,11 +114,11 @@ const searchRes = (props) => {
} }
> >
<List.Item.Meta <List.Item.Meta
title={<a href={item.link}>{getHighlightedText(item.title, keyword)}</a>} title={<a href={item.link}> <div dangerouslySetInnerHTML={ { __html: item.title}} /></a>}
description={item.ext?.desc ? item.ext.desc : undefined} description={item.ext?.desc ? item.ext.desc : undefined}
// description={item.content} // description={item.content}
/> />
{getHighlightedText(item.content, keyword)} <div dangerouslySetInnerHTML={ { __html: item.content}} />
</List.Item> </List.Item>
)} )}
/> : <Empty className='search-empty' /> /> : <Empty className='search-empty' />

4
code/web/client/src/utils/webapi.js

@ -2,8 +2,8 @@
import request from 'superagent'; import request from 'superagent';
export const ApiTable = { export const ApiTable = {
login: 'login', login: 'v1/login',
logout: 'logout', logout: 'v1/logout',
search: 'v1/search/{wd}', search: 'v1/search/{wd}',

Loading…
Cancel
Save