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) => { const handleValuesChange = (row: FormData) => {
console.log('row', row); console.log('row', row);
let data: ApiTypes.Company.CompanyConfigs.Store = { 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_key: 'Theme',
config_value: { config_value: {
color: formValues?.color, color: formValues?.color,
@ -66,7 +67,8 @@ export default function Index({ title = '小程序页面配置' }) {
if (getShowData?.id) { if (getShowData?.id) {
Apis.Company.CompanyConfigs.Update({ Apis.Company.CompanyConfigs.Update({
...data, ...data,
id: getShowData?.id || 0, // id: getShowData?.id || 0,
id: 2,
}).then(() => { }).then(() => {
message.success('保存成功'); message.success('保存成功');
}); });
@ -191,9 +193,7 @@ export default function Index({ title = '小程序页面配置' }) {
colProps: { span: 24 }, colProps: { span: 24 },
fieldProps: { fieldProps: {
onChange: (val: { url: string }[]) => { onChange: (val: { url: string }[]) => {
console.log('val', val); setFormValues({ ...formValues, logo: 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 } = {}) { export default function Show({ title }: { title?: string } = {}) {
const { id } = useParams<{ id: string }>(); const { id } = useParams<{ id: string }>();
const [data, setShow] = useState<any>({}); const [data, setShow] = useState<any>({});
const [activeKey, setActiveKey] = useState('1');
// 注册当前页面为标签页 // 注册当前页面为标签页
const { addTab } = usePageTabs({ const { addTab } = usePageTabs({
tabKey: `company-show-${id}`, tabKey: `company-show-${id}`,
@ -173,12 +173,7 @@ export default function Show({ title }: { title?: string } = {}) {
</div> </div>
</ProCard> </ProCard>
<ProCard> <ProCard>
<Tabs <Tabs type="card" items={data?.id ? items : []} />
type="card"
activeKey={activeKey}
onChange={setActiveKey}
items={data?.id ? items : []}
/>
</ProCard> </ProCard>
</MyPageContainer> </MyPageContainer>
); );