|
@@ -29,7 +29,7 @@ type Props = {
|
|
|
}) => void
|
|
|
}
|
|
|
function AdAccount(props: Props) {
|
|
|
- let { adAccountId, userId ,tableIdClick} = props
|
|
|
+ let {accountId, adAccountId, userId ,tableIdClick} = props
|
|
|
let [selectedRowKeys, setSelectedRowKeys] = useState<any[]>([])
|
|
|
const [queryForm, setQueryForm] = useState<{
|
|
|
pageNum: number;
|
|
@@ -40,12 +40,11 @@ function AdAccount(props: Props) {
|
|
|
// api方法
|
|
|
const listAjax = useAjax((params) => getAdqAdAccountList(params), { formatResult: true })
|
|
|
const syncAjax = useAjax((params) => putAdqAdAccountSyncByIds(params))
|
|
|
- console.log('创意=====》')
|
|
|
useEffect(() => {
|
|
|
- getList()
|
|
|
- }, [queryForm, userId])
|
|
|
+ getList(accountId)
|
|
|
+ }, [queryForm, userId,accountId])
|
|
|
// 获取列表
|
|
|
- const getList = useCallback(() => {
|
|
|
+ const getList = useCallback((accountId?:any) => {
|
|
|
listAjax.run({ ...queryForm, userId })
|
|
|
}, [queryForm, userId, listAjax])
|
|
|
// 同步
|