diff --git a/src/dealer/withdraw/index.tsx b/src/dealer/withdraw/index.tsx index 881de55..8bd92f5 100644 --- a/src/dealer/withdraw/index.tsx +++ b/src/dealer/withdraw/index.tsx @@ -98,7 +98,7 @@ const normalizeMoneyString = (money: unknown) => { } const DealerWithdraw: React.FC = () => { - const [activeTab, setActiveTab] = useState('0') + const [activeTab, setActiveTab] = useState('0') const [loading, setLoading] = useState(false) const [refreshing, setRefreshing] = useState(false) const [submitting, setSubmitting] = useState(false) @@ -114,10 +114,11 @@ const DealerWithdraw: React.FC = () => { // Tab 切换处理函数 const handleTabChange = (value: string | number) => { console.log('Tab切换到:', value) - setActiveTab(value) + const next = String(value) + setActiveTab(next) // 如果切换到提现记录页面,刷新数据 - if (String(value) === '1') { + if (next === '1') { fetchWithdrawRecords() } } @@ -628,13 +629,12 @@ const DealerWithdraw: React.FC = () => { - {renderWithdrawForm()} - {renderWithdrawRecords()} + {activeTab === '0' ? renderWithdrawForm() : renderWithdrawRecords()} ) } diff --git a/src/rider/index.tsx b/src/rider/index.tsx index 665800e..a77aef6 100644 --- a/src/rider/index.tsx +++ b/src/rider/index.tsx @@ -130,7 +130,7 @@ const DealerIndex: React.FC = () => { {dealerUser && ( - 工资统计 + 配送提成