Merge pull request 'fix:更新金刚区配置' (#26) from develop into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m45s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m45s
Reviewed-on: #26
This commit is contained in:
commit
9d8eb74d9a
@ -50,8 +50,7 @@ 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,
|
||||||
@ -67,8 +66,7 @@ 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('保存成功');
|
||||||
});
|
});
|
||||||
@ -193,7 +191,9 @@ export default function Index({ title = '小程序页面配置' }) {
|
|||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
onChange: (val: { url: string }[]) => {
|
onChange: (val: { url: string }[]) => {
|
||||||
setFormValues({ ...formValues, logo: val });
|
console.log('val', val);
|
||||||
|
form.setFieldValue('logo', val || []);
|
||||||
|
setFormValues({ ...formValues, logo: val || [] });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -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,7 +173,12 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
</div>
|
</div>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
<ProCard>
|
<ProCard>
|
||||||
<Tabs type="card" items={data?.id ? items : []} />
|
<Tabs
|
||||||
|
type="card"
|
||||||
|
activeKey={activeKey}
|
||||||
|
onChange={setActiveKey}
|
||||||
|
items={data?.id ? items : []}
|
||||||
|
/>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</MyPageContainer>
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user