错误修复

This commit is contained in:
XaoLi717 2024-10-18 09:40:14 +08:00
parent bcbc84ff12
commit de8bf98371

View File

@ -165,7 +165,7 @@ const upload = async (myFile:any) => {
} }
formData.append('file', myFile);//form formData.append('file', myFile);//form
try { try {
console.log("ok") // console.log("ok")
const response = await axios.post(`${config.only_url}/admin-api/only/onlyof/update`, formData, configs); const response = await axios.post(`${config.only_url}/admin-api/only/onlyof/update`, formData, configs);
console.log("ok",response) console.log("ok",response)
} catch (error) { } catch (error) {
@ -248,6 +248,7 @@ const SyncFiles = async () => {
txt: 'add_texts', txt: 'add_texts',
html: 'add_html', html: 'add_html',
}; };
console.log("66")
await delay(100); await delay(100);
fName.page = 70; fName.page = 70;
fName.lodTxt="70%" fName.lodTxt="70%"
@ -255,12 +256,15 @@ const SyncFiles = async () => {
fName.page = 90; fName.page = 90;
fName.lodTxt="90%" fName.lodTxt="90%"
const response = await axios.post(`${config.ai_url}/${add}?path=${filePath}`); const response = await axios.post(`${config.ai_url}/${add}?path=${filePath}`);
console.log("response",response)
if (response.data.response.indexOf("added")==-1){ if (response.data.response.indexOf("added")==-1){
throw new Error("同步错误"); throw new Error("同步错误");
} }
upDing.value=false upDing.value=false
await delay(100); await delay(100);
fName.page = 100; fName.page = 100;
console.log("77")
fName.lodTxt="完成" fName.lodTxt="完成"
} catch (error) { } catch (error) {
upDing.value=false upDing.value=false