GM后台修改status code

This commit is contained in:
luying
2020-10-17 16:39:17 +08:00
parent 76a6259fbc
commit 81bce4f57b
10 changed files with 134 additions and 321 deletions

View File

@@ -1,4 +1,5 @@
import { Controller } from 'egg';
import { STATUS } from '@consts/statusCode';
export default class UserController extends Controller {
@@ -32,10 +33,7 @@ export default class UserController extends Controller {
} else if (optType == 'item') {
ctx.body = await ctx.service.users.createItem(uids, itemid, itemcount);
} else {
ctx.body = {
status: 'error',
data: '参数错误'
}
ctx.body = ctx.service.utils.resResult(STATUS.WRONG_PARMS);
}
}
}