1234567891011121314151617181920212223242526272829 |
- import { useAjax } from '@/Hook/useAjax'
- import { getAdAccountApi } from '@/services/launchAdq/adAuthorize'
- import { getGroupListApi } from '@/services/launchAdq/subgroup'
- export default function useAdAuthorize() {
- const getAdAccount = useAjax(() => getAdAccountApi(), { formatResult: true })
- /** 所有分组列表 */
- const getGroupList = useAjax(() => getGroupListApi())
- /** 初始话 */
- const groupListInit = () => {
- getGroupList.run()
- }
- const groupRefresh = () => {
- getGroupList.refresh()
- }
- return {
- getAdAccount,
- getGroupList,
- groupListInit,
- groupRefresh
- }
- }
|