static void OnUserLoginFinished(QKSDKReturn sdkReturn) { /// ErrorCode:错误码,0代码成功 /// Msg:描述 /// User:用户对象 QKCommand tempCmd = SDKCommand.SDKLoginFinish; tempCmd.AddParam("ErrorCode", sdkReturn.ErrorCode); tempCmd.AddParam("Msg", sdkReturn.ErrorMsg); if (0 == sdkReturn.ErrorCode) { QKSDKUser tempUser = QKSDKUser.Parse(sdkReturn.Content.TrySecDecode()); // 缓存非游客用户账号 if (0 == tempUser.GuestMode) { SDKConfig.CacheAccount(mCurrAccount, mCurrPassword); } else { SDKCookie.SetValue("TempAccount", tempUser.Account); SDKCookie.SetValue("TempPassword", tempUser.Account); } tempCmd.AddParam("User", tempUser); } tempCmd.Send(); }
static void OnUserLoginFinished(WWW www) { QKSDKReturn sdkReturn = null; if (string.IsNullOrEmpty(www.error)) { sdkReturn = QKSDKReturn.Parse(www.text); } else { sdkReturn = new QKSDKReturn(404, www.error); } OnUserLoginFinished(sdkReturn); }