This commit is contained in:
HongRun Liu
2026-05-26 15:52:30 +08:00
commit b0744c8ab6
849 changed files with 130587 additions and 0 deletions
+277
View File
@@ -0,0 +1,277 @@
import request from '@/sheep/request'
// 消息列表 aishop/shop-messages/list
export function getMessageList(params: any) {
return request({
url: '/aishop/shop-messages/list',
method: 'get',
params
})
}
// 是否开通店铺 member/user/check-shop-status
export function checkShopStatus(params: any) {
return request({
url: '/member/user/check-shop-status',
method: 'get',
params
})
}
// 判断剩余开通数量 member/user/ai-shop-remaining
export function getRemainingCount(params: any) {
return request({
url: '/member/user/ai-shop-remaining',
method: 'get',
params
})
}
// 选品广场 aishop/product/spu/page
export function getSpuPage(params: any) {
return request({
url: '/aishop/product/spu/page',
method: 'get',
params
})
}
// 选品广场 轮次
export function getSpuTimeList(params: any) {
return request({
url: '/aishop/product/spu/time-list',
method: 'get',
params
})
}
// 明细 aishop/product/spu/get-detail
export function getSpuDetail(id: any, shoppingPlazaId: any) {
return request({
url: '/aishop/product/spu/get-detail',
method: 'get',
params:{
id,
shoppingPlazaId
}
})
}
// 添加购物车 app-api/aishop/shop-cart/add
export function addShopCart(params: any) {
return request({
url: '/aishop/shop-cart/add',
method: 'post',
data: params,
custom: {
showSuccess: true,
successMsg: '添加成功'
},
})
}
// 获取购物车列表app-api/aishop/shop-cart/list
export function getShopCartList(params: any) {
return request({
url: '/aishop/shop-cart/list',
method: 'get',
params
})
}
// 删除购物车 app-api/aishop/shop-cart/delete
export function deleteShopCart(params: any) {
return request({
url: '/aishop/shop-cart/delete',
method: 'DELETE',
params,
custom: {
showSuccess: true,
successMsg: '删除成功'
},
})
}
// 更新购物车 app-api/aishop/shop-cart/update
export function updateShopCart(params: any) {
return request({
url: '/aishop/shop-cart/update',
method: 'put',
data: params,
custom: {
showSuccess: true,
successMsg: '更新成功'
},
})
}
// 获取订单结算信息aishop/order/settlement
export function getSettlementInfo(params: any) {
return request({
url: '/aishop/order/settlement',
method: 'get',
params
})
}
// 生成订单 aishop/order/createOrder
export function createOrder(params: any) {
return request({
url: '/aishop/order/createOrder',
method: 'post',
params,
})
}
//查询订单 aishop/order/get-detail
export function getOrderDetail(params: any) {
return request({
url: '/aishop/order/get-detail',
method: 'get',
params
})
}
// 获取订单列表 aishop/order/page
export function getOrderPage(params: any) {
return request({
url: '/aishop/order/page',
method: 'get',
params
})
}
// 取消订单 aishop/order/cancel
export function cancelOrder(params: any) {
return request({
url: '/aishop/order/cancel',
method: 'DELETE',
params,
custom: {
showSuccess: true,
successMsg: '取消成功'
},
})
}
// 确认收货 aishop/order/receive
export function confirmReceive(params: any) {
return request({
url: '/aishop/order/receive',
method: 'put',
params,
custom: {
showSuccess: true,
successMsg: '确认收货成功'
},
})
}
// 开通ai店铺aishop/order/createOpen
export function createOpen(params: any) {
return request({
url: '/aishop/order/createOpen',
method: 'post',
params,
})
}
// 用户等级 aishop/level-card/info
export function getLevelInfo(params: any) {
return request({
url: '/aishop/level-card/info',
method: 'get',
params
})
}
export function getPrice(params: any) {
return request({
url: '/app/markingConfig/getPrice',
method: 'get',
params
})
}
// 获取是否开通商品发货
export function getAiOpenStatus(params : any) {
return request({
url: '/aishop/shop-cart/AiOpenStatus',
method: 'get',
params
})
}
//获取已购买赠品
export function getGiftOrder(params: any) {
return request({
url: '/aishop/order/get-pay-order',
method: 'get',
params
})
}
//查询赠品订单
export function getGiftOrderDetail(params : any) {
return request({
url: '/aishop/order/get-detail-open',
method: 'get',
params
})
}
// 获取开通ai店铺商品订单结算信息
export function getGiftSettlementInfo(params : any) {
return request({
url: '/aishop/order/settlement-open',
method: 'get',
params
})
}
// 创建发货状态订单
export function createOrderOpen(params : any) {
return request({
url: '/aishop/order/createOrderOpen',
method: 'post',
params,
})
}
//查询赠品订单
export function getGiftOrderInfo(params: any) {
return request({
url: '/aishop/order/get-detail-open',
method: 'get',
params
})
}
// 赠品确认收货
export function giftConfirmReceive(params: any) {
return request({
url: '/aishop/order/receive-open',
method: 'put',
params,
custom: {
showSuccess: true,
successMsg: '确认收货成功'
},
})
}
//开通ai店铺赠送商品套餐
export function getAiProduct(params : any) {
return request({
url: '/aishop/product/page',
method: 'get',
params
})
}
// 延迟发货
export function aiDelayedShipment(params : any) {
return request({
url: '/aishop/order/update/delayedShipment',
method: 'post',
params,
})
}
// 立即发货
export function aiPendingShipment(params : any) {
return request({
url: '/aishop/order/update/pendingShipment',
method: 'post',
params,
})
}
+61
View File
@@ -0,0 +1,61 @@
import request from '@/sheep/request';
// 意见反馈
export const createfeedback = (params) => {
return request({
url: '/member/feedback/create',
method: 'POST',
data: params,
custom: {
showSuccess: true,
successMsg: '提交成功',
},
});
};
// 邀请好友/member/app/invite/info
export const inviteinfo = (params) => {
return request({
url: '/member/app/invite/info',
method: 'GET',
params: params,
});
};
// 社员/member/app/team/page
export const teamPage = (params) => {
return request({
url: '/member/app/team/page',
method: 'GET',
params: params,
});
};
// 代理明细/member/app/agent-earnings/order/page
export const agentEarningsDetailPage = (params) => {
return request({
url: '/member/app/agent-earnings/order/page',
method: 'GET',
params: params,
});
};
// 七天收益/member/app/agent-earnings/trend
export const agentEarningsTrend = (params) => {
return request({
url: '/member/app/agent-earnings/trend',
method: 'GET',
params: params,
});
};
// 金种子/member/app/gold-seed/index
export const goldSeedIndex = (params) => {
return request({
url: '/member/app/gold-seed/index',
method: 'GET',
params: params,
});
};
// 社员统计
export const getTeamStats = (params) => {
return request({
url: '/member/app/team/stats',
method: 'GET',
params: params,
});
};
+167
View File
@@ -0,0 +1,167 @@
import request from '@/sheep/request';
// 钱包流水/pay/wallet-transaction/page
export const getWalletTransactionPage = (params) => {
return request({
url: '/pay/wallet-transaction/page',
method: 'GET',
params,
});
};
// 获取钱包 pay/wallet/get
export const getWallet = () => {
return request({
url: '/pay/wallet/get',
method: 'GET',
});
};
// 佣金明细member/app/commission/detail/page
export const commissionDetailPage = (params) => {
return request({
url: '/member/app/commission/detail/page',
method: 'GET',
params,
});
};
// 代理明细/member/app/agent-earnings/order/page
export const agentEarningsDetailPage = (params) => {
return request({
url: '/member/app/agent-earnings/order/page',
method: 'GET',
params: params,
});
};
// 分红明细 member/app/dividend/detail/page
export const dividendDetailPage = (params) => {
return request({
url: '/member/app/dividend/detail/page',
method: 'GET',
params,
});
};
// 金种子兑换(JSON) member/app/integral/exchange-gold-seed
export const exchangeGoldSeed = (data) => {
return request({
url: '/member/app/integral/exchange-gold-seed',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '兑换中',
successMsg: '兑换成功',
},
});
};
// 创建分销提现
export const createBrokerageWithdraw = (data) => {
return request({
url: '/trade/brokerage-withdraw/create',
method: 'POST',
data,
});
};
// huamao提现
export const hmPayExpenditure = (data) => {
return request({
url: '/trade/brokerage-withdraw/hmPayExpenditure',
method: 'POST',
data,
});
};
// 提现明细列表
export const withdrawRecord = (data) => {
return request({
url: '/trade/brokerage-withdraw/page',
method: 'GET',
data,
});
};
// 查询银行卡trade/brokerage-withdraw/getBank
export const getBank = (params) => {
return request({
url: '/trade/brokerage-withdraw/getBank',
method: 'GET',
params,
});
};
// 查询银行卡列表 member/user/getBankList
export const getBankList = (params) => {
return request({
url: '/member/user/getBankList',
method: 'GET',
params,
});
};
//获取待释放列表
export const getReleaseList = (params) => {
return request({
url: '/app/member/agent-earnings-release/page',
method: 'GET',
params,
});
};
//钱包充值金额列表
export const getWalletRechargeMoneyList = (params) => {
return request({
url: '/pay/wallet-recharge-package/list',
method: 'GET',
params,
});
};
//创建充值订单
export const walletRechargeCreate = (data) => {
return request({
url: '/pay/wallet-recharge/create',
method: 'POST',
data,
});
};
//充值记录
export const walletRechargePage = (data) => {
return request({
url: '/pay/wallet-recharge/page',
method: 'GET',
data,
});
};
//钱包消费记录
export const walletRransactionExpense = (data) => {
return request({
url: '/pay/wallet-transaction/expense',
method: 'GET',
data,
});
};
//获得实名认证
export const getRealName = (params) => {
return request({
url: '/app/member/user-real-name-auth/get',
method: 'GET',
params,
});
};
//创建实名认证
export const createRealName = (data) => {
return request({
url: '/app/member/user-real-name-auth/create',
method: 'POST',
data,
});
};
//更新实名认证
export const updateRealName = (data) => {
return request({
url: '/app/member/user-real-name-auth/update',
method: 'PUT',
data,
});
};
// 收益趋势/member/app/agent-earnings/trend-new
export const agentEarningsTrendNew = (params) => {
return request({
url: '/member/app/agent-earnings/trend-new',
method: 'GET',
params,
});
};
+33
View File
@@ -0,0 +1,33 @@
import request from '@/sheep/request';
// 绿色积分
export const integraldetai = (params) => {
return request({
url: '/member/app/integral/detail/page',
method: 'GET',
params: params,
});
};
// 佣金
export const commission = (params) => {
return request({
url: '/member/app/commission/detail/page',
method: 'GET',
params: params,
});
};
// 代理收益
export const agentearnings = (params) => {
return request({
url: '/member/app/agent-earnings/order/page',
method: 'GET',
params: params,
});
};
// 消费金
export const consumptiongold = (params) => {
return request({
url: '/member/app/consumption-gold/detail/page',
method: 'GET',
params: params,
});
};
+135
View File
@@ -0,0 +1,135 @@
import request from "@/sheep/request";
// 拼团列表 incrementalpoints/points-group-buy-record/list
export function getOrderPage(params: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/list',
method: 'get',
params
})
}
// 立即拼团 /incrementalpoints/points-group-buy-record/join
export function joinGroup(data: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/join',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '拼团成功'
},
})
}
// 获取商品详情 /incremental/points-product/detail
export function getGroupDetail(params: any) {
return request({
url: '/incremental/points-product/detail',
method: 'get',
params
})
}
// 获取商品详情拼团列表 incremental/points-product/group-buys
export function getGroupBuys(params: any) {
return request({
url: '/incremental/points-product/group-buys',
method: 'get',
params
})
}
// 获取用户拼团信息 /incrementalpoints/user-group-buy/info
export function getUserGroupInfo(params: any) {
return request({
url: '/incrementalpoints/user-group-buy/info',
method: 'get',
params
})
}
// 获取所有用户的已参团记录 /incrementalpoints/user-group-buy/participants
export function getParticipants(params: any) {
return request({
url: '/incrementalpoints/user-group-buy/participants',
method: 'get',
params
})
}
// 交易所积分账户明细 /incremental/points-detail/page
export function getPointsDetail(params: any) {
return request({
url: '/incremental/points-detail/page',
method: 'get',
params
})
}
// 积分明细 /app-api/incremental/points-detail/exAndBesPointList
export function exAndBesPointList(params: any) {
return request({
url: '/incremental/points-detail/exAndBesPointList',
method: 'get',
params
})
}
// 增量账户明细 /incremental/account-detail/page
export function getAccountDetail(params: any) {
return request({
url: '/incremental/account-detail/page',
method: 'get',
params
})
}
// 原始积分兑换金种子 /incrementalpoints/points-group-buy-record/exPointChangeGoldSeed
export function exPointChangeGoldSeed(data: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/exPointChangeGoldSeed',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '兑换成功'
},
})
}
// 增量积分兑换原始积分/incrementalpoints/points-group-buy-record/incrPointChangeExPoint
export function incrPointChangeExPoint(data: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/incrPointChangeExPoint',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '兑换成功'
},
})
}
// 增量积分兑换配置票 incrementalpoints/points-group-buy-record/incrPointChangeIncPoint
export function incrPointChangeIncPoint(data: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/incrPointChangeIncPoint',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '兑换成功'
},
})
}
// 手动开启自动拼团/incrementalpoints/points-group-buy-record/automaticGroupBuy
export function automaticGroupBuy(data: any) {
return request({
url: '/incrementalpoints/points-group-buy-record/automaticGroupBuy',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '开启成功'
},
})
}
+11
View File
@@ -0,0 +1,11 @@
// 目的:解决微信小程序的「代码质量」在「JS 文件」提示:主包内,不应该存在主包未使用的 JS 文件
const files = import.meta.glob('./*/*.js', { eager: true });
let api = {};
Object.keys(files).forEach((key) => {
api = {
...api,
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
};
});
export default api;
+116
View File
@@ -0,0 +1,116 @@
import request from '@/sheep/request';
// banner列表
export const getbannerlist = (params) => {
return request({
url: '/promotion/banner/list',
method: 'GET',
params: params,
});
};
// 商品标签 product/tag/list
export const getproducttaglist = (params) => {
return request({
url: '/product/tag/list',
method: 'GET',
params: params,
});
};
// 消息通知/promotion/app/notification
export const getnotification = (params) => {
return request({
url: '/promotion/app/notification/banner',
method: 'GET',
params: params,
});
};
// 活动banner promotion/app/banner
export const getappbanner = (params) => {
return request({
url: '/promotion/app/banner/list',
method: 'GET',
params: params,
});
};
// 品牌product/brand/list
export const getbrandlist = (params) => {
return request({
url: '/product/brand/list',
method: 'GET',
params: params,
});
};
// 价格/product/price-range/list
export const getpricerangelist = (params) => {
return request({
url: '/product/price-range/list',
method: 'GET',
params: params,
});
};
// 热门搜索 hot/search/hot-list
export const gethotsearchlist = (params) => {
return request({
url: '/hot/search/hot-list',
method: 'GET',
params: params,
});
};
// 热更新 system/hot-update/get-latest
export const gethotupdatelist = (params) => {
return request({
url: '/system/hot-update/get-latest',
method: 'GET',
params: params,
});
};
// 用户协议 member/app/policy/user-agreement
export const getuseragreement = (params) => {
return request({
url: '/member/app/policy/get',
method: 'GET',
params: params,
});
};
// 隐私协议 member/app/policy/privacy
export const getprivacy = (params) => {
return request({
url: '/member/app/policy/privacy',
method: 'GET',
params: params,
});
};
// ai店铺协议 aishop/privacy-policy/get
export const getaishopPrivacyPolicy = (params) => {
return request({
url: '/aishop/privacy-policy/get',
method: 'GET',
params: params,
});
};
// 协议 member/app/policy/get
export const getpolicy = (params) => {
return request({
url: '/member/app/policy/get',
method: 'GET',
params: params,
});
};
// 获取apk链接
export const getAndroidAppUrl = (params) => {
return request({
url: '/app/config/getAndroidAppUrl',
method: 'GET',
params: params,
});
};
// 物流信息 aishop/order/all/get-express-track-list
export const getExpressTrackList = (params) => {
return request({
url: '/aishop/order/all/get-express-track-list',
method: 'GET',
params: params,
});
};
+67
View File
@@ -0,0 +1,67 @@
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
import request, { getAccessToken } from '@/sheep/request';
const FileApi = {
// 上传文件
uploadFile: (file, directory = '') => {
uni.showLoading({
title: '上传中',
});
return new Promise((resolve, reject) => {
uni.uploadFile({
url: baseUrl + apiPath + '/infra/file/upload',
filePath: file,
name: 'file',
header: {
Accept: '*/*',
'tenant-id': tenantId,
Authorization: 'Bearer ' + getAccessToken(),
},
formData: {
directory,
},
success: (uploadFileRes) => {
let result = JSON.parse(uploadFileRes.data);
if (result.error === 1) {
uni.showToast({
icon: 'none',
title: result.msg,
});
} else {
return resolve(result);
}
},
fail: (error) => {
console.log('上传失败:', error);
return resolve(false);
},
complete: () => {
uni.hideLoading();
},
});
});
},
// 获取文件预签名地址
getFilePresignedUrl: (name, directory) => {
return request({
url: '/infra/file/presigned-url',
method: 'GET',
params: {
name,
directory,
},
});
},
// 创建文件
createFile: (data) => {
return request({
url: '/infra/file/create', // 请求的 URL
method: 'POST', // 请求方法
data: data, // 要发送的数据
});
},
};
export default FileApi;
+17
View File
@@ -0,0 +1,17 @@
import request from '@/sheep/request';
/**
* 通过网站域名获取租户信息
* @param {string} website - 网站域名
* @returns {Promise<Object>} 租户信息
*/
export function getTenantByWebsite(website) {
return request({
url: '/system/tenant/get-by-website',
method: 'GET',
params: { website },
custom: {
isToken: false, // 避免登录情况下,跨租户访问被拦截
},
});
}
+53
View File
@@ -0,0 +1,53 @@
import request from '@/sheep/request';
const AddressApi = {
// 获得用户收件地址列表
getAddressList: () => {
return request({
url: '/member/address/list',
method: 'GET',
});
},
// 创建用户收件地址
createAddress: (data) => {
return request({
url: '/member/address/create',
method: 'POST',
data,
custom: {
showSuccess: true,
successMsg: '保存成功',
},
});
},
// 更新用户收件地址
updateAddress: (data) => {
return request({
url: '/member/address/update',
method: 'PUT',
data,
custom: {
showSuccess: true,
successMsg: '更新成功',
},
});
},
// 获得用户收件地址
getAddress: (id) => {
return request({
url: '/member/address/get',
method: 'GET',
params: { id },
});
},
// 删除用户收件地址
deleteAddress: (id) => {
return request({
url: '/member/address/delete',
method: 'DELETE',
params: { id },
});
},
};
export default AddressApi;
+152
View File
@@ -0,0 +1,152 @@
import request from '@/sheep/request';
const AuthUtil = {
// 使用手机 + 密码登录
login: (data) => {
return request({
url: '/member/auth/login',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '登录中',
successMsg: '登录成功',
},
});
},
// 使用手机 + 验证码登录
smsLogin: (data) => {
return request({
url: '/member/auth/sms-login',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '登录中',
successMsg: '登录成功',
},
});
},
// 发送手机验证码
sendSmsCode: (mobile, scene) => {
return request({
url: '/member/auth/send-sms-code',
method: 'POST',
data: {
mobile,
scene,
},
custom: {
loadingMsg: '发送中',
showSuccess: true,
successMsg: '发送成功',
},
});
},
// 注册
register: (data) => {
return request({
url: '/member/auth/register',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '注册中',
successMsg: '注册成功',
},
});
},
// 登出系统
logout: () => {
return request({
url: '/member/auth/logout',
method: 'POST',
});
},
// 注销账号
deactivate: () => {
return request({
url: '/member/user/deactivate',
method: 'POST',
});
},
// 刷新令牌
refreshToken: (refreshToken) => {
return request({
url: '/member/auth/refresh-token',
method: 'POST',
params: {
refreshToken,
},
custom: {
showLoading: false, // 不用加载中
showError: false, // 不展示错误提示
},
});
},
// 社交授权的跳转
socialAuthRedirect: (type, redirectUri) => {
return request({
url: '/member/auth/social-auth-redirect',
method: 'GET',
params: {
type,
redirectUri,
},
custom: {
showSuccess: true,
loadingMsg: '登陆中',
},
});
},
// 社交快捷登录
socialLogin: (type, code, state) => {
return request({
url: '/member/auth/social-login',
method: 'POST',
data: {
type,
code,
state,
},
custom: {
showSuccess: true,
loadingMsg: '登陆中',
},
});
},
// 微信小程序的一键登录
weixinMiniAppLogin: (phoneCode, loginCode, state) => {
return request({
url: '/member/auth/weixin-mini-app-login',
method: 'POST',
data: {
phoneCode,
loginCode,
state,
},
custom: {
showSuccess: true,
loadingMsg: '登陆中',
successMsg: '登录成功',
},
});
},
// 创建微信 JS SDK 初始化所需的签名
createWeixinMpJsapiSignature: (url) => {
return request({
url: '/member/auth/create-weixin-jsapi-signature',
method: 'POST',
params: {
url,
},
custom: {
showError: false,
showLoading: false,
},
});
},
//
};
export default AuthUtil;
+19
View File
@@ -0,0 +1,19 @@
import request from '@/sheep/request';
const PointApi = {
// 获得用户积分记录分页
getPointRecordPage: (params) => {
if (params.addStatus === undefined) {
delete params.addStatus;
}
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/member/point/record/page?${queryString}`,
method: 'GET',
});
},
};
export default PointApi;
+37
View File
@@ -0,0 +1,37 @@
import request from '@/sheep/request';
const SignInApi = {
// 获得签到规则列表
getSignInConfigList: () => {
return request({
url: '/member/sign-in/config/list',
method: 'GET',
});
},
// 获得个人签到统计
getSignInRecordSummary: () => {
return request({
url: '/member/sign-in/record/get-summary',
method: 'GET',
});
},
// 签到
createSignInRecord: () => {
return request({
url: '/member/sign-in/record/create',
method: 'POST',
});
},
// 获得签到记录分页
getSignRecordPage: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/member/sign-in/record/page?${queryString}`,
method: 'GET',
});
},
};
export default SignInApi;
+76
View File
@@ -0,0 +1,76 @@
import request from '@/sheep/request';
const SocialApi = {
// 获得社交用户
getSocialUser: (type) => {
return request({
url: '/member/social-user/get',
method: 'GET',
params: {
type,
},
custom: {
showLoading: false,
},
});
},
// 社交绑定
socialBind: (type, code, state) => {
return request({
url: '/member/social-user/bind',
method: 'POST',
data: {
type,
code,
state,
},
custom: {
custom: {
showSuccess: true,
loadingMsg: '绑定中',
successMsg: '绑定成功',
},
},
});
},
// 社交绑定
socialUnbind: (type, openid) => {
return request({
url: '/member/social-user/unbind',
method: 'DELETE',
data: {
type,
openid,
},
custom: {
showLoading: false,
loadingMsg: '解除绑定',
successMsg: '解绑成功',
},
});
},
// 获取订阅消息模板列表
getSubscribeTemplateList: () =>
request({
url: '/member/social-user/get-subscribe-template-list',
method: 'GET',
custom: {
showError: false,
showLoading: false,
},
}),
// 获取微信小程序码
getWxaQrcode: async (path, query) => {
return await request({
url: '/member/social-user/wxa-qrcode',
method: 'POST',
data: {
scene: query,
path,
checkPath: false, // TODO 开发环境暂不检查 path 是否存在
},
});
},
};
export default SocialApi;
+84
View File
@@ -0,0 +1,84 @@
import request from '@/sheep/request';
const UserApi = {
// 获得基本信息
getUserInfo: () => {
return request({
url: '/member/user/get',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
});
},
// 修改基本信息
updateUser: (data) => {
return request({
url: '/member/user/update',
method: 'PUT',
data,
custom: {
auth: true,
showSuccess: true,
successMsg: '更新成功',
},
});
},
// 修改用户手机
updateUserMobile: (data) => {
return request({
url: '/member/user/update-mobile',
method: 'PUT',
data,
custom: {
loadingMsg: '验证中',
showSuccess: true,
successMsg: '修改成功',
},
});
},
// 基于微信小程序的授权码,修改用户手机
updateUserMobileByWeixin: (code) => {
return request({
url: '/member/user/update-mobile-by-weixin',
method: 'PUT',
data: {
code,
},
custom: {
showSuccess: true,
loadingMsg: '获取中',
successMsg: '修改成功',
},
});
},
// 修改密码
updateUserPassword: (data) => {
return request({
url: '/member/user/update-password',
method: 'PUT',
data,
custom: {
loadingMsg: '验证中',
showSuccess: true,
successMsg: '修改成功',
},
});
},
// 重置密码
resetUserPassword: (data) => {
return request({
url: '/member/user/reset-password',
method: 'PUT',
data,
custom: {
loadingMsg: '验证中',
showSuccess: true,
successMsg: '修改成功',
},
});
},
};
export default UserApi;
+21
View File
@@ -0,0 +1,21 @@
import request from '@/sheep/request';
// TODO 芋艿:【直播】小程序直播还不支持
export default {
//小程序直播
mplive: {
getRoomList: (ids) =>
request({
url: 'app/mplive/getRoomList',
method: 'GET',
params: {
ids: ids.join(','),
},
}),
getMpLink: () =>
request({
url: 'app/mplive/getMpLink',
method: 'GET',
}),
},
};
+18
View File
@@ -0,0 +1,18 @@
import request from '@/sheep/request';
export default {
// 苹果相关
apple: {
// 第三方登录
login: (data) =>
request({
url: 'third/apple/login',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '登陆中',
},
}),
},
};
+14
View File
@@ -0,0 +1,14 @@
import request from '@/sheep/request';
const PayChannelApi = {
// 获得指定应用的开启的支付渠道编码列表
getEnableChannelCodeList: (appId) => {
return request({
url: '/pay/channel/get-enable-code-list',
method: 'GET',
params: { appId },
});
},
};
export default PayChannelApi;
+22
View File
@@ -0,0 +1,22 @@
import request from '@/sheep/request';
const PayOrderApi = {
// 获得支付订单
getOrder: (id, sync) => {
return request({
url: '/pay/order/get',
method: 'GET',
params: { id, sync },
});
},
// 提交支付订单
submitOrder: (data) => {
return request({
url: '/pay/order/submit',
method: 'POST',
data,
});
},
};
export default PayOrderApi;
+14
View File
@@ -0,0 +1,14 @@
import request from '@/sheep/request';
const PayTransferApi = {
// 同步转账单
syncTransfer: (id) => {
return request({
url: '/pay/transfer/sync',
method: 'GET',
params: { id },
});
},
};
export default PayTransferApi;
+68
View File
@@ -0,0 +1,68 @@
import request from '@/sheep/request';
const PayWalletApi = {
// 获取钱包
getPayWallet() {
return request({
url: '/pay/wallet/get',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
});
},
// 获得钱包流水分页
getWalletTransactionPage: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/pay/wallet-transaction/page?${queryString}`,
method: 'GET',
});
},
// 获得钱包流水统计
getWalletTransactionSummary: (params) => {
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
return request({
url: `/pay/wallet-transaction/get-summary?${queryString}`,
// url: `/pay/wallet-transaction/get-summary`,
method: 'GET',
// params: params
});
},
// 获得钱包充值套餐列表
getWalletRechargePackageList: () => {
return request({
url: '/pay/wallet-recharge-package/list',
method: 'GET',
custom: {
showError: false,
showLoading: false,
},
});
},
// 创建钱包充值记录(发起充值)
createWalletRecharge: (data) => {
return request({
url: '/pay/wallet-recharge/create',
method: 'POST',
data,
});
},
// 获得钱包充值记录分页
getWalletRechargePage: (params) => {
return request({
url: '/pay/wallet-recharge/page',
method: 'GET',
params,
custom: {
showError: false,
showLoading: false,
},
});
},
};
export default PayWalletApi;
+21
View File
@@ -0,0 +1,21 @@
import request from '@/sheep/request';
const CategoryApi = {
// 查询分类列表
getCategoryList: () => {
return request({
url: '/product/category/list',
method: 'GET',
});
},
// 查询分类列表,指定编号
getCategoryListByIds: (ids) => {
return request({
url: '/product/category/list-by-ids',
method: 'GET',
params: { ids },
});
},
};
export default CategoryApi;
+22
View File
@@ -0,0 +1,22 @@
import request from '@/sheep/request';
const CommentApi = {
// 获得商品评价分页
getCommentPage: (spuId, pageNo, pageSize, type) => {
return request({
url: '/product/comment/page',
method: 'GET',
params: {
spuId,
pageNo,
pageSize,
type,
},
custom: {
showLoading: false,
showError: false,
},
});
},
};
export default CommentApi;
+54
View File
@@ -0,0 +1,54 @@
import request from '@/sheep/request';
const FavoriteApi = {
// 获得商品收藏分页
getFavoritePage: (data) => {
return request({
url: '/product/favorite/page',
method: 'GET',
params: data,
});
},
// 检查是否收藏过商品
isFavoriteExists: (spuId) => {
return request({
url: '/product/favorite/exits',
method: 'GET',
params: {
spuId,
},
});
},
// 添加商品收藏
createFavorite: (spuId) => {
return request({
url: '/product/favorite/create',
method: 'POST',
data: {
spuId,
},
custom: {
auth: true,
showSuccess: true,
successMsg: '收藏成功',
},
});
},
// 取消商品收藏
deleteFavorite: (spuId) => {
return request({
url: '/product/favorite/delete',
method: 'DELETE',
data: {
spuId,
},
custom: {
auth: true,
showSuccess: true,
successMsg: '取消成功',
},
});
},
};
export default FavoriteApi;
+39
View File
@@ -0,0 +1,39 @@
import request from '@/sheep/request';
const SpuHistoryApi = {
// 删除商品浏览记录
deleteBrowseHistory: (spuIds) => {
return request({
url: '/product/browse-history/delete',
method: 'DELETE',
data: { spuIds },
custom: {
showSuccess: true,
successMsg: '删除成功',
},
});
},
// 清空商品浏览记录
cleanBrowseHistory: () => {
return request({
url: '/product/browse-history/clean',
method: 'DELETE',
custom: {
showSuccess: true,
successMsg: '清空成功',
},
});
},
// 获得商品浏览记录分页
getBrowseHistoryPage: (data) => {
return request({
url: '/product/browse-history/page',
method: 'GET',
data,
custom: {
showLoading: false,
},
});
},
};
export default SpuHistoryApi;
+53
View File
@@ -0,0 +1,53 @@
import request from '@/sheep/request';
const SpuApi = {
// 获得商品 SPU 列表
getSpuListByIds: (ids) => {
return request({
url: '/product/spu/list-by-ids',
method: 'GET',
params: { ids },
custom: {
showLoading: false,
showError: false,
},
});
},
// 获得商品结算信息
getSettlementProduct: (spuIds) => {
return request({
url: '/trade/order/settlement-product',
method: 'GET',
params: { spuIds },
custom: {
showLoading: false,
showError: false,
},
});
},
// 获得商品 SPU 分页
getSpuPage: (params) => {
return request({
url: '/product/spu/page',
method: 'GET',
params,
custom: {
showLoading: false,
showError: false,
},
});
},
// 查询商品
getSpuDetail: (id) => {
return request({
url: '/product/spu/get-detail',
method: 'GET',
params: { id },
custom: {
showLoading: false,
showError: false,
},
});
},
};
export default SpuApi;
+16
View File
@@ -0,0 +1,16 @@
import request from '@/sheep/request';
const ActivityApi = {
// 获得单个商品,进行中的拼团、秒杀、砍价活动信息
getActivityListBySpuId: (spuId) => {
return request({
url: '/promotion/activity/list-by-spu-id',
method: 'GET',
params: {
spuId,
},
});
},
};
export default ActivityApi;
+12
View File
@@ -0,0 +1,12 @@
import request from '@/sheep/request';
export default {
// 获得文章详情
getArticle: (id, title) => {
return request({
url: '/promotion/article/get',
method: 'GET',
params: { id, title },
});
},
};
+78
View File
@@ -0,0 +1,78 @@
import request from '@/sheep/request';
// 拼团 API
const CombinationApi = {
// 获得拼团活动分页
getCombinationActivityPage: (params) => {
return request({
url: '/promotion/combination-activity/page',
method: 'GET',
params,
});
},
// 获得拼团活动明细
getCombinationActivity: (id) => {
return request({
url: '/promotion/combination-activity/get-detail',
method: 'GET',
params: {
id,
},
});
},
// 获得拼团活动列表,基于活动编号数组
getCombinationActivityListByIds: (ids) => {
return request({
url: '/promotion/combination-activity/list-by-ids',
method: 'GET',
params: {
ids,
},
});
},
// 获得最近 n 条拼团记录(团长发起的)
getHeadCombinationRecordList: (activityId, status, count) => {
return request({
url: '/promotion/combination-record/get-head-list',
method: 'GET',
params: {
activityId,
status,
count,
},
});
},
// 获得我的拼团记录分页
getCombinationRecordPage: (params) => {
return request({
url: '/promotion/combination-record/page',
method: 'GET',
params,
});
},
// 获得拼团记录明细
getCombinationRecordDetail: (id) => {
return request({
url: '/promotion/combination-record/get-detail',
method: 'GET',
params: {
id,
},
});
},
// 获得拼团记录的概要信息
getCombinationRecordSummary: () => {
return request({
url: '/promotion/combination-record/get-summary',
method: 'GET',
});
},
};
export default CombinationApi;
+84
View File
@@ -0,0 +1,84 @@
import request from '@/sheep/request';
const CouponApi = {
// 获得优惠劵模板列表
getCouponTemplateListByIds: (ids) => {
return request({
url: '/promotion/coupon-template/list-by-ids',
method: 'GET',
params: { ids },
custom: {
showLoading: false, // 不展示 Loading,避免领取优惠劵时,不成功提示
showError: false,
},
});
},
// 获得优惠劵模版列表
getCouponTemplateList: (spuId, productScope, count) => {
return request({
url: '/promotion/coupon-template/list',
method: 'GET',
params: { spuId, productScope, count },
});
},
// 获得优惠劵模版分页
getCouponTemplatePage: (params) => {
return request({
url: '/promotion/coupon-template/page',
method: 'GET',
params,
});
},
// 获得优惠劵模版
getCouponTemplate: (id) => {
return request({
url: '/promotion/coupon-template/get',
method: 'GET',
params: { id },
});
},
// 我的优惠劵列表
getCouponPage: (params) => {
return request({
url: '/promotion/coupon/page',
method: 'GET',
params,
});
},
// 领取优惠券
takeCoupon: (templateId) => {
return request({
url: '/promotion/coupon/take',
method: 'POST',
data: { templateId },
custom: {
auth: true,
showLoading: true,
loadingMsg: '领取中',
showSuccess: true,
successMsg: '领取成功',
},
});
},
// 获得优惠劵
getCoupon: (id) => {
return request({
url: '/promotion/coupon/get',
method: 'GET',
params: { id },
});
},
// 获得未使用的优惠劵数量
getUnusedCouponCount: () => {
return request({
url: '/promotion/coupon/get-unused-count',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
});
},
};
export default CouponApi;
+38
View File
@@ -0,0 +1,38 @@
import request from '@/sheep/request';
const DiyApi = {
getUsedDiyTemplate: () => {
return request({
url: '/promotion/diy-template/used',
method: 'GET',
custom: {
showError: false,
showLoading: false,
},
});
},
getDiyTemplate: (id) => {
return request({
url: '/promotion/diy-template/get',
method: 'GET',
params: {
id,
},
custom: {
showError: false,
showLoading: false,
},
});
},
getDiyPage: (id) => {
return request({
url: '/promotion/diy-page/get',
method: 'GET',
params: {
id,
},
});
},
};
export default DiyApi;
+31
View File
@@ -0,0 +1,31 @@
import request from '@/sheep/request';
const KeFuApi = {
sendKefuMessage: (data) => {
return request({
url: '/promotion/kefu-message/send',
method: 'POST',
data,
custom: {
auth: true,
showLoading: true,
loadingMsg: '发送中',
showSuccess: true,
successMsg: '发送成功',
},
});
},
getKefuMessageList: (params) => {
return request({
url: '/promotion/kefu-message/list',
method: 'GET',
params,
custom: {
auth: true,
showLoading: false,
},
});
},
};
export default KeFuApi;
+30
View File
@@ -0,0 +1,30 @@
import request from '@/sheep/request';
const PointApi = {
// 获得积分商城活动分页
getPointActivityPage: (params) => {
return request({ url: 'promotion/point-activity/page', method: 'GET', params });
},
// 获得积分商城活动列表,基于活动编号数组
getPointActivityListByIds: (ids) => {
return request({
url: '/promotion/point-activity/list-by-ids',
method: 'GET',
params: {
ids,
},
});
},
// 获得积分商城活动明细
getPointActivity: (id) => {
return request({
url: 'promotion/point-activity/get-detail',
method: 'GET',
params: { id },
});
},
};
export default PointApi;
+14
View File
@@ -0,0 +1,14 @@
import request from '@/sheep/request';
const RewardActivityApi = {
// 获得满减送活动
getRewardActivity: (id) => {
return request({
url: '/promotion/reward-activity/get',
method: 'GET',
params: { id },
});
},
};
export default RewardActivityApi;
+44
View File
@@ -0,0 +1,44 @@
import request from '@/sheep/request';
const SeckillApi = {
// 获得秒杀时间段列表
getSeckillConfigList: () => {
return request({ url: 'promotion/seckill-config/list', method: 'GET' });
},
// 获得当前秒杀活动
getNowSeckillActivity: () => {
return request({ url: 'promotion/seckill-activity/get-now', method: 'GET' });
},
// 获得秒杀活动分页
getSeckillActivityPage: (params) => {
return request({ url: 'promotion/seckill-activity/page', method: 'GET', params });
},
// 获得秒杀活动列表,基于活动编号数组
getSeckillActivityListByIds: (ids) => {
return request({
url: '/promotion/seckill-activity/list-by-ids',
method: 'GET',
params: {
ids,
},
});
},
/**
* 获得秒杀活动明细
* @param {number} id 秒杀活动编号
* @return {*}
*/
getSeckillActivity: (id) => {
return request({
url: 'promotion/seckill-activity/get-detail',
method: 'GET',
params: { id },
});
},
};
export default SeckillApi;
+13
View File
@@ -0,0 +1,13 @@
import request from '@/sheep/request';
const AreaApi = {
// 获得地区树
getAreaTree: () => {
return request({
url: '/system/area/tree',
method: 'GET',
});
},
};
export default AreaApi;
+16
View File
@@ -0,0 +1,16 @@
import request from '@/sheep/request';
const DictApi = {
// 根据字典类型查询字典数据信息
getDictDataListByType: (type) => {
return request({
url: `/system/dict-data/type`,
method: 'GET',
params: {
type,
},
});
},
};
export default DictApi;
+63
View File
@@ -0,0 +1,63 @@
import request from '@/sheep/request';
const AfterSaleApi = {
// 获得售后分页
getAfterSalePage: (params) => {
return request({
url: `/trade/after-sale/page`,
method: 'GET',
params,
custom: {
showLoading: false,
},
});
},
// 创建售后
createAfterSale: (data) => {
return request({
url: `/trade/after-sale/create`,
method: 'POST',
data,
});
},
// 获得售后
getAfterSale: (id) => {
return request({
url: `/trade/after-sale/get`,
method: 'GET',
params: {
id,
},
});
},
// 取消售后
cancelAfterSale: (id) => {
return request({
url: `/trade/after-sale/cancel`,
method: 'DELETE',
params: {
id,
},
});
},
// 获得售后日志列表
getAfterSaleLogList: (afterSaleId) => {
return request({
url: `/trade/after-sale-log/list`,
method: 'GET',
params: {
afterSaleId,
},
});
},
// 退回货物
deliveryAfterSale: (data) => {
return request({
url: `/trade/after-sale/delivery`,
method: 'PUT',
data,
});
},
};
export default AfterSaleApi;
+111
View File
@@ -0,0 +1,111 @@
import request from '@/sheep/request';
const BrokerageApi = {
// 绑定分销用户
bindBrokerageUser: (data) => {
return request({
url: '/trade/brokerage-user/bind',
method: 'PUT',
data,
});
},
// 获得个人分销信息
getBrokerageUser: () => {
return request({
url: '/trade/brokerage-user/get',
method: 'GET',
});
},
// 获得个人分销统计
getBrokerageUserSummary: () => {
return request({
url: '/trade/brokerage-user/get-summary',
method: 'GET',
});
},
// 获得分销记录分页
getBrokerageRecordPage: (params) => {
if (params.status === undefined) {
delete params.status;
}
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-record/page?${queryString}`,
method: 'GET',
});
},
// 创建分销提现
createBrokerageWithdraw: (data) => {
return request({
url: '/trade/brokerage-withdraw/create',
method: 'POST',
data,
});
},
// 获得分销提现分页
getBrokerageWithdrawPage: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-withdraw/page?${queryString}`,
method: 'GET',
});
},
// 获得分销提现详情
getBrokerageWithdraw: (id) => {
return request({
url: `/trade/brokerage-withdraw/get`,
method: 'GET',
params: { id },
});
},
// 获得商品的分销金额
getProductBrokeragePrice: (spuId) => {
return request({
url: '/trade/brokerage-record/get-product-brokerage-price',
method: 'GET',
params: { spuId },
});
},
// 获得分销用户排行(基于佣金)
getRankByPrice: (params) => {
const queryString = `times=${params.times[0]}&times=${params.times[1]}`;
return request({
url: `/trade/brokerage-user/get-rank-by-price?${queryString}`,
method: 'GET',
});
},
// 获得分销用户排行分页(基于佣金)
getBrokerageUserChildSummaryPageByPrice: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-price?${queryString}`,
method: 'GET',
});
},
// 获得分销用户排行分页(基于用户量)
getBrokerageUserRankPageByUserCount: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`,
method: 'GET',
});
},
// 获得下级分销统计分页
getBrokerageUserChildSummaryPage: (params) => {
return request({
url: '/trade/brokerage-user/child-summary-page',
method: 'GET',
params,
});
},
};
export default BrokerageApi;
+50
View File
@@ -0,0 +1,50 @@
import request from '@/sheep/request';
const CartApi = {
addCart: (data) => {
return request({
url: '/trade/cart/add',
method: 'POST',
data: data,
custom: {
showSuccess: true,
successMsg: '已添加到购物车~',
},
});
},
updateCartCount: (data) => {
return request({
url: '/trade/cart/update-count',
method: 'PUT',
data: data,
});
},
updateCartSelected: (data) => {
return request({
url: '/trade/cart/update-selected',
method: 'PUT',
data: data,
});
},
deleteCart: (ids) => {
return request({
url: '/trade/cart/delete',
method: 'DELETE',
params: {
ids,
},
});
},
getCartList: () => {
return request({
url: '/trade/cart/list',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
});
},
};
export default CartApi;
+16
View File
@@ -0,0 +1,16 @@
import request from '@/sheep/request';
const TradeConfigApi = {
// 获得交易配置
getTradeConfig: () => {
return request({
url: `/trade/config/get`,
method: 'GET',
custom: {
showLoading: false,
},
});
},
};
export default TradeConfigApi;
+31
View File
@@ -0,0 +1,31 @@
import request from '@/sheep/request';
const DeliveryApi = {
// 获得快递公司列表
getDeliveryExpressList: () => {
return request({
url: `/trade/delivery/express/list`,
method: 'get',
});
},
// 获得自提门店列表
getDeliveryPickUpStoreList: (params) => {
return request({
url: `/trade/delivery/pick-up-store/list`,
method: 'GET',
params,
});
},
// 获得自提门店
getDeliveryPickUpStore: (id) => {
return request({
url: `/trade/delivery/pick-up-store/get`,
method: 'GET',
params: {
id,
},
});
},
};
export default DeliveryApi;
+176
View File
@@ -0,0 +1,176 @@
import request from '@/sheep/request';
import { isEmpty } from '@/sheep/helper/utils';
const OrderApi = {
// 计算订单信息
settlementOrder: (data) => {
const data2 = {
...data,
};
// 移除多余字段
if (!(data.couponId > 0)) {
delete data2.couponId;
}
if (!(data.addressId > 0)) {
delete data2.addressId;
}
if (!(data.pickUpStoreId > 0)) {
delete data2.pickUpStoreId;
}
if (isEmpty(data.receiverName)) {
delete data2.receiverName;
}
if (isEmpty(data.receiverMobile)) {
delete data2.receiverMobile;
}
if (!(data.combinationActivityId > 0)) {
delete data2.combinationActivityId;
}
if (!(data.combinationHeadId > 0)) {
delete data2.combinationHeadId;
}
if (!(data.seckillActivityId > 0)) {
delete data2.seckillActivityId;
}
if (!(data.pointActivityId > 0)) {
delete data2.pointActivityId;
}
if (!(data.deliveryType > 0)) {
delete data2.deliveryType;
}
// 解决 SpringMVC 接受 List<Item> 参数的问题
delete data2.items;
for (let i = 0; i < data.items.length; i++) {
data2[encodeURIComponent('items[' + i + '' + '].skuId')] = data.items[i].skuId + '';
data2[encodeURIComponent('items[' + i + '' + '].count')] = data.items[i].count + '';
if (data.items[i].cartId) {
data2[encodeURIComponent('items[' + i + '' + '].cartId')] = data.items[i].cartId + '';
}
}
const queryString = Object.keys(data2)
.map((key) => key + '=' + data2[key])
.join('&');
return request({
url: `/trade/order/settlement?${queryString}`,
method: 'GET',
custom: {
showError: true,
showLoading: true,
},
});
},
// 获得商品结算信息
getSettlementProduct: (spuIds) => {
return request({
url: '/trade/order/settlement-product',
method: 'GET',
params: { spuIds },
custom: {
showLoading: false,
showError: false,
},
});
},
// 创建订单
createOrder: (data) => {
return request({
url: `/trade/order/create`,
method: 'POST',
data,
});
},
// 获得订单详细:sync 是可选参数
getOrderDetail: (id, sync) => {
return request({
url: `/trade/order/get-detail`,
method: 'GET',
params: {
id,
sync,
},
custom: {
showLoading: false,
},
});
},
// 订单列表
getOrderPage: (params) => {
return request({
url: '/trade/order/page',
method: 'GET',
params,
custom: {
showLoading: false,
},
});
},
// 确认收货
receiveOrder: (id) => {
return request({
url: `/trade/order/receive`,
method: 'PUT',
params: {
id,
},
});
},
// 取消订单
cancelOrder: (id) => {
return request({
url: `/trade/order/cancel`,
method: 'DELETE',
params: {
id,
},
});
},
// 删除订单
deleteOrder: (id) => {
return request({
url: `/trade/order/delete`,
method: 'DELETE',
params: {
id,
},
});
},
// 获得交易订单的物流轨迹
getOrderExpressTrackList: (id) => {
return request({
url: `/trade/order/get-express-track-list`,
method: 'GET',
params: {
id,
},
});
},
// 获得交易订单数量
getOrderCount: () => {
return request({
url: '/trade/order/get-count',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
});
},
// 创建单个评论
createOrderItemComment: (data) => {
return request({
url: `/trade/order/item/create-comment`,
method: 'POST',
data,
});
},
// 申请售后
aftersalecreate: (params) => {
return request({
url: `/trade/after-sale/create`,
method: 'POST',
params: params,
});
},
};
export default OrderApi;