From bcc1155365489498f171a245d26818be0aa526d0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 25 三月 2021 18:40:59 +0800
Subject: [PATCH] 2021-03-25 1.完善丰林接口对接。
---
DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll | 0
HDL_ON/DAL/Server/NewAPI.cs | 8 +-
HDL_ON/DAL/Server/NewApiRes.cs | 5 +
HDL_ON/Common/HDLCommon.cs | 54 +++++++++---
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs | 13 +++
HDL_ON/DAL/FL/ESOnVideo.cs | 68 +++++++++++-----
.vs/HDL_APP_Project/xs/UserPrefs.xml | 38 +++++++--
HDL-ON_iOS/AppDelegate.cs | 12 ++
HDL_ON/UI/UI1-Login/LoginPage.cs | 6
HDL-ON_Android/Other/JPush/JPushReceiver.cs | 2
10 files changed, 152 insertions(+), 54 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 308018c..94c1796 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,27 +1,44 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_iOS/AppDelegate.cs">
<Files>
- <File FileName="HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs" Line="1" Column="1" />
+ <File FileName="HDL-ON_Android/Other/JLCountrycode.cs" Line="40" Column="1" />
+ <File FileName="HDL_ON/Common/HDLCommon.cs" Line="412" Column="42" />
+ <File FileName="HDL_ON/DAL/FL/ESOnVideo.cs" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs" />
+ <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1462" Column="18" />
+ <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="23" Column="22" />
+ <File FileName="HDL-ON_Android/Other/JPush/JPushReceiver.cs" Line="166" Column="75" />
+ <File FileName="HDL-ON_iOS/AppDelegate.cs" Line="320" Column="39" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
+ <Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
- <Node name="FL" expanded="True" />
+ <Node name="Server" expanded="True" />
</Node>
+ <Node name="Entity" expanded="True" />
<Node name="UI" expanded="True">
- <Node name="UI1-Login" expanded="True">
- <Node name="ForgetPasswordPage.cs" selected="True" />
- </Node>
+ <Node name="1-test-" expanded="True" />
+ <Node name="BindingResidence" expanded="True" />
+ <Node name="CSS" expanded="True" />
+ <Node name="UI0-Public" expanded="True" />
+ <Node name="UI0-Stan" expanded="True" />
+ <Node name="UI1-Login" expanded="True" />
+ <Node name="UI2" expanded="True" />
+ </Node>
+ </Node>
+ <Node name="HDL-ON_Android" expanded="True">
+ <Node name="Other" expanded="True">
+ <Node name="JPush" expanded="True" />
</Node>
</Node>
<Node name="HDL-ON_iOS" expanded="True">
- <Node name="Other" expanded="True" />
+ <Node name="AppDelegate.cs" selected="True" />
</Node>
- <Node name="ys" expanded="True" />
</Node>
</State>
</Pad>
@@ -36,7 +53,10 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore />
+ <BreakpointStore>
+ <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/Common/HDLCommon.cs" relfile="HDL_ON/Common/HDLCommon.cs" line="298" column="1" />
+ <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/Common/HDLCommon.cs" relfile="HDL_ON/Common/HDLCommon.cs" line="284" column="1" />
+ </BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
diff --git a/DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll b/DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll
new file mode 100644
index 0000000..173262f
--- /dev/null
+++ b/DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll
Binary files differ
diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index b15ec4d..b93aded 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -57,6 +57,7 @@
if (jpushExpandData != null && jpushExpandData.messageType != null)
{
pushMes.messageType = jpushExpandData.messageType;
+ pushMes.expantContent = jpushExpandData.expantContent;
Utlis.WriteLine("PushMes messageType : " + pushMes.messageType);
}
@@ -162,6 +163,7 @@
if (jpushExpandData != null && jpushExpandData.messageType != null)
{
pushMes.messageType = jpushExpandData.messageType;
+ pushMes.expantContent = jpushExpandData.expantContent;
Utlis.WriteLine("PushMes messageType : " + pushMes.messageType);
}
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 58437b4..99caa0e 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -295,6 +295,7 @@
var title = alert["title"] as NSString;
var expandData = "";
var messageType = "";
+ var expantContent = "";
if (userInfo.ContainsKey(new NSString("expandData")))
{
var expandDataStr = userInfo["expandData"] as NSString;
@@ -308,7 +309,13 @@
messageType = expandDataNSD["messageType"] as NSString;
Utlis.WriteLine("messageType: " + messageType);
}
-
+
+ if (expandDataNSD.ContainsKey(new NSString("expantContent")))
+ {
+ expantContent = expandDataNSD["expantContent"] as NSString;
+ Utlis.WriteLine("expantContent: " + expantContent);
+ }
+
}
}
else
@@ -322,7 +329,8 @@
Title = title,
Content = body,
Extras = expandData,
- messageType = messageType
+ messageType = messageType,
+ expantContent = expantContent
};
Utlis.WriteLine("PushMes title : " + pushMes.Title);
Utlis.WriteLine("PushMes message : " + pushMes.Content);
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 1abb521..6ab29de 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -277,22 +277,25 @@
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString()))
{
-#if DEBUG
-#if __Android__
-
- ShowAlert("鏉ョ數閫氱煡锛侊紒锛侊紒");
+ if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
-#else
- ESOnVideo.Current.Test();
-#endif
-#endif
- //瑙f瀽鍛煎彨鐨勯棬鍙f満UUID淇℃伅锛屽苟璺宠浆涓版灄鍛煎彨椤甸潰
- //ESVideoInfo eSVideoInfo = new ESVideoInfo()
- //{
- // DeviceName = "瀹ゅ鏈�88",
- // ESVideoUUID = "JJY000019VPLLF",
- //};
- //ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo);
+ ESVideoInfo eSVideoInfo = GetESOnVideoJson(jpushMessageInfo.expantContent);
+
+ if (eSVideoInfo == null) return;
+
+ if (string.IsNullOrEmpty(eSVideoInfo.uuid)) return;
+
+ if (eSVideoInfo.uuid.Contains(","))
+ {
+ var uuid = eSVideoInfo.uuid.Split(',');
+ eSVideoInfo.ESVideoUUID = uuid[0];
+ }
+ else
+ {
+ eSVideoInfo.ESVideoUUID = eSVideoInfo.uuid;
+ }
+
+ ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo);
}
}
@@ -304,6 +307,27 @@
}
/// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonStr"></param>
+ /// <returns></returns>
+ ESVideoInfo GetESOnVideoJson(string jsonStr)
+ {
+ try
+ {
+ if (!string.IsNullOrEmpty(jsonStr))
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<ESVideoInfo>(jsonStr);
+ }
+ return null;
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
+ /// <summary>
/// 璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈�
/// 瑕佸湪涓荤嚎绋嬭皟鐢�
/// 閫�鍑虹櫥褰曟搷浣�
diff --git a/HDL_ON/DAL/FL/ESOnVideo.cs b/HDL_ON/DAL/FL/ESOnVideo.cs
index f7f67e1..e9a5cf2 100644
--- a/HDL_ON/DAL/FL/ESOnVideo.cs
+++ b/HDL_ON/DAL/FL/ESOnVideo.cs
@@ -38,11 +38,13 @@
}
/// <summary>
- ///
+ /// 闂ㄥ彛鏈恒�佷赴鏋楀皬鍖轰俊鎭拰鎴块棿淇℃伅绛夊弬鏁�
/// </summary>
public ESVideoInfo esVideoInfo;
- //public FLInfo mFLInfo;
+ /// <summary>
+ ///
+ /// </summary>
public void InitESVideoSDK()
{
//ESVideo.
@@ -66,6 +68,7 @@
Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
#else
+
#endif
}
@@ -84,9 +87,12 @@
//vc.MESRoomID = mESVideoInfo.ESRoomID;
vc.DeviceName = mESVideoInfo.DeviceName;
//vc.RoomName = mESVideoInfo.RoomName;
- vc.MESCallDelegate = new OnESCallDelegate(this);
+ //vc.MESCallDelegate = new OnESCallDelegate(this);
+ mOnESCallDelegate = new OnESCallDelegate(this);
+ vc.MESCallDelegate = mOnESCallDelegate;
Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
#else
+
#endif
}
@@ -99,7 +105,13 @@
/// <returns></returns>
bool CheckESVideoInfoIsNullOrEmpty()
{
- return (esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId));
+ if(esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId))
+ {
+ Utlis.WriteLine("ESVideoInfo Is NullOrEmpty");
+ return true;
+ }
+ return false;
+ //return (esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId));
}
/// <summary>
@@ -121,12 +133,11 @@
}
else
{
- Utlis.WriteLine("POST 鎺ュ惉澶辫触");
+ Utlis.WriteLine("POST 鎺ュ惉澶辫触 code: " + revertObj.Code);
}
})
- { IsBackground = true }.Start();
-
+ { IsBackground = false }.Start();
}
@@ -154,11 +165,11 @@
}
else
{
- Utlis.WriteLine("POST 鎸傛柇澶辫触");
+ Utlis.WriteLine("POST 鎸傛柇澶辫触 code: "+ revertObj.Code);
}
})
- { IsBackground = true }.Start();
+ { IsBackground = false }.Start();
}
/// <summary>
@@ -183,11 +194,11 @@
}
else
{
- Utlis.WriteLine("POST 鎷掓帴澶辫触");
+ Utlis.WriteLine("POST 鎷掓帴澶辫触 code: " + revertObj.Code);
}
})
- { IsBackground = true }.Start();
+ { IsBackground = false }.Start();
}
/// <summary>
@@ -215,14 +226,15 @@
}
else
{
- Utlis.WriteLine("POST 鎴浘涓婁紶澶辫触");
+ Utlis.WriteLine("POST 鎴浘涓婁紶澶辫触 code: " + revertObj.Code);
}
})
- { IsBackground = true }.Start();
+ { IsBackground = false }.Start();
}
+ DateTime UnlockDateTime = DateTime.MinValue;
/// <summary>
/// 寮�閿佹垚鍔�
/// </summary>
@@ -231,6 +243,15 @@
Utlis.WriteLine("UnlockAction");
if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ //3S鍐呬笉鍏佽瑙﹀彂绗簩娆�
+ if(UnlockDateTime.AddSeconds(3) > DateTime.Now)
+ {
+ UnlockDateTime = DateTime.Now;
+ Utlis.WriteLine("3S鍐呬笉鍏佽瑙﹀彂绗簩娆�");
+ //涓版灄SDKbug锛屽懠鍙殑鏃跺�欏紑閿佹垚鍔熶細鏈�2娆″洖璋冿紝
+ return;
+ }
new Thread(() =>
{
@@ -245,11 +266,11 @@
}
else
{
- Utlis.WriteLine("POST 寮�閿佸け璐�");
+ Utlis.WriteLine("POST 寮�閿佸け璐� code: " + revertObj.Code);
}
})
- { IsBackground = true }.Start();
+ { IsBackground = false }.Start();
}
#endregion
@@ -259,8 +280,11 @@
/////// <summary>
/////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢
/////// </summary>
- //OnESCallDelegate mOnESCallDelegate;
+ OnESCallDelegate mOnESCallDelegate;
+ /// <summary>
+ ///
+ /// </summary>
public class OnESCallDelegate : ESCallDelegate
{
@@ -333,6 +357,7 @@
{
DeviceName = "瀹ゅ鏈�88",
ESVideoUUID = "JJY000019VPLLF",
+
};
if (isMonitor)
{
@@ -340,6 +365,7 @@
}
else
{
+ eSVideoInfo.callId = "88888";
ShowESvideoVideoIntercom(eSVideoInfo);
}
@@ -360,7 +386,7 @@
/// 瀹ゅ鏈虹殑鍚嶇О
/// 渚嬶細瀹ゅ鏈�
/// </summary>
- public string DeviceName = string.Empty;
+ public string DeviceName = "闂ㄥ彛鏈�";
/// <summary>
/// 涓版灄璇锋眰鐨勫敮涓�id
/// </summary>
@@ -377,10 +403,10 @@
/// 涓版灄妤兼爧鍙�
/// </summary>
public string unitno;
- /// <summary>
- /// 涓版灄浣忓畢Id
- /// </summary>
- public string HomeID;
+ ///// <summary>
+ ///// 涓版灄浣忓畢Id
+ ///// </summary>
+ //public string HomeID;
/// <summary>
/// 鍛煎彨璁板綍Id
/// </summary>
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index e653247..e7694be 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -526,10 +526,10 @@
#endregion
#region 鈻� -- 涓版灄鐩稿叧鐩稿叧鎺ュ彛___________________________
- ///// <summary>
- ///// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃
- ///// </summary>
- //public const string API_POST_FL_Check = "/home-wisdom/app/fl/vi/answer";
+ /// <summary>
+ /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃
+ /// </summary>
+ public const string API_POST_FL_Check = "/home-wisdom/app/fl/vi/check";
/// <summary>
/// 鎺ュ惉
/// </summary>
diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs
index e30c1fb..c23dac9 100644
--- a/HDL_ON/DAL/Server/NewApiRes.cs
+++ b/HDL_ON/DAL/Server/NewApiRes.cs
@@ -1434,6 +1434,11 @@
/// 淇℃伅绫诲瀷
/// </summary>
public string messageType = "";
+ /// <summary>
+ /// 鎵╁睍鏁版嵁鍐呭
+ /// </summary>
+ public string expantContent = "";
+
}
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 96c7940..741de09 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -188,15 +188,15 @@
#if DEBUG
btnIcon_bg.MouseUpEventHandler += (sender, e) =>
{
- ESOnVideo.Current.Test();
+ //ESOnVideo.Current.Test();
};
bool b = false;
btnIcon.MouseUpEventHandler += (sender, e) =>
{
- ESOnVideo.Current.Test(false);
+ //ESOnVideo.Current.Test(false);
- return;
+ //return;
if (b)
{
etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
index f0747c8..0b26a18 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -71,6 +71,19 @@
};
bodyView.AddChidren(btnOnTitle);
+#if DEBUG
+ btnOnIcon.MouseUpEventHandler += (sender, e) =>
+ {
+ ESOnVideo.Current.Test();
+ };
+
+ btnOnTitle.MouseUpEventHandler += (sender, e) =>
+ {
+ ESOnVideo.Current.Test(false);
+ };
+
+#endif
+
Button btnOnVersion = new Button()
{
Y = btnOnTitle.Bottom,
--
Gitblit v1.8.0