From fe6cf7ce98d475039aedf296c426e164d53e6220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Mon, 4 Sep 2023 15:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=B8=8B=E6=88=90=E9=95=BF=E5=80=BC=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/experience-record/index.ts | 42 +++++ src/utils/dict.ts | 2 +- .../user/detail/UserExperienceRecord.vue | 162 ++++++++++++++++++ src/views/member/user/detail/index.vue | 5 +- 4 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 src/api/member/experience-record/index.ts create mode 100644 src/views/member/user/detail/UserExperienceRecord.vue diff --git a/src/api/member/experience-record/index.ts b/src/api/member/experience-record/index.ts new file mode 100644 index 00000000..07f839d3 --- /dev/null +++ b/src/api/member/experience-record/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export interface ExperienceRecordVO { + id: number + userId: number + bizId: string + bizType: number + title: string + description: string + experience: number + totalExperience: number +} + +// 查询会员经验记录列表 +export const getExperienceRecordPage = async (params) => { + return await request.get({ url: `/member/experience-record/page`, params }) +} + +// 查询会员经验记录详情 +export const getExperienceRecord = async (id: number) => { + return await request.get({ url: `/member/experience-record/get?id=` + id }) +} + +// 新增会员经验记录 +export const createExperienceRecord = async (data: ExperienceRecordVO) => { + return await request.post({ url: `/member/experience-record/create`, data }) +} + +// 修改会员经验记录 +export const updateExperienceRecord = async (data: ExperienceRecordVO) => { + return await request.put({ url: `/member/experience-record/update`, data }) +} + +// 删除会员经验记录 +export const deleteExperienceRecord = async (id: number) => { + return await request.delete({ url: `/member/experience-record/delete?id=` + id }) +} + +// 导出会员经验记录 Excel +export const exportExperienceRecord = async (params) => { + return await request.download({ url: `/member/experience-record/export-excel`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 6b163628..e1bdbd0e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -143,7 +143,7 @@ export enum DICT_TYPE { // ========== MALL - 会员模块 ========== MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 - + MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 diff --git a/src/views/member/user/detail/UserExperienceRecord.vue b/src/views/member/user/detail/UserExperienceRecord.vue new file mode 100644 index 00000000..55de8969 --- /dev/null +++ b/src/views/member/user/detail/UserExperienceRecord.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 3c329a5b..622d5d4b 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -36,7 +36,9 @@ - 成长值(WIP) + + 余额(WIP) @@ -62,6 +64,7 @@ import UserAccountInfo from './UserAccountInfo.vue' import UserAddressList from './UserAddressList.vue' import UserPointList from './UserPointList.vue' import UserSignList from './UserSignList.vue' +import UserExperienceRecord from './UserExperienceRecord.vue' import { CardTitle } from '@/components/Card/index' defineOptions({ name: 'MemberDetail' })