//请求登录的JSON数据{ ???"request":"login", ???"data": ???{ ???"username":"zhangsan", ???"password":"123", ???"client":"iphone", ???"other":"" ???}}//请求查询时候的JSON数据1.通过姓名查询{ ???"request":"queryByName", ???"data": ???{ ???"username":"zhangsan", ???"client":"iphone" ???}}2.通过工号查询{ ???"request":"queryById", ???"data": ???{ ???"teaID":"1650111", ?//具体看数据库字段怎么设计的 ???"client":"iphone" ???}}//请求修改密码的JSON数据{ ???"request":"changePassword", ???"data": ???{ ???"password":"123456" ???"client":"iphone" ???}}//登录成功返回的JSON数据{ ???"result":"success", ???"data": ???{ ???"request":"login", ???"username":"zhangsan", ???}}//登录错误返回的JSON数据,错误代码 000{ ???"result":"error", ???"error": ???{ ???"errorCode":"000", ???"errorMsg":"用户名或者密码不正确" ???}}//按姓名查询时错误返回的JSON数据,错误代码001{ ???"result":"error", ???"error": ???{ ???"errorCode":"001", ???"errorMsg":"用户名不存在" ???}}//按教师工号查询时错误返回的JSON数据,错误代码002{ ???"result":"error", ???"error": ???{ ???"errorCode":"002", ???"errorMsg":"教师工号不存在" ???}}//修改密码时候错误返回的数据003{ ???"result":"error", ???"error": ???{ ???"errorCode":"003", ???"errorMsg":"修改密码失败,不满足密码要求" ???}}
Socket传输JSON数据
原文地址:https://www.cnblogs.com/zzlback/p/8638426.html