fix: 点单端推荐官按UID绑定,二维码进首页且去掉邀请码

扫码参数改为 yaoqingren=UserUID 落地点单首页;海报默认不再复用管事背景;不影响打手端与支付抢单分红。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-21 02:48:16 +08:00
parent 60d8b52693
commit 435422e716
4 changed files with 76 additions and 76 deletions

View File

@@ -76,7 +76,7 @@ MINIAPP_ICON_META = [
('icon_refresh', '通用刷新'),
('guanshi_poster_bg', '管事推广海报背景'),
('zuzhang_poster_bg', '组长推广海报背景'),
('cuser_poster_bg', '点单端推广海报背景'),
('cuser_poster_bg', '点单端推荐官海报背景'),
]
MINIAPP_ICON_KEYS = [k for k, _ in MINIAPP_ICON_META]
@@ -137,7 +137,8 @@ MINIAPP_ICON_DEFAULTS['fighter_mine_switch'] = f'{ICON_FOLDER}/fighter_mine_swit
MINIAPP_ICON_DEFAULTS['mine_pindao'] = 'beijing/tubiao/grzx_pindao.jpg'
MINIAPP_ICON_DEFAULTS['guanshi_poster_bg'] = 'beijing/haibaobeijing.jpg'
MINIAPP_ICON_DEFAULTS['zuzhang_poster_bg'] = 'beijing/zuzhangbeijing.jpg'
MINIAPP_ICON_DEFAULTS['cuser_poster_bg'] = 'beijing/haibaobeijing.jpg'
# 点单端推荐官海报:独立路径,禁止复用管事/打手背景
MINIAPP_ICON_DEFAULTS['cuser_poster_bg'] = 'beijing/haibao/cuser_poster_bg.jpg'
POSTER_BG_FIELDS = {
'guanshi_bg': 'guanshi_poster_bg',
@@ -147,7 +148,7 @@ POSTER_BG_FIELDS = {
POSTER_BG_DEFAULTS = {
'guanshi_bg': 'beijing/haibaobeijing.jpg',
'zuzhang_bg': 'beijing/zuzhangbeijing.jpg',
'cuser_bg': 'beijing/haibaobeijing.jpg',
'cuser_bg': 'beijing/haibao/cuser_poster_bg.jpg',
}
POSTER_FOLDER = 'beijing/haibao'
POSTER_ICON_KEYS = frozenset(POSTER_BG_FIELDS.values())
@@ -218,6 +219,9 @@ def get_poster_payload(club_id: str) -> dict:
row = rows.get(icon_key)
if row and row.is_uploaded and (row.image_path or '').strip():
result[field] = row.image_path.strip()
elif field == 'cuser_bg':
# 点单端未上传时不回落到管事背景,避免错图
result[field] = (row.image_path.strip() if row and (row.image_path or '').strip() else '') or default
else:
result[field] = default
return result