| 
														
															@@ -18,14 +18,14 @@ import type { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   RefType,  
														 | 
														
														 | 
														
															   RefType,  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   FormDataType  
														 | 
														
														 | 
														
															   FormDataType  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } from './components/CreateModal/types' 
														 | 
														
														 | 
														
															 } from './components/CreateModal/types' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import { AllAppListItemType } from './types' 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import type { AllAppListItemType } from './types' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 export function AdManage(){ 
														 | 
														
														 | 
														
															 export function AdManage(){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const [tableData, setTableData] = useState<RowDataType[]>([]) 
														 | 
														
														 | 
														
															   const [tableData, setTableData] = useState<RowDataType[]>([]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const [total, setTotal] = useState(0) 
														 | 
														
														 | 
														
															   const [total, setTotal] = useState(0) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const [paginationParams, setPaginationParams] = useState<PaginationParamsType>({ pageNumber: 1, pageSize: 10}) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const [paginationParams, setPaginationParams] = useState<PaginationParamsType>({ pageNumber:1, pageSize:10}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const [allAppList, setAllAppList] = useState<AllAppListItemType[]>([]) 
														 | 
														
														 | 
														
															   const [allAppList, setAllAppList] = useState<AllAppListItemType[]>([]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const createModalRef = useRef<RefType>() 
														 | 
														
														 | 
														
															   const createModalRef = useRef<RefType>() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const setloading = useGlobalStateUpdate() 
														 | 
														
														 | 
														
															   const setloading = useGlobalStateUpdate() 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -58,7 +58,7 @@ export function AdManage(){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setloading(false) 
														 | 
														
														 | 
														
															     setloading(false) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const onPaginationChange =async (params: PaginationParamsType) => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const onPaginationChange =async (params:PaginationParamsType) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setPaginationParams(params) 
														 | 
														
														 | 
														
															     setPaginationParams(params) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -67,17 +67,15 @@ export function AdManage(){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const onSwitchStatus = async ({row, checked}:{row:RowDataType, checked:boolean}) => { 
														 | 
														
														 | 
														
															   const onSwitchStatus = async ({row, checked}:{row:RowDataType, checked:boolean}) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log(row, checked) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setloading(true) 
														 | 
														
														 | 
														
															     setloading(true) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     const res =  checked ? await openAd(row.id) : await clsoeAd(row.id) 
														 | 
														
														 | 
														
															     const res =  checked ? await openAd(row.id) : await clsoeAd(row.id) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setloading(false) 
														 | 
														
														 | 
														
															     setloading(false) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (res) { 
														 | 
														
														 | 
														
															     if (res) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       getTableData() 
														 | 
														
														 | 
														
															       getTableData() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const createAd = async (form: FormDataType, cb:EventFunctionType<[]>) => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const createAd = async (form:FormDataType, cb:EventFunctionType<[]>) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setloading(true) 
														 | 
														
														 | 
														
															     setloading(true) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     const res = await createAdRequest(form) 
														 | 
														
														 | 
														
															     const res = await createAdRequest(form) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setloading(false) 
														 | 
														
														 | 
														
															     setloading(false) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -87,7 +85,7 @@ export function AdManage(){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const updateAd = (form: RowDataType,  cb:EventFunctionType<[]>) => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const updateAd = (form:RowDataType,  cb:EventFunctionType<[]>) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('更新',form) 
														 | 
														
														 | 
														
															     console.log('更新',form) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     // TODO 更新接口 
														 | 
														
														 | 
														
															     // TODO 更新接口 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     cb() 
														 | 
														
														 | 
														
															     cb() 
														 |