refactor(Customer/StatisticList): 替换客户列表接口为统计列表接口并调整排序参数格式
This commit is contained in:
parent
a4445362d5
commit
69b5ab72ff
|
|
@ -2,7 +2,7 @@ import { HistoryOrder } from '@/pages/Statistics/Order';
|
||||||
import {
|
import {
|
||||||
customercontrollerAddtag,
|
customercontrollerAddtag,
|
||||||
customercontrollerDeltag,
|
customercontrollerDeltag,
|
||||||
customercontrollerGetcustomerlist,
|
customercontrollerGetcustomerstatisticlist,
|
||||||
customercontrollerGettags,
|
customercontrollerGettags,
|
||||||
customercontrollerSetrate,
|
customercontrollerSetrate,
|
||||||
} from '@/servers/api/customer';
|
} from '@/servers/api/customer';
|
||||||
|
|
@ -200,9 +200,9 @@ const ListPage: React.FC = () => {
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
const key = Object.keys(sorter)[0];
|
const key = Object.keys(sorter)[0];
|
||||||
const { data, success } = await customercontrollerGetcustomerlist({
|
const { data, success } = await customercontrollerGetcustomerstatisticlist({
|
||||||
...params,
|
...params,
|
||||||
...(key ? { sorterKey: key, sorterValue: sorter[key] } : {}),
|
...(key ? { orderBy: `${key}:${sorter[key]}` } : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue