统计:增加商品统计

This commit is contained in:
owen
2023-12-16 23:48:09 +08:00
parent 80355f3acd
commit ca35e1a4af
8 changed files with 492 additions and 25 deletions

View File

@ -285,3 +285,12 @@ export const getUrlValue = (key: string, urlStr: string = location.href): string
export const getUrlNumberValue = (key: string, urlStr: string = location.href): number => {
return toNumber(getUrlValue(key, urlStr))
}
/**
* 构建排序字段
* @param prop 字段名称
* @param order 顺序
*/
export const buildSortingField = ({ prop, order }) => {
return { field: prop, order: order === 'ascending' ? 'asc' : 'desc' }
}