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/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/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/api/product/index.ts b/src/api/product/index.ts index 2facf1e..ae3d34c 100644 --- a/src/api/product/index.ts +++ b/src/api/product/index.ts @@ -181,6 +181,15 @@ const AuthAPI = { method: "get", params, }); + }, + // 导出商品 + exportProducts(params: any) { + return request({ + url: `${baseURL}/export`, + method: "get", + params, + responseType: 'blob' + }); } }; diff --git a/src/assets/applocation/fxpz.png b/src/assets/applocation/fxpz.png new file mode 100644 index 0000000..47c1f3e Binary files /dev/null and b/src/assets/applocation/fxpz.png differ 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/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/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..97a6473 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: "fxpz", + 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 @@ + + + + + \ 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 @@