Przeglądaj źródła

轻会员-比较表跳转登录,轻会员-订阅账号登出后部分参数重置

lvle 1 rok temu
rodzic
commit
0b552a0a4f

+ 5 - 0
PDF Office/Helper/ServiceHelper.cs

@@ -756,6 +756,8 @@ namespace PDF_Master.Helper
                     reader.Close();
                     JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
                     App.IsLogin = false;
+                    Settings.Default.UserDate.subscribestatus = -1;
+                    Settings.Default.UserDate.subscribepayType = 0;
                     if (response != null)
                     {
                         response.Close();
@@ -803,6 +805,9 @@ namespace PDF_Master.Helper
                     Console.WriteLine(responseData);
                     reader.Close();
                     JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    App.IsLogin = false;
+                    Settings.Default.UserDate.subscribestatus = -1;
+                    Settings.Default.UserDate.subscribepayType = 0;
                     if (response != null)
                     {
                         response.Close();

+ 9 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs

@@ -113,7 +113,7 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
         public DelegateCommand RefreshCommand { get; set; }
        public IAPCompareDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
-
+            GoLoginCommand = new DelegateCommand(GoLogin);
             LinkstoreCommand = new DelegateCommand(Linkstore);
             RefreshCommand = new DelegateCommand(Refresh);
             InitString();
@@ -133,6 +133,14 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             }
         }
 
+        private void GoLogin()
+        {
+            Close();
+            App.mainWindowViewModel.OpenLogin();
+        }
+
+
+
         public void Close()
         {
             RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));

+ 1 - 0
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml

@@ -175,6 +175,7 @@
                         Height="40"
                         Margin="0,32,0,0"
                         Content="Sign Up For Free"
+                        Command="{Binding GoLoginCommand}"
                         FontFamily="Segoe UI"
                         FontSize="16"
                         FontWeight="SemiBold">

+ 3 - 1
PDFSettings/UserDate.cs

@@ -34,7 +34,9 @@ using System.Threading.Tasks;
 
         public int subscribeplatform { get; set; }
 
-        //0已注册1订阅中2订阅过期3试用中4试用过期
+        /// <summary>
+        /// 0已注册1订阅中2订阅过期3试用中4试用过期
+        /// </summary>
         public int subscribestatus{ get; set; }
 
         public string subscribeendDate { get; set; }