下载文件方法优化

This commit is contained in:
不做码农
2022-12-05 18:44:58 +08:00
parent 960a5ded70
commit 4a3bcd74bd
3 changed files with 55 additions and 51 deletions
+2 -10
View File
@@ -449,16 +449,8 @@ function handleExport() {
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
exportUser(queryParams.value).then((response) => {
const { code, data } = response
if (code == 200) {
proxy.$modal.msgSuccess('导出成功')
proxy.download(data.path)
} else {
proxy.$modal.msgError('导出失败')
}
})
.then(async () => {
await exportUser(queryParams.value)
})
}
/** 用户状态修改 */