mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 19:35:07 +08:00
商城:增加商城首页
This commit is contained in:
@ -54,6 +54,20 @@ export interface MemberTerminalStatisticsRespVO {
|
||||
userCount: number
|
||||
}
|
||||
|
||||
/** 会员数量统计 Response VO */
|
||||
export interface MemberCountRespVO {
|
||||
/** 用户访问量 */
|
||||
visitUserCount: string
|
||||
/** 新增用户数量 */
|
||||
createUserCount: number
|
||||
}
|
||||
|
||||
/** 会员注册数量 Response VO */
|
||||
export interface MemberRegisterCountRespVO {
|
||||
date: string
|
||||
count: number
|
||||
}
|
||||
|
||||
// 查询会员统计
|
||||
export const getMemberSummary = () => {
|
||||
return request.get<MemberSummaryRespVO>({
|
||||
@ -89,3 +103,21 @@ export const getMemberTerminalStatisticsList = () => {
|
||||
url: '/statistics/member/get-terminal-statistics-list'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户数量量对照
|
||||
export const getUserCountComparison = () => {
|
||||
return request.get<TradeStatisticsComparisonRespVO<MemberCountRespVO>>({
|
||||
url: '/statistics/member/user-count-comparison'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员注册数量列表
|
||||
export const getMemberRegisterCountList = (
|
||||
beginTime: dayjs.ConfigType,
|
||||
endTime: dayjs.ConfigType
|
||||
) => {
|
||||
return request.get<MemberRegisterCountRespVO[]>({
|
||||
url: '/statistics/member/register-count-list',
|
||||
params: { times: [formatDate(beginTime), formatDate(endTime)] }
|
||||
})
|
||||
}
|
||||
|
6
src/api/mall/statistics/pay.ts
Normal file
6
src/api/mall/statistics/pay.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** 获取钱包充值金额 */
|
||||
export const getWalletRechargePrice = async () => {
|
||||
return await request.get<number>({ url: `/statistics/pay/wallet-recharge-price` })
|
||||
}
|
@ -33,6 +33,36 @@ export interface TradeTrendSummaryRespVO {
|
||||
orderRefundPrice: number
|
||||
}
|
||||
|
||||
/** 交易订单数量 Response VO */
|
||||
export interface TradeOrderCountRespVO {
|
||||
/** 待发货 */
|
||||
undelivered?: number
|
||||
/** 待核销 */
|
||||
pickUp?: number
|
||||
/** 退款中 */
|
||||
afterSaleApply?: number
|
||||
/** 提现待审核 */
|
||||
auditingWithdraw?: number
|
||||
}
|
||||
|
||||
/** 交易订单统计 Response VO */
|
||||
export interface TradeOrderSummaryRespVO {
|
||||
/** 支付订单商品数 */
|
||||
orderPayCount?: number
|
||||
/** 总支付金额,单位:分 */
|
||||
orderPayPrice?: number
|
||||
}
|
||||
|
||||
/** 订单量趋势统计 Response VO */
|
||||
export interface TradeOrderTrendRespVO {
|
||||
/** 日期 */
|
||||
date: string
|
||||
/** 订单数量 */
|
||||
orderPayCount: number
|
||||
/** 订单支付金额 */
|
||||
orderPayPrice: number
|
||||
}
|
||||
|
||||
// 查询交易统计
|
||||
export const getTradeStatisticsSummary = () => {
|
||||
return request.get<TradeStatisticsComparisonRespVO<TradeSummaryRespVO>>({
|
||||
@ -64,6 +94,30 @@ export const exportTradeTrend = (params: TradeTrendReqVO) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得交易订单数量
|
||||
export const getOrderCount = async () => {
|
||||
return await request.get<TradeOrderCountRespVO>({ url: `/statistics/trade/order-count` })
|
||||
}
|
||||
|
||||
// 获得交易订单数量对照
|
||||
export const getOrderComparison = async () => {
|
||||
return await request.get<TradeStatisticsComparisonRespVO<TradeOrderSummaryRespVO>>({
|
||||
url: `/statistics/trade/order-comparison`
|
||||
})
|
||||
}
|
||||
|
||||
// 获得订单量趋势统计
|
||||
export const getOrderCountTrendComparison = (
|
||||
type: number,
|
||||
beginTime: dayjs.ConfigType,
|
||||
endTime: dayjs.ConfigType
|
||||
) => {
|
||||
return request.get<TradeStatisticsComparisonRespVO<TradeOrderTrendRespVO>[]>({
|
||||
url: '/statistics/trade/order-count-trend',
|
||||
params: { type, beginTime: formatDate(beginTime), endTime: formatDate(endTime) }
|
||||
})
|
||||
}
|
||||
|
||||
/** 时间参数需要格式化, 确保接口能识别 */
|
||||
const formatDateParam = (params: TradeTrendReqVO) => {
|
||||
return { times: [formatDate(params.times[0]), formatDate(params.times[1])] } as TradeTrendReqVO
|
||||
|
Reference in New Issue
Block a user