From 9dbca25b4d0e5e4df9f88ddf7196d23e7bc83981 Mon Sep 17 00:00:00 2001 From: XingQue Date: Sun, 5 Jul 2026 16:42:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dshyhq=20=E8=BF=94=E5=9B=9E=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E5=8D=A1=E7=89=87=E5=9B=BE=20card=5Fimage/card=5Fbg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- products/views/product_query.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/products/views/product_query.py b/products/views/product_query.py index dbff1c9..9efaad2 100644 --- a/products/views/product_query.py +++ b/products/views/product_query.py @@ -275,6 +275,12 @@ class DashouHuiyuanList(APIView): 'huiyuan_id', 'jieshao', 'jtjieshao', 'jiage', ).order_by('jiage') + from jituan.models import ClubHuiyuanPrice + club_rows = { + r.huiyuan_id: r + for r in ClubHuiyuanPrice.query.filter(club_id=club_id, is_enabled=True) + } + huiyuan_list = [] yonghuid = request.user.UserUID for huiyuan in huiyuan_queryset: @@ -287,6 +293,9 @@ class DashouHuiyuanList(APIView): trial_sellable, trial_price, trial_days = club_huiyuan_sellable( club_id, huiyuan.huiyuan_id, is_trial=True, ) + club_row = club_rows.get(huiyuan.huiyuan_id) + card_image = (club_row.card_image or '').strip() if club_row else '' + card_bg = (club_row.card_bg or '').strip() if club_row else '' huiyuan_list.append({ 'id': huiyuan.huiyuan_id, 'mingzi': huiyuan.jieshao, @@ -297,6 +306,8 @@ class DashouHuiyuanList(APIView): 'trial_price': format_yuan(trial_price) if trial_sellable else '0.00', 'trial_days': trial_days if trial_sellable else 0, 'can_buy_trial': bool(trial_ok and trial_sellable), + 'card_image': card_image, + 'card_bg': card_bg, }) # 5. 返回数据