You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
740 B
23 lines
740 B
3 months ago
|
# -*- coding: utf-8 -*-
|
||
|
"""
|
||
|
statusCode.responseEntity
|
||
|
~~~~~~~~~~~~~~
|
||
|
|
||
|
返回类型,数据为json,状态为200或500.
|
||
|
|
||
|
:copyright: 云南新八达科技有限公司.
|
||
|
:author: 李进才.
|
||
|
"""
|
||
|
from flask import Response
|
||
|
from statusCode.result import *
|
||
|
|
||
|
|
||
|
def SuccessResponse(resultCode, data, token):
|
||
|
return Response(response=resultData(resultCode.value['code'], resultCode.value['message'], data, token).value(),
|
||
|
status=200, mimetype="application/json")
|
||
|
|
||
|
|
||
|
def BadResponse(resultCode, data, token):
|
||
|
return Response(response=resultData(resultCode.value['code'], resultCode.value['message'], data, token).value(),
|
||
|
status=500, mimetype="application/json")
|