chenjunkai 5 years ago
parent
commit
bda0032f9e
1 changed files with 6 additions and 7 deletions
  1. 6 7
      Controller/UserController.py

+ 6 - 7
Controller/UserController.py

@@ -1263,11 +1263,8 @@ class InitInfoView(View):
         response = ResponseObject()
         token = request_dict.get('token', None)
         tko = TokenObject(token)
-        if tko.code == 0:
-            userID = tko.userID
-            return self.init_info(request_dict, userID, response)
-        else:
-            return response.json(tko.code)
+        userID = tko.userID
+        return self.init_info(request_dict, userID, response)
 
     # 初始化设备token
     def init_info(self, request_dict, userID, response):
@@ -1280,7 +1277,7 @@ class InitInfoView(View):
         lang = request_dict.get('lang', '')  # 语言区域
         is_ver = request_dict.get('is_ver', 0)  # 判断是否为对接新接口的app版本
         now_time = int(time.time())
-        if all([token_val, push_type, appBundleId]):
+        if all([token_val, push_type, appBundleId,userID]):
             push_type = int(push_type)
             if push_type == 0:
                 if appBundleId not in APNS_CONFIG.keys():
@@ -1335,13 +1332,15 @@ class InitInfoView(View):
             # 广告模块
             res['ad_module'] = {
                 "time": 0,
-                "start_path": "https://test.dvema.com/web/static/image/default_start",
+                "start_path": "",
                 "ad_path": [
                     "https://test.dvema.com/web/static/image/default_ad1",
                     "https://test.dvema.com/web/static/image/default_ad2",
                     "https://test.dvema.com/web/static/image/default_ad3",
                 ]
             }
+            res['init_img'] = 'https://test.dvema.com/web/static/image/default_start'
+            # http: // test.dvema.com / web / static / image / default_start_750_1334.jpg
         return response.json(0, res)