Merge pull request 'fix:更新金刚区配置' (#26) from develop into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m45s

Reviewed-on: #26
This commit is contained in:
zsq 2026-01-30 17:07:29 +08:00
commit 9d8eb74d9a
2 changed files with 12 additions and 7 deletions

View File

@ -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 || [] });
},
},
}),

View File

@ -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<any>({});
const [activeKey, setActiveKey] = useState('1');
// 注册当前页面为标签页
const { addTab } = usePageTabs({
tabKey: `company-show-${id}`,
@ -173,7 +173,12 @@ export default function Show({ title }: { title?: string } = {}) {
</div>
</ProCard>
<ProCard>
<Tabs type="card" items={data?.id ? items : []} />
<Tabs
type="card"
activeKey={activeKey}
onChange={setActiveKey}
items={data?.id ? items : []}
/>
</ProCard>
</MyPageContainer>
);