后台:添加武将,装备,道具
This commit is contained in:
@@ -11,11 +11,22 @@ export default class UserController extends Controller {
|
||||
|
||||
public async createRole() {
|
||||
const { ctx } = this;
|
||||
const { uid, roleName } = ctx.request.body;
|
||||
const serverId = 1;
|
||||
const { uid, roleName, serverId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.createRole(uid, serverId, roleName);
|
||||
}
|
||||
|
||||
public async addAuth() {
|
||||
const { ctx } = this;
|
||||
const { uid, auth } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.addAuth(uid, auth);
|
||||
}
|
||||
|
||||
public async fixSms() {
|
||||
const { ctx } = this;
|
||||
const { tel } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.fixSms(tel);
|
||||
}
|
||||
|
||||
public async deleteRole() {
|
||||
const { ctx } = this;
|
||||
const { roleId } = ctx.request.body;
|
||||
@@ -59,8 +70,20 @@ export default class UserController extends Controller {
|
||||
|
||||
public async getHeroList() {
|
||||
const { ctx } = this;
|
||||
const { roleId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getHeroList(roleId);
|
||||
const { field, value } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getHeroList(field, value);
|
||||
}
|
||||
|
||||
public async deleteHero() {
|
||||
const { ctx } = this;
|
||||
const { selectedRowKeys: roleIdAndHids } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.deleteHero(roleIdAndHids);
|
||||
}
|
||||
|
||||
public async setHeroLv() {
|
||||
const { ctx } = this;
|
||||
const { selectedRowKeys: roleIdAndHids, lv } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.setHeroLv(roleIdAndHids, lv);
|
||||
}
|
||||
|
||||
public async saveHeroToDefense() {
|
||||
@@ -74,4 +97,34 @@ export default class UserController extends Controller {
|
||||
const { roleId, hid } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.removeHeroFromDefense(roleId, hid);
|
||||
}
|
||||
|
||||
public async getEquipList() {
|
||||
const { ctx } = this;
|
||||
const { field, value } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getEquipList(field, value);
|
||||
}
|
||||
|
||||
public async getItemList() {
|
||||
const { ctx } = this;
|
||||
const { field, value } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.getItemList(field, value);
|
||||
}
|
||||
|
||||
public async deleteEquip() {
|
||||
const { ctx } = this;
|
||||
const { selectedRowKeys: roleIdAndSeqIds } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.deleteEquip(roleIdAndSeqIds);
|
||||
}
|
||||
|
||||
public async deleteItem() {
|
||||
const { ctx } = this;
|
||||
const { selectedRowKeys: roleIdAndIds } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.deleteItem(roleIdAndIds);
|
||||
}
|
||||
|
||||
public async setItemCount() {
|
||||
const { ctx } = this;
|
||||
const { selectedRowKeys: roleIdAndIds, count } = ctx.request.body;
|
||||
ctx.body = await ctx.service.users.setItemCount(roleIdAndIds, count);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user