old mode 100755
new mode 100644
| | |
| | | namespace Shared.Phone.UserView |
| | | { |
| | | /// <summary> |
| | | /// Home page. |
| | | /// Home page.第二版呀 |
| | | /// </summary> |
| | | public class HomePage : PageLayout |
| | | { |
| | |
| | | } |
| | | }; |
| | | |
| | | //*******待改***** |
| | | UserPage.Instance.Fresh(); |
| | | if (Config.Instance.IsLogin) |
| | | { |
| | | ShowLoginLoadView(); |
| | | CommonPage.Loading.Start(); |
| | | Action action = async () => |
| | | { |
| | |
| | | { |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | //登录成功 |
| | | var homes = await House.GetHomeLists(); |
| | | |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | //启动ZigBee
|
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | Room.canInitAllRoom = true; |
| | | Room.InitAllRoom(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Instance.RemoveViewByTag("Login"); |
| | | UserPage.Instance.Fresh(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | |
| | | //登录失败,也直接进入主页 |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | //登录成功 |
| | | var homes = await House.GetHomeLists(); |
| | | |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | //启动ZigBee
|
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | Room.canInitAllRoom = true; |
| | | Room.InitAllRoom(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Instance.RemoveViewByTag("Login"); |
| | | UserPage.Instance.Fresh(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | |
| | | Shared.Common.CommonPage.Instance.AddChidren(accountLogin); |
| | | accountLogin.Show(); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void ShowLoginLoadView() |
| | | { |
| | | var loginLoad = new LoginLoading { }; |
| | | CommonPage.Instance.AddChidren(loginLoad); |
| | | loginLoad.Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return -1; |
| | | } |
| | | //初始化管理员权限信息(里面有特殊判断了,可以直接调用) |
| | | await UserCenter.UserCenterLogic.InitAdminConnectMqttInfo(); |
| | | |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString()); |
| | | var revertData = responseDataObj; |
| | | Config.Instance.UserID = revertData.UserID; |
| | | Config.Instance.MasterID = revertData.MainUserID; |
| | | Config.Instance.AccountType = revertData.UserType; |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.Password = password;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; |
| | | Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; |
| | | Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; |
| | | Config.Instance.LoginToken = revertData.Token; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |