From ca182dc32522db21d6643e21dbd4f543393f729d Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 28 Jan 2026 15:02:24 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/coupon/index.js | 62 ++++ src/components/selectCoupon/index.vue | 34 ++ src/views/login/index.vue | 6 +- src/views/marketing_center/data.js | 10 +- .../components/groupSetting.vue | 290 ++++++++++++++++++ .../distribution_page/index.vue | 9 +- .../share_setting/components/add_banner.vue | 175 +++++++++++ .../components/banner_setting.vue | 136 ++++++++ .../share_setting/components/linkCard.vue | 189 ++++++++++++ .../share_setting/components/setting.vue | 135 ++++++++ .../marketing_center/share_setting/data.js | 38 +++ .../marketing_center/share_setting/index.vue | 56 ++++ src/views/product/index.vue | 7 +- src/views/product/indexconfig/content.ts | 5 +- 14 files changed, 1141 insertions(+), 11 deletions(-) create mode 100644 src/components/selectCoupon/index.vue create mode 100644 src/views/marketing_center/distribution_page/components/groupSetting.vue create mode 100644 src/views/marketing_center/share_setting/components/add_banner.vue create mode 100644 src/views/marketing_center/share_setting/components/banner_setting.vue create mode 100644 src/views/marketing_center/share_setting/components/linkCard.vue create mode 100644 src/views/marketing_center/share_setting/components/setting.vue create mode 100644 src/views/marketing_center/share_setting/data.js create mode 100644 src/views/marketing_center/share_setting/index.vue diff --git a/src/api/coupon/index.js b/src/api/coupon/index.js index b713bf5..86f0091 100644 --- a/src/api/coupon/index.js +++ b/src/api/coupon/index.js @@ -801,6 +801,68 @@ export function attendanceDetail(params) { }); } +// 分享奖励基础:新增/修改 +export function shareBasePost(data) { + return request({ + url: `${Market_BaseUrl}/admin/shareBase`, + method: 'POST', + data + }); +} + +// 分享奖励基础 查询 +export function shareBaseGet(params) { + return request({ + url: `${Market_BaseUrl}/admin/shareBase`, + method: 'GET', + params + }); +} + +// 轮播图配置:新增/修改 +export function shareCarouselPost(data) { + return request({ + url: `${Market_BaseUrl}/admin/carousel`, + method: 'POST', + data + }); +} + +// 分享轮播图配置 +export function shareCarouselGet(params) { + return request({ + url: `${Market_BaseUrl}/admin/carousel`, + method: 'GET', + params + }); +} + +// 分享 轮播图配置 删除 +export function shareCarouselDel(id) { + return request({ + url: `${Market_BaseUrl}/admin/carousel/${id}`, + method: 'DELETE' + }); +} + +// 全民股东群聊 配置信息获取 +export function disGroupGet(params) { + return request({ + url: `${Market_BaseUrl}/admin/disGroup`, + method: 'get', + params + }); +} + +// 全民股东群聊:新增/修改 +export function disGroupPost(data) { + return request({ + url: `${Market_BaseUrl}/admin/disGroup`, + method: 'POST', + data + }); +} + diff --git a/src/components/selectCoupon/index.vue b/src/components/selectCoupon/index.vue new file mode 100644 index 0000000..ddaa258 --- /dev/null +++ b/src/components/selectCoupon/index.vue @@ -0,0 +1,34 @@ + + + + + + \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 16ec113..d41322b 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -70,11 +70,11 @@ const env = process.env.NODE_ENV // DEV-START const accountList = reactive([ { username: "admin", type: 'primary', label: 'admin' }, - // { username: "19191703856", type: 'warning', label: '喜气洋洋' }, - // { username: "19107220837", type: 'danger', label: '快乐时光店铺' }, + { username: "18049104914", type: 'warning', label: '东风的店铺' }, + { username: "19107220837", type: 'danger', label: '快乐时光店铺' }, // { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' }, { username: "18821670757", type: 'success', label: '高歌的小店' }, - // { username: "19112345678", type: 'danger', label: '酸橘子·云贵小馆' }, + { username: "191123456", type: 'primary', label: '酸橘子' }, ]); // 快捷模拟登录 diff --git a/src/views/marketing_center/data.js b/src/views/marketing_center/data.js index 4fc62de..f809cd7 100644 --- a/src/views/marketing_center/data.js +++ b/src/views/marketing_center/data.js @@ -32,10 +32,10 @@ export const newMenus = [ intro: '协助商家拉来新客户,拓展客户群体', childrenList: [ { - name: "分销", + name: "全民分销", icon: "zhcz", pathName: "distribution_page", - intro: "用户成为业务员,可促进消费" + intro: "用户成为股东,可促进消费" }, { name: "套餐推广", @@ -55,6 +55,12 @@ export const newMenus = [ pathName: "group_booking", intro: "拼团" }, + { + name: "分享配置", + icon: "sppt", + pathName: "share_setting", + intro: "商家可配置用户分享后可获得的奖励" + }, ] }, { diff --git a/src/views/marketing_center/distribution_page/components/groupSetting.vue b/src/views/marketing_center/distribution_page/components/groupSetting.vue new file mode 100644 index 0000000..b5d76eb --- /dev/null +++ b/src/views/marketing_center/distribution_page/components/groupSetting.vue @@ -0,0 +1,290 @@ + + + + + {{ shopInfo.shopName }} + + {{ form.title }} + + + + + + + {{ form.content }} + + + {{ defaultNote }} + + + + + + + + + + + + + + + + + {{ defaultNote }} + + + + + + 保存 + + + + + + + + + \ No newline at end of file diff --git a/src/views/marketing_center/distribution_page/index.vue b/src/views/marketing_center/distribution_page/index.vue index 8c15d35..df922e0 100644 --- a/src/views/marketing_center/distribution_page/index.vue +++ b/src/views/marketing_center/distribution_page/index.vue @@ -1,7 +1,7 @@ - + @@ -18,6 +18,8 @@ + + @@ -30,6 +32,7 @@ import setting from "./components/setting.vue"; import distributor from "./components/distributor.vue"; import activation_record from "./components/activation_record.vue"; import distribution_details from "./components/distribution_details.vue"; +import groupSetting from "./components/groupSetting.vue"; import { ref, onMounted, watch } from 'vue' import { distributionGet, distributionPut } from '@/api/coupon' @@ -53,6 +56,10 @@ const tabList = ref([ label: '分销明细', value: 3 }, + { + label: '股东管理群', + value: 3 + }, ]) const form = ref({ diff --git a/src/views/marketing_center/share_setting/components/add_banner.vue b/src/views/marketing_center/share_setting/components/add_banner.vue new file mode 100644 index 0000000..fea2f15 --- /dev/null +++ b/src/views/marketing_center/share_setting/components/add_banner.vue @@ -0,0 +1,175 @@ + + + + + + + + + + + + 建议尺寸:750x300像素,支持jpg、png、gif格式,大小不超过2MB + + + + + + + + + + + 开启时,用户端会显示单独的分享按钮 + + + + + + + form.sort = filterNumberInput(e, 1)" style="width: 300px;" + placeholder="排序值越大越靠前"> + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/marketing_center/share_setting/components/banner_setting.vue b/src/views/marketing_center/share_setting/components/banner_setting.vue new file mode 100644 index 0000000..0227292 --- /dev/null +++ b/src/views/marketing_center/share_setting/components/banner_setting.vue @@ -0,0 +1,136 @@ + + + + + + 添加 + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + 已启用 + 已禁用 + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/marketing_center/share_setting/components/linkCard.vue b/src/views/marketing_center/share_setting/components/linkCard.vue new file mode 100644 index 0000000..ab6b5eb --- /dev/null +++ b/src/views/marketing_center/share_setting/components/linkCard.vue @@ -0,0 +1,189 @@ + + + + + + 选填,轮播图点击后跳转的目标页面 + + + + + + + + + \ No newline at end of file diff --git a/src/views/marketing_center/share_setting/components/setting.vue b/src/views/marketing_center/share_setting/components/setting.vue new file mode 100644 index 0000000..9c86706 --- /dev/null +++ b/src/views/marketing_center/share_setting/components/setting.vue @@ -0,0 +1,135 @@ + + + + + + + + + + + 分享人可获得奖励 + + + + + form.sharerCouponNum = filterNumberInput(e, 1)" style="width: 300px;" /> + + + + + + + + 被分享人可获得奖励 + + + + + form.sharedUserCouponNum = filterNumberInput(e, 1)" style="width: 300px;" /> + + + + + + + + + 保存 + + + + + + + \ No newline at end of file diff --git a/src/views/marketing_center/share_setting/data.js b/src/views/marketing_center/share_setting/data.js new file mode 100644 index 0000000..37254da --- /dev/null +++ b/src/views/marketing_center/share_setting/data.js @@ -0,0 +1,38 @@ +export default [ + { + label: '店铺首页', + value: 'index' + }, + // { + // label: '我的', + // value: 'dine' + // }, + { + label: '点餐页', + value: 'eat' + }, + { + label: '点餐页-详情', + value: 'eat-detail' + }, + { + label: '套餐推广-列表', + value: 'pp-list' + }, + { + label: '套餐推广-详情', + value: 'pp-detail' + }, + { + label: '商品拼团-列表', + value: 'gb-list' + }, + { + label: '商品拼团-详情', + value: 'gb-detail' + }, + { + label: '全民股东', + value: 'dis' + } +] \ No newline at end of file diff --git a/src/views/marketing_center/share_setting/index.vue b/src/views/marketing_center/share_setting/index.vue new file mode 100644 index 0000000..aa6d07a --- /dev/null +++ b/src/views/marketing_center/share_setting/index.vue @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 79e7768..c49889e 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -183,7 +183,6 @@ import editModalConfig from "./indexconfig/edit"; import searchConfig from "./indexconfig/search"; import MyDialog from "@/components/mycomponents/myDialog.vue"; import Statistics from "./indexconfig/statistics.vue"; -import { min } from "lodash"; const { searchRef, @@ -242,13 +241,17 @@ if (isSyncStatus()) { contentConfig.cols[contentConfig.cols.length - 1].operat[2].hidden = false; } -onMounted(() => { +onMounted(async () => { console.log(route.query); if (route.query.id) { contentRef.value?.fetchPageData({ id: route.query.id }); } // 获取耗材列表 gethaocaiList(); + + const res = await UserAPI.getPage() + form.warnLine = res.warnLine || '' + // console.log('contentRef.value===', res); }); function newHandleQueryClick(e: IObject | undefined) { diff --git a/src/views/product/indexconfig/content.ts b/src/views/product/indexconfig/content.ts index e0586ef..2ac8516 100644 --- a/src/views/product/indexconfig/content.ts +++ b/src/views/product/indexconfig/content.ts @@ -75,11 +75,10 @@ const contentConfig: IContentConfig = { { icon: "edit", text: "库存预警", - type: "info", + type: "danger", name: "custom1", auth: "import", }, - ], cols: [ // { type: "selection", width: 50, align: "center" }, @@ -127,7 +126,7 @@ const contentConfig: IContentConfig = { fixed: "right", width: 280, templet: "tool", - operat: [{ text: "报损", name: ''}, { text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}], + operat: [{ text: "报损", name: '' }, { text: "编辑", icon: 'edit', name: "edit" }, { text: "删除", icon: 'delete', type: 'danger', name: "delete" }], }, ], }; From 71bec03475a9007422941080c9dbc4d0be6b1f7d Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 28 Jan 2026 16:16:04 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/shopUser.ts | 11 ++++++++++- src/api/order/sale-summary.ts | 1 - src/utils/index.ts | 12 ++++++++++-- src/views/marketing_center/data.js | 2 +- src/views/user/list/config/content.ts | 2 +- src/views/user/list/index.vue | 13 ++++++++++++- 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/api/account/shopUser.ts b/src/api/account/shopUser.ts index 25faf3c..883bfa3 100644 --- a/src/api/account/shopUser.ts +++ b/src/api/account/shopUser.ts @@ -71,7 +71,16 @@ const API = { method: "get", params }); - } + }, + // 导出 + export(params: any) { + return request({ + url: `${baseURL}/export`, + method: "get", + params, + responseType: 'blob' + }); + }, } export default API; export interface getRequest { diff --git a/src/api/order/sale-summary.ts b/src/api/order/sale-summary.ts index 72f386d..d885d7f 100644 --- a/src/api/order/sale-summary.ts +++ b/src/api/order/sale-summary.ts @@ -26,7 +26,6 @@ const Api = { method: "get", params, responseType: 'blob' - }); }, }; diff --git a/src/utils/index.ts b/src/utils/index.ts index d3dbe87..7eea652 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -111,8 +111,16 @@ export function downloadFile(obj: BlobPart, name: string, suffix: string, useUni const link = document.createElement("a"); link.style.display = "none"; link.href = url; - const newFilename = useUnix ? (parseTime(new Date(), undefined) + "-") : '' + name.trim() - const fileName = newFilename + "." + suffix; + // 期望行为: + // - 当 useUnix 为 true 且传入 name 时:`${timestamp}-${name}` + // - 当 useUnix 为 true 且 name 为空时:仅 `${timestamp}`(不带多余的 `-`) + // - 当 useUnix 为 false:使用传入的 name(如为空则回退到时间戳) + const safeName = (name || "").trim(); + const timeStamp = parseTime(new Date(), undefined); + const fileBase = useUnix + ? (safeName ? `${timeStamp}-${safeName}` : timeStamp) + : (safeName || timeStamp); + const fileName = fileBase + "." + suffix; link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); diff --git a/src/views/marketing_center/data.js b/src/views/marketing_center/data.js index f809cd7..7598b35 100644 --- a/src/views/marketing_center/data.js +++ b/src/views/marketing_center/data.js @@ -32,7 +32,7 @@ export const newMenus = [ intro: '协助商家拉来新客户,拓展客户群体', childrenList: [ { - name: "全民分销", + name: "全民股东", icon: "zhcz", pathName: "distribution_page", intro: "用户成为股东,可促进消费" diff --git a/src/views/user/list/config/content.ts b/src/views/user/list/config/content.ts index f739756..d7d8e45 100644 --- a/src/views/user/list/config/content.ts +++ b/src/views/user/list/config/content.ts @@ -21,7 +21,7 @@ const contentConfig: IContentConfig = { // // return shopUserApi.edit(data); // }, pk: "id", - toolbar: ["add"], + toolbar: ["add", 'export'], defaultToolbar: ["refresh", "filter", "search"], cols: [ { type: "selection", width: 50, align: "center" }, diff --git a/src/views/user/list/index.vue b/src/views/user/list/index.vue index 0a94f76..46ba916 100644 --- a/src/views/user/list/index.vue +++ b/src/views/user/list/index.vue @@ -158,6 +158,7 @@ import { returnOptionsLabel } from "./config/config"; import shopUserApi from "@/api/account/shopUser"; import { useRoute } from 'vue-router' import { ElNotification } from 'element-plus' +import { downloadFile } from "@/utils/index"; const editMoneyModalRef = ref(null); const userCouponDialogRef = ref(null); const GiveCouponRef = ref(null); @@ -175,7 +176,7 @@ const { // handleAddClick, // handleEditClick, handleSubmitClick, - handleExportClick, + // handleExportClick, handleSearchClick, handleFilterChange, } = usePage(); @@ -217,6 +218,16 @@ function formDataChange(type, val) { } } +// 导出 +async function handleExportClick() { + try { + const file = await shopUserApi.export(searchRef.value.getQueryParams()); + downloadFile(file, "用户列表", "xlsx"); + } catch (error) { + console.log(error); + } +} + // 新增 async function handleAddClick() { addModalRef.value?.setModalVisible(); From 62c6b755afe0ceda0ed890627d58dba7b9a21b47 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 28 Jan 2026 17:47:25 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=82=B9=E9=A4=90=E9=A1=B5=E8=BD=AE=E6=92=AD=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share_setting/components/add_banner.vue | 4 ++ .../share_setting/components/linkCard.vue | 42 +++++++++++++++---- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/views/marketing_center/share_setting/components/add_banner.vue b/src/views/marketing_center/share_setting/components/add_banner.vue index fea2f15..140845b 100644 --- a/src/views/marketing_center/share_setting/components/add_banner.vue +++ b/src/views/marketing_center/share_setting/components/add_banner.vue @@ -111,6 +111,10 @@ const includesNames = ref([ { id: '10', name: '点餐商品详情弹窗页' + }, + { + id: '12', + name: '积分商品详情页面' } ]); diff --git a/src/views/marketing_center/share_setting/components/linkCard.vue b/src/views/marketing_center/share_setting/components/linkCard.vue index ab6b5eb..0042973 100644 --- a/src/views/marketing_center/share_setting/components/linkCard.vue +++ b/src/views/marketing_center/share_setting/components/linkCard.vue @@ -14,6 +14,7 @@