From 2eba7f5d706f7802bbd76629116499adeb518a68 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 31 十二月 2019 17:58:14 +0800
Subject: [PATCH] 2019-12-31-03
---
ZigbeeApp/Shared/Common/CommonPage.cs | 53 ++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
old mode 100755
new mode 100644
index bf1c822..e64b370
--- 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";
@@ -53,11 +58,11 @@
public static string LogoString = @"Logo/Logo.png";
public static string RegisterLogoString = @"Logo/Register_logo.png";
public static string RequestHttpsHost = "https://global.hdlcontrol.com/HangZhouHdlCloudApi";
- //public static string RequestHttpsHost = "http://172.16.2.225:13061";
+ //public static string RequestHttpsHost = "http://172.16.2.192:13061";
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string CodeIDString = "1.0.19071501";
+ public static string CodeIDString = "1.0.19112901";
/// <summary>
/// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
/// </summary>
@@ -74,11 +79,11 @@
/// <summary>
/// 璇锋眰鐗堟湰鍙�
/// </summary>
- public static string RequestVersion = "1.0";
+ public static string RequestVersion = "2.0";
/// <summary>
- /// 宸﹁竟璺濈灞忓箷鐨勫搴�--50
+ /// 宸﹁竟璺濈灞忓箷鐨勫搴�--58
/// </summary>
- public static int XLeft = 50;
+ public static int XLeft = 58;
/// <summary>
/// button楂樺害--110
/// </summary>
@@ -130,9 +135,9 @@
/// </summary>
public static int Navigation_Height = 220;
/// <summary>
- /// 搴曡竟鏍忛珮搴� 160
+ /// 搴曡竟鏍忛珮搴�
/// </summary>
- public static int TabbarHeight = 160;
+ public const int TabbarHeight = 141;
/// <summary>
/// 绾挎潯鐨勯珮搴�--瀹為檯鍍忕礌3
/// </summary>
@@ -177,8 +182,15 @@
/// 褰撳墠缃戠粶杩炴帴鐨勬ā寮� 0:娌℃湁缃戠粶 1锛氳繙绋嬭繛鎺ワ紝涔熷彨3G,4G 2锛歐IFI
/// </summary>
public static int nowNetworkMode = 0;
-
-
+ /// <summary>
+ /// 鍗犱綅瀛椾綋澶у皬
+ /// 11
+ /// </summary>
+ public static int PlaceHolderTextSize = 11;
+ /// <summary>
+ /// 瀹夊崜鐨勭郴缁熻繑鍥炴寜閿兘鍚︽寜涓�(姣斿鍦ㄥ浠借繕鍘熸椂,涓嶈兘鎸変笅杩斿洖閿�)
+ /// </summary>
+ public static bool BackKeyCanClick = true;
/// <summary>
/// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
@@ -261,7 +273,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
{
@@ -272,7 +284,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";
@@ -310,8 +326,10 @@
}
}
catch (Exception e)
- {
- System.Console.WriteLine(e.Message);
+ {
+#if DEBUG
+ System.Console.WriteLine(e.Message);
+#endif
return null;
}
}
@@ -378,13 +396,14 @@
return null;
}
int MaxIndex = 0;
- int NewID = 0;
+ int NewVersion = 0;
for (int i = 0; i < responeData.pageData.Count; i++)
{
var apkInfo = responeData.pageData[i];
- if (int.Parse(apkInfo.Id) > NewID)
+ var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", ""));
+ if (version > NewVersion)
{
- NewID = int.Parse(apkInfo.Id);
+ NewVersion = version;
MaxIndex = i;
}
}
--
Gitblit v1.8.0