爬取数量限制

This commit is contained in:
2025-07-16 20:57:46 +08:00
parent 0e230629fa
commit 94a3701712
4 changed files with 32 additions and 5 deletions

View File

@@ -61,8 +61,8 @@
</div>
</div>
</template>
<el-row :gutter="20">
<el-col :span="8">
<el-row :gutter="24">
<el-col :span="6">
<div class="input-group">
<label>{{ $t('workbenchesSetup.setCoinsNum') }}</label>
<el-input type='number' v-model="pyData.gold.min" :min="0" :max="pyData.gold.max - 1"
@@ -77,7 +77,7 @@
</el-input>
</div>
</el-col>
<el-col :span="8">
<el-col :span="6">
<div class="input-group">
<label>{{ $t('workbenchesSetup.setFansNum') }}</label>
<el-input type='number' v-model="pyData.fans.min" :min="0" :max="pyData.fans.max - 1"
@@ -92,7 +92,7 @@
</el-input>
</div>
</el-col>
<el-col :span="8">
<el-col :span="6">
<div class="input-group">
<label>{{ $t('workbenchesSetup.setQuery') }}</label>
<!-- <el-input type='number' v-model="pyData.frequency.hour" @input="handleInputHour" -->
@@ -109,6 +109,18 @@
</el-input>
</div>
</el-col>
<el-col :span="6">
<div class="input-group">
<label>{{ $t('workbenchesSetup.setNum') }}</label>
<!-- <el-input type='number' v-model="pyData.frequency.hour" @input="handleInputHour" -->
<div class="center-justify" style="height: 100% ;">
<el-input type='number' v-model="hostNum" :placeholder="$t('workbenchesSetup.num')"
style="width: 100% ; margin-bottom: 70px;" :disabled="!pyData.isStart">
<template #append>{{ $t('workbenchesSetup.num') }}</template>
</el-input>
</div>
</div>
</el-col>
</el-row>
<div style="margin-top: 20px; text-align: center">
@@ -205,7 +217,8 @@ let pyData = ref({
tenantId: getUser().tenantId,
userId: getUser().userId,
});
//需要查询的主播数
let hostNum = ref(0);
//按钮提交状态
let submitting = ref(true);
@@ -317,6 +330,10 @@ const submit = () => {
getHostTimer.value = setInterval(() => {
fetchDataCount().then((res) => {
hostData.value = JSON.parse(res);
if (hostData.value.canInvitationCount >= hostNum.value) {
unsubmit();
alert('爬取完毕')
}
})
}, 1000);
getNumTimer.value = setInterval(() => {
@@ -658,6 +675,7 @@ function handleInputDay(value) {
.input-group {
margin-bottom: 20px;
height: 100%;
.el-input {
margin: 22px 0;