Refactor outdoor fair management:
- Remove .DS_Store file. - Update .gitignore to include .DS_Store. - Modify proxy configuration to use environment variable for backend URL. - Correct component paths in routes. - Implement outdoor fair detail fetching with improved API call. - Enhance EditModal for outdoor fair with dynamic dictionary options. - Add functionality to upload outdoor fair photos. - Update service layer to handle outdoor fair dictionary options.
This commit is contained in:
@@ -3,7 +3,7 @@ import { history, useSearchParams } from '@umijs/max';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { Tabs, Button, Spin, message } from 'antd';
|
||||
import { ArrowLeftOutlined } from '@ant-design/icons';
|
||||
import { getOutdoorFairList } from '@/services/jobportal/outdoorFair';
|
||||
import { getOutdoorFairInfo } from '@/services/jobportal/outdoorFair';
|
||||
import type { OutdoorFairItem } from '@/services/jobportal/outdoorFair';
|
||||
import FairInfoTab from './components/FairInfoTab';
|
||||
import BoothTab from './components/BoothTab';
|
||||
@@ -22,12 +22,11 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
const fetchFairInfo = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await getOutdoorFairList({ current: 1, pageSize: 100 });
|
||||
const found = res.rows.find((item) => item.id === fairId);
|
||||
if (found) {
|
||||
setFairInfo(found);
|
||||
const res = await getOutdoorFairInfo(fairId);
|
||||
if (res.code === 200 && res.data) {
|
||||
setFairInfo(res.data);
|
||||
} else {
|
||||
message.error('未找到该招聘会信息');
|
||||
message.error(res.msg || '未找到该招聘会信息');
|
||||
}
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -72,7 +71,13 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
children: (() => {
|
||||
switch (tab.key) {
|
||||
case 'fair-info':
|
||||
return <FairInfoTab fairId={fairId} fairInfo={fairInfo} onFairUpdate={fetchFairInfo} />;
|
||||
return (
|
||||
<FairInfoTab
|
||||
fairId={fairId}
|
||||
fairInfo={fairInfo}
|
||||
onFairUpdate={fetchFairInfo}
|
||||
/>
|
||||
);
|
||||
case 'booth':
|
||||
return <BoothTab fairId={fairId} />;
|
||||
case 'company-review':
|
||||
|
||||
Reference in New Issue
Block a user