增加code: 0的回报数据
This commit is contained in:
parent
a055327bd7
commit
86491da7cf
|
@ -79,6 +79,7 @@ int main() {
|
||||||
|
|
||||||
if ((row = mysql_fetch_row(res))) {
|
if ((row = mysql_fetch_row(res))) {
|
||||||
cJSON_AddNumberToObject(result_json, "code", 0);
|
cJSON_AddNumberToObject(result_json, "code", 0);
|
||||||
|
cJSON_AddStringToObject(result_json, "nickname", "admin");
|
||||||
} else {
|
} else {
|
||||||
cJSON_AddNumberToObject(result_json, "code", 1);
|
cJSON_AddNumberToObject(result_json, "code", 1);
|
||||||
cJSON_AddStringToObject(result_json, "msg", "用户名或口令错误");
|
cJSON_AddStringToObject(result_json, "msg", "用户名或口令错误");
|
||||||
|
|
Loading…
Reference in New Issue