Compare commits

..

No commits in common. "9d8eb74d9a1fb08b8da68fcc41c726aa247447f8" and "bd77179459974200b59787a579361066007afb2f" have entirely different histories.

2 changed files with 7 additions and 12 deletions

View File

@ -50,7 +50,8 @@ 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: Number(searchParams.get('id')) || 0,
companies_id: 4,
config_key: 'Theme',
config_value: {
color: formValues?.color,
@ -66,7 +67,8 @@ export default function Index({ title = '小程序页面配置' }) {
if (getShowData?.id) {
Apis.Company.CompanyConfigs.Update({
...data,
id: getShowData?.id || 0,
// id: getShowData?.id || 0,
id: 2,
}).then(() => {
message.success('保存成功');
});
@ -191,9 +193,7 @@ export default function Index({ title = '小程序页面配置' }) {
colProps: { span: 24 },
fieldProps: {
onChange: (val: { url: string }[]) => {
console.log('val', val);
form.setFieldValue('logo', val || []);
setFormValues({ ...formValues, 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,12 +173,7 @@ export default function Show({ title }: { title?: string } = {}) {
</div>
</ProCard>
<ProCard>
<Tabs
type="card"
activeKey={activeKey}
onChange={setActiveKey}
items={data?.id ? items : []}
/>
<Tabs type="card" items={data?.id ? items : []} />
</ProCard>
</MyPageContainer>
);