diff --git a/src/views/club/RechargePageCopy.vue b/src/views/club/RechargePageCopy.vue new file mode 100644 index 0000000..1d946d1 --- /dev/null +++ b/src/views/club/RechargePageCopy.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/src/views/miniapp/CarouselManage.vue b/src/views/miniapp/CarouselManage.vue index 4bd22a9..8eaa43d 100644 --- a/src/views/miniapp/CarouselManage.vue +++ b/src/views/miniapp/CarouselManage.vue @@ -16,9 +16,16 @@ +

- UFO 点单端:主轮播选「点单页主轮播」;公告下第二横幅选「点单页第二横幅(可多图)」; - 「我的」顶区背景选「点单个人中心背景(可多图)」。改图前请切到具体俱乐部(如 ufo),勿在集团视图下上传。 + UFO:主轮播+首页公告 →「点单页主轮播」;公告下第二横幅 →「点单页第二横幅」;「我的」顶区 →「点单个人中心背景」。 + 勿在集团视图下修改。星阙抢单端才用「抢单池」。

@@ -143,13 +150,15 @@ function mergePageOptions(fromServer) { const username = ref(localStorage.getItem('username') || '') const hasPermission = ref(true) -const pageKey = ref('order_pool') +/** 默认点单页:UFO/点单端改公告最容易误停在「抢单池」 */ +const pageKey = ref('accept_order') const pageOptions = ref(mergePageOptions([])) const gonggaoTitle = computed(() => { const opt = pageOptions.value.find((o) => o.key === pageKey.value) const label = opt ? opt.label : pageKey.value return `${label} · 页面公告` }) +const activeClubId = ref('') const lunboList = ref([]) const gonggaoContent = ref('') const scopeHint = ref('') @@ -174,10 +183,11 @@ const fetchGonggao = async () => { }) if (res.code === 0) { gonggaoContent.value = res.data?.content || '' + activeClubId.value = res.data?.club_id || '' if (res.data?.scope === 'ALL_CLUBS') { scopeHint.value = '集团视图下仅可查看;修改轮播/公告请切换到具体子公司' } else if (res.data?.club_id) { - scopeHint.value = `以下配置仅作用于俱乐部 ${res.data.club_id}` + scopeHint.value = `以下配置仅作用于俱乐部 ${res.data.club_id} · 当前页 ${pageKey.value}` } } } catch { @@ -227,7 +237,10 @@ const saveGonggao = async () => { content, }) if (res.code === 0) { - ElMessage.success('保存成功') + const opt = pageOptions.value.find((o) => o.key === pageKey.value) + const label = opt ? opt.label : pageKey.value + const club = activeClubId.value || '当前俱乐部' + ElMessage.success(`已保存到 ${club} · ${label}`) } else { ElMessage.error(res.msg || '保存失败') } @@ -384,6 +397,9 @@ onMounted(async () => { font-size: 13px; line-height: 1.55; } +.page-alert { + margin-bottom: 12px; +} .header-bar { display: flex; justify-content: space-between; diff --git a/src/views/miniapp/MiniappAssets.vue b/src/views/miniapp/MiniappAssets.vue index 4bf1360..6468702 100644 --- a/src/views/miniapp/MiniappAssets.vue +++ b/src/views/miniapp/MiniappAssets.vue @@ -168,6 +168,35 @@ + + +

仅影响「我的」页 VIP 会员条。未上传时小程序继续用黑金硬编码样式;上传后按俱乐部覆盖(云溪/小西等各自独立)。

+
+
+
{{ item.label }}
+
{{ item.icon_key }}
+ +
暂无图片
+ + + {{ item.is_uploaded ? '更换' : '上传' }} + + +
+
+
+

会员充值页顶图、保证金页顶图与右侧装饰。未上传时小程序用默认样式;此处始终可直接上传。

@@ -314,9 +343,16 @@ const FIGHTER_PAGE_BG_META = [ { icon_key: 'fighter_deposit_hero', label: '打手保证金页-卡片右侧装饰图' }, ] const FIGHTER_PAGE_BG_KEYS = new Set(FIGHTER_PAGE_BG_META.map((i) => i.icon_key)) +/** 「我的」VIP 条:新增背景/图标,未上传不下发,小程序走硬编码 */ +const FIGHTER_MINE_VIP_META = [ + { icon_key: 'fighter_mine_vip_bg', label: '打手「我的」-VIP条背景图' }, + { icon_key: 'fighter_mine_vip_icon', label: '打手「我的」-VIP条左侧图标' }, +] +const FIGHTER_MINE_VIP_KEYS = new Set(FIGHTER_MINE_VIP_META.map((i) => i.icon_key)) const CONFIG_ONLY_PREVIEW_KEYS = new Set([ ...GRAB_CARD_BG_KEYS, ...FIGHTER_PAGE_BG_KEYS, + ...FIGHTER_MINE_VIP_KEYS, ]) const FIGHTER_BANNER_KEYS = new Set(['fighter_recharge_member', 'fighter_recharge_deposit']) const FIGHTER_MINE_PAGE_KEYS = new Set([ @@ -349,15 +385,17 @@ const cuserMineIcons = computed(() => icons.value.filter((i) => CUSER_MINE_KEYS. const merchantIcons = computed(() => icons.value.filter((i) => i.icon_key.startsWith('merchant_'))) const grabCardBgIcons = computed(() => mergeFixedIcons(GRAB_CARD_BG_META, icons.value)) const fighterPageBgIcons = computed(() => mergeFixedIcons(FIGHTER_PAGE_BG_META, icons.value)) +const fighterMineVipIcons = computed(() => mergeFixedIcons(FIGHTER_MINE_VIP_META, icons.value)) 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 + if (FIGHTER_MINE_VIP_KEYS.has(k)) return false 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) || FIGHTER_PAGE_BG_KEYS.has(k)) return false + if (FIGHTER_BANNER_KEYS.has(k) || FIGHTER_PAGE_BG_KEYS.has(k) || FIGHTER_MINE_VIP_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))) diff --git a/src/views/product/Detail.vue b/src/views/product/Detail.vue index 37c7e8c..7f0a991 100644 --- a/src/views/product/Detail.vue +++ b/src/views/product/Detail.vue @@ -394,9 +394,16 @@ const enterEditMode = () => { zhuanqu_id: product.value.zhuanqu_id, yaoqiuleixing: product.value.yaoqiuleixing, huiyuan_id: product.value.huiyuan_id || '', - yongjin: product.value.yongjin !== null ? product.value.yongjin : null, - kaioi_ewai_dashou_fencheng: product.value.kaioi_ewai_dashou_fencheng, - ewai_dashou_fencheng: product.value.ewai_dashou_fencheng || 0, + yongjin: product.value.yongjin !== null && product.value.yongjin !== undefined ? Number(product.value.yongjin) : null, + kaioi_ewai_dashou_fencheng: !!( + product.value.kaioi_ewai_dashou_fencheng + ?? product.value.kaioi_ewai_PlayerCommission + ), + ewai_dashou_fencheng: Number( + product.value.ewai_dashou_fencheng + ?? product.value.ewai_PlayerCommission + ?? 0 + ), jieshao: product.value.jieshao || '', xiadan_xuzhi: product.value.xiadan_xuzhi || '', tupian_url: product.value.tupian_url, @@ -414,9 +421,16 @@ const enterEditMode = () => { zhuanqu_id: product.value.zhuanqu_id, yaoqiuleixing: product.value.yaoqiuleixing, huiyuan_id: product.value.huiyuan_id || '', - yongjin: product.value.yongjin !== null ? product.value.yongjin : null, - kaioi_ewai_dashou_fencheng: product.value.kaioi_ewai_dashou_fencheng, - ewai_dashou_fencheng: product.value.ewai_dashou_fencheng || 0, + yongjin: product.value.yongjin !== null && product.value.yongjin !== undefined ? Number(product.value.yongjin) : null, + kaioi_ewai_dashou_fencheng: !!( + product.value.kaioi_ewai_dashou_fencheng + ?? product.value.kaioi_ewai_PlayerCommission + ), + ewai_dashou_fencheng: Number( + product.value.ewai_dashou_fencheng + ?? product.value.ewai_PlayerCommission + ?? 0 + ), jieshao: product.value.jieshao || '', xiadan_xuzhi: product.value.xiadan_xuzhi || '', tupian_url: product.value.tupian_url, @@ -480,8 +494,11 @@ const saveProduct = async () => { } else { formData.append('yongjin', form.yongjin !== null ? form.yongjin : 0) } - formData.append('kaioi_ewai_dashou_fencheng', form.kaioi_ewai_dashou_fencheng) + formData.append('kaioi_ewai_dashou_fencheng', form.kaioi_ewai_dashou_fencheng ? 'true' : 'false') formData.append('ewai_dashou_fencheng', form.ewai_dashou_fencheng) + // 兼容旧后端字段名 + formData.append('kaioi_ewai_PlayerCommission', form.kaioi_ewai_dashou_fencheng ? 'true' : 'false') + formData.append('ewai_PlayerCommission', form.ewai_dashou_fencheng) formData.append('jieshao', form.jieshao || '') formData.append('xiadan_xuzhi', form.xiadan_xuzhi || '') formData.append('shenhezhuangtai', form.shenhezhuangtai) @@ -628,9 +645,16 @@ const fetchProductDetail = async () => { zhuanqu_id: product.value.zhuanqu_id, yaoqiuleixing: product.value.yaoqiuleixing, huiyuan_id: product.value.huiyuan_id || '', - yongjin: product.value.yongjin !== null ? product.value.yongjin : null, - kaioi_ewai_dashou_fencheng: product.value.kaioi_ewai_dashou_fencheng, - ewai_dashou_fencheng: product.value.ewai_dashou_fencheng || 0, + yongjin: product.value.yongjin !== null && product.value.yongjin !== undefined ? Number(product.value.yongjin) : null, + kaioi_ewai_dashou_fencheng: !!( + product.value.kaioi_ewai_dashou_fencheng + ?? product.value.kaioi_ewai_PlayerCommission + ), + ewai_dashou_fencheng: Number( + product.value.ewai_dashou_fencheng + ?? product.value.ewai_PlayerCommission + ?? 0 + ), jieshao: product.value.jieshao || '', xiadan_xuzhi: product.value.xiadan_xuzhi || '', tupian_url: product.value.tupian_url, diff --git a/src/views/product/List.vue b/src/views/product/List.vue index 0cff84b..3d5533e 100644 --- a/src/views/product/List.vue +++ b/src/views/product/List.vue @@ -744,6 +744,7 @@ const submitAddProduct = async () => { } if (addForm.fencheng_type === 'custom') { formData.append('ewai_dashou_fencheng', addForm.ewai_dashou_fencheng) + formData.append('ewai_PlayerCommission', addForm.ewai_dashou_fencheng) } formData.append('file', addForm.imageFile) diff --git a/src/views/user/Shangjia.vue b/src/views/user/Shangjia.vue index 2b9b114..2356f42 100644 --- a/src/views/user/Shangjia.vue +++ b/src/views/user/Shangjia.vue @@ -36,6 +36,7 @@ 搜索 + 添加商家 @@ -151,6 +152,31 @@ + + + + + + + + + + + + @@ -175,6 +201,9 @@ const username = ref(localStorage.getItem('username') || '') const hasPermission = ref(true) const totalCount = ref(0) // 商家总数 const validMerchantCount = ref(0) // 有效商家数(状态为正常的商家数) +const addDialogVisible = ref(false) +const addLoading = ref(false) +const addForm = ref({ yonghuid: '', nicheng: '' }) // 筛选条件 const balanceOp = ref('gte') // 余额比较符: gte(>=) / lte(<=) @@ -284,6 +313,40 @@ const goToDetail = (yonghuid) => { } } +const openAddDialog = () => { + addForm.value = { yonghuid: '', nicheng: '' } + addDialogVisible.value = true +} + +const submitAddMerchant = async () => { + const yonghuid = (addForm.value.yonghuid || '').trim() + if (!yonghuid) { + ElMessage.warning('请填写用户ID') + return + } + addLoading.value = true + try { + const res = await request.post(JITUAN_API.shangjiaAdd, { + username: username.value, + yonghuid, + nicheng: (addForm.value.nicheng || '').trim(), + }) + if (res.code === 0) { + ElMessage.success(res.msg || '商家添加成功') + addDialogVisible.value = false + page.value = 1 + fetchMerchants() + } else { + ElMessage.error(res.msg || '添加失败') + } + } catch (e) { + console.error(e) + ElMessage.error('添加商家失败,请稍后重试') + } finally { + addLoading.value = false + } +} + // 初始化加载 onMounted(() => { fetchMerchants()