Skip to content

Commit

Permalink
feat(bilibili):新增请求失败重试
Browse files Browse the repository at this point in the history
  • Loading branch information
QiuYeDx committed Dec 18, 2023
1 parent 9fe3ba3 commit a4a8d89
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/views/Tools/BilibiliPage/BilibiliPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export default function BilibiliPage() {
// 更新服务请求次数
setCount((await log_api_config.awaitCountAPI('PUT', 'bilibili')).data[0].count);
setLoading(false);

} catch (error) {
if (error.message === ErrorCode.NONE_RESULT_ERROR) {
console.warn('None result error');
Expand Down Expand Up @@ -147,8 +146,7 @@ export default function BilibiliPage() {
const fetchDataByCount = (url, params, count) => {
fetchData(url, params).then((res) => {
if (count === 0) return;
console.info('>>>', res);
if (res.data.code === 10085 || res.code === 10085) {
if (res.data.code === 10085) {
setTimeout(() => {
fetchDataByCount(url, params, count - 1);
}, 800);
Expand Down

0 comments on commit a4a8d89

Please sign in to comment.