From 199286ab2e124186055856cc4432adb5b4fd7610 Mon Sep 17 00:00:00 2001 From: "617594538@qq.com" Date: Mon, 8 Jun 2020 15:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HSLink-front/src/components/Index.vue | 6 +++--- HSLink-front/src/components/PersonalInfo.vue | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/HSLink-front/src/components/Index.vue b/HSLink-front/src/components/Index.vue index 9a39dfa..5524b3e 100644 --- a/HSLink-front/src/components/Index.vue +++ b/HSLink-front/src/components/Index.vue @@ -34,7 +34,7 @@ - + @@ -80,9 +80,9 @@ }) }, goPersonalInfo(userId) { - this.$router.push({name: 'personalinfo'}); sessionStorage.setItem("userId",userId); - setTimeout(()=>{location.reload()},500) + this.$refs.child.getUserInfo(); + this.$router.push({name: 'personalinfo'}); }, goMore() { this.$message({ diff --git a/HSLink-front/src/components/PersonalInfo.vue b/HSLink-front/src/components/PersonalInfo.vue index 357b4d5..52e5607 100644 --- a/HSLink-front/src/components/PersonalInfo.vue +++ b/HSLink-front/src/components/PersonalInfo.vue @@ -197,7 +197,10 @@ } }, mounted() { - // setInterval(()=>{ + this.getUserInfo(); + }, + methods: { + getUserInfo() { let userInfo = JSON.parse(sessionStorage.getItem("userInfo")); if (userInfo.user_id === sessionStorage.getItem("userId")) { this.isOwn = true @@ -218,9 +221,7 @@ user_id: r.personalInfo.user_id, } }) - // },1000) - }, - methods: { + }, deleteLetter(id,type) { this.$confirm('删除该私信?, 是否继续?', '删除', { confirmButtonText: '确定',