diff --git a/front/src/components/Search/index.jsx b/front/src/components/Search/index.jsx index 958eba9..2338b5a 100644 --- a/front/src/components/Search/index.jsx +++ b/front/src/components/Search/index.jsx @@ -42,11 +42,7 @@ class Search extends React.Component { this.clearTimer(); return; } - this.clearTimer(); - this.timer = setTimeout(async () => { - await this.search(content); - this.clearTimer(); - }, 200); + this.search(content); } clearTimer() { @@ -63,13 +59,8 @@ class Search extends React.Component { this.setState({ resultList: [] }); return; } - // httpUtil - // .get( - // "/bookmark/searchUserBookmark?content=" + encodeURIComponent(content) - // ) - // .then(res => this.setState({ resultList: res })); let resultList = await keySearch(content); - this.setState({ resultList }); + this.setState({ resultList, currentIndex: 0 }); } /** diff --git a/front/src/setupProxy.js b/front/src/setupProxy.js index 3ba6b52..d8f144a 100644 --- a/front/src/setupProxy.js +++ b/front/src/setupProxy.js @@ -4,7 +4,7 @@ module.exports = function(app) { app.use( proxy("/bookmark/api/**", { target: "http://localhost:8088/", - // target: "http://ali.tapme.top:8083/", + // target: "http://west.tapme.top:8083/", changeOrigin: true }) );