|
@@ -14,16 +14,27 @@ type Props = {
|
|
|
closeMoalFu: () => void;
|
|
|
};
|
|
|
|
|
|
+
|
|
|
function GoogsDown({ id, closeMoalFu }: Props) {
|
|
|
+ // 弹窗 文物 标题
|
|
|
+ const [myTile,setMyTitle]=useState('')
|
|
|
// 通过id发送请求拿数据
|
|
|
const getInfoFu = useCallback(async (id: number) => {
|
|
|
const res = await getGoodsInfoByIdAPI(id);
|
|
|
- const dataRes: FileListType[] = res.data.file;
|
|
|
- const data: FileListType[] = [];
|
|
|
- dataRes.forEach((v) => {
|
|
|
- if (v.type === "img") data.push({ ...v, done: true });
|
|
|
- });
|
|
|
- setImgList(data);
|
|
|
+ if(res.code===0){
|
|
|
+ // 弹窗的标题
|
|
|
+ setMyTitle(res.data.entity.name)
|
|
|
+
|
|
|
+
|
|
|
+ const dataRes: FileListType[] = res.data.file;
|
|
|
+ const data: FileListType[] = [];
|
|
|
+ dataRes.forEach((v) => {
|
|
|
+ if (v.type === "img") data.push({ ...v, done: true });
|
|
|
+ });
|
|
|
+
|
|
|
+ setImgList(data);
|
|
|
+
|
|
|
+ }
|
|
|
}, []);
|
|
|
|
|
|
useEffect(() => {
|
|
@@ -84,7 +95,7 @@ function GoogsDown({ id, closeMoalFu }: Props) {
|
|
|
wrapClassName={styles.GoogsDown}
|
|
|
destroyOnClose
|
|
|
open={true}
|
|
|
- title="清“乾隆”款珐琅蓝彩十三行通景画瓷碗"
|
|
|
+ title={myTile}
|
|
|
footer={
|
|
|
[] // 设置footer为空,去掉 取消 确定默认按钮
|
|
|
}
|