bool Avatrcallback(int id, object arg) { AsyncImageDownload.Instance.SetAsyncImage(GetUIDPath(LoginModel.Instance.Uid), headIcon); LoginModel.Instance.Head = EncryptManager.GetMD5HashFromString(LoginModel.Instance.Uid.ToString()) + ".png"; GlobalDispatcher.Instance.DispathDelay(GlobalEvent.onPlayerPanelReflash); return(false); }
//1-0 普通手机号登录方法 private void SendLoginSDKReq() { if (inputAccount.text != "" && password.text != "") { if (Regex.IsMatch(inputAccount.text, pattern)) { LoadingImageManager.Instance.AddLoadingItem(); LoginModel.Instance.Account = inputAccount.text; LoginModel.Instance.Password = password.text; #if UNITY_ANDROID && !UNITY_EDITOR LoginController.Instance.SendloginSDKReq(inputAccount.text, password.text, (int)Application.platform, "11111111", 1.ToString(), ""); //TODO // LoginController.Instance.SendloginSDKReq(inputAccount.text, password.text, // (int)Application.platform, GetSignatureMD5Hash(), 1.ToString()); Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", EncryptManager.GetSignatureMD5Hash(), "test1")); #else LoginController.Instance.SendloginSDKReq(inputAccount.text, password.text, (int)Application.platform, "000000000", 1.ToString(), "code"); #endif } else { SystemMsgView.SystemFunction(Function.Tip, Info.PhoneNum, 1.5f); } } else { SystemMsgView.SystemFunction(Function.Tip, Info.InputFieldNotNull, 1.5f); } }
/// <summary> /// 获得md5图片名 /// </summary> /// <param name="uid"></param> /// <returns></returns> private string GetUIDPath(int uid) { return(EncryptManager.GetMD5HashFromString(uid.ToString()) + ".png"); }
public static int GetInt(string key) { return(PlayerPrefs.GetInt(EncryptManager.EncryptDES(key))); }
public static bool HasKey(string key) { return(PlayerPrefs.HasKey(EncryptManager.EncryptDES(key))); }
public static string GetString(string key) { return(EncryptManager.DecryptDES(PlayerPrefs.GetString(EncryptManager.EncryptDES(key)))); }
public static float GetFloat(string key) { return(PlayerPrefs.GetFloat(EncryptManager.EncryptDES(key))); }
public static void Delete(string key) { PlayerPrefs.DeleteKey(EncryptManager.EncryptDES(key)); }
public static void SetFloat(string key, float i) { PlayerPrefs.SetFloat(EncryptManager.EncryptDES(key), i); }
public static void SetString(string key, string i) { PlayerPrefs.SetString(EncryptManager.EncryptDES(key), EncryptManager.EncryptDES(i)); }