Skip to content

接口报错后,内部一直在重新调用接口 #265

Description

@tangjie-93

const mergedOptions = {
// 默认配置
manual: true,
// 缓存配置
cacheKey: ${apiFunc.name}_${Math.random().toString(36).slice(2, 11)},
cacheTime: 5 * 60 * 1000, // 5分钟缓存
staleTime: 2 * 60 * 1000, // 2分钟 stale time
// 防抖配置
debounceInterval: 300,
// 刷新配置
refreshDeps: [],
// 轮询配置
pollingInterval: 0,
// 重试配置 - 明确禁用
retry: false,
retryCount: 0,
errorRetryCount: 0,
errorRetryInterval: 0,
// 错误处理
onError: (error) => {
console.error('API 请求错误:', error)
},
// 成功处理
onSuccess: (data) => {/* */
console.log('API 请求成功:', data)
},
}
配置如上所示

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions