修复:分享页面的文件下载

修复:生产环境下的websocketUrl
This commit is contained in:
jmal 2020-10-21 17:41:12 +08:00
parent 2028603ad2
commit 2d07c77a3e
6 changed files with 9 additions and 6 deletions

View File

@ -2,4 +2,4 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/'
VUE_APP_BASE_API = '/api'

View File

@ -4,4 +4,4 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/'
VUE_APP_BASE_API = '/api'

View File

@ -21,7 +21,7 @@ export default {
window.open(url, '_self')
},
publicDownload: function(shareId, file) {
let url = `${this.baseUrl}/public/s/download/${file.id}/${shareId}ff`
let url = `${this.baseUrl}/public/s/download/${file.id}/${shareId}`
window.open(url, '_self')
},
packageDownload: function(fileIds, token) {

View File

@ -919,7 +919,7 @@
return
}
// 打开文件
fileConfig.preview(this.$store.state.user.token, row)
fileConfig.publicPreview(row.id)
}
}
}

View File

@ -870,7 +870,7 @@
return
}
// 打开文件
fileConfig.preview(this.$store.state.user.token, row)
fileConfig.publicPreview(row.id)
}
}
}

View File

@ -1,9 +1,12 @@
let host = window.location.host;
let url = `${document.location.protocol}//${host}`;
if(process.env.NODE_ENV === 'development'){
if (window.location.port.length > 0) {
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
}
const url = `${document.location.protocol}//${host}:8088`;
url = `${document.location.protocol}//${host}:8088`;
}
let stompClient = '';
let isConnected = false;
let timer = '';