commit
677aab7649
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jmal-cloud-view",
|
||||
"version": "2.10.1",
|
||||
"version": "2.11.0",
|
||||
"description": "jmalcloud",
|
||||
"author": "Jmal <zhushilun084@163.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@ -4070,11 +4070,7 @@ export default {
|
||||
fileIds.push(this.rowContextData.id)
|
||||
}
|
||||
if (fileIds.length > 1 || this.rowContextData.isFolder) {
|
||||
fileConfig.packageDownload(
|
||||
fileIds,
|
||||
this.$store.state.user.token,
|
||||
this.$store.state.user.name
|
||||
)
|
||||
fileConfig.packageDownload(fileIds)
|
||||
return
|
||||
}
|
||||
fileConfig.download(
|
||||
|
||||
@ -66,14 +66,14 @@ export default {
|
||||
},
|
||||
// 下载文件
|
||||
download: function(username, file, token) {
|
||||
fileApi.isAllowDownload().then(() => {
|
||||
fileApi.isAllowDownload({fileIds: [file.id]}).then(() => {
|
||||
let url = this.previewUrl(username, file, token) + '&o=download'
|
||||
window.open(url, '_self')
|
||||
})
|
||||
},
|
||||
// 打包下载文件
|
||||
packageDownload: function(fileIds, token, username) {
|
||||
fileApi.isAllowDownload().then(() => {
|
||||
packageDownload: function(fileIds) {
|
||||
fileApi.isAllowDownload({fileIds: fileIds}).then(() => {
|
||||
fileIds = fileIds.join(',')
|
||||
window.open(`${this.baseUrl}/packageDownload?fileIds=${fileIds}`, '_self')
|
||||
})
|
||||
|
||||
@ -614,7 +614,7 @@ export default {
|
||||
fileIds.push(this.rowContextData.id)
|
||||
}
|
||||
if (fileIds.length > 1 || this.rowContextData.isFolder) {
|
||||
fileConfig.packageDownload(fileIds, this.$store.state.user.token, this.$store.state.user.name)
|
||||
fileConfig.packageDownload(fileIds)
|
||||
return
|
||||
}
|
||||
fileConfig.download(this.$store.state.user.name, this.rowContextData, this.$store.state.user.token)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user