Ejemplo n.º 1
0
        private async void Login()
        {
            var vm = new LoginPageViewModel();

            if (await vm.Show())
            {
                this.NavigationService.ClearHistory();
                this.NavigationService.Navigate("My", null);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 判断登录状态
        /// 如果未登录,则弹出登录界面
        /// </summary>
        /// <returns></returns>
        protected async Task <bool> RequireLogin()
        {
            if (this.CurrentUser.IsLogin)
            {
                return(true);
            }

            var vm = new LoginPageViewModel();

            return(await vm.Show());
        }