chanjunkai 5 tahun lalu
induk
melakukan
ca0039b707
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Controller/Alexa.py

+ 1 - 1
Controller/Alexa.py

@@ -99,7 +99,7 @@ class AlexaConnectNum(TemplateView):
             cursor.execute("SELECT FROM_UNIXTIME(data_time,'%Y-%m') as month, max(num) as max_num FROM alexa_statistics GROUP BY month order by month asc LIMIT 12")
             res_query = cursor.fetchall()
             for max_num, month in res_query:
-                res.append({'num':max_num, 'month':month})
+                res.append({'num':month, 'month':max_num})
 
         res_desc = {'result_code': 0, 'reason': '成功', 'current_num':current_connect_num, 'top_num': res, 'error_code': 0}
         result_json = json.dumps(res_desc, ensure_ascii=False)