From 7b8acc0a899528c2d204d45b6c08e760c3f113e1 Mon Sep 17 00:00:00 2001
From: jianbo <263303411@qq.com>
Date: Wed, 7 Aug 2019 10:51:39 +0800
Subject: [PATCH] =?UTF-8?q?python=E5=AD=A6=E4=B9=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 161 +++++++++++++++-------------
mina | 2 +-
web/interceptors/AuthInterceptor.py | 4 +
www.py | 4 +-
4 files changed, 93 insertions(+), 78 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index beb90ec..ae136e9 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,13 +3,9 @@
-
-
-
-
-
+
@@ -29,10 +25,10 @@
-
+
-
+
@@ -41,22 +37,35 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -70,6 +79,15 @@
+
+
+
+
+
+
+
+
+
@@ -84,24 +102,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -157,7 +157,6 @@
-
@@ -199,12 +198,13 @@
-
-
+
+
+
@@ -218,10 +218,10 @@
-
-
-
-
+
+
+
+
@@ -503,7 +503,14 @@
1565083000494
-
+
+ 1565144368928
+
+
+
+ 1565144368928
+
+
@@ -516,9 +523,9 @@
-
+
-
+
@@ -530,13 +537,13 @@
-
+
-
+
-
+
@@ -726,13 +733,6 @@
-
-
-
-
-
-
-
@@ -774,13 +774,6 @@
-
-
-
-
-
-
-
@@ -788,16 +781,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -815,13 +798,6 @@
-
-
-
-
-
-
-
@@ -831,10 +807,45 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mina b/mina
index a263c74..e4845b7 160000
--- a/mina
+++ b/mina
@@ -1 +1 @@
-Subproject commit a263c7422a7e7a3bbf035a11c1763eef3340b89d
+Subproject commit e4845b73baabd480ca5a1bc78684180b96ba6e4c
diff --git a/web/interceptors/AuthInterceptor.py b/web/interceptors/AuthInterceptor.py
index 39ef1c9..61af630 100644
--- a/web/interceptors/AuthInterceptor.py
+++ b/web/interceptors/AuthInterceptor.py
@@ -14,11 +14,15 @@ def before_request():
ignore_check_login_urls = app.config['IGNORE_CHECK_LOGIN_URLS']
path = request.path
+
# 如果是静态文件就不要查询用户信息了
pattern = re.compile('%s' % "|".join(ignore_check_login_urls))
if pattern.match(path):
return
+ if '/api' in path:
+ return
+
user_info = check_login()
g.current_user=None
if user_info:
diff --git a/www.py b/www.py
index cce2ec6..25c0871 100644
--- a/www.py
+++ b/www.py
@@ -4,8 +4,8 @@ from application import app
'''
统一拦截处理和统一错误处理
'''
-# from web.interceptors.AuthInterceptor import *
-# from web.interceptors.ApiAuthInterceptor import *
+from web.interceptors.AuthInterceptor import *
+from web.interceptors.ApiAuthInterceptor import *
from web.interceptors.ErrorInterceptor import *
'''