From b42565cdebc181eaafba44e051ad7fcd1f289edd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 19 九月 2024 13:10:55 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/code/useCodeImport.jsx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/zy-acs-flow/src/page/code/useCodeImport.jsx b/zy-acs-flow/src/page/code/useCodeImport.jsx
index b53286c..ced0084 100644
--- a/zy-acs-flow/src/page/code/useCodeImport.jsx
+++ b/zy-acs-flow/src/page/code/useCodeImport.jsx
@@ -1,11 +1,18 @@
 import { useCallback, useMemo } from 'react';
 import { useDataProvider, useGetIdentity } from 'react-admin';
+import request from '@/utils/request';
 
 export function useCodeImport() {
 
     const processBatch = useCallback(async (batch) => {
-        console.log(batch);
+        const res = await request.post('/code/import', batch);
+        const { code, msg, data } = res.data;
+        if (code === 200) {
 
+        } else {
+            console.error(msg);
+            throw new Error(`Batch import failed: ${msg}`);
+        }
     }, []);
 
     return {

--
Gitblit v1.9.1