refactor(http): 简化请求处理逻辑并移除取消功能
移除 useRequest 和 http 模块中的取消请求功能 简化请求处理逻辑,移除双 token 刷新机制 优化错误处理流程,减少不必要的状态管理
This commit is contained in:
@@ -8,7 +8,7 @@ import { getFooAPI } from '@/api/foo'
|
||||
// }
|
||||
const initialData = undefined
|
||||
|
||||
const { loading, error, data, run, cancel } = useRequest<IFooItem>(() => getFooAPI('菲鸽'), {
|
||||
const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('菲鸽'), {
|
||||
immediate: true,
|
||||
initialData,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user