JLChen
2020-12-09 e87985ec1dcb69beedaf9f95e8e7aba14b7c08d6
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
@@ -70,9 +70,9 @@
                    {
                        foreach (var f in DB_ResidenceData.functionList.GetAllFunction())
                        {
                            if (f.roomIds.Contains(room.uid))
                            if (f.roomIds.Contains(room.roomId))
                            {
                                f.roomIds.Remove(room.uid);
                                f.roomIds.Remove(room.roomId);
                            }
                        }
                        SpatialInfo.CurrentSpatial.DelRoom(room);
@@ -309,6 +309,7 @@
                {
                    room.SaveRoomData();
                }
            };
            //上传图片到云端
@@ -325,7 +326,7 @@
        {
            try
            {
                MainPage.Log("SelectPicture 裁剪图片返回路径: " + selectImagePath);
                //MainPage.Log("SelectPicture 裁剪图片返回路径: " + selectImagePath);
                //1.读取裁剪后的图片,然后删除
                var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
                System.IO.File.Delete(selectImagePath);
@@ -338,12 +339,12 @@
                {
                    try
                    {
                        var newImageName = mRoom.name.Trim() +  ".png";
                        var newImageName = mRoom.roomName.Trim() +  ".png";
                        var uploadImageObj = new UploadImageObj()
                        {
                            prefix = "ONR",
                            prefix = "Room" + Utlis.GetTimestamp(),
                            fileName = newImageName,
                            uid = mRoom.sid,
                            uid = mRoom.uid,
                            content = imageBytes,
                        };
@@ -353,11 +354,11 @@
                            //上传成功
                            Application.RunOnMainThread(() =>
                            {
                                Utlis.WriteLine("上传成功:" + imageUrl);
                                //Utlis.WriteLine("上传成功:" + imageUrl);
                                //1.2如果是自定义图片删除之前的
                                if (!imageView.ImagePath.Contains("Classification/Room/Roombg"))
                                if (!string.IsNullOrEmpty(imageView.ImagePath) && !imageView.ImagePath.Contains("Classification/Room/Roombg"))
                                {
                                    Utlis.WriteLine("删除: " + imageView.ImagePath);
                                    //Utlis.WriteLine("删除: " + imageView.ImagePath);
                                    System.IO.File.Delete(imageView.ImagePath);
                                }
                                //重命名保存