From b5f1a194d354ba9b2587c59ae17cf38d0f7f9bac Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 13 十二月 2021 16:38:23 +0800
Subject: [PATCH] 二维码闪退问题
---
SiriIntents/HDLRunSceneIntentHandlder.cs | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/SiriIntents/HDLRunSceneIntentHandlder.cs b/SiriIntents/HDLRunSceneIntentHandlder.cs
index b053f56..6d260c2 100644
--- a/SiriIntents/HDLRunSceneIntentHandlder.cs
+++ b/SiriIntents/HDLRunSceneIntentHandlder.cs
@@ -29,14 +29,14 @@
}
else
{
- var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+ var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
if (NSLocale.PreferredLanguages[0].Contains("zh-"))
{
rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
}
else
{
- rsp.SuccessMessage = "Not logged in to the app";
+ rsp.SuccessMessage = "Not logged in to the app.";
}
completion(rsp);
}
@@ -55,6 +55,21 @@
{
if (Server.HttpServerRequest.Ins.DataManager.IsLgoin)
{
+ if(Server.HttpServerRequest.Ins.DataManager.HomeId!= intent.HomeId)
+ {
+ var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
+ if (NSLocale.PreferredLanguages[0].Contains("zh-"))
+ {
+ rsp.SuccessMessage = "浣忓畢涓嶅尮閰�";
+ }
+ else
+ {
+ rsp.SuccessMessage = "Residential mismatch.";
+ }
+ completion(rsp);
+ return;
+ }
+
var result = "-1";
if (intent.ControlType == "1")
{
@@ -78,34 +93,34 @@
}
else
{
- rsp.SuccessMessage = "Successful execution";
+ rsp.SuccessMessage = "Successful execution ";
}
completion(rsp);
}
else
{
- var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+ var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
if (NSLocale.PreferredLanguages[0].Contains("zh-"))
{
rsp.SuccessMessage = "鎵ц澶辫触";
}
else
{
- rsp.SuccessMessage = "Execution failed";
+ rsp.SuccessMessage = "Execution failed.";
}
completion(rsp);
}
}
else
{
- var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Failure, null);
+ var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null);
if (NSLocale.PreferredLanguages[0].Contains("zh-"))
{
rsp.SuccessMessage = "璐﹀彿鏈櫥褰�";
}
else
{
- rsp.SuccessMessage = "Not logged in to the app";
+ rsp.SuccessMessage = "Not logged in to the app.";
}
completion(rsp);
}
--
Gitblit v1.8.0