import { App, Form, InputNumber, Select } from "antd"; import React from "react"; import SelectBook from "../../selectBook"; import { useAjax } from "@/Hook/useAjax"; import { getFreeChapterListApi } from "@/pages/weComTask/API/bookLink"; interface Props extends BOOKLINK.BookLinkChildProps { huaShengCreateLinkDTO: { [x: string]: any } platform: string, mpAccountIds: number[] } /** * 花生作品链接 * @returns */ const BookPromoLinkCreateDTO: React.FC = ({ restField, name, huaShengCreateLinkDTO, platform, mpAccountIds }) => { /**********************************/ const { message } = App.useApp() const getFreeChapterList = useAjax((params) => getFreeChapterListApi(params)) /**********************************/ const getChapterList = () => { if (platform && mpAccountIds?.length && huaShengCreateLinkDTO?.bookPromoLinkCreateDTO?.bookId) { getFreeChapterList.run({ platform, mpAccountIds, bookId: huaShengCreateLinkDTO.bookPromoLinkCreateDTO.bookId }) } else { message.error('请先选择书城、公众号') } } return <> 作品(书籍)ID} > 章节} rules={[{ required: true, message: '请选择章节!' }]} >