From e4b66175f97a7ab4a49d817a4f96ae9526798181 Mon Sep 17 00:00:00 2001 From: hejin Date: Sun, 24 Aug 2025 15:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90=E5=85=A8?= =?UTF-8?q?=E7=AB=99=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 8 +++ src/application/search-result.vue | 109 ++++++++++++++++++++++++++++++ src/locale/en.json | 3 +- src/locale/zh.json | 3 +- src/pages.json | 8 +++ src/pages/index/index.vue | 4 +- 6 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 src/application/search-result.vue diff --git a/src/api/index.js b/src/api/index.js index 9fff114..22e15a6 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -111,4 +111,12 @@ export const msgListApi = (data) => { **/ export const saveMsg = (data) => { return request.post('/web/saveMessage', data) +} + +/** + * @function 全站搜索 + * @param {string} text +**/ +export const fullTextSearchApi = (params) => { + return request.get('/web/searchText', {params}) } \ No newline at end of file diff --git a/src/application/search-result.vue b/src/application/search-result.vue new file mode 100644 index 0000000..14bcadc --- /dev/null +++ b/src/application/search-result.vue @@ -0,0 +1,109 @@ + + + + + \ No newline at end of file diff --git a/src/locale/en.json b/src/locale/en.json index a323d25..c827f15 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -51,7 +51,8 @@ "sending": "sending", "Reset": "Reset", "Sure": "Sure", - "Newdetail": "Newdetail" + "Newdetail": "Newdetail", + "Allloaded": "All loaded" }, "menu": { "Home": "Home", diff --git a/src/locale/zh.json b/src/locale/zh.json index c638df6..c547116 100644 --- a/src/locale/zh.json +++ b/src/locale/zh.json @@ -51,7 +51,8 @@ "sending": "发送", "Reset": "重置", "Sure": "确认", - "Newdetail": "文章详情" + "Newdetail": "文章详情", + "Allloaded": "已全部加载" }, "menu": { "Home": "首页", diff --git a/src/pages.json b/src/pages.json index 07a442c..227e67e 100644 --- a/src/pages.json +++ b/src/pages.json @@ -68,6 +68,14 @@ "enablePullDownRefresh": true, "navigationStyle": "default" } + }, + { + "path": "search-result", + "style": { + "navigationBarTitleText": "Full text search", + "enablePullDownRefresh": true, + "navigationStyle": "default" + } } ] } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 082a880..d19e409 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -160,7 +160,9 @@ if (!searchVal.value) { return } - console.log(searchVal.value) + uni.navigateTo({ + url: `/application/search-result?str=${searchVal.value}` + }) } const hotProductList = ref([])