211 changed files with 5224 additions and 1784 deletions
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type { ApiResult, PageResult } from '@/api'; |
|||
import type { CmsArticleComment, CmsArticleCommentParam } from './model'; |
|||
import { MODULES_API_URL } from '@/config/index'; |
|||
|
|||
/** |
|||
* 分页查询文章评论表 |
|||
*/ |
|||
export async function pageCmsArticleComment(params: CmsArticleCommentParam) { |
|||
const res = await request.get<ApiResult<PageResult<CmsArticleComment>>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询文章评论表列表 |
|||
*/ |
|||
export async function listCmsArticleComment(params?: CmsArticleCommentParam) { |
|||
const res = await request.get<ApiResult<CmsArticleComment[]>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加文章评论表 |
|||
*/ |
|||
export async function addCmsArticleComment(data: CmsArticleComment) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改文章评论表 |
|||
*/ |
|||
export async function updateCmsArticleComment(data: CmsArticleComment) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除文章评论表 |
|||
*/ |
|||
export async function removeCmsArticleComment(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除文章评论表 |
|||
*/ |
|||
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询文章评论表 |
|||
*/ |
|||
export async function getCmsArticleComment(id: number) { |
|||
const res = await request.get<ApiResult<CmsArticleComment>>( |
|||
MODULES_API_URL + '/cms/cms-article-comment/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,47 @@ |
|||
import type { PageParam } from '@/api'; |
|||
|
|||
/** |
|||
* 文章评论表 |
|||
*/ |
|||
export interface CmsArticleComment { |
|||
// 评价ID
|
|||
commentId?: number; |
|||
// 文章ID
|
|||
articleId?: number; |
|||
// 评分 (10好评 20中评 30差评)
|
|||
score?: number; |
|||
// 评价内容
|
|||
content?: string; |
|||
// 是否为图片评价
|
|||
isPicture?: number; |
|||
// 评论者ID
|
|||
userId?: number; |
|||
// 被评价者ID
|
|||
toUserId?: number; |
|||
// 回复的评论ID
|
|||
replyCommentId?: number; |
|||
// 回复者ID
|
|||
replyUserId?: number; |
|||
// 排序(数字越小越靠前)
|
|||
sortNumber?: number; |
|||
// 备注
|
|||
comments?: string; |
|||
// 状态, 0未读, 1已读
|
|||
status?: number; |
|||
// 是否删除, 0否, 1是
|
|||
deleted?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
// 修改时间
|
|||
updateTime?: string; |
|||
} |
|||
|
|||
/** |
|||
* 文章评论表搜索条件 |
|||
*/ |
|||
export interface CmsArticleCommentParam extends PageParam { |
|||
commentId?: number; |
|||
keywords?: string; |
|||
} |
@ -1,82 +1,105 @@ |
|||
import type { PageParam } from '@/api'; |
|||
import type {PageParam} from '@/api'; |
|||
import type {CmsProductParameter} from "~/api/cms/cmsProductParameter/model"; |
|||
import type {CmsProductUrl} from "~/api/cms/cmsProductUrl/model"; |
|||
|
|||
/** |
|||
* 产品 |
|||
*/ |
|||
export interface CmsProduct { |
|||
// 自增ID
|
|||
productId?: number; |
|||
// 类型 0软件产品 1实物商品 2虚拟商品
|
|||
type?: number; |
|||
// 产品编码
|
|||
code?: string; |
|||
// 产品标题
|
|||
title?: string; |
|||
// 封面图
|
|||
image?: string; |
|||
// 产品详情
|
|||
content?: string; |
|||
// 父级分类ID
|
|||
parentId?: number; |
|||
// 产品分类ID
|
|||
categoryId?: number; |
|||
// 产品规格 0单规格 1多规格
|
|||
specs?: number; |
|||
// 货架
|
|||
position?: string; |
|||
// 单位名称 (个)
|
|||
unitName?: string; |
|||
// 进货价格
|
|||
price?: number; |
|||
// 销售价格
|
|||
salePrice?: number; |
|||
// 库存计算方式(10下单减库存 20付款减库存)
|
|||
deductStockType?: number; |
|||
// 轮播图
|
|||
files?: any; |
|||
// 销量
|
|||
sales?: number; |
|||
// 库存
|
|||
stock?: number; |
|||
// 消费赚取积分
|
|||
gainIntegral?: string; |
|||
// 推荐
|
|||
recommend?: number; |
|||
// 商户ID
|
|||
merchantId?: number; |
|||
// 状态(0:未上架,1:上架)
|
|||
isShow?: string; |
|||
// 状态, 0上架 1待上架 2待审核 3审核不通过
|
|||
status?: number; |
|||
// 备注
|
|||
comments?: string; |
|||
// 排序号
|
|||
sortNumber?: number; |
|||
// 用户ID
|
|||
userId?: number; |
|||
// 是否删除, 0否, 1是
|
|||
deleted?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
// 修改时间
|
|||
updateTime?: string; |
|||
// 父级分类名称
|
|||
parentName?: string; |
|||
// 父级分类路径
|
|||
parentPath?: string; |
|||
// 分类名称
|
|||
categoryName?: string; |
|||
// 评分
|
|||
rate?: number; |
|||
// 自增ID
|
|||
productId?: number; |
|||
// 类型 0软件产品 1实物商品 2虚拟商品
|
|||
type?: number; |
|||
// 产品编码
|
|||
code?: string; |
|||
// 产品标题
|
|||
title?: string; |
|||
// 封面图
|
|||
image?: string; |
|||
// 产品详情
|
|||
content?: string; |
|||
// 父级分类ID
|
|||
parentId?: number; |
|||
// 产品分类ID
|
|||
categoryId?: number; |
|||
// 产品规格 0单规格 1多规格
|
|||
specs?: number; |
|||
// 货架
|
|||
position?: string; |
|||
// 单位名称 (个)
|
|||
unitName?: string; |
|||
// 进货价格
|
|||
price?: number; |
|||
// 销售价格
|
|||
salePrice?: number; |
|||
// 库存计算方式(10下单减库存 20付款减库存)
|
|||
deductStockType?: number; |
|||
// 轮播图
|
|||
files?: any; |
|||
// 销量
|
|||
sales?: number; |
|||
// 库存
|
|||
stock?: number; |
|||
// 安装次数
|
|||
install?: number; |
|||
// 消费赚取积分
|
|||
gainIntegral?: string; |
|||
// 计费方式
|
|||
durationMethod?: number; |
|||
// 推荐
|
|||
recommend?: number; |
|||
// 商户ID
|
|||
merchantId?: number; |
|||
merchantName: undefined, |
|||
merchantAvatar: undefined, |
|||
merchantComments: undefined, |
|||
// 状态(0:未上架,1:上架)
|
|||
isShow?: string; |
|||
// 状态, 0上架 1待上架 2待审核 3审核不通过
|
|||
status?: number; |
|||
// 备注
|
|||
comments?: string; |
|||
// 排序号
|
|||
sortNumber?: number; |
|||
// 用户ID
|
|||
userId?: number; |
|||
// 是否删除, 0否, 1是
|
|||
deleted?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
// 修改时间
|
|||
updateTime?: string; |
|||
// 父级分类名称
|
|||
parentName?: string; |
|||
// 父级分类路径
|
|||
parentPath?: string; |
|||
// 分类名称
|
|||
categoryName?: string; |
|||
// 评分
|
|||
rate?: string; |
|||
// 是否已购买
|
|||
isBuy?: boolean; |
|||
// 是否已安装插件
|
|||
installed?: boolean; |
|||
// 产品参数
|
|||
parameters?: CmsProductParameter[]; |
|||
// 产品链接
|
|||
links?: CmsProductUrl[]; |
|||
// 插件入口
|
|||
path?: string; |
|||
// 标签
|
|||
tag?: string; |
|||
// 菜单ID
|
|||
menuId?: number; |
|||
} |
|||
|
|||
/** |
|||
* 产品搜索条件 |
|||
*/ |
|||
export interface CmsProductParam extends PageParam { |
|||
productId?: number; |
|||
status?: number; |
|||
keywords?: string; |
|||
productId?: number; |
|||
status?: number; |
|||
keywords?: string; |
|||
} |
|||
|
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type {ApiResult, PageResult} from '@/api'; |
|||
import type {CmsProductComment, CmsProductCommentParam} from './model'; |
|||
import {SERVER_API_URL} from '@/config/index'; |
|||
|
|||
/** |
|||
* 分页查询产品评论 |
|||
*/ |
|||
export async function pageCmsProductComment(params: CmsProductCommentParam) { |
|||
const res = await request.get<ApiResult<PageResult<CmsProductComment>>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询产品评论列表 |
|||
*/ |
|||
export async function listCmsProductComment(params?: CmsProductCommentParam) { |
|||
const res = await request.get<ApiResult<CmsProductComment[]>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加产品评论 |
|||
*/ |
|||
export async function addCmsProductComment(data: CmsProductComment) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改产品评论 |
|||
*/ |
|||
export async function updateCmsProductComment(data: CmsProductComment) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除产品评论 |
|||
*/ |
|||
export async function removeCmsProductComment(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除产品评论 |
|||
*/ |
|||
export async function removeBatchCmsProductComment(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询产品评论 |
|||
*/ |
|||
export async function getCmsProductComment(id: number) { |
|||
const res = await request.get<ApiResult<CmsProductComment>>( |
|||
SERVER_API_URL + '/cms/cms-product-comment/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,41 @@ |
|||
import type { PageParam } from '@/api'; |
|||
|
|||
/** |
|||
* 产品评论 |
|||
*/ |
|||
export interface CmsProductComment { |
|||
// ID
|
|||
id?: number; |
|||
// 产品ID
|
|||
productId?: number; |
|||
// 用户ID
|
|||
userId?: number; |
|||
// 用户头像
|
|||
avatar?: string; |
|||
// 用户昵称
|
|||
nickname?: string; |
|||
image?: string; |
|||
// 排序(数字越小越靠前)
|
|||
sortNumber?: number; |
|||
// 评论内容
|
|||
comments?: string; |
|||
// 评分
|
|||
rate?: number; |
|||
// 状态
|
|||
status?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
// 子列表
|
|||
children?: CmsProductComment[]; |
|||
} |
|||
|
|||
/** |
|||
* 产品评论搜索条件 |
|||
*/ |
|||
export interface CmsProductCommentParam extends PageParam { |
|||
id?: number; |
|||
userId?: number; |
|||
keywords?: string; |
|||
} |
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type {ApiResult, PageResult} from '@/api'; |
|||
import type {CmsProductParameter, CmsProductParameterParam} from './model'; |
|||
import {SERVER_API_URL} from '@/config'; |
|||
|
|||
/** |
|||
* 分页查询产品参数 |
|||
*/ |
|||
export async function pageCmsProductParameter(params: CmsProductParameterParam) { |
|||
const res = await request.get<ApiResult<PageResult<CmsProductParameter>>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询产品参数列表 |
|||
*/ |
|||
export async function listCmsProductParameter(params?: CmsProductParameterParam) { |
|||
const res = await request.get<ApiResult<CmsProductParameter[]>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加产品参数 |
|||
*/ |
|||
export async function addCmsProductParameter(data: CmsProductParameter) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改产品参数 |
|||
*/ |
|||
export async function updateCmsProductParameter(data: CmsProductParameter) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除产品参数 |
|||
*/ |
|||
export async function removeCmsProductParameter(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除产品参数 |
|||
*/ |
|||
export async function removeBatchCmsProductParameter(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询产品参数 |
|||
*/ |
|||
export async function getCmsProductParameter(id: number) { |
|||
const res = await request.get<ApiResult<CmsProductParameter>>( |
|||
SERVER_API_URL + '/cms/cms-product-parameter/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,33 @@ |
|||
import type { PageParam } from '@/api'; |
|||
|
|||
/** |
|||
* 产品参数 |
|||
*/ |
|||
export interface CmsProductParameter { |
|||
// 自增ID
|
|||
id?: number; |
|||
// 产品ID
|
|||
productId?: number; |
|||
// 参数名称
|
|||
name?: string; |
|||
// 参数内容
|
|||
value?: string; |
|||
// 备注
|
|||
comments?: string; |
|||
// 排序(数字越小越靠前)
|
|||
sortNumber?: number; |
|||
// 状态, 0正常, 1待确认
|
|||
status?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
} |
|||
|
|||
/** |
|||
* 产品参数搜索条件 |
|||
*/ |
|||
export interface CmsProductParameterParam extends PageParam { |
|||
id?: number; |
|||
keywords?: string; |
|||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,151 +0,0 @@ |
|||
import request from '@/utils/request'; |
|||
import type { ApiResult, PageResult } from '@/api'; |
|||
import { Cart, CartParam, CartVo } from './model'; |
|||
import { MODULES_API_URL } from '@/config/setting'; |
|||
|
|||
/** |
|||
* 分页查询购物车 |
|||
*/ |
|||
export async function pageCart(params: CartParam) { |
|||
const res = await request.get<ApiResult<PageResult<Cart>>>( |
|||
MODULES_API_URL + '/shop/cart/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询购物车列表 |
|||
*/ |
|||
export async function listCart(params?: CartParam) { |
|||
const res = await request.get<ApiResult<CartVo>>( |
|||
MODULES_API_URL + '/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 addCart(data: Cart) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改购物车 |
|||
*/ |
|||
export async function updateCart(data: Cart) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除购物车 |
|||
*/ |
|||
export async function removeCart(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除购物车 |
|||
*/ |
|||
export async function removeBatchCart(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/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 getCart(id: number) { |
|||
const res = await request.get<ApiResult<Cart>>( |
|||
MODULES_API_URL + '/shop/cart/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 挂单 |
|||
* @param data |
|||
*/ |
|||
export async function packCart(data: Cart) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart/packCart', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 减少数量 |
|||
* @param data |
|||
*/ |
|||
export async function subCartNum(data: Cart) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart/subCartNum', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 增加数量 |
|||
* @param data |
|||
*/ |
|||
export async function addCartNum(data: Cart) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/cart/addCartNum', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -1,83 +0,0 @@ |
|||
import type { PageParam } from '@/api'; |
|||
|
|||
export interface CartVo { |
|||
// 店铺列表
|
|||
shops?: CartShopVo[]; |
|||
// 购物车总金额
|
|||
totalPrice?: number; |
|||
// 宝贝总数量
|
|||
totalNums?: number; |
|||
// 已选宝贝
|
|||
selectNums?: number; |
|||
// 是否全选
|
|||
selectAll?: boolean; |
|||
} |
|||
|
|||
export interface CartShopVo { |
|||
// 店铺ID
|
|||
shopId?: number; |
|||
// 店铺名称
|
|||
shopName?: string; |
|||
// 店铺LOGO
|
|||
shopLogo?: string; |
|||
// 购物车商品列表
|
|||
carts?: Cart[]; |
|||
} |
|||
|
|||
/** |
|||
* 购物车 |
|||
*/ |
|||
export interface Cart { |
|||
// 购物车表ID
|
|||
id?: number; |
|||
// 类型 0商城 1预定
|
|||
type?: number; |
|||
// 商品ID
|
|||
goodsId?: number; |
|||
// 商品名称
|
|||
goodsName?: string; |
|||
// 唯一标识
|
|||
code?: string; |
|||
// 是否多规格
|
|||
specs?: number; |
|||
// 商品规格
|
|||
spec?: string; |
|||
// 商品数量
|
|||
cartNum?: number; |
|||
// 0 = 未购买 1 = 已购买
|
|||
isPay?: string; |
|||
// 是否为立即购买
|
|||
isNew?: string; |
|||
// 拼团id
|
|||
combinationId?: number; |
|||
// 秒杀产品ID
|
|||
seckillId?: number; |
|||
// 砍价id
|
|||
bargainId?: number; |
|||
// 用户ID
|
|||
userId?: string; |
|||
// 是否删除, 0否, 1是
|
|||
deleted?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 注册时间
|
|||
createTime?: string; |
|||
// 修改时间
|
|||
updateTime?: string; |
|||
// 商品图片
|
|||
image?: string; |
|||
// 商品价格
|
|||
price?: number; |
|||
// 加载完成
|
|||
loading?: boolean; |
|||
// 收银员ID
|
|||
adminId?: number; |
|||
} |
|||
|
|||
/** |
|||
* 购物车搜索条件 |
|||
*/ |
|||
export interface CartParam extends PageParam { |
|||
id?: number; |
|||
keywords?: string; |
|||
} |
@ -1,122 +0,0 @@ |
|||
import request from '@/utils/request'; |
|||
import type { ApiResult, PageResult } from '@/api'; |
|||
import type { MerchantAccount, MerchantAccountParam } from './model'; |
|||
import { MODULES_API_URL } from '@/config/setting'; |
|||
|
|||
/** |
|||
* 分页查询商户账号 |
|||
*/ |
|||
export async function pageMerchantAccount(params: MerchantAccountParam) { |
|||
const res = await request.get<ApiResult<PageResult<MerchantAccount>>>( |
|||
MODULES_API_URL + '/shop/merchant-account/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询商户账号列表 |
|||
*/ |
|||
export async function listMerchantAccount(params?: MerchantAccountParam) { |
|||
const res = await request.get<ApiResult<MerchantAccount[]>>( |
|||
MODULES_API_URL + '/shop/merchant-account', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加商户账号 |
|||
*/ |
|||
export async function addMerchantAccount(data: MerchantAccount) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/merchant-account', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改商户账号 |
|||
*/ |
|||
export async function updateMerchantAccount(data: MerchantAccount) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/merchant-account', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除商户账号 |
|||
*/ |
|||
export async function removeMerchantAccount(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/merchant-account/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除商户账号 |
|||
*/ |
|||
export async function removeBatchMerchantAccount(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/merchant-account/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询商户账号 |
|||
*/ |
|||
export async function getMerchantAccount(id: number) { |
|||
const res = await request.get<ApiResult<MerchantAccount>>( |
|||
MODULES_API_URL + '/shop/merchant-account/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
export async function getMerchantAccountByPhone(params?: MerchantAccountParam) { |
|||
const res = await request.get<ApiResult<MerchantAccount>>( |
|||
MODULES_API_URL + '/shop/merchant-account/getMerchantAccountByPhone', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 1) { |
|||
return null; |
|||
} |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type {ApiResult, PageResult} from '@/api'; |
|||
import type {ShopCart, ShopCartParam} from './model'; |
|||
import {SERVER_API_URL} from "~/config"; |
|||
|
|||
/** |
|||
* 分页查询购物车 |
|||
*/ |
|||
export async function pageShopCart(params: ShopCartParam) { |
|||
const res = await request.get<ApiResult<PageResult<ShopCart>>>( |
|||
SERVER_API_URL + '/shop/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[]>>( |
|||
SERVER_API_URL + '/shop/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>>( |
|||
SERVER_API_URL + '/shop/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>>( |
|||
SERVER_API_URL + '/shop/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>>( |
|||
SERVER_API_URL + '/shop/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>>( |
|||
SERVER_API_URL + '/shop/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>>( |
|||
SERVER_API_URL + '/shop/shop-cart/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,66 @@ |
|||
import type { PageParam } from '@/api'; |
|||
import type {ShopOrderInfo} from "~/api/shop/shopOrderInfo/model"; |
|||
|
|||
/** |
|||
* 购物车 |
|||
*/ |
|||
export interface ShopCart { |
|||
// 购物车表ID
|
|||
id?: string; |
|||
// 类型 0商城 1外卖
|
|||
type?: number; |
|||
// 唯一标识
|
|||
code?: string; |
|||
// 商品ID
|
|||
productId?: 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; |
|||
// 商品封面图
|
|||
image?: string; |
|||
} |
|||
|
|||
/** |
|||
* 购物车搜索条件 |
|||
*/ |
|||
export interface ShopCartParam extends PageParam { |
|||
id?: number; |
|||
keywords?: string; |
|||
} |
|||
|
|||
export interface MyCart { |
|||
num?: number, |
|||
payType?: number, |
|||
payPrice?: number, |
|||
month?: number, |
|||
comments?: string, |
|||
orderProduct?: ShopOrderInfo[], |
|||
totalPrice?: number |
|||
} |
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type { ApiResult, PageResult } from '@/api'; |
|||
import type { ShopMerchantAccount, ShopMerchantAccountParam } from './model'; |
|||
import { MODULES_API_URL } from '@/config'; |
|||
|
|||
/** |
|||
* 分页查询商户账号 |
|||
*/ |
|||
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) { |
|||
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询商户账号列表 |
|||
*/ |
|||
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) { |
|||
const res = await request.get<ApiResult<ShopMerchantAccount[]>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加商户账号 |
|||
*/ |
|||
export async function addShopMerchantAccount(data: ShopMerchantAccount) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改商户账号 |
|||
*/ |
|||
export async function updateShopMerchantAccount(data: ShopMerchantAccount) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除商户账号 |
|||
*/ |
|||
export async function removeShopMerchantAccount(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除商户账号 |
|||
*/ |
|||
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询商户账号 |
|||
*/ |
|||
export async function getShopMerchantAccount(id: number) { |
|||
const res = await request.get<ApiResult<ShopMerchantAccount>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-account/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type { ApiResult, PageResult } from '@/api'; |
|||
import type { ShopMerchantCount, ShopMerchantCountParam } from './model'; |
|||
import { MODULES_API_URL } from '@/config'; |
|||
|
|||
/** |
|||
* 分页查询门店销售统计表 |
|||
*/ |
|||
export async function pageShopMerchantCount(params: ShopMerchantCountParam) { |
|||
const res = await request.get<ApiResult<PageResult<ShopMerchantCount>>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询门店销售统计表列表 |
|||
*/ |
|||
export async function listShopMerchantCount(params?: ShopMerchantCountParam) { |
|||
const res = await request.get<ApiResult<ShopMerchantCount[]>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加门店销售统计表 |
|||
*/ |
|||
export async function addShopMerchantCount(data: ShopMerchantCount) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改门店销售统计表 |
|||
*/ |
|||
export async function updateShopMerchantCount(data: ShopMerchantCount) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除门店销售统计表 |
|||
*/ |
|||
export async function removeShopMerchantCount(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除门店销售统计表 |
|||
*/ |
|||
export async function removeBatchShopMerchantCount(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询门店销售统计表 |
|||
*/ |
|||
export async function getShopMerchantCount(id: number) { |
|||
const res = await request.get<ApiResult<ShopMerchantCount>>( |
|||
MODULES_API_URL + '/shop/shop-merchant-count/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
@ -0,0 +1,29 @@ |
|||
import type { PageParam } from '@/api'; |
|||
|
|||
/** |
|||
* 门店销售统计表 |
|||
*/ |
|||
export interface ShopMerchantCount { |
|||
// ID
|
|||
id?: number; |
|||
// 店铺名称
|
|||
name?: string; |
|||
// 店铺说明
|
|||
comments?: string; |
|||
// 状态
|
|||
status?: number; |
|||
// 排序号
|
|||
sortNumber?: number; |
|||
// 租户id
|
|||
tenantId?: number; |
|||
// 创建时间
|
|||
createTime?: string; |
|||
} |
|||
|
|||
/** |
|||
* 门店销售统计表搜索条件 |
|||
*/ |
|||
export interface ShopMerchantCountParam extends PageParam { |
|||
id?: number; |
|||
keywords?: string; |
|||
} |
@ -0,0 +1,106 @@ |
|||
import request from '@/utils/request'; |
|||
import type {ApiResult, PageResult} from '@/api'; |
|||
import type {ShopOrderInfo, ShopOrderInfoParam} from './model'; |
|||
import {SERVER_API_URL} from '@/config'; |
|||
|
|||
/** |
|||
* 分页查询 |
|||
*/ |
|||
export async function pageShopOrderInfo(params: ShopOrderInfoParam) { |
|||
const res = await request.get<ApiResult<PageResult<ShopOrderInfo>>>( |
|||
SERVER_API_URL + '/shop/order-info/page', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 查询列表 |
|||
*/ |
|||
export async function listShopOrderInfo(params?: ShopOrderInfoParam) { |
|||
const res = await request.get<ApiResult<ShopOrderInfo[]>>( |
|||
SERVER_API_URL + '/shop/order-info', |
|||
{ |
|||
params |
|||
} |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 添加 |
|||
*/ |
|||
export async function addShopOrderInfo(data: ShopOrderInfo) { |
|||
const res = await request.post<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/shop/order-info', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 修改 |
|||
*/ |
|||
export async function updateShopOrderInfo(data: ShopOrderInfo) { |
|||
const res = await request.put<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/shop/order-info', |
|||
data |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 删除 |
|||
*/ |
|||
export async function removeShopOrderInfo(id?: number) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/shop/order-info/' + id |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除 |
|||
*/ |
|||
export async function removeBatchShopOrderInfo(data: (number | undefined)[]) { |
|||
const res = await request.delete<ApiResult<unknown>>( |
|||
SERVER_API_URL + '/shop/order-info/batch', |
|||
{ |
|||
data |
|||
} |
|||
); |
|||
if (res.data.code === 0) { |
|||
return res.data.message; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
|||
|
|||
/** |
|||
* 根据id查询 |
|||
*/ |
|||
export async function getShopOrderInfo(id: number) { |
|||
const res = await request.get<ApiResult<ShopOrderInfo>>( |
|||
SERVER_API_URL + '/shop/order-info/' + id |
|||
); |
|||
if (res.data.code === 0 && res.data.data) { |
|||
return res.data.data; |
|||
} |
|||
return Promise.reject(new Error(res.data.message)); |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue