From 713cf3a06a6bff5e7ffd801ca6603980897f831b Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 30 Jan 2026 17:07:07 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=9B=B4=E6=96=B0=E9=87=91?= =?UTF-8?q?=E5=88=9A=E5=8C=BA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/company/list/pages/set_page_info.tsx | 10 +++++----- src/pages/company/list/show/$id.tsx | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pages/company/list/pages/set_page_info.tsx b/src/pages/company/list/pages/set_page_info.tsx index ea07042..925fbee 100644 --- a/src/pages/company/list/pages/set_page_info.tsx +++ b/src/pages/company/list/pages/set_page_info.tsx @@ -50,8 +50,7 @@ export default function Index({ title = '小程序页面配置' }) { const handleValuesChange = (row: FormData) => { console.log('row', row); let data: ApiTypes.Company.CompanyConfigs.Store = { - // companies_id: Number(searchParams.get('id')) || 0, - companies_id: 4, + companies_id: Number(searchParams.get('id')) || 0, config_key: 'Theme', config_value: { color: formValues?.color, @@ -67,8 +66,7 @@ export default function Index({ title = '小程序页面配置' }) { if (getShowData?.id) { Apis.Company.CompanyConfigs.Update({ ...data, - // id: getShowData?.id || 0, - id: 2, + id: getShowData?.id || 0, }).then(() => { message.success('保存成功'); }); @@ -193,7 +191,9 @@ export default function Index({ title = '小程序页面配置' }) { colProps: { span: 24 }, fieldProps: { onChange: (val: { url: string }[]) => { - setFormValues({ ...formValues, logo: val }); + console.log('val', val); + form.setFieldValue('logo', val || []); + setFormValues({ ...formValues, logo: val || [] }); }, }, }), diff --git a/src/pages/company/list/show/$id.tsx b/src/pages/company/list/show/$id.tsx index 02a15b4..bb2d84d 100644 --- a/src/pages/company/list/show/$id.tsx +++ b/src/pages/company/list/show/$id.tsx @@ -20,7 +20,7 @@ import Roles from '../table/Roles'; export default function Show({ title }: { title?: string } = {}) { const { id } = useParams<{ id: string }>(); const [data, setShow] = useState({}); - + const [activeKey, setActiveKey] = useState('1'); // 注册当前页面为标签页 const { addTab } = usePageTabs({ tabKey: `company-show-${id}`, @@ -173,7 +173,12 @@ export default function Show({ title }: { title?: string } = {}) { - + ); -- 2.47.2