resp.py 219 B

1234567891011121314
  1. # 响应基类
  2. def error_resp(msg, code=-1):
  3. return {
  4. "code": code,
  5. "msg": msg
  6. }
  7. def success_resp(data):
  8. return {
  9. "code": 0,
  10. "msg": "Successful",
  11. "data": data
  12. }