修复已知问题

This commit is contained in:
2024-09-27 14:17:12 +08:00
parent c0328fa23e
commit 5e56c31300
299 changed files with 17512 additions and 987 deletions

View File

@@ -1,11 +1,11 @@
VITE_APP_NAME=后台管理系统 VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SOCKET_URL=wss://server.gxwebsoft.com
VITE_SERVER_URL=https://server.gxwebsoft.com/api #VITE_SERVER_URL=https://server.gxwebsoft.com/api
VITE_THINK_URL=https://gxtyzx-api.websoft.top/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api
#VITE_API_URL=https://modules.gxwebsoft.com/api VITE_API_URL=https://modules.gxwebsoft.com/api
#VITE_SERVER_URL=http://127.0.0.1:9090/api VITE_SERVER_URL=http://127.0.0.1:9090/api
VITE_API_URL=http://127.0.0.1:9001/api #VITE_API_URL=http://127.0.0.1:9001/api
#VITE_THINK_URL=http://127.0.0.1:9099/api #VITE_THINK_URL=http://127.0.0.1:9099/api
#/booking/bookingItem #/booking/bookingItem

View File

@@ -0,0 +1,91 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BCAgent, BCAgentParam } from '@/api/apps/bc/agent/model';
/**
* 分页查询设备
*/
export async function pageBCAgent(params: BCAgentParam) {
const res = await request.get<ApiResult<PageResult<BCAgent>>>(
'/apps/bc-agent/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设备列表
*/
export async function listBCAgent(params?: BCAgentParam) {
const res = await request.get<ApiResult<BCAgent[]>>('/apps/bc-agent', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设备
*/
export async function addBCAgent(data: BCAgent) {
const res = await request.post<ApiResult<unknown>>('/apps/bc-agent', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设备
*/
export async function updateBCAgent(data: BCAgent) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-agent', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定设备
*/
export async function bindBCAgent(data: BCAgent) {
const res = await request.put<ApiResult<unknown>>(
'/apps/bc-agent/bind',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设备
*/
export async function removeBCAgent(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-agent/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设备
*/
export async function removeBatchBCAgent(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-agent/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,23 @@
import type { PageParam } from '@/api';
/**
* 代理报餐
*/
export interface BCAgent {
agentId?: number;
userId?: number;
parentId?: number;
sortNumber?: number;
status?: number;
comments?: string;
createTime?: string;
tenantId?: number;
}
/**
* 订单搜索条件
*/
export interface BCAgentParam extends PageParam {
status?: number;
userId?: number;
}

View File

@@ -0,0 +1,142 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BcEquipment, BcEquipmentParam } from './model';
/**
* 分页查询设备
*/
export async function pageBcEquipment(params: BcEquipmentParam) {
const res = await request.get<ApiResult<PageResult<BcEquipment>>>(
'/apps/bc-equipment/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设备列表
*/
export async function listBcEquipment(params?: BcEquipmentParam) {
const res = await request.get<ApiResult<BcEquipment[]>>(
'/apps/bc-equipment',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设备
*/
export async function addBcEquipment(data: BcEquipment) {
const merchantCode = localStorage.getItem('merchantCode');
console.log(merchantCode);
if (merchantCode !== null && merchantCode != '') {
console.log(merchantCode);
data.merchantCode = String(merchantCode);
}
const res = await request.post<ApiResult<unknown>>(
'/apps/bc-equipment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设备
*/
export async function updateBcEquipment(data: BcEquipment) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-equipment', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定设备
*/
export async function bindBcEquipment(data: BcEquipment) {
const res = await request.put<ApiResult<unknown>>(
'/apps/bc-equipment/bind',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设备
*/
export async function removeBcEquipment(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/apps/bc-equipment/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设备
*/
export async function removeBatchBcEquipment(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/apps/bc-equipment/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 检查IP是否存在
*/
export async function checkExistence(
field: string,
value: string,
id?: number
) {
const res = await request.get<ApiResult<unknown>>(
'/apps/bc-equipment/existence',
{
params: { field, value, id }
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 发送企业微信消息推送
*/
export async function addSend(data: BcEquipment) {
const res = await request.post<ApiResult<unknown>>(
'/apps/bc-equipment/addSend',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,31 @@
import type { PageParam } from '@/api';
/**
* 设备
*/
export interface BcEquipment {
bcEquipmentId?: number;
equipmentName?: string;
equipmentCode?: string;
gear?: number;
describe?: string;
sortNumber?: number;
status?: number;
comments?: string;
createTime?: string;
tenantId?: number;
content?: string;
merchantCode?: string;
}
/**
* 订单搜索条件
*/
export interface BcEquipmentParam extends PageParam {
bcEquipmentId?: number;
equipmentName?: string;
equipmentCode?: string;
status?: number;
merchantCode?: string;
userId?: number;
}

View File

@@ -0,0 +1,95 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BcExport, BcExportParam } from '@/api/apps/bc/export/model';
/**
* 分页查询计划
*/
export async function pageBcExport(params: BcExportParam) {
const res = await request.get<ApiResult<PageResult<BcExport>>>(
'/apps/bc-export/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询计划列表
*/
export async function listBcExport(params?: BcExportParam) {
const res = await request.get<ApiResult<BcExport[]>>('/apps/bc-export', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加计划
*/
export async function addBcExport(data: BcExport) {
const res = await request.post<ApiResult<unknown>>('/apps/bc-export', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改计划
*/
export async function updateBcExport(data: BcExport) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-export', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定计划
*/
export async function bindBcExport(data: BcExport) {
const res = await request.put<ApiResult<unknown>>(
'/apps/bc-export/bind',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除计划
*/
export async function removeBcExport(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-export/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除计划
*/
export async function removeBatchBcExport(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/apps/bc-export/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,41 @@
import type { PageParam } from '@/api';
export interface BcExport {
exportId?: number;
organizationName?: string;
nickname?: string;
breakfastPost?: number;
breakfastSign?: number;
lunchPost?: number;
lunchSign?: number;
dinnerPost?: number;
dinnerSign?: number;
gear10?: number;
gear20?: number;
signGear10?: number;
signGear20?: number;
createTime?: string;
tenantId?: number;
expendMoney?: number;
userId?: number;
lunchPostText?: string;
lunchSignText?: string;
}
/**
* 搜索条件
*/
export interface BcExportParam extends PageParam {
exportId?: number;
organizationName?: string;
organizationId?: number;
dayTime?: string;
week?: number;
status?: number;
userId?: number;
deliveryTime?: string;
createTimeStart?: string;
createTimeEnd?: string;
deliveryTimeStart?: string;
deliveryTimeEnd?: string;
}

View File

@@ -0,0 +1,88 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BCFood, BCFoodParam } from '@/api/apps/bc/food/model';
/**
* 分页查询计划
*/
export async function pageBCFood(params: BCFoodParam) {
const res = await request.get<ApiResult<PageResult<BCFood>>>(
'/apps/bc-food/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询计划列表
*/
export async function listBCFood(params?: BCFoodParam) {
const res = await request.get<ApiResult<BCFood[]>>('/apps/bc-food', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加计划
*/
export async function addBCFood(data: BCFood) {
const res = await request.post<ApiResult<unknown>>('/apps/bc-food', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改计划
*/
export async function updateBCFood(data: BCFood) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-food', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定计划
*/
export async function bindBCFood(data: BCFood) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-food/bind', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除计划
*/
export async function removeBCFood(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-food/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除计划
*/
export async function removeBatchBCFood(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-food/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,21 @@
import type { PageParam } from '@/api';
export interface BCFood {
temporaryId?: number;
userId?: number;
parentId?: number;
sortNumber?: number;
status?: number;
comments?: string;
expirationTime?: string;
createTime?: string;
tenantId?: number;
}
/**
* 搜索条件
*/
export interface BCFoodParam extends PageParam {
status?: number;
userId?: number;
}

View File

@@ -0,0 +1,88 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BCPlan, BCPlanParam } from '@/api/apps/bc/plan/model';
/**
* 分页查询计划
*/
export async function pageBCPlan(params: BCPlanParam) {
const res = await request.get<ApiResult<PageResult<BCPlan>>>(
'/apps/bc-plan/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询计划列表
*/
export async function listBCPlan(params?: BCPlanParam) {
const res = await request.get<ApiResult<BCPlan[]>>('/apps/bc-plan', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加计划
*/
export async function addBCPlan(data: BCPlan) {
const res = await request.post<ApiResult<unknown>>('/apps/bc-plan', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改计划
*/
export async function updateBCPlan(data: BCPlan) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-plan', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定计划
*/
export async function bindBCPlan(data: BCPlan) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-plan/bind', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除计划
*/
export async function removeBCPlan(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-plan/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除计划
*/
export async function removeBatchBCPlan(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/apps/bc-plan/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,28 @@
import type { PageParam } from '@/api';
export interface BCPlan {
bcPlanId?: number;
dayTime?: any;
oldTime?: string;
type?: string;
userId?: number;
goodsIds?: any;
status?: number;
period?: string;
comments?: string;
createTime?: string;
tenantId?: number;
isRepeat?: number;
}
/**
* 搜索条件
*/
export interface BCPlanParam extends PageParam {
bcPlanId?: number;
dayTime?: string;
week?: number;
status?: number;
userId?: number;
oldTime?: string;
}

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type {
BCTemporary,
BCTemporaryParam
} from '@/api/apps/bc/temporary/model';
/**
* 分页查询设备
*/
export async function pageBCTemporary(params: BCTemporaryParam) {
const res = await request.get<ApiResult<PageResult<BCTemporary>>>(
'/apps/bc-temporary/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设备列表
*/
export async function listBCTemporary(params?: BCTemporaryParam) {
const res = await request.get<ApiResult<BCTemporary[]>>(
'/apps/bc-temporary',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设备
*/
export async function addBCTemporary(data: BCTemporary) {
const res = await request.post<ApiResult<unknown>>(
'/apps/bc-temporary',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设备
*/
export async function updateBCTemporary(data: BCTemporary) {
const res = await request.put<ApiResult<unknown>>('/apps/bc-temporary', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 绑定设备
*/
export async function bindBCTemporary(data: BCTemporary) {
const res = await request.put<ApiResult<unknown>>(
'/apps/bc-temporary/bind',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设备
*/
export async function removeBCTemporary(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/apps/bc-temporary/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设备
*/
export async function removeBatchBCTemporary(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/apps/bc-temporary/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,25 @@
import type { PageParam } from '@/api';
/**
* 代理报餐
*/
export interface BCTemporary {
temporaryId?: number;
userId?: number;
parentId?: number;
sortNumber?: number;
applyStatus?: number;
status?: number;
comments?: string;
expirationTime?: string;
createTime?: string;
tenantId?: number;
}
/**
* 订单搜索条件
*/
export interface BCTemporaryParam extends PageParam {
status?: number;
userId?: number;
}

View File

@@ -13,6 +13,7 @@ export interface Ad {
path?: string; path?: string;
images?: string; images?: string;
userId?: number; userId?: number;
merchantId?: number;
sortNumber?: number; sortNumber?: number;
comments?: string; comments?: string;
status?: number; status?: number;
@@ -29,6 +30,7 @@ export interface AdParam extends PageParam {
adId?: string; adId?: string;
name?: number; name?: number;
type?: number; type?: number;
merchantId?: number;
adType?: string; adType?: string;
userId?: number; userId?: number;
} }

View File

@@ -1,7 +1,8 @@
import request from '@/utils/request'; import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api'; import type { ApiResult, PageResult } from '@/api';
import type { CmsArticle, CmsArticleParam } from './model'; import type { CmsArticle, CmsArticleParam } from './model';
import { SERVER_API_URL } from '@/config/setting'; import { MODULES_API_URL, SERVER_API_URL } from "@/config/setting";
import type { ArticleParam } from "@/api/cms/article/model";
/** /**
* 分页查询文章 * 分页查询文章
@@ -104,3 +105,13 @@ export async function getCmsArticle(id: number) {
} }
return Promise.reject(new Error(res.data.message)); return Promise.reject(new Error(res.data.message));
} }
export async function getCount(params: ArticleParam) {
const res = await request.get(SERVER_API_URL + '/cms/cms-article/data', {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request'; import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api'; import type { ApiResult, PageResult } from '@/api';
import type { CmsArticleCategory, CmsArticleCategoryParam } from './model'; import type { CmsArticleCategory, CmsArticleCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting'; import { SERVER_API_URL } from '@/config/setting';
/** /**
* 分页查询文章分类表 * 分页查询文章分类表
*/ */
export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) { export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>( const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>(
MODULES_API_URL + '/cms/cms-article-category/page', SERVER_API_URL + '/cms/cms-article-category/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
*/ */
export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) { export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<CmsArticleCategory[]>>( const res = await request.get<ApiResult<CmsArticleCategory[]>>(
MODULES_API_URL + '/cms/cms-article-category', SERVER_API_URL + '/cms/cms-article-category',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
*/ */
export async function addCmsArticleCategory(data: CmsArticleCategory) { export async function addCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category', SERVER_API_URL + '/cms/cms-article-category',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addCmsArticleCategory(data: CmsArticleCategory) {
*/ */
export async function updateCmsArticleCategory(data: CmsArticleCategory) { export async function updateCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category', SERVER_API_URL + '/cms/cms-article-category',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateCmsArticleCategory(data: CmsArticleCategory) {
*/ */
export async function removeCmsArticleCategory(id?: number) { export async function removeCmsArticleCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/' + id SERVER_API_URL + '/cms/cms-article-category/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -79,9 +79,11 @@ export async function removeCmsArticleCategory(id?: number) {
/** /**
* 批量删除文章分类表 * 批量删除文章分类表
*/ */
export async function removeBatchCmsArticleCategory(data: (number | undefined)[]) { export async function removeBatchCmsArticleCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/batch', SERVER_API_URL + '/cms/cms-article-category/batch',
{ {
data data
} }
@@ -97,7 +99,7 @@ export async function removeBatchCmsArticleCategory(data: (number | undefined)[]
*/ */
export async function getCmsArticleCategory(id: number) { export async function getCmsArticleCategory(id: number) {
const res = await request.get<ApiResult<CmsArticleCategory>>( const res = await request.get<ApiResult<CmsArticleCategory>>(
MODULES_API_URL + '/cms/cms-article-category/' + id SERVER_API_URL + '/cms/cms-article-category/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -46,6 +46,8 @@ export interface CmsArticleCategory {
createTime?: string; createTime?: string;
// 修改时间 // 修改时间
updateTime?: string; updateTime?: string;
value?: number;
label?: string;
} }
/** /**

View File

@@ -4,46 +4,51 @@ import type { PageParam } from '@/api';
* 页面管理记录表 * 页面管理记录表
*/ */
export interface CmsDesign { export interface CmsDesign {
// ID
pageId?: number; pageId?: number;
// 页面标题
name?: string; name?: string;
// 所属栏目ID
categoryId?: number;
// 页面关键词
keywords?: string; keywords?: string;
// 页面描述
description?: string; description?: string;
// 缩列图 path?: string;
component?: string;
photo?: string; photo?: string;
// 购买链接 content?: string;
buyUrl?: string; // 类型
type?: string;
categoryId?: number;
// 宽
width?: string;
// 高
height?: string;
// 页面样式 // 页面样式
style?: string; style?: string;
// 页面内容 // 附件
content?: string; images?: string;
// 是否开启布局
showLayout?: number;
// 页面布局
layout?: string;
// 上级id, 0是顶级
parentId?: number;
// 用户ID // 用户ID
userId?: number; userId?: number;
// 设为首页 // 设为首页
home?: number; home?: number;
// 排序(数字越小越靠前) // 排序
sortNumber?: number; sortNumber?: number;
// 备注 // 备注
comments?: string; comments?: string;
// 状态, 0正常, 1冻结 // 状态
status?: number; status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间 // 创建时间
createTime?: string; createTime?: string;
// 更新时间
updateTime?: string;
// 页面布局
layout?: string;
backgroundColor?: string;
// 关联网站导航ID
navigationId?: number;
showLayout?: boolean;
btn?: any[];
showBanner?: boolean;
buyUrl?: string;
demoUrl?: string;
account?: string;
docUrl?: string;
} }
/** /**

View File

@@ -2,6 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api'; import type { ApiResult, PageResult } from '@/api';
import type { CmsNavigation, CmsNavigationParam } from './model'; import type { CmsNavigation, CmsNavigationParam } from './model';
import { SERVER_API_URL } from '@/config/setting'; import { SERVER_API_URL } from '@/config/setting';
import type { Navigation, NavigationParam } from '@/api/cms/navigation/model';
/** /**
* 分页查询网站导航记录表 * 分页查询网站导航记录表
@@ -35,6 +36,21 @@ export async function listCmsNavigation(params?: CmsNavigationParam) {
return Promise.reject(new Error(res.data.message)); return Promise.reject(new Error(res.data.message));
} }
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
SERVER_API_URL + '/cms/cms-navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/** /**
* 添加网站导航记录表 * 添加网站导航记录表
*/ */

View File

@@ -18,6 +18,7 @@ export interface CmsNavigation {
path?: string; path?: string;
// 菜单组件地址, 目录可为空 // 菜单组件地址, 目录可为空
component?: string; component?: string;
componentPath?: string;
// 打开位置 // 打开位置
target?: string; target?: string;
// 菜单图标 // 菜单图标

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request'; import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api'; import type { ApiResult, PageResult } from '@/api';
import type { CmsWebsite, CmsWebsiteParam } from './model'; import type { CmsWebsite, CmsWebsiteParam } from './model';
import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting'; import { SERVER_API_URL } from '@/config/setting';
/** /**
* 分页查询网站信息记录表 * 分页查询网站信息记录表

View File

@@ -93,5 +93,6 @@ export interface CmsWebsite {
*/ */
export interface CmsWebsiteParam extends PageParam { export interface CmsWebsiteParam extends PageParam {
websiteId?: number; websiteId?: number;
status?: number;
keywords?: string; keywords?: string;
} }

View File

@@ -35,6 +35,22 @@ export async function listNavigation(params?: NavigationParam) {
return Promise.reject(new Error(res.data.message)); return Promise.reject(new Error(res.data.message));
} }
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
MODULES_API_URL + '/cms/navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/** /**
* 添加导航 * 添加导航
*/ */

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopBrand, ShopBrandParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询品牌
*/
export async function pageShopBrand(params: ShopBrandParam) {
const res = await request.get<ApiResult<PageResult<ShopBrand>>>(
MODULES_API_URL + '/mall/shop-brand/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询品牌列表
*/
export async function listShopBrand(params?: ShopBrandParam) {
const res = await request.get<ApiResult<ShopBrand[]>>(
MODULES_API_URL + '/mall/shop-brand',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加品牌
*/
export async function addShopBrand(data: ShopBrand) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改品牌
*/
export async function updateShopBrand(data: ShopBrand) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除品牌
*/
export async function removeShopBrand(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除品牌
*/
export async function removeBatchShopBrand(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询品牌
*/
export async function getShopBrand(id: number) {
const res = await request.get<ApiResult<ShopBrand>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,31 @@
import type { PageParam } from '@/api';
/**
* 品牌
*/
export interface ShopBrand {
// ID
brandId?: number;
// 品牌名称
brandName?: string;
// 图标
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 品牌搜索条件
*/
export interface ShopBrandParam extends PageParam {
brandId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCart, ShopCartParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询购物车
*/
export async function pageShopCart(params: ShopCartParam) {
const res = await request.get<ApiResult<PageResult<ShopCart>>>(
MODULES_API_URL + '/mall/shop-cart/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询购物车列表
*/
export async function listShopCart(params?: ShopCartParam) {
const res = await request.get<ApiResult<ShopCart[]>>(
MODULES_API_URL + '/mall/shop-cart',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加购物车
*/
export async function addShopCart(data: ShopCart) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改购物车
*/
export async function updateShopCart(data: ShopCart) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除购物车
*/
export async function removeShopCart(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除购物车
*/
export async function removeBatchShopCart(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询购物车
*/
export async function getShopCart(id: number) {
const res = await request.get<ApiResult<ShopCart>>(
MODULES_API_URL + '/mall/shop-cart/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,53 @@
import type { PageParam } from '@/api';
/**
* 购物车
*/
export interface ShopCart {
// 购物车表ID
id?: string;
// 类型 0商城 1外卖
type?: number;
// 唯一标识
code?: string;
// 商品ID
goodsId?: string;
// 商品规格
spec?: string;
// 商品价格
price?: string;
// 商品数量
cartNum?: number;
// 单商品合计
totalPrice?: string;
// 0 = 未购买 1 = 已购买
isPay?: string;
// 是否为立即购买
isNew?: string;
// 拼团id
combinationId?: number;
// 秒杀产品ID
seckillId?: number;
// 砍价id
bargainId?: number;
// 是否选中
selected?: string;
// 商户ID
merchantId?: string;
// 用户ID
userId?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 购物车搜索条件
*/
export interface ShopCartParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCashier, ShopCashierParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询收银
*/
export async function pageShopCashier(params: ShopCashierParam) {
const res = await request.get<ApiResult<PageResult<ShopCashier>>>(
MODULES_API_URL + '/mall/shop-cashier/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询收银列表
*/
export async function listShopCashier(params?: ShopCashierParam) {
const res = await request.get<ApiResult<ShopCashier[]>>(
MODULES_API_URL + '/mall/shop-cashier',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加收银
*/
export async function addShopCashier(data: ShopCashier) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改收银
*/
export async function updateShopCashier(data: ShopCashier) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除收银
*/
export async function removeShopCashier(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除收银
*/
export async function removeBatchShopCashier(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询收银
*/
export async function getShopCashier(id: number) {
const res = await request.get<ApiResult<ShopCashier>>(
MODULES_API_URL + '/mall/shop-cashier/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,55 @@
import type { PageParam } from '@/api';
/**
* 收银
*/
export interface ShopCashier {
// 收银单ID
id?: string;
// 类型 0商城 1外卖
type?: number;
// 唯一标识
code?: string;
// 商品ID
goodsId?: string;
// 商品名称
name?: string;
// 商品规格
spec?: string;
// 商品价格
price?: string;
// 商品数量
cartNum?: number;
// 单商品合计
totalPrice?: string;
// 0 = 未购买 1 = 已购买
isPay?: string;
// 是否为立即购买
isNew?: string;
// 是否选中
selected?: string;
// 商户ID
merchantId?: string;
// 备注
comments?: string;
// 用户ID
userId?: string;
// 收银员ID
cashierId?: string;
// 分组取单
groupId?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 收银搜索条件
*/
export interface ShopCashierParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCount, ShopCountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商城销售统计表
*/
export async function pageShopCount(params: ShopCountParam) {
const res = await request.get<ApiResult<PageResult<ShopCount>>>(
MODULES_API_URL + '/mall/shop-count/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商城销售统计表列表
*/
export async function listShopCount(params?: ShopCountParam) {
const res = await request.get<ApiResult<ShopCount[]>>(
MODULES_API_URL + '/mall/shop-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 addShopCount(data: ShopCount) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商城销售统计表
*/
export async function updateShopCount(data: ShopCount) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商城销售统计表
*/
export async function removeShopCount(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商城销售统计表
*/
export async function removeBatchShopCount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商城销售统计表
*/
export async function getShopCount(id: number) {
const res = await request.get<ApiResult<ShopCount>>(
MODULES_API_URL + '/mall/shop-count/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,39 @@
import type { PageParam } from '@/api';
/**
* 商城销售统计表
*/
export interface ShopCount {
// ID
id?: number;
// 统计日期
dateTime?: string;
// 总销售额
totalPrice?: string;
// 今日销售额
todayPrice?: string;
// 总会员数
totalUsers?: string;
// 今日新增
todayUsers?: string;
// 总订单笔数
totalOrders?: string;
// 今日订单笔数
todayOrders?: string;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商城销售统计表搜索条件
*/
export interface ShopCountParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerApply(params: ShopDealerApplyParam) { export async function pageShopDealerApply(params: ShopDealerApplyParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerApply>>>( const res = await request.get<ApiResult<PageResult<ShopDealerApply>>>(
MODULES_API_URL + '/shop/shop-dealer-apply/page', MODULES_API_URL + '/mall/shop-dealer-apply/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerApply(params: ShopDealerApplyParam) {
*/ */
export async function listShopDealerApply(params?: ShopDealerApplyParam) { export async function listShopDealerApply(params?: ShopDealerApplyParam) {
const res = await request.get<ApiResult<ShopDealerApply[]>>( const res = await request.get<ApiResult<ShopDealerApply[]>>(
MODULES_API_URL + '/shop/shop-dealer-apply', MODULES_API_URL + '/mall/shop-dealer-apply',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerApply(params?: ShopDealerApplyParam) {
*/ */
export async function addShopDealerApply(data: ShopDealerApply) { export async function addShopDealerApply(data: ShopDealerApply) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-apply', MODULES_API_URL + '/mall/shop-dealer-apply',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerApply(data: ShopDealerApply) {
*/ */
export async function updateShopDealerApply(data: ShopDealerApply) { export async function updateShopDealerApply(data: ShopDealerApply) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-apply', MODULES_API_URL + '/mall/shop-dealer-apply',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerApply(data: ShopDealerApply) {
*/ */
export async function removeShopDealerApply(id?: number) { export async function removeShopDealerApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-apply/' + id MODULES_API_URL + '/mall/shop-dealer-apply/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerApply(id?: number) {
*/ */
export async function removeBatchShopDealerApply(data: (number | undefined)[]) { export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-apply/batch', MODULES_API_URL + '/mall/shop-dealer-apply/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
*/ */
export async function getShopDealerApply(id: number) { export async function getShopDealerApply(id: number) {
const res = await request.get<ApiResult<ShopDealerApply>>( const res = await request.get<ApiResult<ShopDealerApply>>(
MODULES_API_URL + '/shop/shop-dealer-apply/' + id MODULES_API_URL + '/mall/shop-dealer-apply/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerCapital(params: ShopDealerCapitalParam) { export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerCapital>>>( const res = await request.get<ApiResult<PageResult<ShopDealerCapital>>>(
MODULES_API_URL + '/shop/shop-dealer-capital/page', MODULES_API_URL + '/mall/shop-dealer-capital/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
*/ */
export async function listShopDealerCapital(params?: ShopDealerCapitalParam) { export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
const res = await request.get<ApiResult<ShopDealerCapital[]>>( const res = await request.get<ApiResult<ShopDealerCapital[]>>(
MODULES_API_URL + '/shop/shop-dealer-capital', MODULES_API_URL + '/mall/shop-dealer-capital',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
*/ */
export async function addShopDealerCapital(data: ShopDealerCapital) { export async function addShopDealerCapital(data: ShopDealerCapital) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-capital', MODULES_API_URL + '/mall/shop-dealer-capital',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerCapital(data: ShopDealerCapital) {
*/ */
export async function updateShopDealerCapital(data: ShopDealerCapital) { export async function updateShopDealerCapital(data: ShopDealerCapital) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-capital', MODULES_API_URL + '/mall/shop-dealer-capital',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerCapital(data: ShopDealerCapital) {
*/ */
export async function removeShopDealerCapital(id?: number) { export async function removeShopDealerCapital(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-capital/' + id MODULES_API_URL + '/mall/shop-dealer-capital/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerCapital(id?: number) {
*/ */
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) { export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-capital/batch', MODULES_API_URL + '/mall/shop-dealer-capital/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerCapital(data: (number | undefined)[])
*/ */
export async function getShopDealerCapital(id: number) { export async function getShopDealerCapital(id: number) {
const res = await request.get<ApiResult<ShopDealerCapital>>( const res = await request.get<ApiResult<ShopDealerCapital>>(
MODULES_API_URL + '/shop/shop-dealer-capital/' + id MODULES_API_URL + '/mall/shop-dealer-capital/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerOrder(params: ShopDealerOrderParam) { export async function pageShopDealerOrder(params: ShopDealerOrderParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerOrder>>>( const res = await request.get<ApiResult<PageResult<ShopDealerOrder>>>(
MODULES_API_URL + '/shop/shop-dealer-order/page', MODULES_API_URL + '/mall/shop-dealer-order/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerOrder(params: ShopDealerOrderParam) {
*/ */
export async function listShopDealerOrder(params?: ShopDealerOrderParam) { export async function listShopDealerOrder(params?: ShopDealerOrderParam) {
const res = await request.get<ApiResult<ShopDealerOrder[]>>( const res = await request.get<ApiResult<ShopDealerOrder[]>>(
MODULES_API_URL + '/shop/shop-dealer-order', MODULES_API_URL + '/mall/shop-dealer-order',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerOrder(params?: ShopDealerOrderParam) {
*/ */
export async function addShopDealerOrder(data: ShopDealerOrder) { export async function addShopDealerOrder(data: ShopDealerOrder) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-order', MODULES_API_URL + '/mall/shop-dealer-order',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerOrder(data: ShopDealerOrder) {
*/ */
export async function updateShopDealerOrder(data: ShopDealerOrder) { export async function updateShopDealerOrder(data: ShopDealerOrder) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-order', MODULES_API_URL + '/mall/shop-dealer-order',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerOrder(data: ShopDealerOrder) {
*/ */
export async function removeShopDealerOrder(id?: number) { export async function removeShopDealerOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-order/' + id MODULES_API_URL + '/mall/shop-dealer-order/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerOrder(id?: number) {
*/ */
export async function removeBatchShopDealerOrder(data: (number | undefined)[]) { export async function removeBatchShopDealerOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-order/batch', MODULES_API_URL + '/mall/shop-dealer-order/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerOrder(data: (number | undefined)[]) {
*/ */
export async function getShopDealerOrder(id: number) { export async function getShopDealerOrder(id: number) {
const res = await request.get<ApiResult<ShopDealerOrder>>( const res = await request.get<ApiResult<ShopDealerOrder>>(
MODULES_API_URL + '/shop/shop-dealer-order/' + id MODULES_API_URL + '/mall/shop-dealer-order/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerReferee(params: ShopDealerRefereeParam) { export async function pageShopDealerReferee(params: ShopDealerRefereeParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerReferee>>>( const res = await request.get<ApiResult<PageResult<ShopDealerReferee>>>(
MODULES_API_URL + '/shop/shop-dealer-referee/page', MODULES_API_URL + '/mall/shop-dealer-referee/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerReferee(params: ShopDealerRefereeParam) {
*/ */
export async function listShopDealerReferee(params?: ShopDealerRefereeParam) { export async function listShopDealerReferee(params?: ShopDealerRefereeParam) {
const res = await request.get<ApiResult<ShopDealerReferee[]>>( const res = await request.get<ApiResult<ShopDealerReferee[]>>(
MODULES_API_URL + '/shop/shop-dealer-referee', MODULES_API_URL + '/mall/shop-dealer-referee',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerReferee(params?: ShopDealerRefereeParam) {
*/ */
export async function addShopDealerReferee(data: ShopDealerReferee) { export async function addShopDealerReferee(data: ShopDealerReferee) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-referee', MODULES_API_URL + '/mall/shop-dealer-referee',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerReferee(data: ShopDealerReferee) {
*/ */
export async function updateShopDealerReferee(data: ShopDealerReferee) { export async function updateShopDealerReferee(data: ShopDealerReferee) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-referee', MODULES_API_URL + '/mall/shop-dealer-referee',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerReferee(data: ShopDealerReferee) {
*/ */
export async function removeShopDealerReferee(id?: number) { export async function removeShopDealerReferee(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-referee/' + id MODULES_API_URL + '/mall/shop-dealer-referee/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerReferee(id?: number) {
*/ */
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) { export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-referee/batch', MODULES_API_URL + '/mall/shop-dealer-referee/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerReferee(data: (number | undefined)[])
*/ */
export async function getShopDealerReferee(id: number) { export async function getShopDealerReferee(id: number) {
const res = await request.get<ApiResult<ShopDealerReferee>>( const res = await request.get<ApiResult<ShopDealerReferee>>(
MODULES_API_URL + '/shop/shop-dealer-referee/' + id MODULES_API_URL + '/mall/shop-dealer-referee/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerSetting(params: ShopDealerSettingParam) { export async function pageShopDealerSetting(params: ShopDealerSettingParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerSetting>>>( const res = await request.get<ApiResult<PageResult<ShopDealerSetting>>>(
MODULES_API_URL + '/shop/shop-dealer-setting/page', MODULES_API_URL + '/mall/shop-dealer-setting/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerSetting(params: ShopDealerSettingParam) {
*/ */
export async function listShopDealerSetting(params?: ShopDealerSettingParam) { export async function listShopDealerSetting(params?: ShopDealerSettingParam) {
const res = await request.get<ApiResult<ShopDealerSetting[]>>( const res = await request.get<ApiResult<ShopDealerSetting[]>>(
MODULES_API_URL + '/shop/shop-dealer-setting', MODULES_API_URL + '/mall/shop-dealer-setting',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerSetting(params?: ShopDealerSettingParam) {
*/ */
export async function addShopDealerSetting(data: ShopDealerSetting) { export async function addShopDealerSetting(data: ShopDealerSetting) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-setting', MODULES_API_URL + '/mall/shop-dealer-setting',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerSetting(data: ShopDealerSetting) {
*/ */
export async function updateShopDealerSetting(data: ShopDealerSetting) { export async function updateShopDealerSetting(data: ShopDealerSetting) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-setting', MODULES_API_URL + '/mall/shop-dealer-setting',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerSetting(data: ShopDealerSetting) {
*/ */
export async function removeShopDealerSetting(id?: number) { export async function removeShopDealerSetting(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-setting/' + id MODULES_API_URL + '/mall/shop-dealer-setting/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerSetting(id?: number) {
*/ */
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) { export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-setting/batch', MODULES_API_URL + '/mall/shop-dealer-setting/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerSetting(data: (number | undefined)[])
*/ */
export async function getShopDealerSetting(id: number) { export async function getShopDealerSetting(id: number) {
const res = await request.get<ApiResult<ShopDealerSetting>>( const res = await request.get<ApiResult<ShopDealerSetting>>(
MODULES_API_URL + '/shop/shop-dealer-setting/' + id MODULES_API_URL + '/mall/shop-dealer-setting/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerUser(params: ShopDealerUserParam) { export async function pageShopDealerUser(params: ShopDealerUserParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerUser>>>( const res = await request.get<ApiResult<PageResult<ShopDealerUser>>>(
MODULES_API_URL + '/shop/shop-dealer-user/page', MODULES_API_URL + '/mall/shop-dealer-user/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerUser(params: ShopDealerUserParam) {
*/ */
export async function listShopDealerUser(params?: ShopDealerUserParam) { export async function listShopDealerUser(params?: ShopDealerUserParam) {
const res = await request.get<ApiResult<ShopDealerUser[]>>( const res = await request.get<ApiResult<ShopDealerUser[]>>(
MODULES_API_URL + '/shop/shop-dealer-user', MODULES_API_URL + '/mall/shop-dealer-user',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerUser(params?: ShopDealerUserParam) {
*/ */
export async function addShopDealerUser(data: ShopDealerUser) { export async function addShopDealerUser(data: ShopDealerUser) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-user', MODULES_API_URL + '/mall/shop-dealer-user',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerUser(data: ShopDealerUser) {
*/ */
export async function updateShopDealerUser(data: ShopDealerUser) { export async function updateShopDealerUser(data: ShopDealerUser) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-user', MODULES_API_URL + '/mall/shop-dealer-user',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerUser(data: ShopDealerUser) {
*/ */
export async function removeShopDealerUser(id?: number) { export async function removeShopDealerUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-user/' + id MODULES_API_URL + '/mall/shop-dealer-user/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerUser(id?: number) {
*/ */
export async function removeBatchShopDealerUser(data: (number | undefined)[]) { export async function removeBatchShopDealerUser(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-user/batch', MODULES_API_URL + '/mall/shop-dealer-user/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerUser(data: (number | undefined)[]) {
*/ */
export async function getShopDealerUser(id: number) { export async function getShopDealerUser(id: number) {
const res = await request.get<ApiResult<ShopDealerUser>>( const res = await request.get<ApiResult<ShopDealerUser>>(
MODULES_API_URL + '/shop/shop-dealer-user/' + id MODULES_API_URL + '/mall/shop-dealer-user/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) { export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerWithdraw>>>( const res = await request.get<ApiResult<PageResult<ShopDealerWithdraw>>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw/page', MODULES_API_URL + '/mall/shop-dealer-withdraw/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) {
*/ */
export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) { export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) {
const res = await request.get<ApiResult<ShopDealerWithdraw[]>>( const res = await request.get<ApiResult<ShopDealerWithdraw[]>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw', MODULES_API_URL + '/mall/shop-dealer-withdraw',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) {
*/ */
export async function addShopDealerWithdraw(data: ShopDealerWithdraw) { export async function addShopDealerWithdraw(data: ShopDealerWithdraw) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw', MODULES_API_URL + '/mall/shop-dealer-withdraw',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopDealerWithdraw(data: ShopDealerWithdraw) {
*/ */
export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) { export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw', MODULES_API_URL + '/mall/shop-dealer-withdraw',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) {
*/ */
export async function removeShopDealerWithdraw(id?: number) { export async function removeShopDealerWithdraw(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw/' + id MODULES_API_URL + '/mall/shop-dealer-withdraw/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopDealerWithdraw(id?: number) {
*/ */
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) { export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw/batch', MODULES_API_URL + '/mall/shop-dealer-withdraw/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]
*/ */
export async function getShopDealerWithdraw(id: number) { export async function getShopDealerWithdraw(id: number) {
const res = await request.get<ApiResult<ShopDealerWithdraw>>( const res = await request.get<ApiResult<ShopDealerWithdraw>>(
MODULES_API_URL + '/shop/shop-dealer-withdraw/' + id MODULES_API_URL + '/mall/shop-dealer-withdraw/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoods(params: ShopGoodsParam) { export async function pageShopGoods(params: ShopGoodsParam) {
const res = await request.get<ApiResult<PageResult<ShopGoods>>>( const res = await request.get<ApiResult<PageResult<ShopGoods>>>(
MODULES_API_URL + '/shop/shop-goods/page', MODULES_API_URL + '/mall/shop-goods/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoods(params: ShopGoodsParam) {
*/ */
export async function listShopGoods(params?: ShopGoodsParam) { export async function listShopGoods(params?: ShopGoodsParam) {
const res = await request.get<ApiResult<ShopGoods[]>>( const res = await request.get<ApiResult<ShopGoods[]>>(
MODULES_API_URL + '/shop/shop-goods', MODULES_API_URL + '/mall/shop-goods',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoods(params?: ShopGoodsParam) {
*/ */
export async function addShopGoods(data: ShopGoods) { export async function addShopGoods(data: ShopGoods) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods', MODULES_API_URL + '/mall/shop-goods',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoods(data: ShopGoods) {
*/ */
export async function updateShopGoods(data: ShopGoods) { export async function updateShopGoods(data: ShopGoods) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods', MODULES_API_URL + '/mall/shop-goods',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoods(data: ShopGoods) {
*/ */
export async function removeShopGoods(id?: number) { export async function removeShopGoods(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods/' + id MODULES_API_URL + '/mall/shop-goods/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoods(id?: number) {
*/ */
export async function removeBatchShopGoods(data: (number | undefined)[]) { export async function removeBatchShopGoods(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods/batch', MODULES_API_URL + '/mall/shop-goods/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoods(data: (number | undefined)[]) {
*/ */
export async function getShopGoods(id: number) { export async function getShopGoods(id: number) {
const res = await request.get<ApiResult<ShopGoods>>( const res = await request.get<ApiResult<ShopGoods>>(
MODULES_API_URL + '/shop/shop-goods/' + id MODULES_API_URL + '/mall/shop-goods/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsCategory(params: ShopGoodsCategoryParam) { export async function pageShopGoodsCategory(params: ShopGoodsCategoryParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsCategory>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsCategory>>>(
MODULES_API_URL + '/shop/shop-goods-category/page', MODULES_API_URL + '/mall/shop-goods-category/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsCategory(params: ShopGoodsCategoryParam) {
*/ */
export async function listShopGoodsCategory(params?: ShopGoodsCategoryParam) { export async function listShopGoodsCategory(params?: ShopGoodsCategoryParam) {
const res = await request.get<ApiResult<ShopGoodsCategory[]>>( const res = await request.get<ApiResult<ShopGoodsCategory[]>>(
MODULES_API_URL + '/shop/shop-goods-category', MODULES_API_URL + '/mall/shop-goods-category',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsCategory(params?: ShopGoodsCategoryParam) {
*/ */
export async function addShopGoodsCategory(data: ShopGoodsCategory) { export async function addShopGoodsCategory(data: ShopGoodsCategory) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-category', MODULES_API_URL + '/mall/shop-goods-category',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsCategory(data: ShopGoodsCategory) {
*/ */
export async function updateShopGoodsCategory(data: ShopGoodsCategory) { export async function updateShopGoodsCategory(data: ShopGoodsCategory) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-category', MODULES_API_URL + '/mall/shop-goods-category',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsCategory(data: ShopGoodsCategory) {
*/ */
export async function removeShopGoodsCategory(id?: number) { export async function removeShopGoodsCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-category/' + id MODULES_API_URL + '/mall/shop-goods-category/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsCategory(id?: number) {
*/ */
export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) { export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-category/batch', MODULES_API_URL + '/mall/shop-goods-category/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsCategory(data: (number | undefined)[])
*/ */
export async function getShopGoodsCategory(id: number) { export async function getShopGoodsCategory(id: number) {
const res = await request.get<ApiResult<ShopGoodsCategory>>( const res = await request.get<ApiResult<ShopGoodsCategory>>(
MODULES_API_URL + '/shop/shop-goods-category/' + id MODULES_API_URL + '/mall/shop-goods-category/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsComment(params: ShopGoodsCommentParam) { export async function pageShopGoodsComment(params: ShopGoodsCommentParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsComment>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsComment>>>(
MODULES_API_URL + '/shop/shop-goods-comment/page', MODULES_API_URL + '/mall/shop-goods-comment/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsComment(params: ShopGoodsCommentParam) {
*/ */
export async function listShopGoodsComment(params?: ShopGoodsCommentParam) { export async function listShopGoodsComment(params?: ShopGoodsCommentParam) {
const res = await request.get<ApiResult<ShopGoodsComment[]>>( const res = await request.get<ApiResult<ShopGoodsComment[]>>(
MODULES_API_URL + '/shop/shop-goods-comment', MODULES_API_URL + '/mall/shop-goods-comment',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsComment(params?: ShopGoodsCommentParam) {
*/ */
export async function addShopGoodsComment(data: ShopGoodsComment) { export async function addShopGoodsComment(data: ShopGoodsComment) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-comment', MODULES_API_URL + '/mall/shop-goods-comment',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsComment(data: ShopGoodsComment) {
*/ */
export async function updateShopGoodsComment(data: ShopGoodsComment) { export async function updateShopGoodsComment(data: ShopGoodsComment) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-comment', MODULES_API_URL + '/mall/shop-goods-comment',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsComment(data: ShopGoodsComment) {
*/ */
export async function removeShopGoodsComment(id?: number) { export async function removeShopGoodsComment(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-comment/' + id MODULES_API_URL + '/mall/shop-goods-comment/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsComment(id?: number) {
*/ */
export async function removeBatchShopGoodsComment(data: (number | undefined)[]) { export async function removeBatchShopGoodsComment(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-comment/batch', MODULES_API_URL + '/mall/shop-goods-comment/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsComment(data: (number | undefined)[])
*/ */
export async function getShopGoodsComment(id: number) { export async function getShopGoodsComment(id: number) {
const res = await request.get<ApiResult<ShopGoodsComment>>( const res = await request.get<ApiResult<ShopGoodsComment>>(
MODULES_API_URL + '/shop/shop-goods-comment/' + id MODULES_API_URL + '/mall/shop-goods-comment/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsCoupon(params: ShopGoodsCouponParam) { export async function pageShopGoodsCoupon(params: ShopGoodsCouponParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsCoupon>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsCoupon>>>(
MODULES_API_URL + '/shop/shop-goods-coupon/page', MODULES_API_URL + '/mall/shop-goods-coupon/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsCoupon(params: ShopGoodsCouponParam) {
*/ */
export async function listShopGoodsCoupon(params?: ShopGoodsCouponParam) { export async function listShopGoodsCoupon(params?: ShopGoodsCouponParam) {
const res = await request.get<ApiResult<ShopGoodsCoupon[]>>( const res = await request.get<ApiResult<ShopGoodsCoupon[]>>(
MODULES_API_URL + '/shop/shop-goods-coupon', MODULES_API_URL + '/mall/shop-goods-coupon',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsCoupon(params?: ShopGoodsCouponParam) {
*/ */
export async function addShopGoodsCoupon(data: ShopGoodsCoupon) { export async function addShopGoodsCoupon(data: ShopGoodsCoupon) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-coupon', MODULES_API_URL + '/mall/shop-goods-coupon',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsCoupon(data: ShopGoodsCoupon) {
*/ */
export async function updateShopGoodsCoupon(data: ShopGoodsCoupon) { export async function updateShopGoodsCoupon(data: ShopGoodsCoupon) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-coupon', MODULES_API_URL + '/mall/shop-goods-coupon',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsCoupon(data: ShopGoodsCoupon) {
*/ */
export async function removeShopGoodsCoupon(id?: number) { export async function removeShopGoodsCoupon(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-coupon/' + id MODULES_API_URL + '/mall/shop-goods-coupon/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsCoupon(id?: number) {
*/ */
export async function removeBatchShopGoodsCoupon(data: (number | undefined)[]) { export async function removeBatchShopGoodsCoupon(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-coupon/batch', MODULES_API_URL + '/mall/shop-goods-coupon/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsCoupon(data: (number | undefined)[]) {
*/ */
export async function getShopGoodsCoupon(id: number) { export async function getShopGoodsCoupon(id: number) {
const res = await request.get<ApiResult<ShopGoodsCoupon>>( const res = await request.get<ApiResult<ShopGoodsCoupon>>(
MODULES_API_URL + '/shop/shop-goods-coupon/' + id MODULES_API_URL + '/mall/shop-goods-coupon/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsLog(params: ShopGoodsLogParam) { export async function pageShopGoodsLog(params: ShopGoodsLogParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsLog>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsLog>>>(
MODULES_API_URL + '/shop/shop-goods-log/page', MODULES_API_URL + '/mall/shop-goods-log/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsLog(params: ShopGoodsLogParam) {
*/ */
export async function listShopGoodsLog(params?: ShopGoodsLogParam) { export async function listShopGoodsLog(params?: ShopGoodsLogParam) {
const res = await request.get<ApiResult<ShopGoodsLog[]>>( const res = await request.get<ApiResult<ShopGoodsLog[]>>(
MODULES_API_URL + '/shop/shop-goods-log', MODULES_API_URL + '/mall/shop-goods-log',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsLog(params?: ShopGoodsLogParam) {
*/ */
export async function addShopGoodsLog(data: ShopGoodsLog) { export async function addShopGoodsLog(data: ShopGoodsLog) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-log', MODULES_API_URL + '/mall/shop-goods-log',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsLog(data: ShopGoodsLog) {
*/ */
export async function updateShopGoodsLog(data: ShopGoodsLog) { export async function updateShopGoodsLog(data: ShopGoodsLog) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-log', MODULES_API_URL + '/mall/shop-goods-log',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsLog(data: ShopGoodsLog) {
*/ */
export async function removeShopGoodsLog(id?: number) { export async function removeShopGoodsLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-log/' + id MODULES_API_URL + '/mall/shop-goods-log/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsLog(id?: number) {
*/ */
export async function removeBatchShopGoodsLog(data: (number | undefined)[]) { export async function removeBatchShopGoodsLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-log/batch', MODULES_API_URL + '/mall/shop-goods-log/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsLog(data: (number | undefined)[]) {
*/ */
export async function getShopGoodsLog(id: number) { export async function getShopGoodsLog(id: number) {
const res = await request.get<ApiResult<ShopGoodsLog>>( const res = await request.get<ApiResult<ShopGoodsLog>>(
MODULES_API_URL + '/shop/shop-goods-log/' + id MODULES_API_URL + '/mall/shop-goods-log/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsRelation(params: ShopGoodsRelationParam) { export async function pageShopGoodsRelation(params: ShopGoodsRelationParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsRelation>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsRelation>>>(
MODULES_API_URL + '/shop/shop-goods-relation/page', MODULES_API_URL + '/mall/shop-goods-relation/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsRelation(params: ShopGoodsRelationParam) {
*/ */
export async function listShopGoodsRelation(params?: ShopGoodsRelationParam) { export async function listShopGoodsRelation(params?: ShopGoodsRelationParam) {
const res = await request.get<ApiResult<ShopGoodsRelation[]>>( const res = await request.get<ApiResult<ShopGoodsRelation[]>>(
MODULES_API_URL + '/shop/shop-goods-relation', MODULES_API_URL + '/mall/shop-goods-relation',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsRelation(params?: ShopGoodsRelationParam) {
*/ */
export async function addShopGoodsRelation(data: ShopGoodsRelation) { export async function addShopGoodsRelation(data: ShopGoodsRelation) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-relation', MODULES_API_URL + '/mall/shop-goods-relation',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsRelation(data: ShopGoodsRelation) {
*/ */
export async function updateShopGoodsRelation(data: ShopGoodsRelation) { export async function updateShopGoodsRelation(data: ShopGoodsRelation) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-relation', MODULES_API_URL + '/mall/shop-goods-relation',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsRelation(data: ShopGoodsRelation) {
*/ */
export async function removeShopGoodsRelation(id?: number) { export async function removeShopGoodsRelation(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-relation/' + id MODULES_API_URL + '/mall/shop-goods-relation/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsRelation(id?: number) {
*/ */
export async function removeBatchShopGoodsRelation(data: (number | undefined)[]) { export async function removeBatchShopGoodsRelation(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-relation/batch', MODULES_API_URL + '/mall/shop-goods-relation/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsRelation(data: (number | undefined)[])
*/ */
export async function getShopGoodsRelation(id: number) { export async function getShopGoodsRelation(id: number) {
const res = await request.get<ApiResult<ShopGoodsRelation>>( const res = await request.get<ApiResult<ShopGoodsRelation>>(
MODULES_API_URL + '/shop/shop-goods-relation/' + id MODULES_API_URL + '/mall/shop-goods-relation/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsSku(params: ShopGoodsSkuParam) { export async function pageShopGoodsSku(params: ShopGoodsSkuParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsSku>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsSku>>>(
MODULES_API_URL + '/shop/shop-goods-sku/page', MODULES_API_URL + '/mall/shop-goods-sku/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsSku(params: ShopGoodsSkuParam) {
*/ */
export async function listShopGoodsSku(params?: ShopGoodsSkuParam) { export async function listShopGoodsSku(params?: ShopGoodsSkuParam) {
const res = await request.get<ApiResult<ShopGoodsSku[]>>( const res = await request.get<ApiResult<ShopGoodsSku[]>>(
MODULES_API_URL + '/shop/shop-goods-sku', MODULES_API_URL + '/mall/shop-goods-sku',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsSku(params?: ShopGoodsSkuParam) {
*/ */
export async function addShopGoodsSku(data: ShopGoodsSku) { export async function addShopGoodsSku(data: ShopGoodsSku) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-sku', MODULES_API_URL + '/mall/shop-goods-sku',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsSku(data: ShopGoodsSku) {
*/ */
export async function updateShopGoodsSku(data: ShopGoodsSku) { export async function updateShopGoodsSku(data: ShopGoodsSku) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-sku', MODULES_API_URL + '/mall/shop-goods-sku',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsSku(data: ShopGoodsSku) {
*/ */
export async function removeShopGoodsSku(id?: number) { export async function removeShopGoodsSku(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-sku/' + id MODULES_API_URL + '/mall/shop-goods-sku/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsSku(id?: number) {
*/ */
export async function removeBatchShopGoodsSku(data: (number | undefined)[]) { export async function removeBatchShopGoodsSku(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-sku/batch', MODULES_API_URL + '/mall/shop-goods-sku/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsSku(data: (number | undefined)[]) {
*/ */
export async function getShopGoodsSku(id: number) { export async function getShopGoodsSku(id: number) {
const res = await request.get<ApiResult<ShopGoodsSku>>( const res = await request.get<ApiResult<ShopGoodsSku>>(
MODULES_API_URL + '/shop/shop-goods-sku/' + id MODULES_API_URL + '/mall/shop-goods-sku/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopGoodsSpec(params: ShopGoodsSpecParam) { export async function pageShopGoodsSpec(params: ShopGoodsSpecParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsSpec>>>( const res = await request.get<ApiResult<PageResult<ShopGoodsSpec>>>(
MODULES_API_URL + '/shop/shop-goods-spec/page', MODULES_API_URL + '/mall/shop-goods-spec/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopGoodsSpec(params: ShopGoodsSpecParam) {
*/ */
export async function listShopGoodsSpec(params?: ShopGoodsSpecParam) { export async function listShopGoodsSpec(params?: ShopGoodsSpecParam) {
const res = await request.get<ApiResult<ShopGoodsSpec[]>>( const res = await request.get<ApiResult<ShopGoodsSpec[]>>(
MODULES_API_URL + '/shop/shop-goods-spec', MODULES_API_URL + '/mall/shop-goods-spec',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopGoodsSpec(params?: ShopGoodsSpecParam) {
*/ */
export async function addShopGoodsSpec(data: ShopGoodsSpec) { export async function addShopGoodsSpec(data: ShopGoodsSpec) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-spec', MODULES_API_URL + '/mall/shop-goods-spec',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopGoodsSpec(data: ShopGoodsSpec) {
*/ */
export async function updateShopGoodsSpec(data: ShopGoodsSpec) { export async function updateShopGoodsSpec(data: ShopGoodsSpec) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-spec', MODULES_API_URL + '/mall/shop-goods-spec',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopGoodsSpec(data: ShopGoodsSpec) {
*/ */
export async function removeShopGoodsSpec(id?: number) { export async function removeShopGoodsSpec(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-spec/' + id MODULES_API_URL + '/mall/shop-goods-spec/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopGoodsSpec(id?: number) {
*/ */
export async function removeBatchShopGoodsSpec(data: (number | undefined)[]) { export async function removeBatchShopGoodsSpec(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods-spec/batch', MODULES_API_URL + '/mall/shop-goods-spec/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopGoodsSpec(data: (number | undefined)[]) {
*/ */
export async function getShopGoodsSpec(id: number) { export async function getShopGoodsSpec(id: number) {
const res = await request.get<ApiResult<ShopGoodsSpec>>( const res = await request.get<ApiResult<ShopGoodsSpec>>(
MODULES_API_URL + '/shop/shop-goods-spec/' + id MODULES_API_URL + '/mall/shop-goods-spec/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopMerchant(params: ShopMerchantParam) { export async function pageShopMerchant(params: ShopMerchantParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>( const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
MODULES_API_URL + '/shop/shop-merchant/page', MODULES_API_URL + '/mall/shop-merchant/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopMerchant(params: ShopMerchantParam) {
*/ */
export async function listShopMerchant(params?: ShopMerchantParam) { export async function listShopMerchant(params?: ShopMerchantParam) {
const res = await request.get<ApiResult<ShopMerchant[]>>( const res = await request.get<ApiResult<ShopMerchant[]>>(
MODULES_API_URL + '/shop/shop-merchant', MODULES_API_URL + '/mall/shop-merchant',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopMerchant(params?: ShopMerchantParam) {
*/ */
export async function addShopMerchant(data: ShopMerchant) { export async function addShopMerchant(data: ShopMerchant) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant', MODULES_API_URL + '/mall/shop-merchant',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopMerchant(data: ShopMerchant) {
*/ */
export async function updateShopMerchant(data: ShopMerchant) { export async function updateShopMerchant(data: ShopMerchant) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant', MODULES_API_URL + '/mall/shop-merchant',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopMerchant(data: ShopMerchant) {
*/ */
export async function removeShopMerchant(id?: number) { export async function removeShopMerchant(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant/' + id MODULES_API_URL + '/mall/shop-merchant/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopMerchant(id?: number) {
*/ */
export async function removeBatchShopMerchant(data: (number | undefined)[]) { export async function removeBatchShopMerchant(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant/batch', MODULES_API_URL + '/mall/shop-merchant/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopMerchant(data: (number | undefined)[]) {
*/ */
export async function getShopMerchant(id: number) { export async function getShopMerchant(id: number) {
const res = await request.get<ApiResult<ShopMerchant>>( const res = await request.get<ApiResult<ShopMerchant>>(
MODULES_API_URL + '/shop/shop-merchant/' + id MODULES_API_URL + '/mall/shop-merchant/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -16,6 +16,8 @@ export interface ShopMerchant {
image?: string; image?: string;
// 商户手机号 // 商户手机号
phone?: string; phone?: string;
// 座机电话
tel?: string;
// 商户姓名 // 商户姓名
realName?: string; realName?: string;
// 店铺类型 // 店铺类型

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) { export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>( const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
MODULES_API_URL + '/shop/shop-merchant-account/page', MODULES_API_URL + '/mall/shop-merchant-account/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopMerchantAccount(params: ShopMerchantAccountParam)
*/ */
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) { export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) {
const res = await request.get<ApiResult<ShopMerchantAccount[]>>( const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
MODULES_API_URL + '/shop/shop-merchant-account', MODULES_API_URL + '/mall/shop-merchant-account',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopMerchantAccount(params?: ShopMerchantAccountParam)
*/ */
export async function addShopMerchantAccount(data: ShopMerchantAccount) { export async function addShopMerchantAccount(data: ShopMerchantAccount) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-account', MODULES_API_URL + '/mall/shop-merchant-account',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopMerchantAccount(data: ShopMerchantAccount) {
*/ */
export async function updateShopMerchantAccount(data: ShopMerchantAccount) { export async function updateShopMerchantAccount(data: ShopMerchantAccount) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-account', MODULES_API_URL + '/mall/shop-merchant-account',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopMerchantAccount(data: ShopMerchantAccount) {
*/ */
export async function removeShopMerchantAccount(id?: number) { export async function removeShopMerchantAccount(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-account/' + id MODULES_API_URL + '/mall/shop-merchant-account/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopMerchantAccount(id?: number) {
*/ */
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) { export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-account/batch', MODULES_API_URL + '/mall/shop-merchant-account/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopMerchantAccount(data: (number | undefined)[
*/ */
export async function getShopMerchantAccount(id: number) { export async function getShopMerchantAccount(id: number) {
const res = await request.get<ApiResult<ShopMerchantAccount>>( const res = await request.get<ApiResult<ShopMerchantAccount>>(
MODULES_API_URL + '/shop/shop-merchant-account/' + id MODULES_API_URL + '/mall/shop-merchant-account/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>( const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
MODULES_API_URL + '/shop/shop-merchant-apply/page', MODULES_API_URL + '/mall/shop-merchant-apply/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
*/ */
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) { export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<ShopMerchantApply[]>>( const res = await request.get<ApiResult<ShopMerchantApply[]>>(
MODULES_API_URL + '/shop/shop-merchant-apply', MODULES_API_URL + '/mall/shop-merchant-apply',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
*/ */
export async function addShopMerchantApply(data: ShopMerchantApply) { export async function addShopMerchantApply(data: ShopMerchantApply) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-apply', MODULES_API_URL + '/mall/shop-merchant-apply',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopMerchantApply(data: ShopMerchantApply) {
*/ */
export async function updateShopMerchantApply(data: ShopMerchantApply) { export async function updateShopMerchantApply(data: ShopMerchantApply) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-apply', MODULES_API_URL + '/mall/shop-merchant-apply',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopMerchantApply(data: ShopMerchantApply) {
*/ */
export async function removeShopMerchantApply(id?: number) { export async function removeShopMerchantApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-apply/' + id MODULES_API_URL + '/mall/shop-merchant-apply/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopMerchantApply(id?: number) {
*/ */
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) { export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-apply/batch', MODULES_API_URL + '/mall/shop-merchant-apply/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopMerchantApply(data: (number | undefined)[])
*/ */
export async function getShopMerchantApply(id: number) { export async function getShopMerchantApply(id: number) {
const res = await request.get<ApiResult<ShopMerchantApply>>( const res = await request.get<ApiResult<ShopMerchantApply>>(
MODULES_API_URL + '/shop/shop-merchant-apply/' + id MODULES_API_URL + '/mall/shop-merchant-apply/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopMerchantCount(params: ShopMerchantCountParam) { export async function pageShopMerchantCount(params: ShopMerchantCountParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantCount>>>( const res = await request.get<ApiResult<PageResult<ShopMerchantCount>>>(
MODULES_API_URL + '/shop/shop-merchant-count/page', MODULES_API_URL + '/mall/shop-merchant-count/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopMerchantCount(params: ShopMerchantCountParam) {
*/ */
export async function listShopMerchantCount(params?: ShopMerchantCountParam) { export async function listShopMerchantCount(params?: ShopMerchantCountParam) {
const res = await request.get<ApiResult<ShopMerchantCount[]>>( const res = await request.get<ApiResult<ShopMerchantCount[]>>(
MODULES_API_URL + '/shop/shop-merchant-count', MODULES_API_URL + '/mall/shop-merchant-count',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopMerchantCount(params?: ShopMerchantCountParam) {
*/ */
export async function addShopMerchantCount(data: ShopMerchantCount) { export async function addShopMerchantCount(data: ShopMerchantCount) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-count', MODULES_API_URL + '/mall/shop-merchant-count',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopMerchantCount(data: ShopMerchantCount) {
*/ */
export async function updateShopMerchantCount(data: ShopMerchantCount) { export async function updateShopMerchantCount(data: ShopMerchantCount) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-count', MODULES_API_URL + '/mall/shop-merchant-count',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopMerchantCount(data: ShopMerchantCount) {
*/ */
export async function removeShopMerchantCount(id?: number) { export async function removeShopMerchantCount(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-count/' + id MODULES_API_URL + '/mall/shop-merchant-count/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopMerchantCount(id?: number) {
*/ */
export async function removeBatchShopMerchantCount(data: (number | undefined)[]) { export async function removeBatchShopMerchantCount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-count/batch', MODULES_API_URL + '/mall/shop-merchant-count/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopMerchantCount(data: (number | undefined)[])
*/ */
export async function getShopMerchantCount(id: number) { export async function getShopMerchantCount(id: number) {
const res = await request.get<ApiResult<ShopMerchantCount>>( const res = await request.get<ApiResult<ShopMerchantCount>>(
MODULES_API_URL + '/shop/shop-merchant-count/' + id MODULES_API_URL + '/mall/shop-merchant-count/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopMerchantType(params: ShopMerchantTypeParam) { export async function pageShopMerchantType(params: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantType>>>( const res = await request.get<ApiResult<PageResult<ShopMerchantType>>>(
MODULES_API_URL + '/shop/shop-merchant-type/page', MODULES_API_URL + '/mall/shop-merchant-type/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopMerchantType(params: ShopMerchantTypeParam) {
*/ */
export async function listShopMerchantType(params?: ShopMerchantTypeParam) { export async function listShopMerchantType(params?: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<ShopMerchantType[]>>( const res = await request.get<ApiResult<ShopMerchantType[]>>(
MODULES_API_URL + '/shop/shop-merchant-type', MODULES_API_URL + '/mall/shop-merchant-type',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopMerchantType(params?: ShopMerchantTypeParam) {
*/ */
export async function addShopMerchantType(data: ShopMerchantType) { export async function addShopMerchantType(data: ShopMerchantType) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-type', MODULES_API_URL + '/mall/shop-merchant-type',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopMerchantType(data: ShopMerchantType) {
*/ */
export async function updateShopMerchantType(data: ShopMerchantType) { export async function updateShopMerchantType(data: ShopMerchantType) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-type', MODULES_API_URL + '/mall/shop-merchant-type',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopMerchantType(data: ShopMerchantType) {
*/ */
export async function removeShopMerchantType(id?: number) { export async function removeShopMerchantType(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-type/' + id MODULES_API_URL + '/mall/shop-merchant-type/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopMerchantType(id?: number) {
*/ */
export async function removeBatchShopMerchantType(data: (number | undefined)[]) { export async function removeBatchShopMerchantType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-merchant-type/batch', MODULES_API_URL + '/mall/shop-merchant-type/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopMerchantType(data: (number | undefined)[])
*/ */
export async function getShopMerchantType(id: number) { export async function getShopMerchantType(id: number) {
const res = await request.get<ApiResult<ShopMerchantType>>( const res = await request.get<ApiResult<ShopMerchantType>>(
MODULES_API_URL + '/shop/shop-merchant-type/' + id MODULES_API_URL + '/mall/shop-merchant-type/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopOrder(params: ShopOrderParam) { export async function pageShopOrder(params: ShopOrderParam) {
const res = await request.get<ApiResult<PageResult<ShopOrder>>>( const res = await request.get<ApiResult<PageResult<ShopOrder>>>(
MODULES_API_URL + '/shop/shop-order/page', MODULES_API_URL + '/mall/shop-order/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopOrder(params: ShopOrderParam) {
*/ */
export async function listShopOrder(params?: ShopOrderParam) { export async function listShopOrder(params?: ShopOrderParam) {
const res = await request.get<ApiResult<ShopOrder[]>>( const res = await request.get<ApiResult<ShopOrder[]>>(
MODULES_API_URL + '/shop/shop-order', MODULES_API_URL + '/mall/shop-order',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopOrder(params?: ShopOrderParam) {
*/ */
export async function addShopOrder(data: ShopOrder) { export async function addShopOrder(data: ShopOrder) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order', MODULES_API_URL + '/mall/shop-order',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopOrder(data: ShopOrder) {
*/ */
export async function updateShopOrder(data: ShopOrder) { export async function updateShopOrder(data: ShopOrder) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order', MODULES_API_URL + '/mall/shop-order',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopOrder(data: ShopOrder) {
*/ */
export async function removeShopOrder(id?: number) { export async function removeShopOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order/' + id MODULES_API_URL + '/mall/shop-order/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopOrder(id?: number) {
*/ */
export async function removeBatchShopOrder(data: (number | undefined)[]) { export async function removeBatchShopOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order/batch', MODULES_API_URL + '/mall/shop-order/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopOrder(data: (number | undefined)[]) {
*/ */
export async function getShopOrder(id: number) { export async function getShopOrder(id: number) {
const res = await request.get<ApiResult<ShopOrder>>( const res = await request.get<ApiResult<ShopOrder>>(
MODULES_API_URL + '/shop/shop-order/' + id MODULES_API_URL + '/mall/shop-order/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopOrderCartInfo(params: ShopOrderCartInfoParam) { export async function pageShopOrderCartInfo(params: ShopOrderCartInfoParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderCartInfo>>>( const res = await request.get<ApiResult<PageResult<ShopOrderCartInfo>>>(
MODULES_API_URL + '/shop/shop-order-cart-info/page', MODULES_API_URL + '/mall/shop-order-cart-info/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopOrderCartInfo(params: ShopOrderCartInfoParam) {
*/ */
export async function listShopOrderCartInfo(params?: ShopOrderCartInfoParam) { export async function listShopOrderCartInfo(params?: ShopOrderCartInfoParam) {
const res = await request.get<ApiResult<ShopOrderCartInfo[]>>( const res = await request.get<ApiResult<ShopOrderCartInfo[]>>(
MODULES_API_URL + '/shop/shop-order-cart-info', MODULES_API_URL + '/mall/shop-order-cart-info',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopOrderCartInfo(params?: ShopOrderCartInfoParam) {
*/ */
export async function addShopOrderCartInfo(data: ShopOrderCartInfo) { export async function addShopOrderCartInfo(data: ShopOrderCartInfo) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-cart-info', MODULES_API_URL + '/mall/shop-order-cart-info',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopOrderCartInfo(data: ShopOrderCartInfo) {
*/ */
export async function updateShopOrderCartInfo(data: ShopOrderCartInfo) { export async function updateShopOrderCartInfo(data: ShopOrderCartInfo) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-cart-info', MODULES_API_URL + '/mall/shop-order-cart-info',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopOrderCartInfo(data: ShopOrderCartInfo) {
*/ */
export async function removeShopOrderCartInfo(id?: number) { export async function removeShopOrderCartInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-cart-info/' + id MODULES_API_URL + '/mall/shop-order-cart-info/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopOrderCartInfo(id?: number) {
*/ */
export async function removeBatchShopOrderCartInfo(data: (number | undefined)[]) { export async function removeBatchShopOrderCartInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-cart-info/batch', MODULES_API_URL + '/mall/shop-order-cart-info/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopOrderCartInfo(data: (number | undefined)[])
*/ */
export async function getShopOrderCartInfo(id: number) { export async function getShopOrderCartInfo(id: number) {
const res = await request.get<ApiResult<ShopOrderCartInfo>>( const res = await request.get<ApiResult<ShopOrderCartInfo>>(
MODULES_API_URL + '/shop/shop-order-cart-info/' + id MODULES_API_URL + '/mall/shop-order-cart-info/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopOrderGoods(params: ShopOrderGoodsParam) { export async function pageShopOrderGoods(params: ShopOrderGoodsParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderGoods>>>( const res = await request.get<ApiResult<PageResult<ShopOrderGoods>>>(
MODULES_API_URL + '/shop/shop-order-goods/page', MODULES_API_URL + '/mall/shop-order-goods/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopOrderGoods(params: ShopOrderGoodsParam) {
*/ */
export async function listShopOrderGoods(params?: ShopOrderGoodsParam) { export async function listShopOrderGoods(params?: ShopOrderGoodsParam) {
const res = await request.get<ApiResult<ShopOrderGoods[]>>( const res = await request.get<ApiResult<ShopOrderGoods[]>>(
MODULES_API_URL + '/shop/shop-order-goods', MODULES_API_URL + '/mall/shop-order-goods',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopOrderGoods(params?: ShopOrderGoodsParam) {
*/ */
export async function addShopOrderGoods(data: ShopOrderGoods) { export async function addShopOrderGoods(data: ShopOrderGoods) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-goods', MODULES_API_URL + '/mall/shop-order-goods',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopOrderGoods(data: ShopOrderGoods) {
*/ */
export async function updateShopOrderGoods(data: ShopOrderGoods) { export async function updateShopOrderGoods(data: ShopOrderGoods) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-goods', MODULES_API_URL + '/mall/shop-order-goods',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopOrderGoods(data: ShopOrderGoods) {
*/ */
export async function removeShopOrderGoods(id?: number) { export async function removeShopOrderGoods(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-goods/' + id MODULES_API_URL + '/mall/shop-order-goods/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopOrderGoods(id?: number) {
*/ */
export async function removeBatchShopOrderGoods(data: (number | undefined)[]) { export async function removeBatchShopOrderGoods(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-goods/batch', MODULES_API_URL + '/mall/shop-order-goods/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopOrderGoods(data: (number | undefined)[]) {
*/ */
export async function getShopOrderGoods(id: number) { export async function getShopOrderGoods(id: number) {
const res = await request.get<ApiResult<ShopOrderGoods>>( const res = await request.get<ApiResult<ShopOrderGoods>>(
MODULES_API_URL + '/shop/shop-order-goods/' + id MODULES_API_URL + '/mall/shop-order-goods/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopOrderInfo(params: ShopOrderInfoParam) { export async function pageShopOrderInfo(params: ShopOrderInfoParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderInfo>>>( const res = await request.get<ApiResult<PageResult<ShopOrderInfo>>>(
MODULES_API_URL + '/shop/shop-order-info/page', MODULES_API_URL + '/mall/shop-order-info/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopOrderInfo(params: ShopOrderInfoParam) {
*/ */
export async function listShopOrderInfo(params?: ShopOrderInfoParam) { export async function listShopOrderInfo(params?: ShopOrderInfoParam) {
const res = await request.get<ApiResult<ShopOrderInfo[]>>( const res = await request.get<ApiResult<ShopOrderInfo[]>>(
MODULES_API_URL + '/shop/shop-order-info', MODULES_API_URL + '/mall/shop-order-info',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopOrderInfo(params?: ShopOrderInfoParam) {
*/ */
export async function addShopOrderInfo(data: ShopOrderInfo) { export async function addShopOrderInfo(data: ShopOrderInfo) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info', MODULES_API_URL + '/mall/shop-order-info',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopOrderInfo(data: ShopOrderInfo) {
*/ */
export async function updateShopOrderInfo(data: ShopOrderInfo) { export async function updateShopOrderInfo(data: ShopOrderInfo) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info', MODULES_API_URL + '/mall/shop-order-info',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopOrderInfo(data: ShopOrderInfo) {
*/ */
export async function removeShopOrderInfo(id?: number) { export async function removeShopOrderInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info/' + id MODULES_API_URL + '/mall/shop-order-info/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopOrderInfo(id?: number) {
*/ */
export async function removeBatchShopOrderInfo(data: (number | undefined)[]) { export async function removeBatchShopOrderInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info/batch', MODULES_API_URL + '/mall/shop-order-info/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopOrderInfo(data: (number | undefined)[]) {
*/ */
export async function getShopOrderInfo(id: number) { export async function getShopOrderInfo(id: number) {
const res = await request.get<ApiResult<ShopOrderInfo>>( const res = await request.get<ApiResult<ShopOrderInfo>>(
MODULES_API_URL + '/shop/shop-order-info/' + id MODULES_API_URL + '/mall/shop-order-info/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopOrderInfoLog(params: ShopOrderInfoLogParam) { export async function pageShopOrderInfoLog(params: ShopOrderInfoLogParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderInfoLog>>>( const res = await request.get<ApiResult<PageResult<ShopOrderInfoLog>>>(
MODULES_API_URL + '/shop/shop-order-info-log/page', MODULES_API_URL + '/mall/shop-order-info-log/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopOrderInfoLog(params: ShopOrderInfoLogParam) {
*/ */
export async function listShopOrderInfoLog(params?: ShopOrderInfoLogParam) { export async function listShopOrderInfoLog(params?: ShopOrderInfoLogParam) {
const res = await request.get<ApiResult<ShopOrderInfoLog[]>>( const res = await request.get<ApiResult<ShopOrderInfoLog[]>>(
MODULES_API_URL + '/shop/shop-order-info-log', MODULES_API_URL + '/mall/shop-order-info-log',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopOrderInfoLog(params?: ShopOrderInfoLogParam) {
*/ */
export async function addShopOrderInfoLog(data: ShopOrderInfoLog) { export async function addShopOrderInfoLog(data: ShopOrderInfoLog) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info-log', MODULES_API_URL + '/mall/shop-order-info-log',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopOrderInfoLog(data: ShopOrderInfoLog) {
*/ */
export async function updateShopOrderInfoLog(data: ShopOrderInfoLog) { export async function updateShopOrderInfoLog(data: ShopOrderInfoLog) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info-log', MODULES_API_URL + '/mall/shop-order-info-log',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopOrderInfoLog(data: ShopOrderInfoLog) {
*/ */
export async function removeShopOrderInfoLog(id?: number) { export async function removeShopOrderInfoLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info-log/' + id MODULES_API_URL + '/mall/shop-order-info-log/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopOrderInfoLog(id?: number) {
*/ */
export async function removeBatchShopOrderInfoLog(data: (number | undefined)[]) { export async function removeBatchShopOrderInfoLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-order-info-log/batch', MODULES_API_URL + '/mall/shop-order-info-log/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopOrderInfoLog(data: (number | undefined)[])
*/ */
export async function getShopOrderInfoLog(id: number) { export async function getShopOrderInfoLog(id: number) {
const res = await request.get<ApiResult<ShopOrderInfoLog>>( const res = await request.get<ApiResult<ShopOrderInfoLog>>(
MODULES_API_URL + '/shop/shop-order-info-log/' + id MODULES_API_URL + '/mall/shop-order-info-log/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopSpec(params: ShopSpecParam) { export async function pageShopSpec(params: ShopSpecParam) {
const res = await request.get<ApiResult<PageResult<ShopSpec>>>( const res = await request.get<ApiResult<PageResult<ShopSpec>>>(
MODULES_API_URL + '/shop/shop-spec/page', MODULES_API_URL + '/mall/shop-spec/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopSpec(params: ShopSpecParam) {
*/ */
export async function listShopSpec(params?: ShopSpecParam) { export async function listShopSpec(params?: ShopSpecParam) {
const res = await request.get<ApiResult<ShopSpec[]>>( const res = await request.get<ApiResult<ShopSpec[]>>(
MODULES_API_URL + '/shop/shop-spec', MODULES_API_URL + '/mall/shop-spec',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopSpec(params?: ShopSpecParam) {
*/ */
export async function addShopSpec(data: ShopSpec) { export async function addShopSpec(data: ShopSpec) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec', MODULES_API_URL + '/mall/shop-spec',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopSpec(data: ShopSpec) {
*/ */
export async function updateShopSpec(data: ShopSpec) { export async function updateShopSpec(data: ShopSpec) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec', MODULES_API_URL + '/mall/shop-spec',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopSpec(data: ShopSpec) {
*/ */
export async function removeShopSpec(id?: number) { export async function removeShopSpec(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec/' + id MODULES_API_URL + '/mall/shop-spec/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopSpec(id?: number) {
*/ */
export async function removeBatchShopSpec(data: (number | undefined)[]) { export async function removeBatchShopSpec(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec/batch', MODULES_API_URL + '/mall/shop-spec/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopSpec(data: (number | undefined)[]) {
*/ */
export async function getShopSpec(id: number) { export async function getShopSpec(id: number) {
const res = await request.get<ApiResult<ShopSpec>>( const res = await request.get<ApiResult<ShopSpec>>(
MODULES_API_URL + '/shop/shop-spec/' + id MODULES_API_URL + '/mall/shop-spec/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopSpecValue(params: ShopSpecValueParam) { export async function pageShopSpecValue(params: ShopSpecValueParam) {
const res = await request.get<ApiResult<PageResult<ShopSpecValue>>>( const res = await request.get<ApiResult<PageResult<ShopSpecValue>>>(
MODULES_API_URL + '/shop/shop-spec-value/page', MODULES_API_URL + '/mall/shop-spec-value/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopSpecValue(params: ShopSpecValueParam) {
*/ */
export async function listShopSpecValue(params?: ShopSpecValueParam) { export async function listShopSpecValue(params?: ShopSpecValueParam) {
const res = await request.get<ApiResult<ShopSpecValue[]>>( const res = await request.get<ApiResult<ShopSpecValue[]>>(
MODULES_API_URL + '/shop/shop-spec-value', MODULES_API_URL + '/mall/shop-spec-value',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopSpecValue(params?: ShopSpecValueParam) {
*/ */
export async function addShopSpecValue(data: ShopSpecValue) { export async function addShopSpecValue(data: ShopSpecValue) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec-value', MODULES_API_URL + '/mall/shop-spec-value',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopSpecValue(data: ShopSpecValue) {
*/ */
export async function updateShopSpecValue(data: ShopSpecValue) { export async function updateShopSpecValue(data: ShopSpecValue) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec-value', MODULES_API_URL + '/mall/shop-spec-value',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopSpecValue(data: ShopSpecValue) {
*/ */
export async function removeShopSpecValue(id?: number) { export async function removeShopSpecValue(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec-value/' + id MODULES_API_URL + '/mall/shop-spec-value/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopSpecValue(id?: number) {
*/ */
export async function removeBatchShopSpecValue(data: (number | undefined)[]) { export async function removeBatchShopSpecValue(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-spec-value/batch', MODULES_API_URL + '/mall/shop-spec-value/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopSpecValue(data: (number | undefined)[]) {
*/ */
export async function getShopSpecValue(id: number) { export async function getShopSpecValue(id: number) {
const res = await request.get<ApiResult<ShopSpecValue>>( const res = await request.get<ApiResult<ShopSpecValue>>(
MODULES_API_URL + '/shop/shop-spec-value/' + id MODULES_API_URL + '/mall/shop-spec-value/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopUserAddress(params: ShopUserAddressParam) { export async function pageShopUserAddress(params: ShopUserAddressParam) {
const res = await request.get<ApiResult<PageResult<ShopUserAddress>>>( const res = await request.get<ApiResult<PageResult<ShopUserAddress>>>(
MODULES_API_URL + '/shop/shop-user-address/page', MODULES_API_URL + '/mall/shop-user-address/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopUserAddress(params: ShopUserAddressParam) {
*/ */
export async function listShopUserAddress(params?: ShopUserAddressParam) { export async function listShopUserAddress(params?: ShopUserAddressParam) {
const res = await request.get<ApiResult<ShopUserAddress[]>>( const res = await request.get<ApiResult<ShopUserAddress[]>>(
MODULES_API_URL + '/shop/shop-user-address', MODULES_API_URL + '/mall/shop-user-address',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopUserAddress(params?: ShopUserAddressParam) {
*/ */
export async function addShopUserAddress(data: ShopUserAddress) { export async function addShopUserAddress(data: ShopUserAddress) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-address', MODULES_API_URL + '/mall/shop-user-address',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopUserAddress(data: ShopUserAddress) {
*/ */
export async function updateShopUserAddress(data: ShopUserAddress) { export async function updateShopUserAddress(data: ShopUserAddress) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-address', MODULES_API_URL + '/mall/shop-user-address',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopUserAddress(data: ShopUserAddress) {
*/ */
export async function removeShopUserAddress(id?: number) { export async function removeShopUserAddress(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-address/' + id MODULES_API_URL + '/mall/shop-user-address/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopUserAddress(id?: number) {
*/ */
export async function removeBatchShopUserAddress(data: (number | undefined)[]) { export async function removeBatchShopUserAddress(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-address/batch', MODULES_API_URL + '/mall/shop-user-address/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopUserAddress(data: (number | undefined)[]) {
*/ */
export async function getShopUserAddress(id: number) { export async function getShopUserAddress(id: number) {
const res = await request.get<ApiResult<ShopUserAddress>>( const res = await request.get<ApiResult<ShopUserAddress>>(
MODULES_API_URL + '/shop/shop-user-address/' + id MODULES_API_URL + '/mall/shop-user-address/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopUserCollection(params: ShopUserCollectionParam) { export async function pageShopUserCollection(params: ShopUserCollectionParam) {
const res = await request.get<ApiResult<PageResult<ShopUserCollection>>>( const res = await request.get<ApiResult<PageResult<ShopUserCollection>>>(
MODULES_API_URL + '/shop/shop-user-collection/page', MODULES_API_URL + '/mall/shop-user-collection/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopUserCollection(params: ShopUserCollectionParam) {
*/ */
export async function listShopUserCollection(params?: ShopUserCollectionParam) { export async function listShopUserCollection(params?: ShopUserCollectionParam) {
const res = await request.get<ApiResult<ShopUserCollection[]>>( const res = await request.get<ApiResult<ShopUserCollection[]>>(
MODULES_API_URL + '/shop/shop-user-collection', MODULES_API_URL + '/mall/shop-user-collection',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopUserCollection(params?: ShopUserCollectionParam) {
*/ */
export async function addShopUserCollection(data: ShopUserCollection) { export async function addShopUserCollection(data: ShopUserCollection) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-collection', MODULES_API_URL + '/mall/shop-user-collection',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopUserCollection(data: ShopUserCollection) {
*/ */
export async function updateShopUserCollection(data: ShopUserCollection) { export async function updateShopUserCollection(data: ShopUserCollection) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-collection', MODULES_API_URL + '/mall/shop-user-collection',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopUserCollection(data: ShopUserCollection) {
*/ */
export async function removeShopUserCollection(id?: number) { export async function removeShopUserCollection(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-collection/' + id MODULES_API_URL + '/mall/shop-user-collection/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopUserCollection(id?: number) {
*/ */
export async function removeBatchShopUserCollection(data: (number | undefined)[]) { export async function removeBatchShopUserCollection(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-user-collection/batch', MODULES_API_URL + '/mall/shop-user-collection/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopUserCollection(data: (number | undefined)[]
*/ */
export async function getShopUserCollection(id: number) { export async function getShopUserCollection(id: number) {
const res = await request.get<ApiResult<ShopUserCollection>>( const res = await request.get<ApiResult<ShopUserCollection>>(
MODULES_API_URL + '/shop/shop-user-collection/' + id MODULES_API_URL + '/mall/shop-user-collection/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopWechatDeposit(params: ShopWechatDepositParam) { export async function pageShopWechatDeposit(params: ShopWechatDepositParam) {
const res = await request.get<ApiResult<PageResult<ShopWechatDeposit>>>( const res = await request.get<ApiResult<PageResult<ShopWechatDeposit>>>(
MODULES_API_URL + '/shop/shop-wechat-deposit/page', MODULES_API_URL + '/mall/shop-wechat-deposit/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopWechatDeposit(params: ShopWechatDepositParam) {
*/ */
export async function listShopWechatDeposit(params?: ShopWechatDepositParam) { export async function listShopWechatDeposit(params?: ShopWechatDepositParam) {
const res = await request.get<ApiResult<ShopWechatDeposit[]>>( const res = await request.get<ApiResult<ShopWechatDeposit[]>>(
MODULES_API_URL + '/shop/shop-wechat-deposit', MODULES_API_URL + '/mall/shop-wechat-deposit',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopWechatDeposit(params?: ShopWechatDepositParam) {
*/ */
export async function addShopWechatDeposit(data: ShopWechatDeposit) { export async function addShopWechatDeposit(data: ShopWechatDeposit) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-wechat-deposit', MODULES_API_URL + '/mall/shop-wechat-deposit',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopWechatDeposit(data: ShopWechatDeposit) {
*/ */
export async function updateShopWechatDeposit(data: ShopWechatDeposit) { export async function updateShopWechatDeposit(data: ShopWechatDeposit) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-wechat-deposit', MODULES_API_URL + '/mall/shop-wechat-deposit',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopWechatDeposit(data: ShopWechatDeposit) {
*/ */
export async function removeShopWechatDeposit(id?: number) { export async function removeShopWechatDeposit(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-wechat-deposit/' + id MODULES_API_URL + '/mall/shop-wechat-deposit/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopWechatDeposit(id?: number) {
*/ */
export async function removeBatchShopWechatDeposit(data: (number | undefined)[]) { export async function removeBatchShopWechatDeposit(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-wechat-deposit/batch', MODULES_API_URL + '/mall/shop-wechat-deposit/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopWechatDeposit(data: (number | undefined)[])
*/ */
export async function getShopWechatDeposit(id: number) { export async function getShopWechatDeposit(id: number) {
const res = await request.get<ApiResult<ShopWechatDeposit>>( const res = await request.get<ApiResult<ShopWechatDeposit>>(
MODULES_API_URL + '/shop/shop-wechat-deposit/' + id MODULES_API_URL + '/mall/shop-wechat-deposit/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Express, ExpressParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询物流公司
*/
export async function pageExpress(params: ExpressParam) {
const res = await request.get<ApiResult<PageResult<Express>>>(
MODULES_API_URL + '/shop/express/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询物流公司列表
*/
export async function listExpress(params?: ExpressParam) {
const res = await request.get<ApiResult<Express[]>>(
MODULES_API_URL + '/shop/express',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加物流公司
*/
export async function addExpress(data: Express) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/express',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改物流公司
*/
export async function updateExpress(data: Express) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/express',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除物流公司
*/
export async function removeExpress(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/express/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除物流公司
*/
export async function removeBatchExpress(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/express/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询物流公司
*/
export async function getExpress(id: number) {
const res = await request.get<ApiResult<Express>>(
MODULES_API_URL + '/shop/express/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,31 @@
import type { PageParam } from '@/api';
/**
* 物流公司
*/
export interface Express {
// 物流公司ID
expressId?: number;
// 物流公司名称
expressName?: string;
// 物流公司编码 (快递100)
kuaidi100Code?: string;
// 物流公司编码 (快递鸟)
kdniaoCode?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 物流公司搜索条件
*/
export interface ExpressParam extends PageParam {
expressId?: number;
keywords?: string;
}

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopBrand(params: ShopBrandParam) { export async function pageShopBrand(params: ShopBrandParam) {
const res = await request.get<ApiResult<PageResult<ShopBrand>>>( const res = await request.get<ApiResult<PageResult<ShopBrand>>>(
MODULES_API_URL + '/shop/shop-brand/page', MODULES_API_URL + '/mall/shop-brand/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopBrand(params: ShopBrandParam) {
*/ */
export async function listShopBrand(params?: ShopBrandParam) { export async function listShopBrand(params?: ShopBrandParam) {
const res = await request.get<ApiResult<ShopBrand[]>>( const res = await request.get<ApiResult<ShopBrand[]>>(
MODULES_API_URL + '/shop/shop-brand', MODULES_API_URL + '/mall/shop-brand',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopBrand(params?: ShopBrandParam) {
*/ */
export async function addShopBrand(data: ShopBrand) { export async function addShopBrand(data: ShopBrand) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-brand', MODULES_API_URL + '/mall/shop-brand',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopBrand(data: ShopBrand) {
*/ */
export async function updateShopBrand(data: ShopBrand) { export async function updateShopBrand(data: ShopBrand) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-brand', MODULES_API_URL + '/mall/shop-brand',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopBrand(data: ShopBrand) {
*/ */
export async function removeShopBrand(id?: number) { export async function removeShopBrand(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-brand/' + id MODULES_API_URL + '/mall/shop-brand/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopBrand(id?: number) {
*/ */
export async function removeBatchShopBrand(data: (number | undefined)[]) { export async function removeBatchShopBrand(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-brand/batch', MODULES_API_URL + '/mall/shop-brand/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopBrand(data: (number | undefined)[]) {
*/ */
export async function getShopBrand(id: number) { export async function getShopBrand(id: number) {
const res = await request.get<ApiResult<ShopBrand>>( const res = await request.get<ApiResult<ShopBrand>>(
MODULES_API_URL + '/shop/shop-brand/' + id MODULES_API_URL + '/mall/shop-brand/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopCart(params: ShopCartParam) { export async function pageShopCart(params: ShopCartParam) {
const res = await request.get<ApiResult<PageResult<ShopCart>>>( const res = await request.get<ApiResult<PageResult<ShopCart>>>(
MODULES_API_URL + '/shop/shop-cart/page', MODULES_API_URL + '/mall/shop-cart/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopCart(params: ShopCartParam) {
*/ */
export async function listShopCart(params?: ShopCartParam) { export async function listShopCart(params?: ShopCartParam) {
const res = await request.get<ApiResult<ShopCart[]>>( const res = await request.get<ApiResult<ShopCart[]>>(
MODULES_API_URL + '/shop/shop-cart', MODULES_API_URL + '/mall/shop-cart',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopCart(params?: ShopCartParam) {
*/ */
export async function addShopCart(data: ShopCart) { export async function addShopCart(data: ShopCart) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cart', MODULES_API_URL + '/mall/shop-cart',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopCart(data: ShopCart) {
*/ */
export async function updateShopCart(data: ShopCart) { export async function updateShopCart(data: ShopCart) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cart', MODULES_API_URL + '/mall/shop-cart',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopCart(data: ShopCart) {
*/ */
export async function removeShopCart(id?: number) { export async function removeShopCart(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cart/' + id MODULES_API_URL + '/mall/shop-cart/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopCart(id?: number) {
*/ */
export async function removeBatchShopCart(data: (number | undefined)[]) { export async function removeBatchShopCart(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cart/batch', MODULES_API_URL + '/mall/shop-cart/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopCart(data: (number | undefined)[]) {
*/ */
export async function getShopCart(id: number) { export async function getShopCart(id: number) {
const res = await request.get<ApiResult<ShopCart>>( const res = await request.get<ApiResult<ShopCart>>(
MODULES_API_URL + '/shop/shop-cart/' + id MODULES_API_URL + '/mall/shop-cart/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopCashier(params: ShopCashierParam) { export async function pageShopCashier(params: ShopCashierParam) {
const res = await request.get<ApiResult<PageResult<ShopCashier>>>( const res = await request.get<ApiResult<PageResult<ShopCashier>>>(
MODULES_API_URL + '/shop/shop-cashier/page', MODULES_API_URL + '/mall/shop-cashier/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopCashier(params: ShopCashierParam) {
*/ */
export async function listShopCashier(params?: ShopCashierParam) { export async function listShopCashier(params?: ShopCashierParam) {
const res = await request.get<ApiResult<ShopCashier[]>>( const res = await request.get<ApiResult<ShopCashier[]>>(
MODULES_API_URL + '/shop/shop-cashier', MODULES_API_URL + '/mall/shop-cashier',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopCashier(params?: ShopCashierParam) {
*/ */
export async function addShopCashier(data: ShopCashier) { export async function addShopCashier(data: ShopCashier) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cashier', MODULES_API_URL + '/mall/shop-cashier',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopCashier(data: ShopCashier) {
*/ */
export async function updateShopCashier(data: ShopCashier) { export async function updateShopCashier(data: ShopCashier) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cashier', MODULES_API_URL + '/mall/shop-cashier',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopCashier(data: ShopCashier) {
*/ */
export async function removeShopCashier(id?: number) { export async function removeShopCashier(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cashier/' + id MODULES_API_URL + '/mall/shop-cashier/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopCashier(id?: number) {
*/ */
export async function removeBatchShopCashier(data: (number | undefined)[]) { export async function removeBatchShopCashier(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-cashier/batch', MODULES_API_URL + '/mall/shop-cashier/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopCashier(data: (number | undefined)[]) {
*/ */
export async function getShopCashier(id: number) { export async function getShopCashier(id: number) {
const res = await request.get<ApiResult<ShopCashier>>( const res = await request.get<ApiResult<ShopCashier>>(
MODULES_API_URL + '/shop/shop-cashier/' + id MODULES_API_URL + '/mall/shop-cashier/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/ */
export async function pageShopCount(params: ShopCountParam) { export async function pageShopCount(params: ShopCountParam) {
const res = await request.get<ApiResult<PageResult<ShopCount>>>( const res = await request.get<ApiResult<PageResult<ShopCount>>>(
MODULES_API_URL + '/shop/shop-count/page', MODULES_API_URL + '/mall/shop-count/page',
{ {
params params
} }
@@ -24,7 +24,7 @@ export async function pageShopCount(params: ShopCountParam) {
*/ */
export async function listShopCount(params?: ShopCountParam) { export async function listShopCount(params?: ShopCountParam) {
const res = await request.get<ApiResult<ShopCount[]>>( const res = await request.get<ApiResult<ShopCount[]>>(
MODULES_API_URL + '/shop/shop-count', MODULES_API_URL + '/mall/shop-count',
{ {
params params
} }
@@ -40,7 +40,7 @@ export async function listShopCount(params?: ShopCountParam) {
*/ */
export async function addShopCount(data: ShopCount) { export async function addShopCount(data: ShopCount) {
const res = await request.post<ApiResult<unknown>>( const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-count', MODULES_API_URL + '/mall/shop-count',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addShopCount(data: ShopCount) {
*/ */
export async function updateShopCount(data: ShopCount) { export async function updateShopCount(data: ShopCount) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-count', MODULES_API_URL + '/mall/shop-count',
data data
); );
if (res.data.code === 0) { if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateShopCount(data: ShopCount) {
*/ */
export async function removeShopCount(id?: number) { export async function removeShopCount(id?: number) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-count/' + id MODULES_API_URL + '/mall/shop-count/' + id
); );
if (res.data.code === 0) { if (res.data.code === 0) {
return res.data.message; return res.data.message;
@@ -81,7 +81,7 @@ export async function removeShopCount(id?: number) {
*/ */
export async function removeBatchShopCount(data: (number | undefined)[]) { export async function removeBatchShopCount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>( const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-count/batch', MODULES_API_URL + '/mall/shop-count/batch',
{ {
data data
} }
@@ -97,7 +97,7 @@ export async function removeBatchShopCount(data: (number | undefined)[]) {
*/ */
export async function getShopCount(id: number) { export async function getShopCount(id: number) {
const res = await request.get<ApiResult<ShopCount>>( const res = await request.get<ApiResult<ShopCount>>(
MODULES_API_URL + '/shop/shop-count/' + id MODULES_API_URL + '/mall/shop-count/' + id
); );
if (res.data.code === 0 && res.data.data) { if (res.data.code === 0 && res.data.data) {
return res.data.data; return res.data.data;

View File

@@ -195,6 +195,22 @@ export async function uploadOss(file: File) {
return Promise.reject(new Error(res.data.message)); return Promise.reject(new Error(res.data.message));
} }
/**
* 上传阿里云OSS
*/
export async function uploadOssAvatar(file: File, fileName: string) {
const formData = new FormData();
formData.append('file', file, fileName);
const res = await request.post<ApiResult<FileRecord>>(
SERVER_API_URL + '/oss/upload',
formData
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/** /**
* 上传阿里云OSS * 上传阿里云OSS
*/ */

View File

@@ -88,6 +88,7 @@ export interface User {
realName?: string; realName?: string;
companyName?: string; companyName?: string;
merchantName?: string; merchantName?: string;
merchantAvatar?: string;
gradeName?: string; gradeName?: string;
idCard?: string; idCard?: string;
comments?: string; comments?: string;

View File

@@ -0,0 +1,140 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:footer="null"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="gradeId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'companyLogo'">
<a-image
v-if="record.companyLogo"
:src="FILE_THUMBNAIL + record.companyLogo"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a>选择</a>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageExpress } from '@/api/shop/express';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { Express, ExpressParam } from '@/api/shop/express/model';
defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: Express | null;
}>();
const emit = defineEmits<{
(e: 'done', data: Express): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '物流公司',
dataIndex: 'expressName'
},
{
title: '物流编号',
dataIndex: 'kuaidi100Code'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
where = {};
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
return pageExpress({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: ExpressParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: Express) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>

Some files were not shown because too many files have changed in this diff Show More