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.
 
 
 
 
 

33 lines
784 B

# -*- coding: utf-8 -*-
"""
statusCode.result
~~~~~~~~~~~~~~
返回前端的实体为code,message,data,token.
:copyright: 云南新八达科技有限公司.
:author: 李进才.
"""
import json
from utils.List2Json import *
class resultData(object):
code = None
message = None
data = None
token = None
def __init__(self, code, message, data, token):
self.code = code
self.message = message
self.data = data
self.token = token
def value(self):
"""
json data
:return: json data
"""
return json.dumps({'code': self.code, 'message': self.message, 'data': self.data, 'token': self.token},
cls=DecimalEncoder)