Explorar o código

修改返回空字符串

zhangdongming %!s(int64=2) %!d(string=hai) anos
pai
achega
3e1aac9af8
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      Controller/AppSetController.py

+ 3 - 3
Controller/AppSetController.py

@@ -196,13 +196,13 @@ class AppSetView(View):
         popups_qs = PopupsConfig.objects.filter(tag=2, lang=lang) \
             .values('title', 'content', 'start_time', 'end_time', 'tag')
         if not popups_qs.exists():
-            return ''
+            return {}
         ai_device = AppSetView.get_user_ai_device(user_id)
         if not ai_device:
-            return ''
+            return {}
         # 当前时间小于弹窗开始时间或者大于结束时间 则返回空字符串
         if not popups_qs[0]['start_time'] <= now_time <= popups_qs[0]['end_time']:
-            return ''
+            return {}
         user_ai_log_qs = UserOperationLog.objects.filter(user_id=user_id, type=2).values('created_time')
         user_log = {'user_id': user_id, 'status': 1, 'type': 2, 'created_time': now_time, 'updated_time': now_time}
         popups_status = 0