Skip to content

Commit

Permalink
fix(updater): 正确标记上传完成
Browse files Browse the repository at this point in the history
  • Loading branch information
fy0 committed Sep 21, 2023
1 parent 76e06e6 commit 6257986
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/components/misc/PageMiscSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
<el-form-item>
<div>使用指定的压缩包对当前海豹进行覆盖,上传完成后会自动重启海豹。</div>
<div>请注意尽量不要从高版本降低到低版本,数据库有可能不兼容。</div>
<div>选择文件确定后请耐心等待反馈。</div>
</el-form-item>

<h2>其他</h2>
Expand Down Expand Up @@ -524,14 +525,11 @@ const beforeUpload = async (file: any) => { // UploadRawFile
let fd = new FormData()
fd.append('files', file)
try {
await store.diceUploadToUpgrade({ form: fd });
const resp = await store.diceUploadToUpgrade({ form: fd });
ElMessage.success('上传完成,程序即将离线');
} catch (e: any) {
if (e.toString().indexOf('Error: Network Error') != -1) {
ElMessage.success('上传完成,程序即将离线');
} else {
ElMessage.error(e.toString());
console.log(e);
}
ElMessage.error(e.toString());
console.log(e);
}
}
Expand Down

0 comments on commit 6257986

Please sign in to comment.