From bff0a4962f597be1b4ea040be43221a850b8ddb4 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 29 十二月 2020 11:55:04 +0800
Subject: [PATCH] 2020-12-29-1
---
HDL_ON/Entity/Function/Scene.cs | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index a369fa7..fef4381 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using HDL_ON.Common;
using HDL_ON.DAL.Server;
using Shared;
@@ -279,19 +280,30 @@
/// 鏀惰棌鍦烘櫙
/// </summary>
/// <returns></returns>
- public string CollectScene()
+ public void CollectScene()
{
- var pm = new HttpServerRequest();
- if (this.collect)
+ var result = StateCode.SUCCESS;
+ new System.Threading.Thread(() =>
{
- var revPack = pm.CollectScene(this.userSceneId);
- return revPack;
- }
- else
- {
- var revPack = pm.CancelCollectScene(this.userSceneId);
- return revPack;
- }
+ if (collect)
+ {
+ result = ApiUtlis.Ins.HttpRequest.CollectScene(userSceneId);
+ }
+ else
+ {
+ result = ApiUtlis.Ins.HttpRequest.CancelCollectScene(userSceneId);
+ }
+ //鎻愮ず閿欒
+ if (result != StateCode.SUCCESS)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ collect = !collect;
+ IMessageCommon.Current.ShowErrorInfoAlter(result);
+ });
+ }
+ })
+ { IsBackground = true }.Start();
}
/// <summary>
--
Gitblit v1.8.0