From f8298f08e9064435d4fb5e4d9270fa6482816e9c Mon Sep 17 00:00:00 2001 From: xcy <871622040@qq.com> Date: Sat, 23 Dec 2023 01:35:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/email/ApiAllRemove.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/email/ApiAllRemove.ts b/src/api_s2c/email/ApiAllRemove.ts index 220bed2..e2d9bbd 100644 --- a/src/api_s2c/email/ApiAllRemove.ts +++ b/src/api_s2c/email/ApiAllRemove.ts @@ -3,9 +3,9 @@ import { EmailFun } from '../../public/email'; import { ReqAllRemove, ResAllRemove } from "../../shared/protocols/email/PtlAllRemove"; export default async function (call: ApiCall) { - // 筛选出没有奖励已读邮件和已经领取过奖励的邮件 + // 邮件已读 并且 (没有奖励 或者 (有奖励 并且 领取了)) let emailList = (await EmailFun.getAllEmail(call.uid, true)).filter(email => ( - (email.emailRead && email.prizeData?.prize.length <= 0) || email.prizeData.isGet + email.emailRead && (!email.prizeData || (email.prizeData?.prize.length > 0 && email.prizeData?.isGet)) )); if (emailList.length < 1) return call.error(globalThis.lng.email_2);