async function refreshSubOne(ev, id){ const j=await api('/api/subscriptions/refresh',{method:'POST',body:JSON.stringify({account_ids:[id]})}); if(j.error) return fail('无法刷新', j.error); const ids=j.job_ids||[]; if(!ids.length) return notice('没有任务','该账号已跳过'); notice('正在刷新', '账号 #'+id); watchAccountJob(id, 'refresh', ids[0], '刷新状态'); } async function refreshSubSelected(ev){ const btn=clickBtn(ev); const ids=[...selected]; if(!ids.length) return fail('无法刷新','请先勾选账号'); const j=await api('/api/subscriptions/refresh',{method:'POST',body:JSON.stringify({account_ids:ids})}); if(j.error) return fail('无法刷新', j.error); await waitJobs(j.job_ids||[], '刷新状态', btn); }