diff --git a/jero-web/public/api_address_config.js b/jero-web/public/api_address_config.js index 619af5f89..2b5512066 100644 --- a/jero-web/public/api_address_config.js +++ b/jero-web/public/api_address_config.js @@ -3,11 +3,11 @@ */ window._CONFIG = {} window._CONFIG['domianURL'] = '/jero-boot' // 路由转发 devServer -window._CONFIG['domianPreviewURL'] = '' -window._CONFIG['domianWebSocketURL'] = '' +window._CONFIG['domianPreviewURL'] = localStorage.getItem('domianWebSocketURL') ? localStorage.getItem('domianWebSocketURL') : '' +window._CONFIG['domianWebSocketURL'] = localStorage.getItem('domianWebSocketURL') ? localStorage.getItem('domianWebSocketURL') : '' // 单点登录地址 window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/download' window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe' window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas' // 预览文件地址 -window._CONFIG['onlinePreviewDomainURL'] = '' +window._CONFIG['onlinePreviewDomainURL'] = localStorage.getItem('onlinePreviewDomainURL') ? localStorage.getItem('onlinePreviewDomainURL') : '' diff --git a/jero-web/src/components/tools/HeaderNotice.vue b/jero-web/src/components/tools/HeaderNotice.vue index d4dd5b492..ff0621ce9 100644 --- a/jero-web/src/components/tools/HeaderNotice.vue +++ b/jero-web/src/components/tools/HeaderNotice.vue @@ -154,7 +154,7 @@ console.log('断开了:' + err) self.connection() } - }, 10000) + }, 5000) }, websocketOnerror: function(e) { console.log('WebSocket连接发生错误') diff --git a/jero-web/src/store/modules/user.js b/jero-web/src/store/modules/user.js index 267c01c93..5743ceaa5 100644 --- a/jero-web/src/store/modules/user.js +++ b/jero-web/src/store/modules/user.js @@ -84,9 +84,8 @@ const user = { Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000) Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) - window._CONFIG['domianPreviewURL'] = result.domianWebSocketURL+'/jero-boot' - window._CONFIG['domianWebSocketURL'] = result.domianWebSocketURL+'/jero-boot' - window._CONFIG['onlinePreviewDomainURL'] = result.onlinePreviewDomainURL+'/onlinePreview' + Vue.ls.set('domianWebSocketURL', result.domianWebSocketURL) + Vue.ls.set('onlinePreviewDomainURL', result.onlinePreviewDomainURL) commit('SET_TOKEN', result.token) commit('SET_INFO', userInfo) commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) @@ -132,6 +131,9 @@ const user = { const menuData = response.result.menu const authData = response.result.auth const allAuthData = response.result.allAuth + window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot' + window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot' + window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview' const onlinePreviewDomainURL = response.result.onlinePreviewDomainURL const domianWebSocketURL = response.result.domianWebSocketURL //Vue.ls.set(USER_AUTH,authData); diff --git a/jero-web/src/views/documentManage/library/docDetail/index.vue b/jero-web/src/views/documentManage/library/docDetail/index.vue index a6714dca2..0a5a6ee3a 100644 --- a/jero-web/src/views/documentManage/library/docDetail/index.vue +++ b/jero-web/src/views/documentManage/library/docDetail/index.vue @@ -247,8 +247,6 @@ let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { - console.log(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) - downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id }) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') } else {