是否考虑猎头功能暂时隐藏
This commit is contained in:
@@ -237,6 +237,7 @@ class ResumeUpdateReq(BaseModel):
|
||||
|
||||
class StartActivateReq(BaseModel):
|
||||
match_text: str # 匹配条件文本(最后一条消息与之比对)
|
||||
status_filter: str = "unread" # 消息状态过滤:unread=仅未读 / read=仅已读 / all=不限
|
||||
threshold: int = 80 # 相似度阈值(0-100)
|
||||
reply_message: str # 命中后发送的自定义消息
|
||||
max_count: int = 20 # 单次任务发送上限(0=不限)
|
||||
@@ -514,6 +515,8 @@ def stop_apply():
|
||||
def start_activate(req: StartActivateReq):
|
||||
if not req.match_text.strip():
|
||||
raise HTTPException(status_code=400, detail="请填写匹配条件文本")
|
||||
if req.status_filter not in ("unread", "read", "all"):
|
||||
raise HTTPException(status_code=400, detail="消息状态过滤取值非法")
|
||||
if not req.reply_message.strip():
|
||||
raise HTTPException(status_code=400, detail="请填写激活消息内容")
|
||||
if state.applicant and state.applicant.is_running:
|
||||
@@ -528,6 +531,7 @@ def start_activate(req: StartActivateReq):
|
||||
raise HTTPException(status_code=400, detail=str(e))
|
||||
activator.start(
|
||||
match_text=req.match_text,
|
||||
status_filter=req.status_filter,
|
||||
threshold=req.threshold / 100.0,
|
||||
reply_message=req.reply_message,
|
||||
max_count=req.max_count,
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
match_text,
|
||||
status_filter: $("actStatusFilter").value,
|
||||
threshold: parseInt($("actThreshold").value, 10) || 80,
|
||||
reply_message,
|
||||
max_count: parseInt($("actMaxCount").value, 10) || 0,
|
||||
|
||||
@@ -378,7 +378,7 @@ $('btnStartApply').addEventListener('click', async () => {
|
||||
salary_max: parseInt($('salaryMax').value) || null,
|
||||
min_score: parseInt($('minScore').value) || 65,
|
||||
boss_online_only: $('bossOnlineOnly').checked,
|
||||
allow_headhunter: $('allowHeadhunter').checked,
|
||||
allow_headhunter: false, // TODO: 猎头功能暂时隐藏(工作流有问题),恢复时改回 $('allowHeadhunter').checked
|
||||
daily_limit: parseInt($('dailyLimit').value) || 0,
|
||||
prompt: $('prompt').value.trim() || null,
|
||||
}),
|
||||
@@ -429,7 +429,8 @@ function fillApplyForm(t) {
|
||||
$('minScore').value = t.min_score || 65;
|
||||
$('dailyLimit').value = t.daily_limit || 30;
|
||||
$('bossOnlineOnly').checked = !!t.boss_online_only;
|
||||
$('allowHeadhunter').checked = !!t.allow_headhunter;
|
||||
// TODO: 猎头功能隐藏期间强制置为未勾选(忽略模板里的旧值)
|
||||
$('allowHeadhunter').checked = false;
|
||||
$('prompt').value = t.prompt || '';
|
||||
}
|
||||
|
||||
@@ -442,7 +443,8 @@ function collectTemplateFromForm() {
|
||||
min_score: parseInt($('minScore').value) || 65,
|
||||
daily_limit: parseInt($('dailyLimit').value) || 0,
|
||||
boss_online_only: $('bossOnlineOnly').checked,
|
||||
allow_headhunter: $('allowHeadhunter').checked,
|
||||
// TODO: 猎头功能隐藏期间保存模板时强制 false(恢复时改回 $('allowHeadhunter').checked)
|
||||
allow_headhunter: false,
|
||||
prompt: $('prompt').value.trim() || null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -142,7 +142,10 @@
|
||||
<label style="display:flex;align-items:center;gap:6px;margin:0;cursor:pointer;">
|
||||
<input type="checkbox" id="bossOnlineOnly" style="width:auto;"> 只投递 Boss 在线的
|
||||
</label>
|
||||
<label style="display:flex; align-items:center; gap:6px; margin-top:8px;">
|
||||
<!-- TODO: 猎头功能暂时隐藏——当前工作流有问题(猎头职位的识别/筛选流程未跑通),
|
||||
待工作流修复后再恢复展示。隐藏期间 allow_headhunter 在 app.js 中强制为 false,
|
||||
恢复时同步去掉此处 display:none 与 app.js 的三处强制值 -->
|
||||
<label style="display:none; align-items:center; gap:6px; margin-top:8px;">
|
||||
<input type="checkbox" id="allowHeadhunter" style="width:auto;"> 考虑猎头职位
|
||||
</label>
|
||||
</div>
|
||||
@@ -217,12 +220,20 @@
|
||||
<div id="activateMode" class="hidden">
|
||||
<section class="panel">
|
||||
<h2>Boss 激活</h2>
|
||||
<p class="hint">扫描消息页联系人:最后一条消息为未读、且内容达到下方匹配条件时,自动发送一条激活消息。单机功能,无需登录系统账号。</p>
|
||||
<p class="hint">扫描消息页联系人:最后一条消息符合所选状态、且内容达到下方匹配条件时,自动发送一条激活消息。单机功能,无需登录系统账号。</p>
|
||||
<div class="form-group">
|
||||
<label>匹配条件文本</label>
|
||||
<textarea id="actMatchText" rows="3" placeholder="输入要匹配的消息内容(与对方最后一条消息比对)"></textarea>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>消息状态过滤</label>
|
||||
<select id="actStatusFilter">
|
||||
<option value="unread" selected>仅未读([送达]/[未读])</option>
|
||||
<option value="read">仅已读([已读])</option>
|
||||
<option value="all">不限(已读+未读)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>相似度阈值(%)</label>
|
||||
<input type="number" id="actThreshold" value="80" min="0" max="100">
|
||||
@@ -310,8 +321,8 @@
|
||||
<!-- Toast 提示 -->
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script src="/static/app.js?v=4"></script>
|
||||
<script src="/static/activate.js?v=4"></script>
|
||||
<script src="/static/app.js?v=6"></script>
|
||||
<script src="/static/activate.js?v=6"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user