From e2ffb5fce53119f5cb36e3b2466becbefa096842 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 20 十一月 2020 18:09:13 +0800
Subject: [PATCH] Revert "20201120"

---
 HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs |   39 +++++++++++----------------------------
 1 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs
index 858578d..5744a72 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs
@@ -2,6 +2,7 @@
 using Shared;
 using HDL_ON.UI.CSS;
 using System.Threading;
+using HDL_ON.DAL.Server;
 
 namespace HDL_ON.UI
 {
@@ -490,35 +491,16 @@
                                 act = new PublicAssmebly().TipLoadingMsgDialog(Language.StringByID(StringId.SavingPleaseWait));
                             });
                             var verAccount = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo;
-                            var response = new DAL.Server.HttpServerRequest().ValidatorCode(verAccount, etCode, MainPage.LoginUser.areaCode);
-                            if (response.StateCode.ToUpper() == "SUCCESS")
+                            var isPhone = optionType == 2;
+                            var resultObj = new HttpServerRequest().ValidatorCode(VerifyType.REGISTER_USER_SYSTEM, verAccount, etCode, isPhone);
+                            if (resultObj.Code == StateCode.SUCCESS)
                             {
                                 result = true;
                             }
                             else
                             {
-                                string erorrInfo = "";
-                                switch (response.StateCode)
-                                {
-                                    case "ValidCodeAndPhoneNoEqual"://楠岃瘉鐮侀敊璇�
-                                        erorrInfo = Language.StringByID(StringId.VerificationCodeWrong);
-                                        break;
-                                    case "NoRecord":
-                                        erorrInfo = Language.StringByID(StringId.PlsGetTheVerificationCode);
-                                        break;
-                                    default:
-                                        erorrInfo = "Server error";
-                                        break;
-                                }
-                                Application.RunOnMainThread(() =>
-                                {
-                                    new Tip()
-                                    {
-                                        CloseTime = 1,
-                                        Direction = AMPopTipDirection.None,
-                                        Text = erorrInfo,
-                                    }.Show(bodyView);
-                                });
+                                //澶辫触鎻愮ず
+                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Check, resultObj.Code);
                             }
                             Application.RunOnMainThread(() =>
                             {
@@ -549,7 +531,7 @@
                                         new Thread(() =>
                                         {
                                             var result2 = new DAL.Server.HttpServerRequest().BindAccount(account);
-                                            if (result2 == "SUCCESS")
+                                            if (result2 == StateCode.SUCCESS)
                                             {
                                                 Application.RunOnMainThread(() =>
                                                 {
@@ -586,7 +568,7 @@
                                         new Thread(() =>
                                         {
                                             var result2 = new DAL.Server.HttpServerRequest().BindAccount(account);
-                                            if (result2 == "SUCCESS")
+                                            if (result2 == StateCode.SUCCESS)
                                             {
                                                 Application.RunOnMainThread(() =>
                                                 {
@@ -641,11 +623,12 @@
                 {
                     if (optionType == 1)
                     {
-                        var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userEmailInfo);
+                        var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userEmailInfo);
+
                     }
                     else if (optionType == 2)
                     {
-                        var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userMobileInfo);
+                        var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode.ToString());
                     }
                 })
                 { IsBackground = true }.Start();

--
Gitblit v1.8.0