diff --git a/.env.production b/.env.production index 895daab..9534587 100644 --- a/.env.production +++ b/.env.production @@ -6,3 +6,7 @@ ENV = 'production' # 扫码连网/生产环境 VUE_APP_BASE_API = 'https://www.jichuanglanhai.com:9038' + + +#服务器环境退出登录问题 +VUE_APP_LOGIN_OUT="/demo/netEwm" diff --git a/src/components/VideoUpload/index.vue b/src/components/VideoUpload/index.vue index 82c6893..d695fe3 100644 --- a/src/components/VideoUpload/index.vue +++ b/src/components/VideoUpload/index.vue @@ -96,8 +96,16 @@ export default { this.$modal.msgError("视频大小不能超过50MB"); return false; } + if (this.isContainChinese(file.name)) { + this.$modal.msgError("视频文件名不能包含中文字符"); + return false; + } this.isShowUploadVideo = false; }, + isContainChinese(str) { + const reg = /[^\x00-\xff]/; + return reg.test(str); + }, //进度条 uploadVideoProcess(event, file, fileList) { //注意在data中添加对应的变量名 diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 985232e..7e92b5d 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -98,6 +98,7 @@ export default { }, }, }, + methods: { toggleSideBar() { this.$store.dispatch("app/toggleSideBar"); @@ -110,8 +111,11 @@ export default { }) .then(() => { this.$store.dispatch("LogOut").then(() => { - // location.href = "/index"; - this.$router.replace("/login"); + if (process.env.NODE_ENV == "production") { + location.href = process.env.VUE_APP_LOGIN_OUT + "/login"; + } else { + location.href = "/login"; + } }); }) .catch(() => {}); diff --git a/src/store/modules/tagsView.js b/src/store/modules/tagsView.js index 41b8f09..5c31261 100644 --- a/src/store/modules/tagsView.js +++ b/src/store/modules/tagsView.js @@ -5,6 +5,9 @@ const state = { }; const mutations = { + CLOSE_LIST: (state, list) => { + state.visitedViews = list; + }, ADD_IFRAME_VIEW: (state, view) => { if (state.iframeViews.some((v) => v.path === view.path)) return; state.iframeViews.push( diff --git a/src/utils/request.js b/src/utils/request.js index 0af5a92..927f081 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -120,8 +120,11 @@ service.interceptors.response.use( .then(() => { isRelogin.show = false; store.dispatch("LogOut").then(() => { - // location.href = "/index"; - router.replace("/login"); + if (process.env.NODE_ENV == "production") { + location.href = process.env.VUE_APP_LOGIN_OUT + "/login"; + } else { + location.href = "/login"; + } }); }) .catch(() => { diff --git a/src/views/netEwm/net/index.vue b/src/views/netEwm/net/index.vue index 9cc09d2..242baca 100644 --- a/src/views/netEwm/net/index.vue +++ b/src/views/netEwm/net/index.vue @@ -161,6 +161,7 @@ >