Example #1
0
        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);
        }
Example #2
0
        //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);
            }
        }
Example #3
0
 /// <summary>
 /// 获得md5图片名
 /// </summary>
 /// <param name="uid"></param>
 /// <returns></returns>
 private string GetUIDPath(int uid)
 {
     return(EncryptManager.GetMD5HashFromString(uid.ToString()) + ".png");
 }
Example #4
0
 public static int GetInt(string key)
 {
     return(PlayerPrefs.GetInt(EncryptManager.EncryptDES(key)));
 }
Example #5
0
 public static bool  HasKey(string key)
 {
     return(PlayerPrefs.HasKey(EncryptManager.EncryptDES(key)));
 }
Example #6
0
 public static string GetString(string key)
 {
     return(EncryptManager.DecryptDES(PlayerPrefs.GetString(EncryptManager.EncryptDES(key))));
 }
Example #7
0
 public static float GetFloat(string key)
 {
     return(PlayerPrefs.GetFloat(EncryptManager.EncryptDES(key)));
 }
Example #8
0
 public static void Delete(string key)
 {
     PlayerPrefs.DeleteKey(EncryptManager.EncryptDES(key));
 }
Example #9
0
 public static void SetFloat(string key, float i)
 {
     PlayerPrefs.SetFloat(EncryptManager.EncryptDES(key), i);
 }
Example #10
0
 public static void SetString(string key, string i)
 {
     PlayerPrefs.SetString(EncryptManager.EncryptDES(key), EncryptManager.EncryptDES(i));
 }