From c32ed846a082019fc60f9492ba62dbc7fdf58dab Mon Sep 17 00:00:00 2001 From: kevin jiang Date: Sat, 20 Jun 2020 03:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/CustomerView.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/home/CustomerView.vue b/src/pages/home/CustomerView.vue index 71c418e..7f97ff2 100644 --- a/src/pages/home/CustomerView.vue +++ b/src/pages/home/CustomerView.vue @@ -200,7 +200,7 @@ }, data() { return { - userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, + userId: null, intervalId : 0, //加载遮罩 spinShow: false, @@ -286,6 +286,12 @@ }, }, mounted: function () { + if(!JSON.parse(sessionStorage.getItem("loginInfo"))){ + this.$router.push("/login"); + return; + } + this.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId; + this.dateBtnClick('今日'); this.timingRefresh(); },