From 7113b4f2dd47a313c6fbc85c21f4756da42b212a Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Mon, 11 Jan 2021 17:06:18 +0800
Subject: [PATCH] gx

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

diff --git a/hive-app/common/jssdk/httpUtils.js b/hive-app/common/jssdk/httpUtils.js
index 51515d7..f08d3b5 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,16 @@
 		});
 	},
 	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')
+	},
+	getUserFunction(){
+		return StorageUtil.getStorage('userInfo','userFunction')
 	}
  }
  export default httpUtils;
\ No newline at end of file

--
Gitblit v1.9.1