From 0e7903f711552ba61593ff3d5fbcca4be3e89556 Mon Sep 17 00:00:00 2001 From: jerry Date: Mon, 1 Sep 2025 16:36:14 +0800 Subject: [PATCH] =?UTF-8?q?merge(custom):=20=E5=A4=9A=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sp-category-search/index.js | 9 ++---- src/subpages/i18n/lang/index.json | 24 +++++++++++++-- src/subpages/mdugc/index.js | 34 +++++++++++++--------- 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/components/sp-category-search/index.js b/src/components/sp-category-search/index.js index 8e3913bf8..ff11f04e1 100644 --- a/src/components/sp-category-search/index.js +++ b/src/components/sp-category-search/index.js @@ -16,10 +16,7 @@ const initialState = { function SpCategorySearch(props) { const [state, setState] = useImmer(initialState) const { showBar, showSearchDailog, isShowAction, historyList, keyword } = state - const { - placeholder = '搜索', - onConfirm = () => {} - } = props + const { placeholder = '搜索', onConfirm = () => {} } = props useEffect(() => { console.log(showBar, '----') setState((draft) => { @@ -61,12 +58,12 @@ function SpCategorySearch(props) { }) } const handleClear = async () => { - setState(draft => { + setState((draft) => { draft.keyword = '' }) } const handleChangeSearch = async (value) => { - setState(draft => { + setState((draft) => { draft.keyword = value }) } diff --git a/src/subpages/i18n/lang/index.json b/src/subpages/i18n/lang/index.json index d327eb43e..25faac9d5 100644 --- a/src/subpages/i18n/lang/index.json +++ b/src/subpages/i18n/lang/index.json @@ -12918,7 +12918,7 @@ "zh-cn": "专票", "en": "", "zh-tw": "" - }, + }, "5ipxx55": { "zh-cn": "退出小程序", "en": "Exit the mini-program", @@ -12928,5 +12928,25 @@ "zh-cn": "抱歉,本店会员才可以访问", "en": "Sorry, only members of this store can access", "zh-tw": "抱歉,本店會員纔可以訪問" + }, + "1yomk16": { + "zh-cn": "查看数据总览", + "en": "", + "zh-tw": "" + }, + "gpo32": { + "zh-cn": "微信", + "en": "", + "zh-tw": "" + }, + "9b6rva7": { + "zh-cn": "去看看全部商品", + "en": "", + "zh-tw": "" + }, + "k7shki6": { + "zh-cn": "数据不能为空", + "en": "", + "zh-tw": "" } -} +} \ No newline at end of file diff --git a/src/subpages/mdugc/index.js b/src/subpages/mdugc/index.js index c861763f3..7aa0cfa8b 100644 --- a/src/subpages/mdugc/index.js +++ b/src/subpages/mdugc/index.js @@ -35,21 +35,20 @@ import TagsBarcheck from './comps/comp-tags-barcheck' import './index.scss' -const initialState = { - keyword: '', - tagsList: [], - curTagIndex: 0, - filterList: [ - { tag_id: 1, tag_name: '最热' }, - { tag_id: 2, tag_name: '最新' } - ], - curFilterIndex: 0, - leftList: [], - rightList: [], - footerHeight: 0 -} - function UgcIndex() { + const initialState = { + keyword: '', + tagsList: [], + curTagIndex: 0, + filterList: [ + { tag_id: 1, tag_name: '最热' }, + { tag_id: 2, tag_name: '最新' } + ], + curFilterIndex: 0, + leftList: [], + rightList: [], + footerHeight: 0 + } const [state, setState] = useImmer(initialState) const { keyword, tagsList, curTagIndex, filterList, curFilterIndex, leftList, rightList } = state const listRef = useRef() @@ -214,6 +213,13 @@ function UgcIndex() { }} renderFooter={} > + {filterList.map((item) => { + return ( + + {item.tag_name} + + ) + })}