Browse Source

打印日志 - 绑定微信获取access_token返回数据

linhaohong 1 năm trước cách đây
mục cha
commit
72f6645436
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      Controller/UserController.py

+ 3 - 3
Controller/UserController.py

@@ -1383,9 +1383,9 @@ class v3registerView(TemplateView):
                 create_data["region_country"] = number
             Device_User.objects.create(**create_data)
             if push_scription:
-                UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=1)
+                UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=1, created_time=int(time.time()), updated_time=int(time.time()))
             else:
-                UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=0)
+                UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=0, created_time=int(time.time()), updated_time=int(time.time()))
 
         except Exception as e:
             errorInfo = traceback.format_exc()
@@ -2944,7 +2944,7 @@ class wxPerfectView(TemplateView):
                         format(appid=appid, secret=secret, code=grant_code)
                     res_req = requests.get(url=at_url)
                     res_json = res_req.json()
-                    print(res_json)
+                    LOGGER.info(f"绑定微信获取access_token返回数据:{res_json}")
                     if 'access_token' not in res_json.keys():
                         # 授权过期
                         return response.json(717)