This commit is contained in:
parent
dc4b864bba
commit
a4f71b047a
|
|
@ -105,15 +105,23 @@ const BlogArticleWrapper = async ({ params }: { params: { slug: string, locale:
|
||||||
}).then((result: any) => {
|
}).then((result: any) => {
|
||||||
console.log("==================>result:", result);
|
console.log("==================>result:", result);
|
||||||
|
|
||||||
if (result && result.header.code !== 0) {
|
if (result && result.header.code !== 1006) {
|
||||||
statusText = result.header.message || '操作失败(后端返回错误)';
|
statusText = result.header.message || '操作失败(后端返回错误)';
|
||||||
return; // 如果返回失败,不继续处理
|
return; // 如果返回失败,不继续处理
|
||||||
}
|
}
|
||||||
|
if (result.header.code !== 1006){
|
||||||
|
// 如果请求成功
|
||||||
|
statusText = "";
|
||||||
|
// 设置部署状态数据
|
||||||
|
progress = '0%'; // 假设返回的数据里有进度
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// 如果请求成功
|
||||||
|
statusText = result.header.message || '操作成功';
|
||||||
|
// 设置部署状态数据
|
||||||
|
progress = result.data.progress || '0%'; // 假设返回的数据里有进度
|
||||||
|
}
|
||||||
|
|
||||||
// 如果请求成功
|
|
||||||
statusText = result.header.message || '操作成功';
|
|
||||||
// 设置部署状态数据
|
|
||||||
progress = result.data.progress || '0%'; // 假设返回的数据里有进度
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error('请求部署状态失败:', err);
|
console.error('请求部署状态失败:', err);
|
||||||
statusText = '请求失败';
|
statusText = '请求失败';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue