Browse Source

修复已知问题

master
科技小王子 7 months ago
parent
commit
93d250d88f
  1. 8
      api/cms/article/model/index.ts
  2. 106
      api/cms/cmsArticleComment/index.ts
  3. 47
      api/cms/cmsArticleComment/model/index.ts
  4. 163
      api/cms/cmsProduct/model/index.ts
  5. 106
      api/cms/cmsProductComment/index.ts
  6. 41
      api/cms/cmsProductComment/model/index.ts
  7. 106
      api/cms/cmsProductParameter/index.ts
  8. 33
      api/cms/cmsProductParameter/model/index.ts
  9. 2
      api/cms/cmsProductSpec/index.ts
  10. 2
      api/cms/cmsProductSpecValue/index.ts
  11. 2
      api/cms/cmsProductUrl/index.ts
  12. 2
      api/cms/cmsProductUrl/model/index.ts
  13. 2
      api/cms/navigation/model/index.ts
  14. 1
      api/json/china-provinces.geo.json
  15. 1
      api/json/industry-data.json
  16. 1
      api/json/regions-data.json
  17. 1
      api/layout/model/index.ts
  18. 2
      api/oa/app/field/index.ts
  19. 2
      api/oa/app/index.ts
  20. 2
      api/oa/app/renew/index.ts
  21. 2
      api/oa/app/url/index.ts
  22. 2
      api/oa/app/user/index.ts
  23. 2
      api/oa/apply/index.ts
  24. 2
      api/oa/assets/index.ts
  25. 2
      api/oa/assets/user/index.ts
  26. 2
      api/oa/customer/index.ts
  27. 2
      api/oa/link/index.ts
  28. 2
      api/oa/oaApp/index.ts
  29. 2
      api/oa/oaAppField/index.ts
  30. 2
      api/oa/oaAppRenew/index.ts
  31. 2
      api/oa/oaAppUrl/index.ts
  32. 2
      api/oa/oaAppUser/index.ts
  33. 2
      api/oa/oaAssets/index.ts
  34. 2
      api/oa/oaAssetsCode/index.ts
  35. 2
      api/oa/oaAssetsDomain/index.ts
  36. 2
      api/oa/oaAssetsEmail/index.ts
  37. 2
      api/oa/oaAssetsServer/index.ts
  38. 2
      api/oa/oaAssetsSite/index.ts
  39. 2
      api/oa/oaAssetsUser/index.ts
  40. 2
      api/oa/oaAssetsVhost/index.ts
  41. 2
      api/oa/oaCompany/index.ts
  42. 2
      api/oa/oaCompanyField/index.ts
  43. 2
      api/oa/oaCompanyUser/index.ts
  44. 2
      api/oa/oaLink/index.ts
  45. 2
      api/oa/oaProduct/index.ts
  46. 2
      api/oa/oaProductTabs/index.ts
  47. 2
      api/oa/oaTask/index.ts
  48. 2
      api/oa/oaTaskCount/index.ts
  49. 2
      api/oa/oaTaskRecord/index.ts
  50. 2
      api/oa/oaTaskUser/index.ts
  51. 16
      api/oa/product/model/index.ts
  52. 2
      api/oa/product/tabs/index.ts
  53. 2
      api/oa/task-count/index.ts
  54. 2
      api/oa/task-record/index.ts
  55. 2
      api/oa/task-user/index.ts
  56. 2
      api/oa/task/index.ts
  57. 2
      api/shop/brand/index.ts
  58. 151
      api/shop/cart/index.ts
  59. 83
      api/shop/cart/model/index.ts
  60. 2
      api/shop/cashier/index.ts
  61. 2
      api/shop/count/index.ts
  62. 2
      api/shop/dealerApply/index.ts
  63. 2
      api/shop/dealerCapital/index.ts
  64. 2
      api/shop/dealerOrder/index.ts
  65. 2
      api/shop/dealerReferee/index.ts
  66. 2
      api/shop/dealerSetting/index.ts
  67. 2
      api/shop/dealerUser/index.ts
  68. 2
      api/shop/dealerWithdraw/index.ts
  69. 2
      api/shop/goods/index.ts
  70. 2
      api/shop/goodsAttr/index.ts
  71. 2
      api/shop/goodsAttrResult/index.ts
  72. 2
      api/shop/goodsAttrValue/index.ts
  73. 2
      api/shop/goodsComment/index.ts
  74. 2
      api/shop/goodsCoupon/index.ts
  75. 2
      api/shop/goodsDescription/index.ts
  76. 2
      api/shop/goodsLog/index.ts
  77. 2
      api/shop/goodsRelation/index.ts
  78. 2
      api/shop/goodsRule/index.ts
  79. 2
      api/shop/goodsSku/index.ts
  80. 2
      api/shop/goodsSpec/index.ts
  81. 2
      api/shop/goodsSpecRel/index.ts
  82. 122
      api/shop/merchantAccount/index.ts
  83. 2
      api/shop/order/index.ts
  84. 2
      api/shop/rechargeOrder/index.ts
  85. 106
      api/shop/shopCart/index.ts
  86. 66
      api/shop/shopCart/model/index.ts
  87. 38
      api/shop/shopMerchant/index.ts
  88. 52
      api/shop/shopMerchant/model/index.ts
  89. 106
      api/shop/shopMerchantAccount/index.ts
  90. 12
      api/shop/shopMerchantAccount/model/index.ts
  91. 38
      api/shop/shopMerchantApply/index.ts
  92. 27
      api/shop/shopMerchantApply/model/index.ts
  93. 106
      api/shop/shopMerchantCount/index.ts
  94. 29
      api/shop/shopMerchantCount/model/index.ts
  95. 38
      api/shop/shopMerchantType/index.ts
  96. 4
      api/shop/shopMerchantType/model/index.ts
  97. 106
      api/shop/shopOrderInfo/index.ts
  98. 8
      api/shop/shopOrderInfo/model/index.ts
  99. 2
      api/shop/spec/index.ts
  100. 2
      api/shop/specValue/index.ts

