From 2e4bd51dba044143775f196578d720ff570a0945 Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Mon, 18 Mar 2024 00:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/search/search.ts | 29 +++++++++ src/components/Search/Search.vue | 67 +++++++++++++------- src/layout/components/Header/SearchModal.vue | 28 ++++---- src/views/message/content/List.vue | 26 ++++++-- 4 files changed, 107 insertions(+), 43 deletions(-) create mode 100644 src/api/search/search.ts diff --git a/src/api/search/search.ts b/src/api/search/search.ts new file mode 100644 index 0000000..20230cb --- /dev/null +++ b/src/api/search/search.ts @@ -0,0 +1,29 @@ +import { http } from '@/utils/http/axios' + +/** + * 综合搜索 + * @returns + */ +export async function getSearchList(params) { + const res = await http.request({ + url: `/ocr/history/searchList`, + method: 'get', + params, + }) + + return res +} + +/** + * 综合搜索历史记录搜索 + * @returns + */ +export async function historySearch(params) { + const res = await http.request({ + url: `/ocr/history/historySearch`, + method: 'get', + params, + }) + + return res +} diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index adbaf5d..de59eac 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -1,69 +1,88 @@ +] + +async function handlerSearch(value) { + const res = await getSearchList({ + search: value, + }) + if (res.code === 'OK') + console.log(res) +} +async function getHistory() { + const res = await historySearch({ + }) + if (res.code === 'OK') + console.log(res) +} +getHistory() +