| | |
| | | Pra.LoginAccessToken = Config.Instance.Token;
|
| | |
|
| | | //编辑住宅
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra, new List<string> { "NotCheck" });
|
| | | if (flage == true)
|
| | | {
|
| | | //刷新内存的住宅名
|
| | |
| | | home.Name = residenceName;
|
| | | home.Save();
|
| | | //住宅修改名称的话,主页需要重新刷新
|
| | | UserView.UserPage.Instance.RefreshForm = true;
|
| | | UserView.UserPage.Instance.RefreshAllForm = true;
|
| | | }
|
| | |
|
| | |
|
| | |
| | | public House GetHouseByHouseId(string houseId)
|
| | | {
|
| | | var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, houseId, $"House_{houseId}.json");
|
| | | var file = Shared.IO.FileUtils.ReadFile(path);
|
| | | var file = HdlFileLogic.Current.ReadFileByteContent(path);
|
| | | if (file == null)
|
| | | {
|
| | | return null;
|
| | |
| | | public House GetHouseByFilePath(string filePath)
|
| | | {
|
| | | var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, GetHouseIdByFilePath(filePath), filePath);
|
| | | var file = Shared.IO.FileUtils.ReadFile(path);
|
| | | var file = HdlFileLogic.Current.ReadFileByteContent(path);
|
| | | if (file == null)
|
| | | {
|
| | | return null;
|
| | |
| | | if (arryHouse.Length > 0)
|
| | | {
|
| | | //读取文件内容
|
| | | var textValue = UserCenterLogic.LoadFileContent(System.IO.Path.Combine(nowPath, arryHouse[0]));
|
| | | var textValue = HdlFileLogic.Current.ReadFileTextContent(System.IO.Path.Combine(nowPath, arryHouse[0]));
|
| | | if (textValue == null)
|
| | | {
|
| | | continue;
|