/* Sog 游戏基础库 2016 by zouwei */ using System; using System.Collections.Generic; using System.Linq; using System.IO; using Sog; using Sog.IO; namespace HttpProxy { public class GmCmdSvc : BaseReloadableService { public override int GetServiceType() { return HttpProxyServiceType.GmCmdSvc; } //销毁的时候清空指令注册 public override void Dispose() { GmCommandMgr.Instance.ClearAll(); } //构造的时候注册所有指令 public GmCmdSvc() { RegisterAllGmCmd(); } private void RegisterAllGmCmd() { GmCommandMgr.Instance.Register("ClearFBTokenCache", "ClearFBTokenCache", this.ClearFBTokenCache); GmCommandMgr.Instance.Register("TestHeroAuth", "TestHeroAuth", this.TestHeroAuth); } public int ClearFBTokenCache(long userid, string[] cmdParams) { FacebookTokenCacheSvc.GmClearAllCache(); TraceLog.Debug("GmCmdSvc.ClearFBTokenCache success"); return 0; } public int TestHeroAuth(long userid, string[] cmdParams) { //if (cmdParams.Length < 1) //{ // return -1; //} //TraceLog.Trace("GmCmdSvc.TestHeroAuth {0}", cmdParams[0]); //HeroUSDKAuth.Init(HttpProxyServerUtils.GetServerConfig()); //var userInfo = HeroUSDKAuth.GetUserInfo(HeroUSDKProj.SEA, "001", ""); WXMsgHandler.sendLink("oPCeL6w3DYRsbIxMr9Iq9q3BtJXs", "点我充值", "点我购买礼包", "http://10.0.22.35/wx_pay.html", "https://ydxhxbjzmp.the3.changyou.com/release/Assets/PayImg/chongzhi-2.png"); return 0; } } }