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([])