From 3711b1df3f83ad548562516f6d5d846856606cbd Mon Sep 17 00:00:00 2001 From: XingQue Date: Sun, 5 Jul 2026 18:13:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=A2=E5=8D=95=E9=A1=B5=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E6=80=BB=E4=BC=9A=E5=91=98=20included=5Fhuiyuan=5Fids?= =?UTF-8?q?=20=E8=A6=86=E7=9B=96=E5=AD=90=E4=BC=9A=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- utils/dashou-profile.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/dashou-profile.js b/utils/dashou-profile.js index 39043a3..938f57f 100644 --- a/utils/dashou-profile.js +++ b/utils/dashou-profile.js @@ -23,9 +23,14 @@ export async function refreshDashouMembership(app) { return app.globalData.clumber || []; } -/** 用户是否持有某会员类型(与抢单卡片判断一致) */ +/** 用户是否持有某会员类型(与抢单卡片判断一致;支持总会员 covers) */ export function userHasHuiyuan(huiyuanList, huiyuanId) { if (!huiyuanId) return true; const list = huiyuanList || []; - return list.some((h) => String(h.huiyuanid) === String(huiyuanId)); + const req = String(huiyuanId); + return list.some((h) => { + if (String(h.huiyuanid) === req) return true; + const covers = h.included_huiyuan_ids || h.covers || []; + return Array.isArray(covers) && covers.some((id) => String(id) === req); + }); }