修复:使用nginx代理访问时,下载多个文件失败的问题
This commit is contained in:
parent
2723a73b47
commit
e24350cb85
@ -8,7 +8,7 @@
|
||||
<!--在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
|
||||
<link rel="icon" href="<%= BASE_URL %>netdisk.png">
|
||||
<link rel="icon" href="<%= BASE_URL %>facion.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
|
||||
</head>
|
||||
|
||||
@ -2243,7 +2243,20 @@
|
||||
}else{
|
||||
fileIds.push(this.rowContextData.id)
|
||||
}
|
||||
window.open(process.env.VUE_APP_BASE_FILE_API + 'download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
||||
let host = window.location.host
|
||||
if(window.location.port.length > 0){
|
||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
||||
}
|
||||
console.log(host)
|
||||
if(process.env.NODE_ENV !== 'development'){
|
||||
let host = window.location.host
|
||||
if(window.location.port.length > 0){
|
||||
host = window.location.host.substring(0,window.location.host.length - window.location.port.length - 1)
|
||||
}
|
||||
window.open(`http://${host}:8088/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')
|
||||
}
|
||||
} else {
|
||||
this.$message({
|
||||
message: '所选文件为空',
|
||||
|
||||
@ -164,18 +164,18 @@ export const constantRoutes = [
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/demo',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'demo',
|
||||
component: () => import('@/views/demo/index'),
|
||||
meta: { title: 'demo', icon: 'example' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/demo',
|
||||
// component: Layout,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'index',
|
||||
// name: 'demo',
|
||||
// component: () => import('@/views/demo/index'),
|
||||
// meta: { title: 'demo', icon: 'example' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
{
|
||||
path: '/markdown',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user