From ee465fff7508c85cb94aa69891eb683a80f703f7 Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 5 Mar 2019 20:44:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=B3=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=94=A8=E6=88=B7=E8=B5=84=E6=96=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.wpy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.wpy b/src/app.wpy index 43cb89f..6e1b328 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -133,6 +133,11 @@ export default class extends wepy.app { } } getUserInfo() { + if (!this.globalData.userInfo) { + if (wepy.getStorageSync('userInfo')) { + this.globalData.userInfo = JSON.parse(wepy.getStorageSync('userInfo')); + } + } return this.globalData.userInfo } checkAuthorize() {