Explorar el Código

优化模板接口

baoyubo hace 1 año
padre
commit
1f19a57e40
Se han modificado 1 ficheros con 8 adiciones y 9 borrados
  1. 8 9
      routers/api/gateway/__init__.py

+ 8 - 9
routers/api/gateway/__init__.py

@@ -774,15 +774,14 @@ async def v2(serviceid:str,request: Request, db: Session = Depends(get_db)):
         return {
             'code': 0,
             'msg': 'success',
-            'data': {"list": data,
-                     'pages': pages,  # 总页数
-                     'currentPage': current,  # 当前页数
-                     # 'current':current,
-                     # 'total' : total,
-                     'total': total,  # 总数据量
-                     # 'size':size,
-                     'pageSize': size  # 页码
-                     }
+            'rows': data,
+             'pages': pages,  # 总页数
+             'currentPage': current,  # 当前页数
+             # 'current':current,
+             # 'total' : total,
+             'total': total,  # 总数据量
+             # 'size':size,
+             'pageSize': size  # 页码
         }
 
     else: