diff --git a/src/components/HostListDialog.vue b/src/components/HostListDialog.vue index f41b473..ae72d4c 100644 --- a/src/components/HostListDialog.vue +++ b/src/components/HostListDialog.vue @@ -345,7 +345,7 @@ const minCount = ref(5) const maxCount = ref() const selectedLevels = ref(new Set()) const showLevelDropdown = ref(false) -const hostListGateHelpText = '从 TK 工作台采集到的主播会进入主播库。开启上下限模式后,到达接收上限时采集会暂停;只有当主播库数量低于主播下限时,采集才会继续查验主播并重新进入主播库。' +const hostListGateHelpText = '从 TK 工作台采集到的主播会进入主播库。开启上下限模式后,到达接收上限时采集会暂停;只有当主播库数量低于主播下限时,采集才会继续查验主播并重新进入主播库。比如设置上限20,下限5,主播库的数据即可保持较新的查验状态,极大避免几个小时前查的数据发私信时,已被其他公会签约的情况发生' const resolveRestrictedMaxAnchorCount = (fallbackValue = 9999999) => { const permissions = getPermissions() diff --git a/src/views/tk/Workbenches.vue b/src/views/tk/Workbenches.vue index 8b613bf..1db43c9 100644 --- a/src/views/tk/Workbenches.vue +++ b/src/views/tk/Workbenches.vue @@ -136,6 +136,15 @@
+
+ task_alt +
+
爬取完毕
+
{{ crawlCompletedNotice }}
+
+
+
@@ -355,6 +364,8 @@ let country_Lst = ref(); let getHostTimer = ref(null); //获取查询次数定时器 let getNumTimer = ref(null); +let hasReachedHostLimit = ref(false); +let crawlCompletedNotice = ref(''); //获取的主播信息 let hostData = ref({ totalCount: 0, @@ -535,6 +546,8 @@ const submit = () => { .then(() => { // console.log('提交的区间值:', pyData.value.gold, pyData.value.fans, pyData.value.frequency); //开始按钮的状态 改为禁用 + hasReachedHostLimit.value = false; + crawlCompletedNotice.value = ''; submitting.value = true; setNumData(pyData.value); console.error('提交的区间值:', JSON.stringify(pyData.value)); @@ -559,9 +572,13 @@ const submit = () => { fetchDataCount().then((res) => { hostData.value = JSON.parse(res); if (isLimit.value) { - if (hostData.value.canInvitationCount >= hostNum.value) { + if (!hasReachedHostLimit.value && hostData.value.canInvitationCount >= hostNum.value) { + hasReachedHostLimit.value = true; + clearInterval(getHostTimer.value); + getHostTimer.value = null; + crawlCompletedNotice.value = `已达到可邀请数量上限 ${hostNum.value},任务已自动停止。`; unsubmit(); - alert('爬取完毕') + ElMessage.success('爬取完毕') } }