public string GetAccountInfoStr(ref ApolloAccountInfo info) { string text = "===== Account Info =====\n"; text += string.Format("OpenId:{0}\n", info.get_OpenId()); text += string.Format("Pf:{0}\n", info.get_Pf()); text += string.Format("PfKey:{0}\n", info.get_PfKey()); text += string.Format("Platform:{0}\n", info.get_Platform()); text += "TokenList Begin:\n"; using (ListView <ApolloToken> .Enumerator enumerator = info.get_TokenList().GetEnumerator()) { while (enumerator.MoveNext()) { ApolloToken current = enumerator.get_Current(); text += string.Format("{0}:{1}\n", current.get_Type(), current.get_Value()); } } text += "TokenList End:\n"; text += "===== Account Info ====="; return(text); }
public void InitWechatLink() { if (ApolloConfig.platform != 1) { return; } ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false); string text = "Smoba"; string openId = accountInfo.get_OpenId(); string text2 = "qq"; string text3 = string.Empty; string text4 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID.ToString(); string text5 = string.Empty; string text6 = string.Empty; using (ListView <ApolloToken> .Enumerator enumerator = accountInfo.get_TokenList().GetEnumerator()) { while (enumerator.MoveNext()) { ApolloToken current = enumerator.get_Current(); if (ApolloConfig.platform == 1) { if (current.get_Type() == 1) { text5 = current.get_Value(); } } else if (ApolloConfig.platform == 2) { if (current.get_Type() == 3) { text6 = current.get_Value(); } if (current.get_Type() == 1) { text5 = current.get_Value(); } } } } if (ApolloConfig.platform == 2) { text2 = "qq"; if (Application.platform == RuntimePlatform.Android) { text3 = "1"; } else if (Application.platform == RuntimePlatform.IPhonePlayer) { text3 = "2"; } } else if (ApolloConfig.platform == 1) { text2 = "wx"; if (Application.platform == RuntimePlatform.Android) { text3 = "3"; } else if (Application.platform == RuntimePlatform.IPhonePlayer) { text3 = "4"; } } string text7 = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString(); string text8 = ApolloConfig.appID; if (ApolloConfig.platform == 1) { text8 = ApolloConfig.WXAppID; } string appVersion = CVersion.GetAppVersion(); string text9 = "1"; Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add("sOpenId", openId); dictionary.Add("sServiceType", text); dictionary.Add("sAcountType", text2); dictionary.Add("sArea", text3); dictionary.Add("sPartition", text7); dictionary.Add("sAppId", text8); dictionary.Add("sRoleId", text4); dictionary.Add("sAccessToken", text5); dictionary.Add("sPayToken", text6); dictionary.Add("sGameVer", appVersion); dictionary.Add("sPlatID", text9); this.m_bShowWeixinZone = false; if (ApolloConfig.platform == 1 && this.m_bOpenWeixinZone) { int @int = PlayerPrefs.GetInt("SHOW_WEIXINZONE"); if (@int >= 1) { this.m_bShowWeixinZone = true; } WeChatLink.Instance.BeginGetGameZoneUrl(dictionary, new Action <Dictionary <string, string> >(this.OnGetGameZoneUrl)); } }
private void InitPara() { ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false); string text = "Smoba"; string openId = accountInfo.get_OpenId(); string text2 = "qq"; string text3 = string.Empty; string text4 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID.ToString(); string text5 = string.Empty; string text6 = string.Empty; using (ListView <ApolloToken> .Enumerator enumerator = accountInfo.get_TokenList().GetEnumerator()) { while (enumerator.MoveNext()) { ApolloToken current = enumerator.get_Current(); if (ApolloConfig.platform == 1) { if (current.get_Type() == 1) { text5 = current.get_Value(); } } else if (ApolloConfig.platform == 2) { if (current.get_Type() == 3) { text6 = current.get_Value(); } if (current.get_Type() == 1) { text5 = current.get_Value(); } } } } if (ApolloConfig.platform == 2) { text2 = "qq"; if (Application.platform == RuntimePlatform.Android) { text3 = "1"; } else if (Application.platform == RuntimePlatform.IPhonePlayer) { text3 = "2"; } } else if (ApolloConfig.platform == 1) { text2 = "wx"; if (Application.platform == RuntimePlatform.Android) { text3 = "3"; } else if (Application.platform == RuntimePlatform.IPhonePlayer) { text3 = "4"; } } string text7 = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString(); string text8 = ApolloConfig.appID; if (ApolloConfig.platform == 1) { text8 = ApolloConfig.WXAppID; } string appVersion = CVersion.GetAppVersion(); string text9 = "1"; GameObject gameObject = base.gameObject; Pandora.Instance.SetPandoraParent(gameObject); Pandora.Instance.SetPanelBaseDepth(1000); Pandora.Instance.SetCallback(new Action <Dictionary <string, string> >(this.OnPandoraEvent)); Pandora.Instance.SetGetDjImageCallback(new Func <GameObject, int, int, int>(this.OnGetDjImageCallback)); Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add("sOpenId", openId); dictionary.Add("sServiceType", text); dictionary.Add("sAcountType", text2); dictionary.Add("sArea", text3); dictionary.Add("sPartition", text7); dictionary.Add("sAppId", text8); dictionary.Add("sRoleId", text4); dictionary.Add("sAccessToken", text5); dictionary.Add("sPayToken", text6); dictionary.Add("sGameVer", appVersion); dictionary.Add("sPlatID", text9); Pandora.Instance.SetUserData(dictionary); }