From 021d00e932a2b871003fc1a149e03bc407de92e7 Mon Sep 17 00:00:00 2001 From: XingQue Date: Sun, 5 Jul 2026 17:36:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=93=E6=89=8B=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E5=85=85=E5=80=BC=E6=A8=AA=E5=B9=85=E4=B8=8E=E5=85=A8=E9=A1=B5?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=90=8E=E5=8F=B0=E5=88=86=E7=BB=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/utils/club-context.js | 2 + src/views/member/List.vue | 83 +++++++++++++++++- src/views/miniapp/MiniappAssets.vue | 128 +++++++++++++++++++++++++++- 3 files changed, 209 insertions(+), 4 deletions(-) diff --git a/src/utils/club-context.js b/src/utils/club-context.js index 4721e78..836be85 100644 --- a/src/utils/club-context.js +++ b/src/utils/club-context.js @@ -296,6 +296,7 @@ export const JITUAN_API = { penaltyStats: '/jituan/houtai/htglyhqcfsltj', penaltyList: '/jituan/houtai/hthqfklb', penaltyAction: '/jituan/houtai/glyclfk', + penaltyPlatformAudit: '/jituan/houtai/glyptshfk', penaltyCreate: '/jituan/houtai/htfksc', kefuCfgl: '/jituan/houtai/kefu-cfgl', adminAssignments: '/jituan/houtai/admin-assignments', @@ -306,6 +307,7 @@ export const JITUAN_API = { memberCatalog: '/jituan/houtai/hthycatalog', memberEnable: '/jituan/houtai/hthysj', memberDisable: '/jituan/houtai/hthyxj', + memberCardUpload: '/jituan/houtai/hy-card-upload', identityTagList: '/jituan/houtai/identity-tag/list', identityTagManage: '/jituan/houtai/identity-tag/manage', identityTagBindList: '/jituan/houtai/identity-tag/bind-list', diff --git a/src/views/member/List.vue b/src/views/member/List.vue index 920ddf2..d9b7bd4 100644 --- a/src/views/member/List.vue +++ b/src/views/member/List.vue @@ -133,6 +133,38 @@ + @@ -274,6 +306,39 @@ const isEditMode = ref(false) const currentMember = ref({}) const detailFormRef = ref(null) const saving = ref(false) +const cardUploadField = ref('') + +function memberCardUrl(rel) { + if (!rel) return '' + if (rel.startsWith('http')) return rel + const base = window.$ossURL || '' + return base + rel +} + +async function uploadMemberCard(file, field) { + if (!file?.raw || !currentMember.value?.huiyuan_id) return + cardUploadField.value = field + try { + const fd = new FormData() + fd.append('username', username.value) + fd.append('huiyuan_id', currentMember.value.huiyuan_id) + fd.append('field', field) + fd.append('file', file.raw) + const res = await request.post(JITUAN_API.memberCardUpload, fd, { + headers: { 'Content-Type': 'multipart/form-data' }, + }) + if (res.code === 0) { + currentMember.value[field] = res.data?.[field] || '' + ElMessage.success('上传成功') + } else { + ElMessage.error(res.msg || '上传失败') + } + } catch (e) { + ElMessage.error('上传失败') + } finally { + cardUploadField.value = '' + } +} const addDialogVisible = ref(false) const addFormRef = ref(null) @@ -321,7 +386,9 @@ function normalizeMember(member) { trial_price: Number(member.trial_price || 0), trial_days: Number(member.trial_days || 0), trial_guanshifc: Number(member.trial_guanshifc || 0), - trial_zuzhangfc: Number(member.trial_zuzhangfc || 0) + trial_zuzhangfc: Number(member.trial_zuzhangfc || 0), + card_image: member.card_image || '', + card_bg: member.card_bg || '', } } @@ -454,6 +521,8 @@ const saveMember = async () => { guanshifc: m.guanshifc, zuzhangfc: m.zuzhangfc, jtjieshao: m.jtjieshao || '', + card_image: m.card_image || '', + card_bg: m.card_bg || '', ...buildTrialPayload(m) }) if (res.code === 0) { @@ -779,6 +848,18 @@ onMounted(() => { color: #8ab3cf; margin-top: 4px; } +.member-card-upload { + display: flex; + flex-direction: column; + gap: 10px; + align-items: flex-start; +} +.member-card-preview { + width: 160px; + height: 100px; + border-radius: 8px; + background: #0d2137; +} .no-permission { text-align: center; padding: 80px 20px; diff --git a/src/views/miniapp/MiniappAssets.vue b/src/views/miniapp/MiniappAssets.vue index 4f01f7e..ac49f99 100644 --- a/src/views/miniapp/MiniappAssets.vue +++ b/src/views/miniapp/MiniappAssets.vue @@ -36,9 +36,111 @@ - +
-
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ + + 更换 + +
+
+ + + + +

打手「我的」页钱包下方左右两张可点击大图,上传后立即生效。

+
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ + + 更换横幅 + +
+
+
+ + + +

订单区、交易明细、好友邀请、快手提现、复制/编辑、切片横幅、罚单提示等。

+
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ + + 更换 + +
+
+
+ + + +
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ + + 更换 + +
+
+
+ + + +
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ + + 更换 + +
+
+
+ + + +
+
{{ item.label }}
{{ item.icon_key }}
@@ -105,8 +207,28 @@ const REQUIRED_PERMISSION = '8080a' const hasPermission = ref(true) const icons = ref([]) const POSTER_KEYS = new Set(['guanshi_poster_bg', 'zuzhang_poster_bg']) +const COMMON_KEYS = new Set(['mine_pindao', 'icon_refresh']) +const FIGHTER_BANNER_KEYS = new Set(['fighter_recharge_member', 'fighter_recharge_deposit']) +const FIGHTER_MINE_PAGE_KEYS = new Set([ + 'fighter_order_pending', 'fighter_order_settling', 'fighter_order_done', 'fighter_order_closed', + 'fighter_trade_commission', 'fighter_trade_withdraw', 'fighter_trade_settle', 'fighter_trade_deduct', 'fighter_trade_recharge', + 'fighter_invite_subordinate', 'fighter_invite_poster', 'fighter_invite_code', + 'fighter_kuaishou_cash', 'fighter_mine_copy', 'fighter_mine_edit', 'fighter_mine_qiepian', 'fighter_mine_penalty_tip', +]) const posterIcons = computed(() => icons.value.filter((i) => POSTER_KEYS.has(i.icon_key))) -const funcIcons = computed(() => icons.value.filter((i) => !POSTER_KEYS.has(i.icon_key))) +const merchantIcons = computed(() => icons.value.filter((i) => i.icon_key.startsWith('merchant_'))) +const fighterBannerIcons = computed(() => icons.value.filter((i) => FIGHTER_BANNER_KEYS.has(i.icon_key))) +const fighterMinePageIcons = computed(() => icons.value.filter((i) => FIGHTER_MINE_PAGE_KEYS.has(i.icon_key))) +const fighterMoreFuncIcons = computed(() => icons.value.filter((i) => { + const k = i.icon_key + return k.startsWith('fighter_mine_') && !FIGHTER_MINE_PAGE_KEYS.has(k) +})) +const fighterRechargeIcons = computed(() => icons.value.filter((i) => { + const k = i.icon_key + if (FIGHTER_BANNER_KEYS.has(k)) return false + return k.startsWith('fighter_recharge_') || k.startsWith('fighter_deposit_') +})) +const commonIcons = computed(() => icons.value.filter((i) => COMMON_KEYS.has(i.icon_key))) const uploadingKey = ref('') const pindao = ref({ channel_no: '', title: '频道' }) const pindaoImages = ref([])