From 20baee9438fdae56c87d9e8596343ccd62d218d2 Mon Sep 17 00:00:00 2001 From: babbage <601728820@qq.com> Date: Sat, 29 Dec 2018 10:49:05 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E9=94=99=E8=AF=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=81=9C=E7=95=99=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E3=80=82?= =?UTF-8?q?2.=20=E5=BD=93=E7=94=A8=E6=88=B7=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E7=9A=84=E8=AE=BF=E9=97=AE=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=88=96?= =?UTF-8?q?=E8=80=85=E9=94=99=E8=AF=AF=E9=A1=B5=E9=9D=A2=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=A9=BA=E7=99=BD=E9=93=BE=E6=8E=A5=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=88=90=E5=BD=93=E5=A0=86=E6=A0=88=E6=9C=89=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E6=97=B6=E8=B7=B3=E4=B8=8A=E4=B8=80=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E5=90=A6=E5=88=99=E8=B7=B3=E4=B8=BB=E9=A1=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/index.js | 5 +++++ src/view/error-page/back-btn-group.vue | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index 6739a85a5..ef1ec6bd3 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -27,6 +27,11 @@ export default { /** * @description 需要加载的插件 */ + /** + * @description 错误页面停留时长,秒单位 + */ + error_page_stay_time: 5, + plugin: { 'error-store': { showInHeader: true, // 设为false后不会在顶部显示错误日志徽标 diff --git a/src/view/error-page/back-btn-group.vue b/src/view/error-page/back-btn-group.vue index 4bbda48c5..1efdc8cd2 100644 --- a/src/view/error-page/back-btn-group.vue +++ b/src/view/error-page/back-btn-group.vue @@ -11,7 +11,7 @@ export default { name: 'backBtnGroup', data () { return { - second: 5, + second: this.$config.error_page_stay_time, timer: null } }, @@ -22,7 +22,11 @@ export default { }) }, backPrev () { - this.$router.go(-1) + window.history.length > 1 + ? this.$router.go(-1) + : this.$router.replace({ + name: this.$config.homeName + }) } }, mounted () {