This commit is contained in:
728
2023-08-03 01:24:32 +08:00
parent 2d38a327a3
commit 25ec04a2e5
2 changed files with 3 additions and 12 deletions

View File

@ -630,17 +630,8 @@ export async function dst(
}, a: "无效输入", r: dst,
}))
} else[t.put, t.preaid].forEach(el => el.remove())
if (nav.pas) {
if (nav.pas.dst.reduceRight((a, b) => a + b[1], 0) < nav.pas.limdst || nav.pas.redst) t.preuid.addEventListener("click", () => put("dst", "投票", {
nam: { p1: "参赛活动IDa1" }, val: {}, p: "pre", b: p => {
if (p.p1 === "dst") return { rd: lim_rd, uid: nav.pas!.uid }
const aid = parseInt(p.p1?.substring(1) ?? "")
if (q.dst.findIndex(d => d.aid === aid) < 0) return null
return { rd: lim_rd, aid, uid: nav.pas!.uid }
}, a: "无效活动ID或已为该ID投过票",
r: () => { navpas().then(dst) }
})); else t.preuid.disabled = true
} else t.preuid.remove()
if (nav.pas) t.preuid.disabled = true
else t.preuid.remove()
main.append(t.bind)
imgl()

View File

@ -555,7 +555,7 @@
<section class="pos flex" style="margin: 2ch 0;">
<button class="put">编辑比赛信息</button>
<button class="preaid">添加参赛投稿</button>
<button class="preuid">投票</button>
<button class="preuid" disabled>投票</button>
</section>
</article>
</template>