后台:七天成长任务定制页面
This commit is contained in:
@@ -2,6 +2,8 @@ import { Service } from 'egg';
|
||||
import { STATUS } from '@consts';
|
||||
import { GameModel } from '@db/Game';
|
||||
import { ServerlistModel } from '@db/Serverlist';
|
||||
import { gameData } from '@pubUtils/data';
|
||||
import { DicHero } from '@pubUtils/dictionary/DicHero';
|
||||
|
||||
/**
|
||||
* Test Service
|
||||
@@ -37,4 +39,16 @@ export default class Game extends Service {
|
||||
});
|
||||
}
|
||||
|
||||
public async getDicHero() {
|
||||
let list: DicHero[] = [];
|
||||
for(let [heroId, hero] of gameData.hero) {
|
||||
if(heroId <= 300) {
|
||||
list.push(hero)
|
||||
}
|
||||
}
|
||||
return this.ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
list
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -270,6 +270,7 @@ export default class GMUsers extends Service {
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, { uids });
|
||||
} catch(e) {
|
||||
console.error(e.stack)
|
||||
return ctx.service.utils.resResult(STATUS.GM_CREATE_ERROR, null, e.stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user