修改打包下载api
This commit is contained in:
parent
a7ed85d2db
commit
fbbcd72f19
File diff suppressed because it is too large
Load Diff
@ -556,15 +556,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
let host = window.location.host
|
||||||
let host = window.location.host
|
if (window.location.port.length > 0) {
|
||||||
if(window.location.port.length > 0){
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
|
||||||
}
|
|
||||||
window.open(`${document.location.protocol}//${host}:10010/download?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`,'_self')
|
|
||||||
}else{
|
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + '/download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
|
||||||
}
|
}
|
||||||
|
let api = '/api/packageDownload'
|
||||||
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
|
api = '/api/download'
|
||||||
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件夹为空',
|
message: '所选文件夹为空',
|
||||||
|
|||||||
@ -867,16 +867,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
|
let host = window.location.host
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
if (window.location.port.length > 0) {
|
||||||
let host = window.location.host
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
if(window.location.port.length > 0){
|
|
||||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
|
||||||
}
|
|
||||||
window.open(`${document.location.protocol}//${host}:10010/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`,'_self')
|
|
||||||
}else{
|
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + `/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`, '_self')
|
|
||||||
}
|
}
|
||||||
|
let api = '/api/packageDownload'
|
||||||
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
|
api = '/api/download'
|
||||||
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件为空',
|
message: '所选文件为空',
|
||||||
|
|||||||
@ -818,16 +818,15 @@
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
|
let host = window.location.host
|
||||||
if(process.env.NODE_ENV !== 'development'){
|
if (window.location.port.length > 0) {
|
||||||
let host = window.location.host
|
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
|
||||||
if(window.location.port.length > 0){
|
|
||||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
|
||||||
}
|
|
||||||
window.open(`${document.location.protocol}//${host}:10010/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`,'_self')
|
|
||||||
}else{
|
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + `/public/s/download?&share=${this.shareId}&fileIds=${fileIds}`, '_self')
|
|
||||||
}
|
}
|
||||||
|
let api = '/api/packageDownload'
|
||||||
|
if (fileIds.length === 1 && !this.rowContextData.isFolder) {
|
||||||
|
api = '/api/download'
|
||||||
|
}
|
||||||
|
window.open(`${document.location.protocol}//${host}${api}?jmal-token=${this.$store.state.user.token}&fileIds=${fileIds}`, '_self')
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '所选文件为空',
|
message: '所选文件为空',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user