fix(install): AJAX 请求拒绝时未 await 导致 unhandled promise rejection
1 个文件变更
+2
-1
13172193298@163.com
| •install/index.php | +2 -1 |
变更内容
diff --git a/install/index.php b/install/index.php
index e14fd8e..476ef50 100644
--- a/install/index.php
+++ b/install/index.php
@@ -867,7 +867,7 @@
const request=async (action,data={})=>{
try{
- return $.ajax({
+ return await $.ajax({
url: './install.api.php?action='+action,
type: 'POST',
data: data,
@@ -888,6 +888,7 @@
console.log(error);
NEXT_BTN_FUN.TipsShow('安装模块异常,请联系官方,QQ群:994752422');
alert('安装模块异常,请联系官方,QQ群:994752422');
+ return {code: -1, msg: '网络异常,请刷新重试'};
}
}