浏览代码

update field

lang 4 年之前
父节点
当前提交
e732bf213c
共有 1 个文件被更改,包括 14 次插入1 次删除
  1. 14 1
      Controller/UserController.py

+ 14 - 1
Controller/UserController.py

@@ -14,7 +14,7 @@
 import datetime
 import traceback
 import time
-
+import logging
 import jwt
 import simplejson
 import simplejson as json
@@ -1836,22 +1836,35 @@ class InitInfoView(View):
     # 初始化设备token
     def init_info(self, request_dict, userID, response, request):
         # 未读的系统消息
+        logger = logging.getLogger('django')
+        logger.info('init-------------begin')
+
         token_val = request_dict.get('token_val', None)
         m_code = request_dict.get('m_code', None)
         push_type = request_dict.get('push_type', None)
         appBundleId = request_dict.get('appBundleId', None)
+        logger.info(push_type)
+        logger.info(type(push_type))
+        logger.info(appBundleId)
+        logger.info(type(appBundleId))
+
         tz = request_dict.get('tz', '0')
         lang = request_dict.get('lang', '')  # 语言区域
         now_time = int(time.time())
         if all([token_val, push_type, appBundleId, userID]):
             push_type = int(push_type)
             if push_type == 0:
+                logger.info('------------0')
                 if appBundleId not in APNS_CONFIG.keys():
                     return response.json(904)
             elif push_type == 1:
+                logger.info('------------1')
+
                 if appBundleId not in FCM_CONFIG.keys():
                     return response.json(904)
             elif push_type == 2:
+                logger.info('------------2')
+
                 if appBundleId not in JPUSH_CONFIG.keys():
                     return response.json(904)
             else: