protected override void OnRequest(request_login request, object userdata) { LoginActionParam param = userdata as LoginActionParam; if (param == null) { return; } string md5_value = MD5Utils.Encrypt(param.Passwd); request.clientversion = param.ClientVer; request.tencentlogin = param.TencentLogin; request.usrname = param.UserName; request.passwd = HMACUtils.HMacSha1Encrypt(md5_value, Net.Instance.GetSessionKey()); request.openId = param.OpenId; request.platform = param.Platform; request.accesstoken = param.AccessToken; request.paytoken = param.PayToken; request.pf = param.Pf; request.pfkey = param.PfKey; request.regchannel = param.RegChannel; request.setupchannel = param.SetupChannel; request.clientsystem = param.ClientSystem; request.txplat = param.TXPlat; }
public void ConnectServerSucceed() { GameDebug.Log("连接到服务器成功"); LoginActionParam param = new LoginActionParam(); param.ClientVer = AppSystemInfo.GetAppVersion(); param.UserName = mUserName; param.Passwd = mPasswd; param.TencentLogin = mTencentLogin; param.OpenId = PlatformSDK.OpenId; param.Platform = PlatformSDK.Platform; param.AccessToken = PlatformSDK.AccessToken; param.PayToken = PlatformSDK.PayToken; param.Pf = PlatformSDK.Pf; param.PfKey = PlatformSDK.PfKey; param.RegChannel = PlatformSDK.RegChannel; param.SetupChannel = PlatformSDK.SetupChannel; param.ClientSystem = PlatformSDK.ClientSystem; param.TXPlat = PlatformSDK.TXPlat; Net.Instance.DoAction((int)MESSAGE_ID.ID_MSG_LOGIN, param, true); }