feat: 内容管理

This commit is contained in:
2025-10-29 17:10:53 +08:00
parent 476ee7a754
commit 4c628fee22
67 changed files with 8210 additions and 4494 deletions

View File

@@ -23,8 +23,6 @@ import { baseOrderColumns } from './config';
const { Search } = Input;
const { Text } = Typography;
import { DownOutlined, UpOutlined, UserOutlined } from '@ant-design/icons';
import PopconfirmForm, {
type PopconfirmFormRef,
@@ -50,8 +48,8 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
const popconfirmFormRef = useRef<PopconfirmFormRef>(null);
const onFetch = async (
params: TradeReq & {
pageSize?: number;
current?: number;
pageSize: number;
current: number;
},
) => {
const data = await getTradeOrderPage({
@@ -68,10 +66,13 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
};
};
const handleDetail = useCallback((record: TradeOrderPageRespVO) => {
setModalData(record);
configurableDrawerRef.current?.open();
}, []);
const handleDetail = useCallback(
(record: TradeOrderPageRespVO) => {
setModalData(record);
configurableDrawerRef.current?.open(record);
},
[modalData],
);
const handleOrder = useCallback((id?: number) => {
console.log(id, '取消订单');
@@ -107,10 +108,10 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
<a key="cancel" onClick={() => handleOrder(record.id)}>
</a>
<a key="cancel" onClick={() => handleOrder(record.id)}>
<a key="order" onClick={() => handleOrder(record.id)}>
</a>
<a key="cancel" onClick={() => handleOrder(record.id)}>
<a key="sale" onClick={() => handleOrder(record.id)}>
</a>
<a key="detail" onClick={() => handleDetail(record)}>
@@ -186,9 +187,9 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
<span>{record.orderNum}</span>
<span> {record.payType}</span>
<Space>
<Avatar icon={<UserOutlined />} />
<Avatar icon={<UserOutlined />} src={record.shopLogo} />
{/* <Image src={record.picUrl} width={64} /> */}
{record.shopName || '-'}
</Space>
<Space>
{record.userAvatar ? (
@@ -211,7 +212,6 @@ const OrderListItem: React.FC<{ orderStatus: number }> = (props) => {
header: {
cell: (props: any) => {
const { children, ...restProps } = props;
console.log(restProps, children);
return <th {...restProps}>{children}</th>;
},
},