| | |
| | |
|
| | | public void HandleMsgWithSDK(string jsonString)
|
| | | {
|
| | | Debug.Log("收到SDK发来的信息: " + jsonString);
|
| | | Debug.Log("rec sdk msg : " + jsonString);
|
| | | var _json = JsonMapper.ToObject(jsonString);
|
| | | var _code = (int)_json["code"];
|
| | |
|
| | | switch (_code)
|
| | | {
|
| | | case CodeA2U.DeviceInfo:
|
| | |
| | | {
|
| | | BuildFreePlatformInfo(data);
|
| | |
|
| | | DebugEx.LogFormat("sdk登录成功:{0}", data.ToJson());
|
| | | if (onFreePlatformLoginOk != null)
|
| | | {
|
| | | onFreePlatformLoginOk(FreePlatformInfo);
|
| | |
| | | if (vipModel.realRecharge < chatCenter.talkRechargeLimmit ||
|
| | | PlayerDatas.Instance.baseData.LV < chatCenter.talkLevelLimmit)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("mdtqInfo1", chatCenter.talkRechargeLimmit, chatCenter.talkLevelLimmit);
|
| | | SysNotifyMgr.Instance.ShowTip("mdtqInfo1", chatCenter.talkRechargeLimmit/10000, chatCenter.talkLevelLimmit);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnSDKAccountLoginOk(ynmbxxjUtil.FP_LoginOk _result)
|
| | | {
|
| | |
|
| | | sdkLogined = true;
|
| | | sdkLoginResult = _result;
|
| | |
|
| | | if (!DebugUtility.Instance.isWhiteListAccount)
|
| | | {
|
| | | DebugUtility.Instance.RequestWhiteListAuthority(sdkLoginResult.account);
|
| | | }
|
| | |
|
| | | ServerListCenter.Instance.RequestServerListPlayer(sdkLoginResult.account);
|
| | | ynmbxxjUtil.Instance.MakeKeyAndVisible();
|
| | | OperationLogCollect.Instance.RecordLauchEvent(5);
|
| | |
| | | case VersionAuthority.Release:
|
| | | send.Extra = VersionConfig.Get().SpID + "|" + ynmbxxjUtil.Instance.Device.uniqueID;
|
| | | send.ExtraLen = (ushort)send.Extra.Length;
|
| | |
|
| | | if (ynmbxxjUtil.Instance.ChannelPlatform == ynmbxxjUtil.E_ChannelPlatform.Free)
|
| | | {
|
| | | send.IDType = 1;
|
| | |
| | | send.Extra += ("|" + sdkLoginResult.token + "|" + sdkLoginResult.qkUserName);
|
| | | send.ExtraLen = (ushort)send.Extra.Length;
|
| | | }
|
| | | |
| | | string deviceInfo = "ios";
|
| | | try
|
| | | { |
| | | deviceInfo = DeviceUtility.GetDeviceModel();
|
| | | deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|","");
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | Debug.Log("C0101_tagCPlayerLogin Exception: " + ex.Message);
|
| | | }
|
| | | send.AccID = sdkLoginResult.account;
|
| | |
|
| | | var deviceInfo = DeviceUtility.GetDeviceModel();
|
| | | deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|","");
|
| | | var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo);
|
| | |
|
| | | send.Extra += ("|" + versionStr.Substring(0, Math.Min(24, versionStr.Length)));
|