This commit is contained in:
PC-202306242200\Administrator
2024-09-26 15:09:52 +08:00
parent 76f37cae6f
commit 19ee4dd79d
6 changed files with 26 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
import { orderPage, orderExport, orderRefund, getWeiXinCollect, getCollect, getBalance,getZhiFuBaoCollect } from '@/services/order';
import { orderPage, orderExport, orderRefund, getWeiXinCollect, getCollect, getBalance, getZhiFuBaoCollect } from '@/services/order';
import { exportData } from '@/utils/func';
import React, { useRef, useEffect, useState } from 'react';
import { useIntl, useAccess } from '@umijs/max';
@@ -23,12 +23,30 @@ const LogTableList: React.FC = () => {
const [count4, setCount4] = useState({});
const access = useAccess()
const count = useState({})
useEffect(() => {
getWeiXinCollect().then((res) => {
setCount1(res.data);
})
getBalance().then((res) => {
setCount2(res.data);
})
getCollect().then((res) => {
setCount3(res.data);
})
getZhiFuBaoCollect().then((res) => {
setCount4(res.data);
})
}, []);
const [shopOption, setShopOption] = useState([]);
const searchShop = async (value) => {
@@ -331,20 +349,8 @@ const LogTableList: React.FC = () => {
]}
request={async (params, sorter, filter) => {
setSearchParams({ ...params });
countFun()
let { data } = await orderPage(params)
let _count1 = await getWeiXinCollect()
let _count2 = await getBalance()
let _count3 = await getCollect()
let _count4 = await getZhiFuBaoCollect()
setCount1(_count1.data);
setCount2(_count2.data);
setCount3(_count3.data);
setCount4(_count4.data);
return {
data: data?.records || [],
total: data?.total,