From d950aef4e5cce91d90a538ae62eef35a31c202a6 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 12 Sep 2025 13:23:27 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=A2=9E=E5=8A=A0=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9C=AA=E7=BB=91=E5=AE=9A=E7=BE=8E=E5=9B=A2=E7=9A=84=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=99=BB=E5=BD=95=E6=8A=A5=E9=94=99=E8=80=8C=E6=9C=AA?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E8=B7=B3=E8=BD=AC=E9=A6=96=E9=A1=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/config.ts | 1 + src/api/market/member.ts | 240 ++++++++ src/assets/applocation/super_vip.png | Bin 0 -> 1157 bytes src/components/Breadcrumb/index.vue | 5 +- src/store/modules/permission.ts | 17 + src/views/login/index.vue | 67 ++- .../components/headerCard.vue | 24 +- .../super_vip/components/coup-lists.vue | 55 ++ .../super_vip/components/dialog-coup.vue | 0 .../super_vip/components/dialog-plans.vue | 153 +++++ .../marketing_center/super_vip/index.vue | 529 +++++++++++++++++- 11 files changed, 1065 insertions(+), 26 deletions(-) create mode 100644 src/api/market/member.ts create mode 100644 src/assets/applocation/super_vip.png create mode 100644 src/views/marketing_center/super_vip/components/coup-lists.vue create mode 100644 src/views/marketing_center/super_vip/components/dialog-coup.vue create mode 100644 src/views/marketing_center/super_vip/components/dialog-plans.vue diff --git a/src/api/config.ts b/src/api/config.ts index 5236bab..96f6d21 100644 --- a/src/api/config.ts +++ b/src/api/config.ts @@ -8,3 +8,4 @@ export const Account_BaseUrl = "account"; export const Order_BaseUrl = "order"; export const Product_BaseUrl = "product"; export const System_BaseUrl = "system"; +export const Market_BaseUrl = "market"; diff --git a/src/api/market/member.ts b/src/api/market/member.ts new file mode 100644 index 0000000..3cf52d0 --- /dev/null +++ b/src/api/market/member.ts @@ -0,0 +1,240 @@ +import request from "@/utils/request"; +import { Market_BaseUrl } from "@/api/config"; +const baseURL = Market_BaseUrl + "/admin/member"; +const API = { + getConfig(params: any) { + return request({ + url: `${baseURL}`, + method: "get", + params + }); + }, + editConfig(data: editRequest) { + return request({ + url: `${baseURL}`, + method: "post", + data: data, + }); + }, + levelAdd(data: levelAddRequest) { + return request({ + url: `${baseURL}/level`, + method: "post", + data: data, + }); + }, + levelEdit(data: levelEditRequest) { + return request({ + url: `${baseURL}/level`, + method: "put", + data: data, + }); + }, + levelDel(data: levelDelRequest) { + return request({ + url: `${baseURL}/level/${data.id}`, + method: "delete", + // data + }); + }, + levelList(params: any) { + return request({ + url: `${baseURL}/level/list`, + method: "get", + params + }); + }, +} +export default API; + +/** + * MemberConfigDTO + */ +export interface editRequest { + /** + * 条件开通条件项 + */ + conditionList?: Condition[] | null; + /** + * 金额购买方案列表 + */ + configList?: ConfigList[] | null; + /** + * 每消费一元经验值 + */ + costReward?: number | null; + /** + * id + */ + id: number | null; + /** + * 是否享受会员价 + */ + isMemberPrice: number | null; + /** + * 是否开启 + */ + isOpen: string; + /** + * 提交生日/姓名 + */ + isSubmitInfo: number | null; + /** + * 参与会员价门店 + */ + memberPriceShopIdList?: number[] | null; + /** + * 每充值一元经验值 + */ + rechargeReward?: number | null; + /** + * 规则说明 + */ + remark: null | string; + [property: string]: any; +} + +/** +* com.czg.account.dto.MemberConfigDTO.condition +* +* condition +*/ +export interface Condition { + code?: null | string; + value?: null | string; + [property: string]: any; +} + +/** +* com.czg.account.dto.MemberConfigDTO.ConfigList +* +* ConfigList +*/ +export interface ConfigList { + /** + * 会员周期 1月 1日 + */ + circleTime: null | string; + /** + * 赠送优惠券 + */ + couponIdList?: number[] | null; + /** + * 名称 + */ + name: null | string; + /** + * 价格 + */ + price: number | null; + /** + * 赠送成长值 + */ + reward?: number | null; + [property: string]: any; +} + + +/** + * MemberLevelDTO + */ +export interface levelAddRequest { + /** + * 消费送积分,消费n元送1积分, 0为禁用 + */ + costRewardPoints?: number | null; + /** + * 优惠券列表 + */ + cycleRewardCouponList?: number[] | null; + /** + * 赠送积分 + */ + cycleRewardPoints?: number | null; + /** + * 周期时间包含周 月 年 日 + */ + cycleTime?: null | string; + /** + * 会员折扣 + */ + discount: number | null; + /** + * 所需成长值 + */ + experienceValue: number | null; + /** + * ID + */ + id?: number | null; + /** + * 周期奖励状态 0禁用 1启用 + */ + isCycleReward: number | null; + /** + * logo + */ + logo?: null | string; + /** + * 会员名称 + */ + name: null | string; + /** + * 描述说明 + */ + remark: string; + [property: string]: any; +} + + +/** + * MemberLevelDTOUpdateGroup + */ +export interface levelEditRequest { + /** + * 消费送积分,消费n元送1积分, 0为禁用 + */ + costRewardPoints?: number | null; + /** + * 优惠券列表 + */ + cycleRewardCouponList?: number[] | null; + /** + * 赠送积分 + */ + cycleRewardPoints?: number | null; + /** + * 周期时间包含周 月 年 日 + */ + cycleTime?: null | string; + /** + * 会员折扣 + */ + discount?: number | null; + /** + * 所需成长值 + */ + experienceValue?: number | null; + /** + * ID + */ + id: number | null; + /** + * 周期奖励状态 0禁用 1启用 + */ + isCycleReward?: number | null; + /** + * logo + */ + logo?: null | string; + /** + * 会员名称 + */ + name?: null | string; + [property: string]: any; +} + +export interface levelDelRequest { + id: number; + [property: string]: any; +} \ No newline at end of file diff --git a/src/assets/applocation/super_vip.png b/src/assets/applocation/super_vip.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3732100aef5800a0af6f0feebcb29b362a9c57 GIT binary patch literal 1157 zcmV;01bX|4P)7(_@WUL z#Rf#Hm7stTd=QPPKA@2ZC0ql6kU+R!%YC!{Gd*c(piFyaN)PGD{%6l^ul4`4XU|@H zPJ;a&o12!E&rO#Yju_H@j$`Ftri&^X)A2@~MC47y-&UAn7;5P6M==G|oIT555|Jb+ z?;GRchI~7Qn}}J7sj192=AHOfBvvRkZs#5eC@>OZEbM#jK{A9i z>g)E98C8vJSCm`}oA$v6f5O7GZfc3{Lu25hN++h=L}jnLWdz6vJ@|PGxZg%>UM+lW zQ(@wb&VyDOtv+*XRJ()v)Rl4G!!8RV{+>;%?6vcsC1YQ{)b0Z>0TXPEpZyeQgnW$V z(nk;bESq9_r})_M67b4>Zpv&u01ZFF)AQqC`Xbo89|k2LpTPu_*&UFvFaCus=HU2g zhye{y4hl0|2^2R~-r-8i zHo9}DG^l{(o88-151_*AEXkTuGQpiw?>YVFM{A&N?C#;FE= zHu742T`5c&RDdWgUI(Ynkcm_^l_r7^;; zTEeBl1&EraQJT8gNwLit%Qsngt+vpJB0wQQ%k~bcD|f*5gB|6NxhMie@P|(GeZl{# ziGyeYR_%n(?ekJty(d_nnG@DiXUPy{+}pQs!I#e<#ItWQ_Ec - + {{ translateRouteTitle(item.meta.title) }} diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index d747e10..c8c03d3 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -33,6 +33,23 @@ export const usePermissionStore = defineStore("permission", () => { .then((data) => { if (!isTest) { const dynamicRoutes = parseDynamicRoutes(data.filter(v => v.type == 0)); + console.log('dynamicRoutes') + console.log(dynamicRoutes) + dynamicRoutes.forEach((route) => { + //过滤出可见子节点 + let onlyOneChild = null + const showingChildren = route.children.filter((route) => { + if (!route.meta?.hidden) { + onlyOneChild = route; + return true; + } + return false; + }); + // 仅有一个节点 + if (showingChildren.length === 1 && onlyOneChild) { + route.redirect = onlyOneChild.path; + } + }) routes.value = [...constantRoutes, ...dynamicRoutes]; isRoutesLoaded.value = true; resolve(dynamicRoutes); diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 88d23a7..cd81300 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,7 +1,13 @@ \ No newline at end of file diff --git a/src/views/marketing_center/super_vip/components/dialog-coup.vue b/src/views/marketing_center/super_vip/components/dialog-coup.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/marketing_center/super_vip/components/dialog-plans.vue b/src/views/marketing_center/super_vip/components/dialog-plans.vue new file mode 100644 index 0000000..4e54948 --- /dev/null +++ b/src/views/marketing_center/super_vip/components/dialog-plans.vue @@ -0,0 +1,153 @@ + + + \ No newline at end of file diff --git a/src/views/marketing_center/super_vip/index.vue b/src/views/marketing_center/super_vip/index.vue index 25315c1..923e605 100644 --- a/src/views/marketing_center/super_vip/index.vue +++ b/src/views/marketing_center/super_vip/index.vue @@ -1,3 +1,528 @@ \ No newline at end of file +
+ + + + + + + + + + +
+ + + + +