2.5.6
This commit is contained in:
@@ -136,6 +136,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div v-if="crawlCompletedNotice"
|
||||
class="mb-6 flex items-start gap-3 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-left text-sm text-emerald-800">
|
||||
<span class="material-icons-round text-base text-emerald-600">task_alt</span>
|
||||
<div>
|
||||
<div class="font-semibold">爬取完毕</div>
|
||||
<div class="mt-1 leading-6">{{ crawlCompletedNotice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-6">
|
||||
<!-- Coins -->
|
||||
<div>
|
||||
@@ -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('爬取完毕')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user