From 9c8baf7e7e1169ebdf7d5f7ed33ab29dd5fcbf18 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 14 十二月 2020 17:45:17 +0800
Subject: [PATCH] 2020-12-14 1.解锁设置问题修复,增加面容ID验证。2.错误码对接增加。

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs |   41 ++++++++++++++++++++---------------------
 1 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
index 375c8a3..bec504f 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
@@ -53,14 +53,6 @@
         {
             functionRow.MouseUpEventHandler = (sender, e) => {
                 btn.IsSelected = !btn.IsSelected;
-                if (btn.IsSelected)
-                {
-                    function.roomIds.Add(room.uid);
-                }
-                else
-                {
-                    function.roomIds.Remove(room.uid);
-                }
                 if (changeList.Contains(function))
                 {
                     changeList.Remove(function);
@@ -71,14 +63,7 @@
             };
             btn.MouseUpEventHandler = (sender, e) => {
                 btn.IsSelected = !btn.IsSelected;
-                if (btn.IsSelected)
-                {
-                    function.roomIds.Add(room.uid);
-                }
-                else
-                {
-                    function.roomIds.Remove(room.uid);
-                }
+
                 if (changeList.Contains(function))
                 {
                     changeList.Remove(function);
@@ -131,13 +116,27 @@
         void LoadEvent_SaveRoomData()
         {
             btnConfrim.MouseUpEventHandler = (sender, e) => {
-                foreach(var f in changeList)
+                if (string.IsNullOrEmpty(room.roomId))//鏂板鐨勬埧闂达紝浜戠鏈垱寤簉oomid 鏃犳硶淇濆瓨鏁版嵁
                 {
-                    f.SaveFunctionData();
+                    newRoomAddFunction(changeList);
                 }
-                room.SaveRoomData();
-                room.GetRoomFunctions(true);
-                bodyView.RemoveFromParent();
+                else
+                {
+                    foreach (var f in changeList)
+                    {
+                        if(f.roomIds.Contains(room.roomId))
+                        {
+                            f.roomIds.Remove(room.roomId);
+                        }
+                        else
+                        {
+                            f.roomIds.Add(room.roomId);
+                        }
+                        f.SaveFunctionData(true);
+                    }
+                    room.GetRoomFunctions(true);
+                    bodyView.RemoveFromParent();
+                }
             };
         }
 

--
Gitblit v1.8.0