//获取区服列表 /* *** *** opId : 运营商ID *** gameId : 游戏ID *** account : 用户ID *** callback : 回调函数:callback(data); */ function getServerList(opId,gameId,account,callback){ if(!account) account = "0060015_"; if(!opId||!gameId||!account){ handle_param_error(opId,opId,account,callback); return {}; } var result = {}; var appId = gameId+".youzu.com"; getServerInfoByAsync(opId,gameId,appId,function(data){ if(typeof(data.retCode)!="undefined"&&data.retCode=="000"&&data.data){ var accountConfig = getAccountConfig(); var realAccount = (typeof(accountConfig[gameId])!="undefined")?account:"0060015_"+account; var param = {'opId':opId,'gameId':gameId,'account':realAccount}; handleServerList(data.data.list,callback,param); }else{ if(callback){ var retCode = (typeof(data['retCode'])!="undefined")?data['retCode']:'0'; if(retCode=="000"||retCode=="401") retCode = "1"; callback([],retCode,''); } } }); return result; } //获取区服角色 /* *** *** opId : 运营商ID *** gameId : 游戏ID *** account : 用户ID *** serverId : 区服ID *** callback : 回调函数:callback(data); */ function getServerRole(opId,gameId,account,serverId,callback){ if(!account) account = "0060015_"; if(!opId||!gameId||!account||!serverId){ handle_param_error(opId,gameId,account,callback,serverId); return {}; } var result = {}; var accountConfig = getAccountConfig(); var realAccount = (typeof(accountConfig[gameId])!="undefined")?account:"0060015_"+account; var param = {'opId':opId,'gameId':gameId,'account':realAccount,'serverId':serverId}; handleServerList("",callback,param,function(data,origin){ var info = []; if(typeof(data.retCode)!="undefined"&&data.retCode=="000"&&data.data){ for(var i = 0;iserverObj[data['data'][i]['serverId']]['flag']){ serverObj[data['data'][i]['serverId']]['flag'] = data['data'][i][key]; } } } for(var j = 0;j-->