✨ feat(服务器): 服务器命名路径修改
This commit is contained in:
@@ -2,7 +2,7 @@ import { PackageModel } from '@db/Package';
|
||||
import { Service } from 'egg';
|
||||
import { REDIS_KEY, SNS_LINK_TYPE, STATUS } from '@consts';
|
||||
import { ServerlistModel } from '@db/Serverlist';
|
||||
import { gameData } from '@pubUtils/data';
|
||||
import { gameData, getDicServerName } from '@pubUtils/data';
|
||||
import { DicHero } from '@pubUtils/dictionary/DicHero';
|
||||
import { DicRMB } from '@pubUtils/dictionary/DicRMB';
|
||||
import { DicActivityType } from '@pubUtils/dictionary/DicActivityType';
|
||||
@@ -15,7 +15,6 @@ import { ActivityGroupModel } from '@db/ActivityGroup';
|
||||
import { nowSeconds } from '@pubUtils/timeUtil';
|
||||
import { WhiteListModel } from '@db/RegionWhiteList';
|
||||
import { SearchMarqueeParam, SearchOrderParam, SearchSurveyParam } from '@domain/backEndField/search';
|
||||
import { DicServerName } from '@pubUtils/dictionary/DicServerName';
|
||||
import { CreateRegionParam, UpdateChannelParam } from '@domain/backEndField/params';
|
||||
import { UserOrderModel } from '@db/UserOrder';
|
||||
import { SurveyModel } from '@db/Survery';
|
||||
@@ -173,9 +172,10 @@ export default class Game extends Service {
|
||||
if(!region) return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let activityGroups = await ActivityGroupModel.findAllActivityGroup();
|
||||
let dicServerName = getDicServerName(region.env, region.latestServer + 1);
|
||||
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
region, activityGroups
|
||||
region, activityGroups, newServerName: dicServerName?.sname
|
||||
});
|
||||
}
|
||||
|
||||
@@ -264,12 +264,9 @@ export default class Game extends Service {
|
||||
}
|
||||
|
||||
public async getServerName() {
|
||||
let list: DicServerName[] = [];
|
||||
for(let [_, serverName] of gameData.serverNames) {
|
||||
list.push(serverName);
|
||||
}
|
||||
|
||||
return this.ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
list
|
||||
newServerName: '测试'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -398,7 +395,9 @@ export default class Game extends Service {
|
||||
const nextPVPTypes = await ServerGroupModel.findByTime(seasonEndTime, 2);
|
||||
|
||||
const servers = serverlists.map(server => {
|
||||
let dic = gameData.serverNames.get(server.serverId);
|
||||
let dic = getDicServerName(server.env, server.serverId);
|
||||
if(!dic) return
|
||||
|
||||
let curGVG = currentGVGTypes.find(obj => obj.serverId == server.id)?.groupId||dic.groupId;
|
||||
let nextGVG = nextGVGTypes.find(obj => obj.serverId == server.id)?.groupId||curGVG;
|
||||
let gvgTime = nextGVGTypes.find(obj => obj.serverId == server.id)?.time;
|
||||
|
||||
Reference in New Issue
Block a user