1.前后端json对接的规范。
前后端的json代码规范
result ={
success:”true”,//true表示成功,false表示失败。
data:{}, //数据
errorCode:””,//错误码,下面有例子
message:””//报错原因
}
var ec = {
"00000101": "用户名或密码不能为空",
"00000102": "用户名不存在",
"00000103": "密码错误",
"00000104": "用户被禁止使用",
"00000105": "用户名不能为空",
"00000106": "用户名xxxxx已经存在(导入时动态显示错误用户名)",
"00000107": "登录会话超时,请重新登录",
"00000108": "导入用户失败,请联系管理员!",
"00000109": "手机号不能为空",
"00000110": "公司名不能为空",
"00000111": "公司地址不能为空",
"00000112": "联系电话不能为空",
"00000113": "邮箱不能为空",
"00000114": "手机号码xxxxx或者Email xxxx的用户已经存在!",
"00000115": "获取数据失败,请重试!",
"00000116": "新旧密码不能相同",
"00000118": "活动结束时间必须晚于今天",
"00000201": "上传文件失败",
"00000202": "上传的不是图片文件",
"00000203": "裁剪失败(原图无法下载)",
"00000205": "上传文档格式不正确",
"00000206": "上传的文件尺寸不能为0",
"00000231": "调用远程服务失败",
"00000204": "裁剪失败(裁剪图片时出现错误)",
"00000401": "未绑定公众号,操作失败",
"00000402": "您已被纳入黑名单,操作失败",
"00000403": "非法请求",
"00000405" : "绑定失败,公众号信息无效",
"00000901": "当前组下没有用户"
};
2.