From 0f1afeb419f94da3e5c6098ae4f16123b41aecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=B4=87=E6=A0=8B?= <786631302qq.com> Date: Wed, 26 Aug 2020 10:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E5=92=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/center.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/views/center.vue b/src/views/center.vue index b4fc74d..74a50a5 100644 --- a/src/views/center.vue +++ b/src/views/center.vue @@ -19,7 +19,7 @@ - 修改密码 + 修改密码 @@ -32,6 +32,25 @@ export default { return { userInfo: {} }; + }, + methods: { + editPwd() { + localStorage.clear(); + sessionStorage.clear(); + this.$axios({ + url: "/app/userCenter", + method: "GET" + }).then(res => { + // res.url = "http://localhost:8080"; + window.open( + res.url + "?redirect=" + location.origin + "#/center", + "_self" + ); + }); + } + }, + mounted() { + this.userInfo = JSON.parse(localStorage.getItem('userInfo') || '{}') } };