后台:七天成长任务定制页面

This commit is contained in:
luying
2021-05-26 19:36:19 +08:00
parent 9ccaa796f7
commit 1a3fed89eb
6 changed files with 24 additions and 2 deletions
+14
View File
@@ -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
})
}
}
+1
View File
@@ -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);
}
}