From c34437c3e946de2af1afd615de50d3caf33bb7be Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 22 Jan 2026 11:41:55 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=9B=B4=E6=96=B0=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E6=9E=84=E7=AB=AFadmin=EF=BC=8Clogo?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../company/list/pages/set_page_info.tsx | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/pages/company/list/pages/set_page_info.tsx b/src/pages/company/list/pages/set_page_info.tsx index 259fbe9..1ea6212 100644 --- a/src/pages/company/list/pages/set_page_info.tsx +++ b/src/pages/company/list/pages/set_page_info.tsx @@ -17,6 +17,7 @@ interface FormData { color: string; pageColor: string; pageColorValue?: string[]; + admin_logo?: { url: string }[]; } export default function Index({ title = '小程序页面配置' }) { @@ -25,10 +26,11 @@ export default function Index({ title = '小程序页面配置' }) { const [searchParams] = useSearchParams(); const [formValues, setFormValues] = useState({ logo: [], + admin_logo: [], color: '#1890ff', pageColor: `linear-gradient(180deg,rgba(255, 255, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg,#d3d7ff 0%,rgba(255, 255, 255, 0) 37%),linear-gradient(194deg,#dffff3 0%,#f8f8f8 30%)`, }); - const [GET_DEFAULT_COLOR, SET_DEFAULT_COLOR] = useState([ + const GET_DEFAULT_COLOR = [ { color: '#d3d7ff', percent: 0, @@ -37,7 +39,7 @@ export default function Index({ title = '小程序页面配置' }) { color: '#dffff3', percent: 100, }, - ]); + ]; // 处理表单值变化,用于实时预览 const handleValuesChange = (row: FormData) => { console.log('row', row); @@ -49,6 +51,7 @@ export default function Index({ title = '小程序页面配置' }) { pageColor: formValues?.pageColor, logo: row?.logo || formValues?.logo, pageColorValue: formValues?.pageColorValue, + admin_logo: row?.admin_logo, }, }; @@ -70,7 +73,7 @@ export default function Index({ title = '小程序页面配置' }) { useEffect(() => { if (searchParams.get('id')) { Apis.Company.CompanyConfigs.GetDetail({ - companies_id: searchParams.get('id'), + companies_id: searchParams.get('id') ?? 0, config_key: 'Theme', }).then((res: any) => { console.log('res', res); @@ -156,9 +159,9 @@ export default function Index({ title = '小程序页面配置' }) { key: 'logo', title: (
- 机构Logo + 机构小程序Logo - (请上传480*480,png格式的Logo) + (请上传正方形,建议:480*480,png格式的Logo)
), @@ -170,6 +173,19 @@ export default function Index({ title = '小程序页面配置' }) { }, }, }), + MyFormItems.UploadImages({ + key: 'admin_logo', + title: ( +
+ 机构后台Logo + + (请上传长方形横版,jpg,png格式的Logo) + +
+ ), + max: 1, + colProps: { span: 24 }, + }), { title: (