diff --git a/.env.development b/.env.development index db70fbc..dbba788 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_THINK_URL=https://gxtyzx-api.websoft.top/api VITE_API_URL=https://modules.gxwebsoft.com/api -VITE_SERVER_URL=https://common-api.websoft.top/api +VITE_SERVER_URL=http://127.0.0.1:30000/api #VITE_API_URL=http://127.0.0.1:9001/api #VITE_THINK_URL=http://127.0.0.1:9099/api #/booking/bookingItem diff --git a/.env.production b/.env.production index 8f9990d..f4821c9 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -VITE_SERVER_URL=https://common-api.websoft.top/api +VITE_SERVER_URL=https://server.websoft.top/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api VITE_API_URL=https://modules.gxwebsoft.com/api diff --git a/src/api/cms/cmsProductComment/index.ts b/src/api/cms/cmsProductComment/index.ts new file mode 100644 index 0000000..cd00370 --- /dev/null +++ b/src/api/cms/cmsProductComment/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsProductComment, CmsProductCommentParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询产品评论 + */ +export async function pageCmsProductComment(params: CmsProductCommentParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/cms-product-comment/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询产品评论列表 + */ +export async function listCmsProductComment(params?: CmsProductCommentParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-comment', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加产品评论 + */ +export async function addCmsProductComment(data: CmsProductComment) { + const res = await request.post>( + MODULES_API_URL + '/cms/cms-product-comment', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改产品评论 + */ +export async function updateCmsProductComment(data: CmsProductComment) { + const res = await request.put>( + MODULES_API_URL + '/cms/cms-product-comment', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除产品评论 + */ +export async function removeCmsProductComment(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-comment/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除产品评论 + */ +export async function removeBatchCmsProductComment(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-comment/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询产品评论 + */ +export async function getCmsProductComment(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-comment/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/cmsProductComment/model/index.ts b/src/api/cms/cmsProductComment/model/index.ts new file mode 100644 index 0000000..83e2776 --- /dev/null +++ b/src/api/cms/cmsProductComment/model/index.ts @@ -0,0 +1,31 @@ +import type { PageParam } from '@/api'; + +/** + * 产品评论 + */ +export interface CmsProductComment { + // ID + id?: number; + // 产品ID + productId?: number; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 评论内容 + comments?: string; + // 状态 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 产品评论搜索条件 + */ +export interface CmsProductCommentParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/cmsProductRecord/index.ts b/src/api/cms/cmsProductRecord/index.ts new file mode 100644 index 0000000..8806c66 --- /dev/null +++ b/src/api/cms/cmsProductRecord/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsProductRecord, CmsProductRecordParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询插件安装明细 + */ +export async function pageCmsProductRecord(params: CmsProductRecordParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/cms-product-record/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询插件安装明细列表 + */ +export async function listCmsProductRecord(params?: CmsProductRecordParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-record', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加插件安装明细 + */ +export async function addCmsProductRecord(data: CmsProductRecord) { + const res = await request.post>( + MODULES_API_URL + '/cms/cms-product-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改插件安装明细 + */ +export async function updateCmsProductRecord(data: CmsProductRecord) { + const res = await request.put>( + MODULES_API_URL + '/cms/cms-product-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除插件安装明细 + */ +export async function removeCmsProductRecord(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-record/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除插件安装明细 + */ +export async function removeBatchCmsProductRecord(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-record/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询插件安装明细 + */ +export async function getCmsProductRecord(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-record/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/cmsProductRecord/model/index.ts b/src/api/cms/cmsProductRecord/model/index.ts new file mode 100644 index 0000000..5c6670a --- /dev/null +++ b/src/api/cms/cmsProductRecord/model/index.ts @@ -0,0 +1,31 @@ +import type { PageParam } from '@/api'; + +/** + * 插件安装明细 + */ +export interface CmsProductRecord { + // ID + id?: number; + // 产品ID + productId?: number; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0待处理, 1已完成 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 插件安装明细搜索条件 + */ +export interface CmsProductRecordParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchant/index.ts b/src/api/shop/shopMerchant/index.ts new file mode 100644 index 0000000..5ed8e11 --- /dev/null +++ b/src/api/shop/shopMerchant/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchant, ShopMerchantParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户 + */ +export async function pageShopMerchant(params: ShopMerchantParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户列表 + */ +export async function listShopMerchant(params?: ShopMerchantParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户 + */ +export async function addShopMerchant(data: ShopMerchant) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户 + */ +export async function updateShopMerchant(data: ShopMerchant) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户 + */ +export async function removeShopMerchant(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户 + */ +export async function removeBatchShopMerchant(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户 + */ +export async function getShopMerchant(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchant/model/index.ts b/src/api/shop/shopMerchant/model/index.ts new file mode 100644 index 0000000..52d4543 --- /dev/null +++ b/src/api/shop/shopMerchant/model/index.ts @@ -0,0 +1,87 @@ +import type { PageParam } from '@/api'; + +/** + * 商户 + */ +export interface ShopMerchant { + // ID + merchantId?: number; + // 商户名称 + merchantName?: string; + // 商户编号 + merchantCode?: string; + // 商户类型 + type?: number; + // 商户图标 + image?: string; + // 商户手机号 + phone?: string; + // 商户姓名 + realName?: string; + // 店铺类型 + shopType?: string; + // 项目分类 + itemType?: string; + // 商户分类 + category?: string; + // 商户经营分类 + merchantCategoryId?: number; + // 商户分类 + merchantCategoryTitle?: string; + // 经纬度 + lngAndLat?: string; + // + lng?: string; + // + lat?: string; + // 所在省份 + province?: string; + // 所在城市 + city?: string; + // 所在辖区 + region?: string; + // 详细地址 + address?: string; + // 手续费 + commission?: string; + // 关键字 + keywords?: string; + // 资质图片 + files?: string; + // 营业时间 + businessTime?: string; + // 文章内容 + content?: string; + // 每小时价格 + price?: string; + // 是否自营 + ownStore?: number; + // 是否推荐 + recommend?: number; + // 是否需要审核 + goodsReview?: number; + // 管理入口 + adminUrl?: string; + // 备注 + comments?: string; + // 所有人 + userId?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户搜索条件 + */ +export interface ShopMerchantParam extends PageParam { + merchantId?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantAccount/index.ts b/src/api/shop/shopMerchantAccount/index.ts new file mode 100644 index 0000000..eff50c4 --- /dev/null +++ b/src/api/shop/shopMerchantAccount/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantAccount, ShopMerchantAccountParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户账号 + */ +export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-account/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户账号列表 + */ +export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-account', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户账号 + */ +export async function addShopMerchantAccount(data: ShopMerchantAccount) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-account', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户账号 + */ +export async function updateShopMerchantAccount(data: ShopMerchantAccount) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-account', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户账号 + */ +export async function removeShopMerchantAccount(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-account/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户账号 + */ +export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-account/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户账号 + */ +export async function getShopMerchantAccount(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-account/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantAccount/model/index.ts b/src/api/shop/shopMerchantAccount/model/index.ts new file mode 100644 index 0000000..6dbada0 --- /dev/null +++ b/src/api/shop/shopMerchantAccount/model/index.ts @@ -0,0 +1,39 @@ +import type { PageParam } from '@/api'; + +/** + * 商户账号 + */ +export interface ShopMerchantAccount { + // ID + id?: number; + // 商户手机号 + phone?: string; + // 真实姓名 + realName?: string; + // 商户ID + merchantId?: number; + // 角色ID + roleId?: number; + // 角色名称 + roleName?: string; + // 用户ID + userId?: number; + // 备注 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户账号搜索条件 + */ +export interface ShopMerchantAccountParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantApply/index.ts b/src/api/shop/shopMerchantApply/index.ts new file mode 100644 index 0000000..b26ed11 --- /dev/null +++ b/src/api/shop/shopMerchantApply/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantApply, ShopMerchantApplyParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户入驻申请 + */ +export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-apply/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户入驻申请列表 + */ +export async function listShopMerchantApply(params?: ShopMerchantApplyParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-apply', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户入驻申请 + */ +export async function addShopMerchantApply(data: ShopMerchantApply) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-apply', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户入驻申请 + */ +export async function updateShopMerchantApply(data: ShopMerchantApply) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-apply', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户入驻申请 + */ +export async function removeShopMerchantApply(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-apply/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户入驻申请 + */ +export async function removeBatchShopMerchantApply(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-apply/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户入驻申请 + */ +export async function getShopMerchantApply(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-apply/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantApply/model/index.ts b/src/api/shop/shopMerchantApply/model/index.ts new file mode 100644 index 0000000..81a85f0 --- /dev/null +++ b/src/api/shop/shopMerchantApply/model/index.ts @@ -0,0 +1,59 @@ +import type { PageParam } from '@/api'; + +/** + * 商户入驻申请 + */ +export interface ShopMerchantApply { + // ID + applyId?: number; + // 商户名称 + merchantName?: string; + // 商户图标 + image?: string; + // 商户手机号 + phone?: string; + // 商户姓名 + realName?: string; + // 身份证号码 + idCard?: string; + // 店铺类型 + shopType?: string; + // 商户分类 + category?: string; + // 手续费 + commission?: string; + // 关键字 + keywords?: string; + // 资质图片 + files?: string; + // 所有人 + userId?: number; + // 是否自营 + ownStore?: number; + // 是否推荐 + recommend?: number; + // 是否需要审核 + goodsReview?: number; + // 工作负责人 + name2?: string; + // 驳回原因 + reason?: string; + // 备注 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户入驻申请搜索条件 + */ +export interface ShopMerchantApplyParam extends PageParam { + applyId?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantCount/index.ts b/src/api/shop/shopMerchantCount/index.ts new file mode 100644 index 0000000..74229e9 --- /dev/null +++ b/src/api/shop/shopMerchantCount/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantCount, ShopMerchantCountParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询门店销售统计表 + */ +export async function pageShopMerchantCount(params: ShopMerchantCountParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-count/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询门店销售统计表列表 + */ +export async function listShopMerchantCount(params?: ShopMerchantCountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-count', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加门店销售统计表 + */ +export async function addShopMerchantCount(data: ShopMerchantCount) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-count', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改门店销售统计表 + */ +export async function updateShopMerchantCount(data: ShopMerchantCount) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-count', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除门店销售统计表 + */ +export async function removeShopMerchantCount(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-count/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除门店销售统计表 + */ +export async function removeBatchShopMerchantCount(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-count/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询门店销售统计表 + */ +export async function getShopMerchantCount(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-count/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantCount/model/index.ts b/src/api/shop/shopMerchantCount/model/index.ts new file mode 100644 index 0000000..ea27a60 --- /dev/null +++ b/src/api/shop/shopMerchantCount/model/index.ts @@ -0,0 +1,29 @@ +import type { PageParam } from '@/api'; + +/** + * 门店销售统计表 + */ +export interface ShopMerchantCount { + // ID + id?: number; + // 店铺名称 + name?: string; + // 店铺说明 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 门店销售统计表搜索条件 + */ +export interface ShopMerchantCountParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantType/index.ts b/src/api/shop/shopMerchantType/index.ts new file mode 100644 index 0000000..2070c5e --- /dev/null +++ b/src/api/shop/shopMerchantType/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantType, ShopMerchantTypeParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户类型 + */ +export async function pageShopMerchantType(params: ShopMerchantTypeParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-type/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户类型列表 + */ +export async function listShopMerchantType(params?: ShopMerchantTypeParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-type', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户类型 + */ +export async function addShopMerchantType(data: ShopMerchantType) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-type', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户类型 + */ +export async function updateShopMerchantType(data: ShopMerchantType) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-type', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户类型 + */ +export async function removeShopMerchantType(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-type/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户类型 + */ +export async function removeBatchShopMerchantType(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-type/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户类型 + */ +export async function getShopMerchantType(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-type/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantType/model/index.ts b/src/api/shop/shopMerchantType/model/index.ts new file mode 100644 index 0000000..c051169 --- /dev/null +++ b/src/api/shop/shopMerchantType/model/index.ts @@ -0,0 +1,29 @@ +import type { PageParam } from '@/api'; + +/** + * 商户类型 + */ +export interface ShopMerchantType { + // ID + id?: number; + // 店铺类型 + name?: string; + // 店铺入驻条件 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户类型搜索条件 + */ +export interface ShopMerchantTypeParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/system/website/field/index.ts b/src/api/system/website/field/index.ts index 962ece8..a0e4ceb 100644 --- a/src/api/system/website/field/index.ts +++ b/src/api/system/website/field/index.ts @@ -134,7 +134,7 @@ export async function checkExistence( */ export async function configWebsiteField(params?: WebsiteFieldParam) { const res = await request.get>( - SERVER_API_URL + '/cms/website-field/config', + SERVER_API_URL + '/cms/cms-website-field/config', { params } diff --git a/src/views/cms/cmsProductComment/components/cmsProductCommentEdit.vue b/src/views/cms/cmsProductComment/components/cmsProductCommentEdit.vue new file mode 100644 index 0000000..686fdc2 --- /dev/null +++ b/src/views/cms/cmsProductComment/components/cmsProductCommentEdit.vue @@ -0,0 +1,204 @@ + + + + diff --git a/src/views/cms/cmsProductComment/components/search.vue b/src/views/cms/cmsProductComment/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/cms/cmsProductComment/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/cms/cmsProductComment/index.vue b/src/views/cms/cmsProductComment/index.vue new file mode 100644 index 0000000..0a7411d --- /dev/null +++ b/src/views/cms/cmsProductComment/index.vue @@ -0,0 +1,245 @@ + + + + + + + diff --git a/src/views/cms/cmsProductRecord/components/cmsProductRecordEdit.vue b/src/views/cms/cmsProductRecord/components/cmsProductRecordEdit.vue new file mode 100644 index 0000000..a919964 --- /dev/null +++ b/src/views/cms/cmsProductRecord/components/cmsProductRecordEdit.vue @@ -0,0 +1,204 @@ + + + + diff --git a/src/views/cms/cmsProductRecord/components/search.vue b/src/views/cms/cmsProductRecord/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/cms/cmsProductRecord/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/cms/cmsProductRecord/index.vue b/src/views/cms/cmsProductRecord/index.vue new file mode 100644 index 0000000..1ef395f --- /dev/null +++ b/src/views/cms/cmsProductRecord/index.vue @@ -0,0 +1,245 @@ + + + + + + + diff --git a/src/views/shop/shopMerchant/components/search.vue b/src/views/shop/shopMerchant/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/shop/shopMerchant/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/shop/shopMerchant/components/shopMerchantEdit.vue b/src/views/shop/shopMerchant/components/shopMerchantEdit.vue new file mode 100644 index 0000000..2abe7c7 --- /dev/null +++ b/src/views/shop/shopMerchant/components/shopMerchantEdit.vue @@ -0,0 +1,427 @@ + + + + diff --git a/src/views/shop/shopMerchant/index.vue b/src/views/shop/shopMerchant/index.vue new file mode 100644 index 0000000..dcfc6d6 --- /dev/null +++ b/src/views/shop/shopMerchant/index.vue @@ -0,0 +1,413 @@ + + + + + + + diff --git a/src/views/shop/shopMerchantAccount/components/search.vue b/src/views/shop/shopMerchantAccount/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/shop/shopMerchantAccount/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/shop/shopMerchantAccount/components/shopMerchantAccountEdit.vue b/src/views/shop/shopMerchantAccount/components/shopMerchantAccountEdit.vue new file mode 100644 index 0000000..f5e4e87 --- /dev/null +++ b/src/views/shop/shopMerchantAccount/components/shopMerchantAccountEdit.vue @@ -0,0 +1,236 @@ + + + + diff --git a/src/views/shop/shopMerchantAccount/index.vue b/src/views/shop/shopMerchantAccount/index.vue new file mode 100644 index 0000000..ebf294a --- /dev/null +++ b/src/views/shop/shopMerchantAccount/index.vue @@ -0,0 +1,269 @@ + + + + + + + diff --git a/src/views/shop/shopMerchantApply/components/search.vue b/src/views/shop/shopMerchantApply/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/shop/shopMerchantApply/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/shop/shopMerchantApply/components/shopMerchantApplyEdit.vue b/src/views/shop/shopMerchantApply/components/shopMerchantApplyEdit.vue new file mode 100644 index 0000000..0044d60 --- /dev/null +++ b/src/views/shop/shopMerchantApply/components/shopMerchantApplyEdit.vue @@ -0,0 +1,320 @@ + + + + diff --git a/src/views/shop/shopMerchantApply/index.vue b/src/views/shop/shopMerchantApply/index.vue new file mode 100644 index 0000000..0f04f74 --- /dev/null +++ b/src/views/shop/shopMerchantApply/index.vue @@ -0,0 +1,329 @@ + + + + + + + diff --git a/src/views/shop/shopMerchantCount/components/search.vue b/src/views/shop/shopMerchantCount/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/shop/shopMerchantCount/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/shop/shopMerchantCount/components/shopMerchantCountEdit.vue b/src/views/shop/shopMerchantCount/components/shopMerchantCountEdit.vue new file mode 100644 index 0000000..9152653 --- /dev/null +++ b/src/views/shop/shopMerchantCount/components/shopMerchantCountEdit.vue @@ -0,0 +1,196 @@ + + + + diff --git a/src/views/shop/shopMerchantCount/index.vue b/src/views/shop/shopMerchantCount/index.vue new file mode 100644 index 0000000..890dc20 --- /dev/null +++ b/src/views/shop/shopMerchantCount/index.vue @@ -0,0 +1,239 @@ + + + + + + + diff --git a/src/views/shop/shopMerchantType/components/search.vue b/src/views/shop/shopMerchantType/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/shop/shopMerchantType/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/shop/shopMerchantType/components/shopMerchantTypeEdit.vue b/src/views/shop/shopMerchantType/components/shopMerchantTypeEdit.vue new file mode 100644 index 0000000..d3c14d3 --- /dev/null +++ b/src/views/shop/shopMerchantType/components/shopMerchantTypeEdit.vue @@ -0,0 +1,196 @@ + + + + diff --git a/src/views/shop/shopMerchantType/index.vue b/src/views/shop/shopMerchantType/index.vue new file mode 100644 index 0000000..a93999b --- /dev/null +++ b/src/views/shop/shopMerchantType/index.vue @@ -0,0 +1,239 @@ + + + + + + +