From 228d70232e1ba90d9103895a7fb0485b080e6769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Thu, 30 Nov 2023 14:27:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 ++++ src/components/VideoUpload/index.vue | 8 ++++++++ src/layout/components/Navbar.vue | 8 ++++++-- src/store/modules/tagsView.js | 3 +++ src/utils/request.js | 7 +++++-- src/views/netEwm/net/index.vue | 5 ++++- 6 files changed, 30 insertions(+), 5 deletions(-) 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 @@ >
+
店铺名称:{{ code.posName }}
WI-FI名称:{{ code.wifiName }}
@@ -248,7 +249,9 @@ export default { }; getCode(data).then((res) => { this.code.imgs = "data:image/png;base64," + res.data; + this.code.wifiName = row.wifiName; + this.code.posName = row.posName; this.wifiopen = true; }); }, @@ -372,7 +375,7 @@ export default { height: 350px; } .netName { - margin-top: 6px; + margin-top: 10px; text-align: center; font-size: 16px; font-weight: bold;