chenjunkai 5 жил өмнө
parent
commit
1b51997fd3

+ 4 - 8
Controller/DetectController.py

@@ -31,16 +31,12 @@ from Object.TokenObject import TokenObject
 from Object.UidTokenObject import UidTokenObject
 from Service.CommonService import CommonService
 from Object.ETkObject import ETkObject
+'''
+http://test.dvema.com/detect/changeStatus?push_type=2&token_val=1507bfd3f7ba3bbb551&appBundleId=com.ansjer.zccloud_ab&tz=+08.00&uid=T4AZ3CUKCERH9FZA111A&status=1&m_code=AN020000own000000unkn.zccloud_ab&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzUxOTAxNjksInVzZXJJRCI6IjE1Njc3NTgyMTg2MTkxMzgwMDEzODAwMCIsImxhbmciOiJ0YyIsInVzZXIiOiIxMzExOTY1NzcxMyJ9.rQ11jA3IQPxQofFbZyG0nvLhGVcxOR82N2qQ8i04VuU&lang=tc&app_type=2
+http://test.push.dvema.com/notify/push?uidToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJUNEFaM0NVS0NFUkg5RlpBMTExQSJ9.GtrXeq5gb2Z9M3mKECxi9eNQbPxqC-6PtgJkOOg6PwI&n_time=1598456451&channel=1&event_type=1&is_st=1
+'''
 
-
-# http://192.168.136.40:8077/detect/changeStatus?uid=JW3684H8BSHG9TTM111A&token_val=18071adc03536302f34&appBundleId=com.ansjer.zccloud_ab&push_type=2&token=local&status=1&app_type=1&m_code=12
 class DetectControllerView(View):
-    @method_decorator(csrf_exempt)
-    def dispatch(self, *args, **kwargs):
-        return super(DetectControllerView, self).dispatch(*args, **kwargs)
-
-    # def __init__(self):
-    #     self.ip = ''
 
     def get(self, request, *args, **kwargs):
         request.encoding = 'utf-8'

+ 1 - 1
Controller/UserController.py

@@ -1468,7 +1468,6 @@ class wxAuthSignView(TemplateView):
     # 登录
     def do_login(self, user_qs, response):
         now_time = datetime.datetime.utcnow().replace(tzinfo=utc).astimezone(utc)
-        user_qs.update(last_login=now_time, online=True)
         userID = user_qs[0].userID
         print('userID' + userID)
         tko = TokenObject()
@@ -1493,6 +1492,7 @@ class wxAuthSignView(TemplateView):
         res['userEmail'] = user_list[0]["userEmail"] if user_list[0]["userEmail"] is not None else ''
         res['phone'] = user_list[0]["phone"] if user_list[0]["phone"] is not None else ''
         print(res)
+        user_qs.update(last_login=now_time, online=True)
         return response.json(0, res)
 
     def do_register(self, userID, nickname, response, appBundleId, openid):