From cceddb9e8755e84c5e9fe489113004b293a11136 Mon Sep 17 00:00:00 2001 From: Gao xiaosong <704041637@qq.com> Date: Thu, 4 Jun 2020 00:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9C=AA=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E8=BF=9B=E8=A1=8C=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/authorization/index.vue | 24 +++++++++++------------- pages/user/User/index.vue | 7 ++++++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pages/authorization/index.vue b/pages/authorization/index.vue index af7b6dd..29b8989 100644 --- a/pages/authorization/index.vue +++ b/pages/authorization/index.vue @@ -115,20 +115,18 @@ export default { this.changeAuthorization(false); }, mounted() { - // console.log("当前是授权页面,11111"); - // this.UPDATE_AUTHORIZATIONPAGE(true); + this.UPDATE_AUTHORIZATIONPAGE(true); // // 先校验用户是否授权,如果没有授权,显示授权按钮 - // console.log("先校验用户是否授权,如果没有授权,显示授权按钮"); - // authorize("userInfo") - // .then(res => { - // console.log(res); - // this.authorize = false; - // }) - // .catch(error => { - // console.log(error); - // // 用户未授权,显示授权按钮 - // this.authorize = true; - // }); + console.log("先校验用户是否授权,如果没有授权,显示授权按钮"); + authorize("userInfo") + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + // 用户未授权,显示授权按钮 + this.authorize = true; + }); } }; diff --git a/pages/user/User/index.vue b/pages/user/User/index.vue index fb60075..827c7ee 100644 --- a/pages/user/User/index.vue +++ b/pages/user/User/index.vue @@ -164,11 +164,11 @@