From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 14 十二月 2020 11:16:06 +0800
Subject: [PATCH] 合并了晾衣架(非新云端)

---
 ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs |   55 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
index 2d50b95..ea66313 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
@@ -12,9 +12,9 @@
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
-        /// 1:BUG銆�2:浼樺寲(OPTIMIZE)銆�3:鏂伴渶姹�(REQUIRE)
+        /// 0:Bug銆�1:浼樺寲銆�2:鏂伴渶姹�
         /// </summary>
-        private string typeMode = string.Empty;
+        private int typeMode = 0;
         /// <summary>
         /// 鎰忚鍙嶉鍓╀綑娆℃暟
         /// </summary>
@@ -54,7 +54,7 @@
 
             //瀛楁暟
             var btnFild = new NormalViewControl(150, 60, true);
-            btnFild.X = frameInput.Width - HdlControlResourse.XXLeft - Application.GetRealWidth(150);
+            btnFild.X = frameInput.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(150);
             btnFild.Y = Application.GetRealHeight(503);
             btnFild.TextColor = UserCenterColor.Current.TextGrayColor1;
             btnFild.TextSize = 12;
@@ -64,7 +64,7 @@
 
             //鎮ㄧ殑鍙嶉鍜屾剰瑙佷細璁╂垜浠彉寰楁洿濂�
             var txtInput = new EditTextView();
-            txtInput.Width = bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2;
+            txtInput.Width = bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2;
             txtInput.Height = Application.GetRealHeight(470);
             txtInput.Y = Application.GetRealHeight(32);
             txtInput.TextAlignment = TextAlignment.TopLeft;
@@ -125,7 +125,7 @@
 
             //鍙嶉绫诲瀷
             var btnType = new NormalViewControl(220, 60, true);
-            btnType.X = HdlControlResourse.XXLeft;
+            btnType.X = ControlCommonResourse.XXLeft;
             btnType.Gravity = Gravity.CenterVertical;
             btnType.TextID = R.MyInternationalizationString.uSuggestionType;
             framType.AddChidren(btnType);
@@ -154,7 +154,7 @@
                     btnBugIcon.IsSelected = true;
                     btnOptimizationIcon.IsSelected = false;
                     btnDemandIcon.IsSelected = false;
-                    this.typeMode = "BUG";
+                    this.typeMode = 0;
                 }
             };
             //浼樺寲
@@ -182,7 +182,7 @@
 
                     btnBugIcon.IsSelected = false;
                     btnDemandIcon.IsSelected = false;
-                    this.typeMode = "OPTIMIZE";
+                    this.typeMode = 1;
                 }
             };
             //鏂伴渶姹�
@@ -210,7 +210,7 @@
 
                     btnBugIcon.IsSelected = false;
                     btnOptimizationIcon.IsSelected = false;
-                    this.typeMode = "REQUIRE";
+                    this.typeMode = 2;
                 }
             };
 
@@ -221,7 +221,7 @@
             bodyFrameLayout.AddChidren(frameEmail);
             //鑱旂郴鏂瑰紡
             var btnContact = new NormalViewControl(220, 60, true);
-            btnContact.X = HdlControlResourse.XXLeft;
+            btnContact.X = ControlCommonResourse.XXLeft;
             btnContact.Gravity = Gravity.CenterVertical;
             btnContact.TextID = R.MyInternationalizationString.uContactInformation;
             frameEmail.AddChidren(btnContact);
@@ -247,7 +247,7 @@
                 this.UploadSuggestion(txtInput.Text, txtEmail.Text);
             };
 
-            var data = HdlFileLogic.Current.ReadFileTextContent(HdlFileNameResourse.SuggestionFile);
+            var data = HdlFileLogic.Current.ReadFileTextContent(DirNameResourse.SuggestionFile);
             if (data != null)
             {
                 var strNowData = DateTime.Now.ToString("yyyyMMdd");
@@ -278,23 +278,28 @@
         {
             HdlThreadLogic.Current.RunThread(() =>
             {
-                var pra = new { contactWay = email, content = strContent, feedbackType = this.typeMode };
-                var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/feedback/add", RestSharp.Method.POST, pra);
-                //妫�娴嬬姸鎬佺爜
-                if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false)
+                var pra = new
                 {
-                    return;
-                }
-                //淇濆瓨娆℃暟
-                this.suggestionCount--;
-                //鍐欏叆鍐呭
-                HdlFileLogic.Current.SaveTextToFile(HdlFileNameResourse.SuggestionFile, this.suggestionCount + DateTime.Now.ToString("yyyyMMdd"));
+                    RequestVersion = Common.CommonPage.RequestVersion,
+                    LoginAccessToken = Common.Config.Instance.Token,
+                    Content = strContent,
+                    OpinionFeedbackType = this.typeMode,
+                    Email = email
+                };
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("App/AddOpinionFeedback", false, pra);
+                if (result == true)
+                {
+                    //淇濆瓨娆℃暟
+                    this.suggestionCount--;
+                    //鍐欏叆鍐呭
+                    HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SuggestionFile, this.suggestionCount + DateTime.Now.ToString("yyyyMMdd"));
 
-                HdlThreadLogic.Current.RunMain(() =>
-                {
-                    //鏄剧ず鎴愬姛鐨勭晫闈�
-                    this.ShowSuccessMsg();
-                });
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        //鏄剧ず鎴愬姛鐨勭晫闈�
+                        this.ShowSuccessMsg();
+                    });
+                }
             });
         }
 

--
Gitblit v1.8.0