From 01b55d7e82c3b13554a412e9c5be0fc96a4906a3 Mon Sep 17 00:00:00 2001
From: li-guang <153605324@qq.com>
Date: Tue, 05 Jan 2021 18:22:04 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/jyyforjava/hive-app

---
 hive-app/common/jssdk/httpUtils.js |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/hive-app/common/jssdk/httpUtils.js b/hive-app/common/jssdk/httpUtils.js
index 51515d7..7f4a4f6 100644
--- a/hive-app/common/jssdk/httpUtils.js
+++ b/hive-app/common/jssdk/httpUtils.js
@@ -45,9 +45,15 @@
 						    key: 'userInfo',
 						    success: (res) => {
 						        reject(result);
+								uni.navigateTo({
+									url: '/pages/login/index?isNotLogin=1'
+								})
 						    },
 							fail() {
 								reject(result);
+								uni.navigateTo({
+									url: '/pages/login/index'
+								})
 							}
 						});
 					}
@@ -59,10 +65,13 @@
 		});
 	},
 	isNotLogin(err) {
-	    if (!err || !err.status) {
-	       return false;
-	    }
-	    return err.status === 700014;
+	    return !err || !err.status || err.status == 700014;
+	},
+	getRoleInfo(){
+		return StorageUtil.getStorage('userInfo','roleInfo')
+	},
+	getToken(){
+		return StorageUtil.getStorage('userInfo','token')
 	}
  }
  export default httpUtils;
\ No newline at end of file

--
Gitblit v1.9.1