添加远征匹配玩家方法
This commit is contained in:
@@ -30,7 +30,6 @@ export default class UserController extends Controller {
|
||||
|
||||
public async createRoleData() {
|
||||
const { ctx } = this;
|
||||
console.log(ctx.request.body)
|
||||
const { hid, hlv, eid, elv, ecount, ehid, itemid, itemcount, selectedRowKeys: uids, optType } = ctx.request.body;
|
||||
if(optType == 'hero') {
|
||||
ctx.body = await ctx.service.users.createHero(uids, hid, hlv);
|
||||
@@ -42,4 +41,28 @@ export default class UserController extends Controller {
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.WRONG_PARMS);
|
||||
}
|
||||
}
|
||||
|
||||
public async getPveDefense() {
|
||||
const { ctx } = this;
|
||||
const { roleId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getPvpDefense(roleId);
|
||||
}
|
||||
|
||||
public async getHeroList() {
|
||||
const { ctx } = this;
|
||||
const { roleId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getHeroList(roleId);
|
||||
}
|
||||
|
||||
public async saveHeroToDefense() {
|
||||
const { ctx } = this;
|
||||
const { roleId, roleName, hid } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.saveHeroToDefense(roleId, roleName, hid);
|
||||
}
|
||||
|
||||
public async removeHeroFromDefense() {
|
||||
const { ctx } = this;
|
||||
const { roleId, hid } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.removeHeroFromDefense(roleId, hid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user