From f611d507bc8d9fdbf621b9ca5f498cd27f2e0132 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Fri, 28 Feb 2025 15:29:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=8D=95=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E6=B7=BB=E5=8A=A0=E6=97=B6=E5=80=99=E7=9A=84skuid?= =?UTF-8?q?=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 10 + src/views/application/marketing/index.vue | 2 +- .../application/marketing/points/index.ts | 68 +++++ .../application/marketing/points/index.vue | 26 ++ .../points/pointsconfig/BasicSettings.vue | 241 ++++++++++++++++++ .../points/pointsconfig/exchangerecords.vue | 16 ++ .../exchangerecordsconfig/Content.vue | 139 ++++++++++ .../exchangerecordsconfig/DataStatistics.vue | 69 +++++ .../exchangerecordsconfig/Search.vue | 68 +++++ .../pointsconfig/exchangerecordsconfig/api.ts | 66 +++++ .../component/Paging.vue | 24 ++ .../exchangerecordsconfig/component/Table.vue | 48 ++++ src/views/product/indexconfig/addgoods.vue | 4 +- 13 files changed, 779 insertions(+), 2 deletions(-) create mode 100644 src/views/application/marketing/points/index.ts create mode 100644 src/views/application/marketing/points/index.vue create mode 100644 src/views/application/marketing/points/pointsconfig/BasicSettings.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecords.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Content.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/DataStatistics.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Search.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/api.ts create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Paging.vue create mode 100644 src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Table.vue diff --git a/src/router/index.ts b/src/router/index.ts index 8f4e28b..83162ca 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -384,6 +384,16 @@ export const constantRoutes: RouteRecordRaw[] = [ hidden: true }, }, + { + path: "points", + component: () => import("@/views/application/marketing/points/index.vue"), + name: "points", + meta: { + title: "积分", + affix: false, + hidden: true + }, + }, { path: "ad", component: () => import("@/views/application/list/ad/index.vue"), diff --git a/src/views/application/marketing/index.vue b/src/views/application/marketing/index.vue index bff30b5..7ece955 100644 --- a/src/views/application/marketing/index.vue +++ b/src/views/application/marketing/index.vue @@ -28,7 +28,7 @@ const list = ref([ { name: "优惠券", icon: card, path: "coupon" }, { name: "霸王餐", icon: charge, path: "bwc" }, { name: "邀请裂变", icon: invite, path: "" }, - { name: "积分锁客", icon: score, path: "" }, + { name: "积分锁客", icon: score, path: "points" }, ]); diff --git a/src/views/application/marketing/points/index.ts b/src/views/application/marketing/points/index.ts new file mode 100644 index 0000000..e1eaebe --- /dev/null +++ b/src/views/application/marketing/points/index.ts @@ -0,0 +1,68 @@ +import request from "@/utils/request"; +const baseURL = "/account/admin/points/basic-setting"; +// 积分-配置 +const AuthAPI = { + // 积分基本设置详情 + getBasicSetting(params: any) { + return request({ + url: `${baseURL}`, + method: "get", + params, + }); + }, + // 积分保存 + BasicSettingadd(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + /** 分页*/ + getPage(params: any) { + return request({ + url: `${baseURL}/page`, + method: "get", + params, + }); + }, + // 新增 + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + // 详情 + getinfo(id: number) { + return request({ + url: `${baseURL}/${id}`, + method: "get", + }); + }, + // 编辑 + update(data: Object) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + // 删除 + deleteByIds(id: number | String) { + return request({ + url: `${baseURL}/${id}`, + method: "delete", + }); + }, + +}; +export interface Responseres { + code?: number | null; + data?: any; + msg?: null | string; + [property: string]: any; +} + +export default AuthAPI; \ No newline at end of file diff --git a/src/views/application/marketing/points/index.vue b/src/views/application/marketing/points/index.vue new file mode 100644 index 0000000..72e9e68 --- /dev/null +++ b/src/views/application/marketing/points/index.vue @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/BasicSettings.vue b/src/views/application/marketing/points/pointsconfig/BasicSettings.vue new file mode 100644 index 0000000..bb71180 --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/BasicSettings.vue @@ -0,0 +1,241 @@ + + + + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecords.vue b/src/views/application/marketing/points/pointsconfig/exchangerecords.vue new file mode 100644 index 0000000..3538599 --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecords.vue @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Content.vue b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Content.vue new file mode 100644 index 0000000..5f6527e --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Content.vue @@ -0,0 +1,139 @@ + + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/DataStatistics.vue b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/DataStatistics.vue new file mode 100644 index 0000000..f6eccbc --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/DataStatistics.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Search.vue b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Search.vue new file mode 100644 index 0000000..912ea99 --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/Search.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/api.ts b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/api.ts new file mode 100644 index 0000000..effdc4c --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/api.ts @@ -0,0 +1,66 @@ +import request from "@/utils/request"; +const baseURL = "/account/admin/points/exchange-record"; +// 兑换记录-配置 +const AuthAPI = { + // 列表 + getList(params: any) { + return request({ + url: `${baseURL}/list`, + method: "get", + params, + }); + }, + /** 分页*/ + getPage(params: any) { + return request({ + url: `${baseURL}/page`, + method: "get", + params, + }); + }, + // 新增 + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + // 详情 + getinfo(id: number) { + return request({ + url: `${baseURL}/${id}`, + method: "get", + }); + }, + // 编辑 + update(data: Object) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + // 删除 + deleteByIds(id: number | String) { + return request({ + url: `${baseURL}/${id}`, + method: "delete", + }); + }, + // 统计 + gettotal() { + return request({ + url: `${baseURL}/total`, + method: "get", + }); + }, +}; +export interface Responseres { + code?: number | null; + data?: any; + msg?: null | string; + [property: string]: any; +} + +export default AuthAPI; \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Paging.vue b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Paging.vue new file mode 100644 index 0000000..ee9b056 --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Paging.vue @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Table.vue b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Table.vue new file mode 100644 index 0000000..b61e8d5 --- /dev/null +++ b/src/views/application/marketing/points/pointsconfig/exchangerecordsconfig/component/Table.vue @@ -0,0 +1,48 @@ + + + diff --git a/src/views/product/indexconfig/addgoods.vue b/src/views/product/indexconfig/addgoods.vue index 4907560..684ed9e 100644 --- a/src/views/product/indexconfig/addgoods.vue +++ b/src/views/product/indexconfig/addgoods.vue @@ -533,11 +533,13 @@ function selectShopRes(res: Array) { item.proId = item.id item.proName = item.name item.price = item.lowPrice - item.skuId = '' + item.skuId = item.skuList[0].id item.skuName = '' item.number = 1 + // 单规格skuid添加 return item }) + if (ruleForm.groupType == '0') { let obj = { title: '',