From ef45206230e6b5c0e7c9924ea392b78aacf85139 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 18 Feb 2025 15:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=87=8F=E7=94=A8=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9crud?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=89=E6=96=B9=E9=85=8D=E7=BD=AE=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/shopMerchant.ts | 55 ++++ src/api/account/shopUser.ts | 160 ++++++++++ src/components/CURD/PageContent.vue | 296 +++++++++++++----- src/components/CURD/PageModal.vue | 7 +- src/components/CURD/types.ts | 6 + src/router/index.ts | 2 +- src/utils/request.ts | 3 +- .../shop/list/components/detailModal.vue | 61 ++-- src/views/shop/list/index.vue | 13 +- src/views/user/active.vue | 1 + src/views/user/index.vue | 0 src/views/user/list/config/add.ts | 135 ++++++++ src/views/user/list/config/config.ts | 46 +++ src/views/user/list/config/content.ts | 106 +++++++ src/views/user/list/config/edit-money.ts | 145 +++++++++ src/views/user/list/config/edit.ts | 136 ++++++++ src/views/user/list/config/search.ts | 35 +++ src/views/user/list/index.vue | 169 ++++++++++ 18 files changed, 1271 insertions(+), 105 deletions(-) create mode 100644 src/api/account/shopMerchant.ts create mode 100644 src/api/account/shopUser.ts delete mode 100644 src/views/user/index.vue create mode 100644 src/views/user/list/config/add.ts create mode 100644 src/views/user/list/config/config.ts create mode 100644 src/views/user/list/config/content.ts create mode 100644 src/views/user/list/config/edit-money.ts create mode 100644 src/views/user/list/config/edit.ts create mode 100644 src/views/user/list/config/search.ts create mode 100644 src/views/user/list/index.vue diff --git a/src/api/account/shopMerchant.ts b/src/api/account/shopMerchant.ts new file mode 100644 index 0000000..25418b9 --- /dev/null +++ b/src/api/account/shopMerchant.ts @@ -0,0 +1,55 @@ +import request from "@/utils/request"; +import { Account_BaseUrl } from "@/api/config"; +const baseURL = Account_BaseUrl + "/admin/shopMerchant"; +const API = { + get(shopId: string | number) { + return request({ + url: `${baseURL}`, + method: "get", + headers: { + shopId: shopId + } + }); + }, + edit(shopId: string | number, data: shopMerchantType) { + return request({ + url: `${baseURL}`, + method: "put", + data: data, + headers: { + shopId: shopId + } + }); + } +} +export default API; +/** + * ShopMerchantEditDTO + */ +export interface shopMerchantType { + /** + * 支付宝appid + */ + alipaySmallAppid: null | string; + /** + * 商户应用id + */ + appId: null | string; + /** + * 商户秘钥 + */ + appSecret: null | string; + /** + * 支付密码 + */ + payPassword: null | string; + /** + * 支付系统商户id + */ + storeId: null | string; + /** + * 微信appid + */ + wechatSmallAppid: null | string; + [property: string]: any; +} \ No newline at end of file diff --git a/src/api/account/shopUser.ts b/src/api/account/shopUser.ts new file mode 100644 index 0000000..4831704 --- /dev/null +++ b/src/api/account/shopUser.ts @@ -0,0 +1,160 @@ +import request from "@/utils/request"; +import { Account_BaseUrl } from "@/api/config"; +const baseURL = Account_BaseUrl + "/admin/shopUser"; +const API = { + // 获取店铺用户概述信息 + getSummary(data: getSummaryRequest) { + return request({ + url: `${baseURL}/summary`, + method: "get", + params: data + }); + }, + getList(data: getListRequest) { + return request({ + url: `${baseURL}`, + method: "get", + params: data + }); + }, + edit(shopId: string | number, data: editRequest) { + return request({ + url: `${baseURL}`, + method: "put", + data: data, + headers: { + shopId: shopId + } + }); + }, + // 店铺用户余额修改 + editMoney(shopId: string | number, data: editMoneyRequest) { + return request({ + url: `${baseURL}/money`, + method: "put", + data: data, + headers: { + shopId: shopId + } + }); + }, + add(shopId: string | number, data: addRequest) { + return request({ + url: `${baseURL}`, + method: "post", + data: data, + headers: { + shopId: shopId + } + }); + } +} +export default API; + +export interface getSummaryRequest { + /** + * 0 非vip 1 vip + */ + isVip?: number; + [property: string]: any; +} +export interface getListRequest { + /** + * 0 非vip 1 vip + */ + isVip?: number; + /** + * 昵称或手机号 + */ + key?: string; + [property: string]: any; +} + +/** + * ShopUserEditDTO + */ +export interface editRequest { + /** + * 生日 + */ + birthDay?: null | string; + /** + * 对应shopUserid + */ + id: number | null; + /** + * 昵称 + */ + nickName?: null | string; + /** + * 性别 0女 1男 + */ + sex?: number | null; + [property: string]: any; +} + +/** + * ShopUserMoneyEditDTO + */ +export interface editMoneyRequest { + /** + * 对应shopUserid + */ + id: number | null; + /** + * 浮动金额 + */ + money: number | null; + /** + * 备注 + */ + remark?: null | string; + /** + * 0减少 1增加 + */ + type: number | null; + [property: string]: any; +} + +/** + * ShopUserAddDTO + */ +export interface addRequest { + /** + * 账户积分 + */ + accountPoints?: number | null; + /** + * 钱包余额 + */ + amount?: number | null; + /** + * 会员生日 + */ + birthDay?: null | string; + /** + * 用户头像 + */ + headImg?: null | string; + /** + * 是否会员, + */ + isVip?: number | null; + /** + * 用户昵称 + */ + nickName: null | string; + /** + * 电话号码 + */ + phone: null | string; + /** + * 0-女 1男 + */ + sex?: number | null; + /** + * 用户Id + */ + userId: number | null; + [property: string]: any; +} \ No newline at end of file diff --git a/src/components/CURD/PageContent.vue b/src/components/CURD/PageContent.vue index 12193bd..ec86d1e 100644 --- a/src/components/CURD/PageContent.vue +++ b/src/components/CURD/PageContent.vue @@ -8,37 +8,58 @@ @@ -67,36 +88,68 @@ - + @@ -191,32 +263,68 @@ @@ -232,18 +340,33 @@ - + - + @@ -253,10 +376,16 @@ - - + + @@ -277,17 +406,35 @@ - + - + - + :drag="true" + :limit="1" + :auto-upload="false" + :on-exceed="handleFileExceed" + >
将文件拖到此处,或 @@ -296,8 +443,13 @@