From 63e8714f6c4dd15d1a14b8716b882da4534b6f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=9D=B0?= Date: Wed, 2 Jan 2019 10:08:13 +0800 Subject: [PATCH] =?UTF-8?q?v1.1=20=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83,?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5=E5=90=8E=E7=AB=AFv1.1?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/dev.env.js | 2 +- src/views/monitor/log/msg.vue | 6 +++--- src/views/system/user/center/updateEmail.vue | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/dev.env.js b/config/dev.env.js index 031402a..53ca896 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -4,5 +4,5 @@ const prodEnv = require('./prod.env') module.exports = merge(prodEnv, { NODE_ENV: '"development"', - BASE_API: '"http://localhost:8000"' + BASE_API: '"http://api.auauz.net"' }) diff --git a/src/views/monitor/log/msg.vue b/src/views/monitor/log/msg.vue index c612261..e12b6a6 100644 --- a/src/views/monitor/log/msg.vue +++ b/src/views/monitor/log/msg.vue @@ -60,7 +60,7 @@ export default { beforeDestroy: function() { // 页面离开时断开连接,清除定时器 this.disconnect() - clearInterval(this.timer) + window.clearInterval(this.timer) }, methods: { time(date) { @@ -69,7 +69,7 @@ export default { initWebSocket() { this.connection(this) // 断开重连机制,尝试发送消息,捕获异常发生时重连 - this.timer = setInterval(() => { + this.timer = window.setInterval(() => { try { this.stompClient.send('test') } catch (err) { @@ -103,7 +103,7 @@ export default { disconnect() { if (this.stompClient != null) { this.stompClient.disconnect() - clearInterval(this.timer) + window.clearInterval(this.timer) } }, getColor(level) { diff --git a/src/views/system/user/center/updateEmail.vue b/src/views/system/user/center/updateEmail.vue index 7e35655..cc57d08 100644 --- a/src/views/system/user/center/updateEmail.vue +++ b/src/views/system/user/center/updateEmail.vue @@ -60,7 +60,7 @@ export default { loading: false, dialog: false, title: '修改邮箱', form: { pass: '', email: '', code: '' }, user: { email: '', password: '' }, codeLoading: false, codeData: { type: 'email', value: '' }, - buttonName: '获取验证码', isDisabled: false, time: 60, + buttonName: '获取验证码', isDisabled: false, time: 5, rules: { pass: [ { required: true, validator: validatePass, trigger: 'blur' } @@ -98,9 +98,9 @@ export default { --_this.time if (_this.time < 0) { _this.buttonName = '重新发送' - _this.time = 60 + _this.time = 5 _this.isDisabled = false - clearInterval(_this.timer) + window.clearInterval(_this.timer) } }, 1000) }).catch(err => { @@ -135,8 +135,8 @@ export default { resetForm() { this.dialog = false this.$refs['form'].resetFields() - clearInterval(this.timer) - this.time = 60 + window.clearInterval(this.timer) + this.time = 5 this.buttonName = '获取验证码' this.isDisabled = false this.form = { pass: '', email: '', code: '' }