8
api/cms/article/model/index.ts

@ -54,6 +54,8 @@ export interface Article {
username?: string;
// 用户头像
avatar?: string;
// 作者
author?: string;
// 所属门店ID
shopId?: number;
//
@ -68,6 +70,12 @@ export interface Article {
createTime?: string;
// 更新时间
updateTime?: string;
// 租户ID
tenantId?: number;
// 租户名称
tenantName?: string;
// 租户logo
logo?: string;
}
/**

106
api/cms/cmsArticleComment/index.ts

@ -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));
}

47
api/cms/cmsArticleComment/model/index.ts

@ -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;
}

163
api/cms/cmsProduct/model/index.ts

@ -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;
}

106
api/cms/cmsProductComment/index.ts

@ -0,0 +1,106 @@
import request from '@/utils/request';
import type {ApiResult, PageResult} from '@/api';
import type {CmsProductComment, CmsProductCommentParam} from './model';
import {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));
}

41
api/cms/cmsProductComment/model/index.ts

@ -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;
}

106
api/cms/cmsProductParameter/index.ts

@ -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));
}

33
api/cms/cmsProductParameter/model/index.ts

@ -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;
}

2
api/cms/cmsProductSpec/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductSpec, CmsProductSpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/cms/cmsProductSpecValue/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductSpecValue, CmsProductSpecValueParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/cms/cmsProductUrl/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductUrl, CmsProductUrlParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/cms/cmsProductUrl/model/index.ts

@ -12,6 +12,8 @@ export interface CmsProductUrl {
type?: string;
// 域名
domain?: string;
// 二维码
qrcode?: string;
// 账号
account?: string;
// 密码

2
api/cms/navigation/model/index.ts

@ -44,6 +44,8 @@ export interface Navigation{
categoryPath?: string;
currentTitle?: string;
style?: string;
label?: string;
value?: number;
}
/**

1
api/json/china-provinces.geo.json

File diff suppressed because one or more lines are too long

1
api/json/industry-data.json

File diff suppressed because one or more lines are too long

1
api/json/regions-data.json

File diff suppressed because one or more lines are too long

1
api/layout/model/index.ts

@ -1,3 +1,4 @@
/**
*
*/

2
api/oa/app/field/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { AppField, AppFieldParam } from '@/api/oa/app/field/model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/app/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { App, AppParam } from './model/index';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
export async function getCount() {
const res = await request.get(MODULES_API_URL + '/oa/app/data');

2
api/oa/app/renew/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { AppRenew, AppRenewParam } from '@/api/oa/app/renew/model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/app/url/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { AppUrl, AppUrlParam } from '@/api/oa/app/url/model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/app/user/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { AppUser, AppUserParam } from '@/api/oa/app/user/model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/apply/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { Customer } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/assets/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Assets, AssetsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
export async function getCount() {
const res = await request.get(MODULES_API_URL + '/oa/assets/data');

2
api/oa/assets/user/index.ts

@ -4,7 +4,7 @@ import type {
AssetsUser,
AssetsUserParam
} from '@/api/oa/assets/user/model/index';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/customer/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Customer, CustomerParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/link/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Link, LinkParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaApp/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaApp, OaAppParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAppField/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAppField, OaAppFieldParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAppRenew/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAppRenew, OaAppRenewParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAppUrl/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAppUrl, OaAppUrlParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAppUser/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAppUser, OaAppUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssets/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssets, OaAssetsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsCode/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsCode, OaAssetsCodeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsDomain/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsDomain, OaAssetsDomainParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsEmail/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsEmail, OaAssetsEmailParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsServer/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsServer, OaAssetsServerParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsSite/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsSite, OaAssetsSiteParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsUser/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsUser, OaAssetsUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaAssetsVhost/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaAssetsVhost, OaAssetsVhostParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaCompany/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaCompany, OaCompanyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaCompanyField/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaCompanyField, OaCompanyFieldParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaCompanyUser/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaCompanyUser, OaCompanyUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaLink/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaLink, OaLinkParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaProduct/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaProduct, OaProductParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaProductTabs/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaProductTabs, OaProductTabsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaTask/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaTask, OaTaskParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaTaskCount/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaTaskCount, OaTaskCountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaTaskRecord/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaTaskRecord, OaTaskRecordParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/oaTaskUser/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OaTaskUser, OaTaskUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

16
api/oa/product/model/index.ts

@ -24,6 +24,8 @@ export interface Product {
categoryId?: number;
// 产品分类名称
categoryName?: string;
// 标签
tag?: string;
// 产品规格 0单规格 1多规格
specs?: number;
// 货架
@ -36,6 +38,14 @@ export interface Product {
salePrice?: number;
// 库存计算方式(10下单减库存 20付款减库存)
deductStockType?: number;
// 启用交付方式
deliveryMethod?: number;
// 启用购买时长
durationMethod?: number;
// 启用套餐版本
packageMethod?: number;
// 最大可购买数量
canBuyNumber?: number;
// 轮播图
files?: string;
// 销量
@ -46,6 +56,8 @@ export interface Product {
gainIntegral?: string;
// 推荐
recommend?: number;
// 是否官方自营
official?: boolean;
// 商户ID
merchantId?: number;
// 状态(0:未上架,1:上架)
@ -66,6 +78,8 @@ export interface Product {
createTime?: string;
// 修改时间
updateTime?: string;
// 购买数量
num?: number;
}
/**
@ -73,6 +87,8 @@ export interface Product {
*/
export interface ProductParam extends PageParam {
productId?: number;
type?: number;
official?: boolean;
status?: number;
keywords?: string;
}

2
api/oa/product/tabs/index.ts

@ -4,7 +4,7 @@ import type {
ProductTabs,
ProductTabsParam
} from '@/api/oa/product/tabs/model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/task-count/index.ts

@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { TaskCount, TaskCountParam } from './model/index';
import { TabsParam } from '@/api/tabs';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/task-record/index.ts

@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { TaskRecord, TaskRecordParam } from './model/index';
import { TabsParam } from '@/api/tabs';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/task-user/index.ts

@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { TaskUser, TaskUserParam } from './model/index';
import { TabsParam } from '@/api/tabs';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/oa/task/index.ts

@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Task, TaskParam } from './model/index';
import { TabsParam } from '@/api/tabs';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/brand/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Brand, BrandParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

151
api/shop/cart/index.ts

@ -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));
}

83
api/shop/cart/model/index.ts

@ -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;
}

2
api/shop/cashier/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Cashier, CashierParam, CashierVo } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/count/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Count, CountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
export async function data(params: CountParam) {
const res = await request.get<ApiResult<Count[]>>(

2
api/shop/dealerApply/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerApply, DealerApplyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerCapital/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerCapital, DealerCapitalParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerOrder/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerOrder, DealerOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerReferee/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerReferee, DealerRefereeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerSetting/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerSetting, DealerSettingParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerUser/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerUser, DealerUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/dealerWithdraw/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DealerWithdraw, DealerWithdrawParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goods/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Goods, GoodsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
export async function getCount(params: GoodsParam) {
const res = await request.get(MODULES_API_URL + '/shop/goods/data', {

2
api/shop/goodsAttr/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsAttr, GoodsAttrParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsAttrResult/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsAttrResult, GoodsAttrResultParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsAttrValue/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsAttrValue, GoodsAttrValueParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsComment/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsComment, GoodsCommentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsCoupon/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsCoupon, GoodsCouponParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsDescription/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsDescription, GoodsDescriptionParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsLog/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsLog, GoodsLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsRelation/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsRelation, GoodsRelationParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsRule/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsRule, GoodsRuleParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
* ()

2
api/shop/goodsSku/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsSku, GoodsSkuParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
import { GoodsSpec } from '@/api/shop/goodsSpec/model';
export async function generateGoodsSku(data: GoodsSpec) {

2
api/shop/goodsSpec/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsSpec, GoodsSpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/goodsSpecRel/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GoodsSpecRel, GoodsSpecRelParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

122
api/shop/merchantAccount/index.ts

@ -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));
}

2
api/shop/order/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Order, OrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/rechargeOrder/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { RechargeOrder, RechargeOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

106
api/shop/shopCart/index.ts

@ -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));
}

66
api/shop/shopCart/model/index.ts

@ -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
}

