From b2021c30213b9520a0db20d1a4ff892446fea36c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 十一月 2022 13:49:57 +0800
Subject: [PATCH] 注销账号功能
---
HDL-ON_Android/Assets/Language.ini | 8
HDL_ON/Entity/DB_ResidenceData.cs | 2
HDL-ON_iOS/Resources/Language.ini | 29 ++
HDL_ON/DAL/Server/NewAPI.cs | 11 +
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 12 +
HDL_ON/DAL/Server/NewApiRes.cs | 19 +
HDL_ON/Common/HDLCommon.cs | 29 +-
HDL_ON/DAL/Server/HttpUtil.cs | 4
HDL_ON/Common/R.cs | 4
HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs | 285 +++++++++++++++++++++++++++++++
HDL_ON/DAL/Server/HttpServerRequest.cs | 90 ++++++---
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 8
SiriIntents/Server/HttpUtil.cs | 4
13 files changed, 437 insertions(+), 68 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 455cde2..4d097e2 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -563,6 +563,7 @@
576=Open
577=Close
578=Mechanical Arm
+579=Cancellation
@@ -1790,6 +1791,7 @@
576=闃�闂ㄥ凡鍏抽棴
577=闃�闂ㄥ凡鎵撳紑
578=鏈烘鎵�
+579=绔嬪嵆娉ㄩ攢
@@ -2994,7 +2996,7 @@
576=袨褌泻褉褘褌褜
577=袟邪泻褉褘褌褜
578=Mechanical Arm
-
+579=Cancellation
2532=Visitor Invitation Record
@@ -4207,7 +4209,7 @@
576=Abrir
577=Cerrar
578=Mechanical Arm
-
+579=Cancellation
2532=Visitor Invitation Record
2533=Visitor management
@@ -5404,7 +5406,7 @@
575=Select Mode
576=袨褌胁芯褉械薪芯
577=袟邪褌胁芯褉懈
-
+579=Cancellation
1000=袙谢邪卸薪芯褋褌 胁 褋褌邪褟褌邪
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index f8cbefa..4d097e2 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -560,7 +560,10 @@
573=At home
574=Heating and dehumidification
575=Select Mode
-
+576=Open
+577=Close
+578=Mechanical Arm
+579=Cancellation
@@ -1785,6 +1788,10 @@
573=鍦ㄥ
574=鍒剁儹闄ゆ箍
575=閫夋嫨妯″紡
+576=闃�闂ㄥ凡鍏抽棴
+577=闃�闂ㄥ凡鎵撳紑
+578=鏈烘鎵�
+579=绔嬪嵆娉ㄩ攢
@@ -2986,7 +2993,10 @@
573=At home
574=Heating and dehumidification
575=Select Mode
-
+576=袨褌泻褉褘褌褜
+577=袟邪泻褉褘褌褜
+578=Mechanical Arm
+579=Cancellation
2532=Visitor Invitation Record
@@ -3751,7 +3761,7 @@
115=Electrodom茅sticos
116=Bloqueo inteligente
117=Calefacci贸n
-118=Abrir
+118=Abrir
119=Refrigeraci贸n
120=Calefacci贸n
121=Deshumidificar
@@ -4196,9 +4206,10 @@
573=At home
574=Heating and dehumidification
575=Select Mode
-
-
-
+576=Abrir
+577=Cerrar
+578=Mechanical Arm
+579=Cancellation
2532=Visitor Invitation Record
2533=Visitor management
@@ -5393,7 +5404,9 @@
573=At home
574=Heating and dehumidification
575=Select Mode
-
+576=袨褌胁芯褉械薪芯
+577=袟邪褌胁芯褉懈
+579=Cancellation
1000=袙谢邪卸薪芯褋褌 胁 褋褌邪褟褌邪
@@ -5410,7 +5423,7 @@
1011=小懈薪褏褉芯薪懈蟹邪褑懈褟
1012=袠蟹斜械褉械褌械 褋泻芯褉芯褋褌 薪邪 胁褟褌褗褉邪
1013=褋褌械锌械薪
-1014=1014=袦芯谢褟, 锌芯褌胁褗褉写械褌械 写邪谢懈 褎懈谢褌褗褉薪懈褟褌 械谢械屑械薪褌 写械泄褋褌胁懈褌械谢薪芯 械 斜懈谢 薪褍谢懈褉邪薪 懈 褉邪斜芯褌械褌械 褋 芯斜芯褉褍写胁邪薪械褌芯 褋褗谐谢邪褋薪芯 懈薪褋褌褉褍泻褑懈懈褌械 薪邪 {0}, 蟹邪 写邪 锌褉械薪邪褋褌褉芯懈褌械 卸懈胁芯褌邪 薪邪 褎懈谢褌褗褉薪懈褟 械谢械屑械薪褌 {0}
+1014=袦芯谢褟, 锌芯褌胁褗褉写械褌械 写邪谢懈 褎懈谢褌褗褉薪懈褟褌 械谢械屑械薪褌 写械泄褋褌胁懈褌械谢薪芯 械 斜懈谢 薪褍谢懈褉邪薪 懈 褉邪斜芯褌械褌械 褋 芯斜芯褉褍写胁邪薪械褌芯 褋褗谐谢邪褋薪芯 懈薪褋褌褉褍泻褑懈懈褌械 薪邪 {0}, 蟹邪 写邪 锌褉械薪邪褋褌褉芯懈褌械 卸懈胁芯褌邪 薪邪 褎懈谢褌褗褉薪懈褟 械谢械屑械薪褌 {0}
1015=袧懈褋泻邪 褋褌械锌械薪
1016=小褉械写薪邪 褋褌械锌械薪
1017=袙懈褋芯泻邪 褋褌械锌械薪
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 1a42157..b7df610 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -91,7 +91,7 @@
{
if (revertObj.Data != null)
{
- var appVersionRes = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionRes>(revertObj.Data.ToString());
+ var appVersionRes = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionResNew>(revertObj.Data.ToString());
if (appVersionRes != null)
{
@@ -99,24 +99,25 @@
{
UpdateType = appVersionRes.isEnforce ? 2 : 1,
NewVersion = appVersionRes.version,
- NewVersionUrl = appVersionRes.androidUrl
+ NewVersionUrl = appVersionRes.packageUrl
};
#if __IOS__
mForceUpdateInfo.NewVersionUrl = appVersionRes.iosUrl;
#endif
//瑙f瀽鏇存柊鍐呭璇︽儏
- var reasonStrJson = GetReasonStrJson(appVersionRes.updateDescription);
- if (reasonStrJson != null)
- {
- if (Language.CurrentLanguage == "Chinese")
- {
- mForceUpdateInfo.ReasonStr = reasonStrJson.Chinese;
- }
- else
- {
- mForceUpdateInfo.ReasonStr = reasonStrJson.English;
- }
- }
+ //var reasonStrJson = GetReasonStrJson(appVersionRes.remark);
+ //if (reasonStrJson != null)
+ //{
+ // if (Language.CurrentLanguage == "Chinese")
+ // {
+ // mForceUpdateInfo.ReasonStr = reasonStrJson.Chinese;
+ // }
+ // else
+ // {
+ // mForceUpdateInfo.ReasonStr = reasonStrJson.English;
+ // }
+ //}
+ mForceUpdateInfo.ReasonStr = appVersionRes.remark;
Application.RunOnMainThread(() =>
{
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index c6a0d9d..954370b 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@
public static class StringId
{
/// <summary>
+ /// 娉ㄩ攢
+ /// </summary>
+ public const int Cancellation = 579;
+ /// <summary>
/// 鏈烘鑷�
/// </summary>
public const int MechanicalArm = 578;
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index e39af1d..9726771 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1354,18 +1354,52 @@
{
var requestObj = new AppVersionCheckObj()
{
-
+
};
+ #if __IOS__
+ requestObj.releaseSystem = "IOS";
+ #else
+ requestObj.releaseSystem = "Android";
+ #endif
var requestJson = HttpUtil.GetSignRequestJson(requestObj);
return HttpUtil.RequestHttpsPost(NewAPI.API_POST_CheckAppVersion, requestJson);
}
-
-
-
#endregion
- #region 鑾峰彇澶╂皵閮ㄥ垎
+ #region 娉ㄩ攢璐﹀彿
+ /// <summary>
+ /// 鑾峰彇褰撳墠鐗堟湰娉ㄩ攢璐﹀彿妯″紡
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew GetUnregisterModel()
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("version", MainPage.VersionString);
+ d.Add("appCode", "1588071238036582401");
+#if __IOS__
+ d.Add("releaseSystem", "IOS");
+#else
+ d.Add("releaseSystem", "Android");
+#endif
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_GetUnregisterModel, requestJson);
+ }
+ /// <summary>
+ /// 娉ㄩ攢璐﹀彿
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew Unregister(string pwd)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("userId", UserInfo.Current.ID);
+ d.Add("pwd", pwd);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_Unregister, requestJson);
+ }
+#endregion
+
+#region 鑾峰彇澶╂皵閮ㄥ垎
/// <summary>
/// 鑾峰彇鎸囧畾缁忕含搴︾殑鍩庡競淇℃伅澶╂皵淇℃伅
/// </summary>
@@ -1489,10 +1523,10 @@
//}
- #endregion
+#endregion
- #region 澶囦唤閮ㄥ垎
+#region 澶囦唤閮ㄥ垎
///// <summary>
///// 鑾峰彇浣忓畢澶囦唤鍒楄〃
///// </summary>
@@ -1963,10 +1997,10 @@
}
*/
- #endregion
+#endregion
- #region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��
+#region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��
/// <summary>
/// 鑾峰彇璁惧鍒楄〃
/// </summary>
@@ -2246,9 +2280,9 @@
}
- #endregion
+#endregion
- #region Kaede --鍦烘櫙鍔熻兘--------------------------
+#region Kaede --鍦烘櫙鍔熻兘--------------------------
/// <summary>
/// 鑾峰彇鍦烘櫙鍒楄〃
/// 鎴块棿ID鍙┖锛岄粯璁ゆ煡璇綇瀹呬笅鎵�鏈夋埧闂�
@@ -2380,9 +2414,9 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectScene, requestJson).Code;
}
- #endregion
+#endregion
- #region Kaede --鎴块棿鍔熻兘--------------------------
+#region Kaede --鎴块棿鍔熻兘--------------------------
/// <summary>
/// 鑾峰彇鎴块棿鍒楄〃
/// </summary>
@@ -2457,10 +2491,10 @@
return pack;
}
- #endregion
+#endregion
- #region Kaede -- 瀹夐槻鎺ュ彛____________________________
+#region Kaede -- 瀹夐槻鎺ュ彛____________________________
/// <summary>
/// 鑾峰彇瀹夐槻鍒楄〃
/// </summary>
@@ -2624,10 +2658,10 @@
return pack;
}
- #endregion
+#endregion
- #region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
+#region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
/// <summary>
/// 鑾峰彇绗笁鏂瑰搧鐗屽垪琛�
/// </summary>
@@ -2739,9 +2773,9 @@
return pack;
}
- #endregion
+#endregion
- #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
+#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
/// <summary>
/// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
/// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
@@ -2754,10 +2788,10 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
}
- #endregion
+#endregion
- #region 鈻� 鍙瀵硅_________________________
+#region 鈻� 鍙瀵硅_________________________
/// <summary>
/// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋�
/// </summary>
@@ -2789,9 +2823,9 @@
}
- #endregion
+#endregion
- #region 鈻� 闂ㄩ攣鐩稿叧____________________________
+#region 鈻� 闂ㄩ攣鐩稿叧____________________________
/// <summary>
/// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�)
@@ -2860,8 +2894,8 @@
return listSortLog;
}
- #endregion
- #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
+#endregion
+#region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
/// <summary>
/// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃
/// </summary>
@@ -2925,7 +2959,7 @@
var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson);
}
- #endregion
+#endregion
/// <summary>
/// 缁戝畾source闈㈡澘
@@ -2993,7 +3027,7 @@
- #region 鍏変紡鍌ㄨ兘
+#region 鍏変紡鍌ㄨ兘
/// <summary>
/// 鑾峰彇浣忓畢涓嬮�嗗彉鍣ㄥ垪琛�
/// </summary>
@@ -3018,7 +3052,7 @@
var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetInverter_StatisticsInfo, requestJson);
return pack;
}
- #endregion
+#endregion
}
}
\ No newline at end of file
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 511a91e..bf39c96 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
- public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+ //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index d4b49a3..4943403 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -348,13 +348,20 @@
/// <summary>
/// 妫�娴嬫洿鏂�,鏄惁闇�瑕佸己鍒舵洿鏂�
/// </summary>
- public const string API_POST_CheckAppVersion = "/smart-footstone/app/appVersion/check";
+ public const string API_POST_CheckAppVersion = "/basis-footstone/app/appVersion/check";
///// <summary>
///// 鏌ヨAPP鏈�鏂扮増鏈�
///// </summary>
//public const string API_POST_GetAppVersion = "/smart-footstone/app/getAppVersion";
#endregion
-
+ /// <summary>
+ /// 鑾峰彇褰撳墠鐗堟湰娉ㄩ攢璐﹀彿妯″紡
+ /// </summary>
+ public const string Api_Post_GetUnregisterModel = "/basis-footstone/app/appVersion/unregisterModel";
+ /// <summary>
+ /// 娉ㄩ攢璐﹀彿
+ /// </summary>
+ public const string Api_Post_Unregister = "/basis-footstone/member/unregister";
#region 鈻� -- 鎴块棿鍦烘櫙鑳屾櫙鍥剧墖涓婁紶涓嬭浇鎺ュ彛___________________________
diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs
index 40d593d..1878cab 100644
--- a/HDL_ON/DAL/Server/NewApiRes.cs
+++ b/HDL_ON/DAL/Server/NewApiRes.cs
@@ -585,7 +585,7 @@
/// <summary>
/// 缃戝叧ID
/// </summary>
- public string gatewayId ="";
+ public string gatewayId = "";
/// <summary>
/// 缃戝叧snID
/// </summary>
@@ -994,7 +994,7 @@
}
-
+
#endregion
#region 鏁版嵁鍒嗕韩
@@ -1236,6 +1236,21 @@
///
/// </summary>
[System.Serializable]
+ public class AppVersionResNew
+ {
+ public string version;
+ public string appName;
+ public string appCode;
+ public bool isEnforce;
+ public string releaseSystem;
+ public string packageUrl;//": "http://hdl-hz-test.oss-cn-hangzhou.aliyuncs.com/20/2022/11/51b8b0b2-0ebc-4632-a3b5-0be1e5d104e4.apk",
+ public string remark;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ [System.Serializable]
public class AppVersionRes
{
/// <summary>
diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index b28ec2a..d3df31b 100644
--- a/HDL_ON/Entity/DB_ResidenceData.cs
+++ b/HDL_ON/Entity/DB_ResidenceData.cs
@@ -54,11 +54,13 @@
}
}
+ [Newtonsoft.Json.JsonIgnore]
private List<ShowFunction> showFunctions;
/// <summary>
/// 鍔熻兘绫诲瀷鍒楄〃
/// </summary>
+ [Newtonsoft.Json.JsonIgnore]
public List<ShowFunction> functionTypeList
{
get
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index a82f63f..69e0702 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -112,10 +112,10 @@
{
#region 绐楀笜鏇存柊
var onoffString = updataFunction.GetAttrState(FunctionAttributeKey.OnOff);
- if (onoffString == "stop")
- {
- return;
- }
+ //if (onoffString == "stop")
+ //{
+ // return;
+ //}
var percent = onoffString == "off" ? 0 : 100;
if (updataFunction.GetAttributes().Contains(FunctionAttributeKey.Percent))
{
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 2075cb2..8f8440a 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -464,6 +464,14 @@
/// </summary>
void CurtainFragment()
{
+ var onoffString = function.GetAttrState(FunctionAttributeKey.OnOff);
+ var percent = onoffString == "off" ? 0 : 100;
+ if (function.GetAttributes().Contains(FunctionAttributeKey.Percent))
+ {
+ string percentString = function.GetAttrState(FunctionAttributeKey.Percent);
+ int.TryParse(percentString, out percent);
+ }
+
#region Curtain
var btnCurtainClose = new Button()
{
@@ -473,7 +481,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
- IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "off",
+ IsSelected = percent == 0,
Tag = function.sid + "_off"
};
bodyDiv.AddChidren(btnCurtainClose);
@@ -504,7 +512,7 @@
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
Tag = function.sid + "_on",
- IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "on",
+ IsSelected = percent != 0,
};
bodyDiv.AddChidren(btnCurtainOpen);
if (function.spk == SPK.CurtainRoller)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs
index 34fd56e..c64c35c 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs
@@ -2,6 +2,7 @@
using Shared;
using HDL_ON.UI.CSS;
using Xamarin.Essentials;
+using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
@@ -24,7 +25,277 @@
/// <summary>
///
/// </summary>
- public void LoadPage()
+ public void LoadPage() {
+ var loading = new Loading();
+ this.AddChidren(loading);
+ loading.Start("");
+ new System.Threading.Thread(() => {
+ try
+ {
+ var pack = new HttpServerRequest().GetUnregisterModel();
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ var data = Newtonsoft.Json.JsonConvert.DeserializeObject<UMode>(pack.Data.ToString());
+ Application.RunOnMainThread(() =>
+ {
+ if (data != null)
+ {
+ if (data.model == "APP")
+ {
+ InitView_PreRelease();
+ }
+ else
+ {
+ InitView_Release();
+ }
+ }
+ else
+ {
+ InitView_PreRelease();
+ }
+ });
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ InitView_PreRelease();
+ });
+ }
+ }
+ catch
+ {
+ Application.RunOnMainThread(() =>
+ {
+ InitView_PreRelease();
+ });
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (loading != null)
+ {
+ loading.Hide();
+ loading.RemoveFromParent();
+ loading = null;
+ }
+ });
+ }
+ }) { IsBackground = true }.Start();
+ }
+
+ public void InitView_PreRelease()
+ {
+ new TopViewDiv(bodyView, Language.StringByID(StringId.CancelAccount)).LoadTopView(CSS_Color.MainBackgroundColor);
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+
+ var textView = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(64 + 16),
+ Height = Application.GetRealHeight(90),
+ Width = Application.GetRealWidth(343),
+ Padding = new Padding(Application.GetRealWidth(16), Application.GetRealWidth(16), Application.GetRealWidth(16), Application.GetRealWidth(16)),
+ IsMoreLines = true,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.TopLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ Radius = (uint)Application.GetRealHeight(14),
+ BackgroundColor = 0x174484F4,
+ };
+
+ if (Language.CurrentLanguage == "Chinese")
+ {
+ textView.Text = "*娉ㄩ攢璐︽埛鏄笉鍙仮澶嶇殑鎿嶄綔锛屾敞閿�璐︽埛涔嬪悗锛屾偍App鎵�鏈夎处鎴锋暟鎹紙鍖呮嫭鏄电О銆佸ご鍍忋�佷簩缁寸爜鐓х墖绛夛級閮戒細琚垹闄わ紝涓旀棤娉曞啀鎵惧洖銆�";
+ }
+ else
+ {
+ textView.Text = "*Account cancellation is an irreversible operation. After account cancellation, all account data (including nickname, avatar, QR code photo, etc.) of your app will be deleted and cannot be retrieved.";
+ }
+ bodyView.AddChidren(textView);
+
+
+ #region 璐﹀彿濉啓
+ var accountView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(132 + 50),
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(25),
+ };
+ bodyView.AddChidren(accountView);
+
+ var etAccount = new EditText()
+ {
+ X = Application.GetRealWidth(58),
+ Width = Application.GetRealWidth(343 - 68),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ PlaceholderTextColor = CSS_Color.PromptingColor1,
+ PlaceholderText = Language.StringByID(StringId.PlsEntryPhoneNumber),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ accountView.AddChidren(etAccount);
+
+ var btnAccountIcon = new Button()
+ {
+ X = Application.GetRealWidth(26),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(20),
+ Height = Application.GetMinRealAverage(20),
+ UnSelectedImagePath = "LoginIcon/AccountIcon.png",
+ };
+ accountView.AddChidren(btnAccountIcon);
+
+ #endregion
+
+ #region 瀵嗙爜濉啓
+ var passwordView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(211 + 40),
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(50),
+ Radius = (uint)Application.GetRealHeight(25),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ bodyView.AddChidren(passwordView);
+
+
+ var btnPasswordIcon = new Button()
+ {
+ X = Application.GetRealWidth(26),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(20),
+ Height = Application.GetMinRealAverage(20),
+ UnSelectedImagePath = "LoginIcon/PasswordIcon.png",
+ };
+ passwordView.AddChidren(btnPasswordIcon);
+
+ var etPassword = new EditText()
+ {
+ X = Application.GetRealWidth(58),
+ Width = Application.GetRealWidth(343 - 68),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ PlaceholderTextColor = CSS_Color.PromptingColor1,
+ PlaceholderText = Language.StringByID(StringId.PlsEntryPassword),
+ SecureTextEntry = true,
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ passwordView.AddChidren(etPassword);
+
+
+ #endregion
+
+
+
+ var btnLogin = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(403),
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ SelectedBackgroundColor = CSS_Color.MainColor,
+ BackgroundColor = CSS_Color.PromptingColor1,
+ TextID = StringId.Cancellation,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextAlignment = TextAlignment.Center,
+ };
+ bodyView.AddChidren(btnLogin);
+
+ string account = "";
+ etAccount.TextChangeEventHandler = (sender, e) =>
+ {
+ account = etAccount.Text.Trim();
+ if (account.Length > 0 && etPassword.Text.Trim().Length > 0)
+ {
+ btnLogin.IsSelected = true;
+ }
+ else
+ {
+ btnLogin.IsSelected = false;
+ }
+ };
+ etPassword.TextChangeEventHandler += (sender, e) =>
+ {
+ if (etAccount.Text.Trim().Length > 0 && etPassword.Text.Trim().Length > 0)
+ {
+ btnLogin.IsSelected = true;
+ }
+ else
+ {
+ btnLogin.IsSelected = false;
+ }
+ };
+
+ btnLogin.MouseUpEventHandler = (sender,e) =>{
+ if (btnLogin.IsSelected)
+ {
+ var tipMsg = "*鎮ㄥ綋鍓嶆鍦ㄦ敞閿�璐︽埛锛屾敞閿�瀹屾垚鍚庯紝鎮ㄥ湪On Pro App鐨勬墍鏈夋暟鎹潎浼氳鍒犻櫎锛岃璋ㄦ厧鎿嶄綔銆�";
+ Action action = () => {
+ var loading = new Loading();
+ this.AddChidren(loading);
+ loading.Start("");
+ var pwd = etPassword.Text.Trim();
+ new System.Threading.Thread(() => {
+ try
+ {
+ var pack = new HttpServerRequest().Unregister(pwd);
+ Application.RunOnMainThread(() =>
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ //Action okAction = () =>
+ //{
+ HDLCommon.Current.Logout();
+ //};
+ //new ConfirmDialog().ShowDialog(StringId.Tip, StringId.IfConfirmLogout, okAction);
+ }
+ else
+ {
+ var tip = new Tip()
+ {
+ Text = pack.message,
+ CloseTime = 3,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ }
+ });
+ }
+ catch
+ {
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (loading != null)
+ {
+ loading.Hide();
+ loading.RemoveFromParent();
+ loading = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+
+
+ };
+ new PublicAssmebly().TipOptionMsg(StringId.CancelAccount, tipMsg, action, 20);
+
+ }
+ };
+
+ }
+ public void InitView_Release()
{
new TopViewDiv(bodyView, Language.StringByID(StringId.CancelAccount)).LoadTopView();
@@ -206,4 +477,16 @@
}
+ class UMode
+ {
+ public string appCode;
+ public string version;
+ public string releaseSystem;
+ /// <summary>
+ /// APP 锛氱敤鎴峰湪app涓婅嚜鍔╂敞閿�
+ /// APPLY 锛� 鐢ㄦ埛鍙戦偖浠剁粰鍏徃鐢宠娉ㄩ攢
+ /// </summary>
+ public string model;
+ }
+
}
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index f61de04..56a78a0 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
- public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+ //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
--
Gitblit v1.8.0