From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)
---
ZigbeeApp/Shared/Common/CommonPage.cs | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 3151e47..6e16115 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -7,7 +7,7 @@
using Shared.Phone.UserCenter.Abount;
namespace Shared.Common
{
- public class CommonPage : FrameLayout
+ public class CommonPage : UIDrawerLayout
{
static CommonPage commonPage;
public static CommonPage Instance
@@ -43,6 +43,11 @@
Application.MainPage.AddChidren(Loading);
//}
Phone.UserView.HomePage.Instance.InitPage();
+
+ var roomList = new Shared.Phone.Device.Room.RoomManagement();
+
+ Instance.AddLeftView(roomList);
+ roomList.Show();
}
public static string SoftTitle = "ZigBee";
@@ -57,7 +62,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string CodeIDString = "1.0.19110701";
+ public static string CodeIDString = "1.0.19121201";
/// <summary>
/// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
/// </summary>
@@ -153,9 +158,8 @@
/// <summary>
/// 鐢ㄤ簬涓浗澶ч檰楠岃瘉鎵嬫満鍙锋鍒欒〃杈惧紡
- /// 绛夊悓浜�--- "^[1]+\\d{10}"
/// </summary>
- public static string PhoneRegexStr = "^[1]+[0,1,2,3,4,5,6,7,8,9]+\\d{9}";
+ public static string PhoneRegexStr = "^[1][0-9]{10}$";
/// <summary>
/// 鐢ㄤ簬楠岃瘉闈炰腑鍥藉ぇ闄嗘墜鏈哄彿姝e垯琛ㄨ揪寮�
/// </summary>
@@ -268,7 +272,7 @@
/// <param name="token">token</param>
/// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
/// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
- private async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST")
+ public async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST")
{
try
{
@@ -279,7 +283,11 @@
//2锛� 鍒濆鍖朒ttpWebRequest瀵硅薄
webRequest.Method = requestMethod;
webRequest.Timeout = 10 * 1000;
- webRequest.Headers.Add(HttpRequestHeader.Authorization, token);
+ if (token != null)
+ {
+ //瀵瑰簲寰俊缃戝潃
+ webRequest.Headers.Add(HttpRequestHeader.Authorization, token);
+ }
if (requestMethod == "GET")
{
//webRequest.ContentType = "text/html";
@@ -317,8 +325,10 @@
}
}
catch (Exception e)
- {
- System.Console.WriteLine(e.Message);
+ {
+#if DEBUG
+ System.Console.WriteLine(e.Message);
+#endif
return null;
}
}
@@ -380,7 +390,7 @@
}
var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponseEntity.ApkInfoRes>(result.ResponseData.ToString());
- if (responeData == null || responeData.pageData == null || responeData.pageData.Count==0)
+ if (responeData == null || responeData.pageData == null || responeData.pageData.Count == 0)
{
return null;
}
@@ -527,7 +537,7 @@
{
try
{
- Application.RunOnMainThread( () =>
+ Application.RunOnMainThread(() =>
{
//璁惧畾涓�涓椂闂�
Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
--
Gitblit v1.8.0