38
api/shop/merchant/index.ts → api/shop/shopMerchant/index.ts

@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Merchant, MerchantParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import type { ShopMerchant, ShopMerchantParam } from './model';
import { MODULES_API_URL } from '@/config';
/**
*
*/
export async function pageMerchant(params: MerchantParam) {
const res = await request.get<ApiResult<PageResult<Merchant>>>(
MODULES_API_URL + '/shop/merchant/page',
export async function pageShopMerchant(params: ShopMerchantParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
MODULES_API_URL + '/shop/shop-merchant/page',
{
params
}
@ -22,9 +22,9 @@ export async function pageMerchant(params: MerchantParam) {
/**
*
*/
export async function listMerchant(params?: MerchantParam) {
const res = await request.get<ApiResult<Merchant[]>>(
MODULES_API_URL + '/shop/merchant',
export async function listShopMerchant(params?: ShopMerchantParam) {
const res = await request.get<ApiResult<ShopMerchant[]>>(
MODULES_API_URL + '/shop/shop-merchant',
{
params
}
@ -38,9 +38,9 @@ export async function listMerchant(params?: MerchantParam) {
/**
*
*/
export async function addMerchant(data: Merchant) {
export async function addShopMerchant(data: ShopMerchant) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant',
MODULES_API_URL + '/shop/shop-merchant',
data
);
if (res.data.code === 0) {
@ -52,9 +52,9 @@ export async function addMerchant(data: Merchant) {
/**
*
*/
export async function updateMerchant(data: Merchant) {
export async function updateShopMerchant(data: ShopMerchant) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant',
MODULES_API_URL + '/shop/shop-merchant',
data
);
if (res.data.code === 0) {
@ -66,9 +66,9 @@ export async function updateMerchant(data: Merchant) {
/**
*
*/
export async function removeMerchant(id?: number) {
export async function removeShopMerchant(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant/' + id
MODULES_API_URL + '/shop/shop-merchant/' + id
);
if (res.data.code === 0) {
return res.data.message;
@ -79,9 +79,9 @@ export async function removeMerchant(id?: number) {
/**
*
*/
export async function removeBatchMerchant(data: (number | undefined)[]) {
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant/batch',
MODULES_API_URL + '/shop/shop-merchant/batch',
{
data
}
@ -95,9 +95,9 @@ export async function removeBatchMerchant(data: (number | undefined)[]) {
/**
* id查询商户
*/
export async function getMerchant(id: number) {
const res = await request.get<ApiResult<Merchant>>(
MODULES_API_URL + '/shop/merchant/' + id
export async function getShopMerchant(id: number) {
const res = await request.get<ApiResult<ShopMerchant>>(
MODULES_API_URL + '/shop/shop-merchant/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

52
api/shop/merchant/model/index.ts → api/shop/shopMerchant/model/index.ts

@ -3,12 +3,15 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface Merchant {
export interface ShopMerchant {
// ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 商户类型
type?: number;
// 商户图标
image?: string;
// 商户手机号
@ -17,34 +20,42 @@ export interface Merchant {
realName?: string;
// 店铺类型
shopType?: string;
// 项目类
// 项目
itemType?: string;
// 商户分类
category?: string;
// 商户坐标
// 行业父级分类
parentId?: string;
// 商户经营分类
merchantCategoryId?: number;
// 商户分类
merchantCategoryTitle?: string;
// 经纬度
lngAndLat?: string;
// 省
//
lng?: string;
//
lat?: string;
// 所在省份
province?: string;
// 市
// 所在城
city?: string;
// 区
// 所在辖
region?: string;
// 地址
// 详细地址
address?: string;
// 每小时价格
price?: number;
// 手续费
commission?: number;
commission?: string;
// 关键字
keywords?: string;
// 资质图片
files?: string;
// 营业时间
businessTime?: string;
timePeriod1?: string;
timePeriod2?: string;
// 商户介绍
// 文章内容
content?: string;
// 每小时价格
price?: string;
// 是否自营
ownStore?: number;
// 是否推荐
@ -55,6 +66,10 @@ export interface Merchant {
adminUrl?: string;
// 备注
comments?: string;
// 所有人
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 状态
status?: number;
// 排序号
@ -63,21 +78,12 @@ export interface Merchant {
tenantId?: number;
// 创建时间
createTime?: string;
// 默认商户管理角色ID
roleId?: number;
roleName?: string;
label?: string;
value?: number;
key?: number;
title?: string;
}
/**
*
*/
export interface MerchantParam extends PageParam {
export interface ShopMerchantParam extends PageParam {
merchantId?: number;
merchantIds?: string;
merchantCodes?: string;
keywords?: string;
}

106
api/shop/shopMerchantAccount/index.ts

@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantAccount, ShopMerchantAccountParam } from './model';
import { MODULES_API_URL } from '@/config';
/**
*
*/
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));
}

12
api/shop/merchantAccount/model/index.ts → api/shop/shopMerchantAccount/model/index.ts

@ -3,24 +3,21 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface MerchantAccount {
export interface ShopMerchantAccount {
// ID
id?: number;
// 商户手机号
phone?: string;
password?: string;
// 真实姓名
realName?: string;
// 商户ID
merchantId?: number;
merchantName?: string;
// 是否需要审核
goodsReview?: boolean;
// 角色ID
roleId?: number;
// 角色名称
roleName?: string;
// 用户ID
userId?: number;
nickname?: string;
// 备注
comments?: string;
// 状态
@ -36,8 +33,7 @@ export interface MerchantAccount {
/**
*
*/
export interface MerchantAccountParam extends PageParam {
export interface ShopMerchantAccountParam extends PageParam {
id?: number;
phone?: string;
keywords?: string;
}

38
api/shop/merchantApply/index.ts → api/shop/shopMerchantApply/index.ts

@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { MerchantApply, MerchantApplyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
import { MODULES_API_URL } from '@/config';
/**
*
*/
export async function pageMerchantApply(params: MerchantApplyParam) {
const res = await request.get<ApiResult<PageResult<MerchantApply>>>(
MODULES_API_URL + '/shop/merchant-apply/page',
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
MODULES_API_URL + '/shop/shop-merchant-apply/page',
{
params
}
@ -22,9 +22,9 @@ export async function pageMerchantApply(params: MerchantApplyParam) {
/**
*
*/
export async function listMerchantApply(params?: MerchantApplyParam) {
const res = await request.get<ApiResult<MerchantApply[]>>(
MODULES_API_URL + '/shop/merchant-apply',
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<ShopMerchantApply[]>>(
MODULES_API_URL + '/shop/shop-merchant-apply',
{
params
}
@ -38,9 +38,9 @@ export async function listMerchantApply(params?: MerchantApplyParam) {
/**
*
*/
export async function addMerchantApply(data: MerchantApply) {
export async function addShopMerchantApply(data: ShopMerchantApply) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-apply',
MODULES_API_URL + '/shop/shop-merchant-apply',
data
);
if (res.data.code === 0) {
@ -52,9 +52,9 @@ export async function addMerchantApply(data: MerchantApply) {
/**
*
*/
export async function updateMerchantApply(data: MerchantApply) {
export async function updateShopMerchantApply(data: ShopMerchantApply) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-apply',
MODULES_API_URL + '/shop/shop-merchant-apply',
data
);
if (res.data.code === 0) {
@ -66,9 +66,9 @@ export async function updateMerchantApply(data: MerchantApply) {
/**
*
*/
export async function removeMerchantApply(id?: number) {
export async function removeShopMerchantApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-apply/' + id
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
);
if (res.data.code === 0) {
return res.data.message;
@ -79,9 +79,9 @@ export async function removeMerchantApply(id?: number) {
/**
*
*/
export async function removeBatchMerchantApply(data: (number | undefined)[]) {
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-apply/batch',
MODULES_API_URL + '/shop/shop-merchant-apply/batch',
{
data
}
@ -95,9 +95,9 @@ export async function removeBatchMerchantApply(data: (number | undefined)[]) {
/**
* id查询商户入驻申请
*/
export async function getMerchantApply(id: number) {
const res = await request.get<ApiResult<MerchantApply>>(
MODULES_API_URL + '/shop/merchant-apply/' + id
export async function getShopMerchantApply(id: number) {
const res = await request.get<ApiResult<ShopMerchantApply>>(
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

27
api/shop/merchantApply/model/index.ts → api/shop/shopMerchantApply/model/index.ts

@ -3,19 +3,32 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface MerchantApply {
export interface ShopMerchantApply {
// ID
applyId?: number;
// 认证类型
type?: string;
// 商户名称
merchantName?: string;
// 社会信用代码
merchantCode?: string;
// 商户图标
image?: string;
// 商户手机号
phone?: string;
// 商户姓名
realName?: string;
// 身份证号码
idCard?: string;
sfz1?: string;
sfz2?: string;
yyzz?: string;
// 店铺类型
shopType?: string;
// 行业父级分类
parentId?: number;
// 所属分类
categoryId?: number;
// 商户分类
category?: string;
// 手续费
@ -24,12 +37,22 @@ export interface MerchantApply {
keywords?: string;
// 资质图片
files?: string;
// 所有人
userId?: number;
// 是否自营
ownStore?: number;
// 是否推荐
recommend?: number;
// 是否需要审核
goodsReview?: number;
// 审核完成时间
completedTime?: string
// 工作负责人
name2?: string;
// 驳回原因
reason?: string;
// 审核状态
checkStatus?: boolean;
// 备注
comments?: string;
// 状态
@ -45,7 +68,7 @@ export interface MerchantApply {
/**
*
*/
export interface MerchantApplyParam extends PageParam {
export interface ShopMerchantApplyParam extends PageParam {
applyId?: number;
keywords?: string;
}

106
api/shop/shopMerchantCount/index.ts

@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantCount, ShopMerchantCountParam } from './model';
import { MODULES_API_URL } from '@/config';
/**
*
*/
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));
}

29
api/shop/shopMerchantCount/model/index.ts

@ -0,0 +1,29 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface ShopMerchantCount {
// ID
id?: number;
// 店铺名称
name?: string;
// 店铺说明
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
*
*/
export interface ShopMerchantCountParam extends PageParam {
id?: number;
keywords?: string;
}

38
api/shop/merchantType/index.ts → api/shop/shopMerchantType/index.ts

@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { MerchantType, MerchantTypeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import type { ShopMerchantType, ShopMerchantTypeParam } from './model';
import { MODULES_API_URL } from '@/config';
/**
*
*/
export async function pageMerchantType(params: MerchantTypeParam) {
const res = await request.get<ApiResult<PageResult<MerchantType>>>(
MODULES_API_URL + '/shop/merchant-type/page',
export async function pageShopMerchantType(params: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantType>>>(
MODULES_API_URL + '/shop/shop-merchant-type/page',
{
params
}
@ -22,9 +22,9 @@ export async function pageMerchantType(params: MerchantTypeParam) {
/**
*
*/
export async function listMerchantType(params?: MerchantTypeParam) {
const res = await request.get<ApiResult<MerchantType[]>>(
MODULES_API_URL + '/shop/merchant-type',
export async function listShopMerchantType(params?: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<ShopMerchantType[]>>(
MODULES_API_URL + '/shop/shop-merchant-type',
{
params
}
@ -38,9 +38,9 @@ export async function listMerchantType(params?: MerchantTypeParam) {
/**
*
*/
export async function addMerchantType(data: MerchantType) {
export async function addShopMerchantType(data: ShopMerchantType) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-type',
MODULES_API_URL + '/shop/shop-merchant-type',
data
);
if (res.data.code === 0) {
@ -52,9 +52,9 @@ export async function addMerchantType(data: MerchantType) {
/**
*
*/
export async function updateMerchantType(data: MerchantType) {
export async function updateShopMerchantType(data: ShopMerchantType) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-type',
MODULES_API_URL + '/shop/shop-merchant-type',
data
);
if (res.data.code === 0) {
@ -66,9 +66,9 @@ export async function updateMerchantType(data: MerchantType) {
/**
*
*/
export async function removeMerchantType(id?: number) {
export async function removeShopMerchantType(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-type/' + id
MODULES_API_URL + '/shop/shop-merchant-type/' + id
);
if (res.data.code === 0) {
return res.data.message;
@ -79,9 +79,9 @@ export async function removeMerchantType(id?: number) {
/**
*
*/
export async function removeBatchMerchantType(data: (number | undefined)[]) {
export async function removeBatchShopMerchantType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-type/batch',
MODULES_API_URL + '/shop/shop-merchant-type/batch',
{
data
}
@ -95,9 +95,9 @@ export async function removeBatchMerchantType(data: (number | undefined)[]) {
/**
* id查询商户类型
*/
export async function getMerchantType(id: number) {
const res = await request.get<ApiResult<MerchantType>>(
MODULES_API_URL + '/shop/merchant-type/' + id
export async function getShopMerchantType(id: number) {
const res = await request.get<ApiResult<ShopMerchantType>>(
MODULES_API_URL + '/shop/shop-merchant-type/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

4
api/shop/merchantType/model/index.ts → api/shop/shopMerchantType/model/index.ts

@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface MerchantType {
export interface ShopMerchantType {
// ID
id?: number;
// 店铺类型
@ -23,7 +23,7 @@ export interface MerchantType {
/**
*
*/
export interface MerchantTypeParam extends PageParam {
export interface ShopMerchantTypeParam extends PageParam {
id?: number;
keywords?: string;
}

106
api/shop/shopOrderInfo/index.ts

@ -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));
}

8
api/shop/orderInfo/model/index.ts → api/shop/shopOrderInfo/model/index.ts

@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface OrderInfo {
export interface ShopOrderInfo {
//
id?: number;
// 关联订单表id
@ -46,12 +46,16 @@ export interface OrderInfo {
tenantId?: number;
// 创建时间
createTime?: string;
// 商品ID
goodsId?: number;
// 商品名称
goodsName?: string;
}
/**
*
*/
export interface OrderInfoParam extends PageParam {
export interface ShopOrderInfoParam extends PageParam {
id?: number;
oid?: number;
keywords?: string;

2
api/shop/spec/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Spec, SpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

2
api/shop/specValue/index.ts

@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { SpecValue, SpecValueParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { MODULES_API_URL } from '@/config';
/**
*

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

Loading…
Cancel
Save