Browse Source

轻会员优化及保真

lvle 2 years ago
parent
commit
6c4283e1d4

+ 4 - 4
PDF Office/Helper/ServiceHelper.cs

@@ -57,7 +57,7 @@ namespace PDF_Office.Helper
         public static string RebirthUrl = "/pdf-office-sso/auth/resetPassword";
 
         //获取用户信息
-        public static string GetUserUrl = "/pdf-office-sso/pdf-office-sso/user/me";
+        public static string GetUserUrl = "/pdf-office-sso/user/me";
 
 
 
@@ -67,10 +67,10 @@ namespace PDF_Office.Helper
             HttpWebResponse response = null;
             ServicePointManager.DefaultConnectionLimit = 200;
 
-            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(RequestHost + GetUserUrl);
+            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(RequestHost + GetUserUrl+"");
             request.Method = "Get";
             request.Headers.Add("Authorization", $"Bearer {Settings.Default.AppProperties.LoginToken}");
-            request.ContentType = "none";
+            request.ContentType = "text/html;charset=UTF-8";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
             request.Timeout = 10000;
@@ -94,7 +94,7 @@ namespace PDF_Office.Helper
                     }
                     return jobject["email"].ToObject<string>().ToLower();
                 }
-            }
+        }
             catch
             {
                 return "";

+ 35 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/CodeRegionViewModel.cs

@@ -33,6 +33,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set { SetProperty(ref _EnableNextStep, value); }
         }
 
+        private string _CodeTypeName = "注册账号";
+        public string CodeTypeName
+        {
+            get { return _CodeTypeName; }
+            set { SetProperty(ref _CodeTypeName, value); }
+        }
+
+
         private string _CodeType = "user_register";
         public string CodeType
         {
@@ -158,7 +166,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 CodeType = "user_register";
 
             }
+            if (CodeType == "user_reset_password")
+            {
+                CodeTypeName = "重置密码";
+            }
+            else
+            {
+                CodeTypeName = "注册账号";
 
+            }
 
         }
         
@@ -187,6 +203,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 CodeType = "user_register";
 
             }
+            if (CodeType == "user_reset_password")
+            {
+                CodeTypeName = "重置密码";
+            }
+            else
+            {
+                CodeTypeName = "注册账号";
+
+            }
         }
         private void RegisterNext()
         {
@@ -288,6 +313,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 else
                 {
                     RegisterCodemsg = "请输入六位数验证码";
+                    RegisterCodemsgVis = Visibility.Visible;
                 }
 
             }
@@ -334,7 +360,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         private void BackRegisterLast()
         {
-               RegisterDialogViewModel.RegionMan( "RegisterRegion");
+            if(CodeType== "user_register")
+            {
+                RegisterDialogViewModel.RegionMan("RegisterRegion");
+            }
+           else if(CodeType == "user_reset_password")
+            {
+                LoginDialogViewModel.RegionMan("LoginPasswordRegion");
+            }
+           
         }
     }
 }

+ 1 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/RegisterOKRegionViewModel.cs

@@ -56,6 +56,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         private void RegisterGetStart()
         {
+
             RegisterDialogViewModel.Close();
             App.mainWindowViewModel.UserVis = Visibility.Collapsed;
             App.mainWindowViewModel.RegisterVis = Visibility.Collapsed;

+ 2 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/UserOutCodeRegionViewModel.cs

@@ -242,7 +242,8 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             else
                 {
                     UserCodemsg = "请输入六位数验证码";
-                }
+                   UserCodemsgVis = Visibility.Visible;
+            }
 
             
         }

+ 1 - 1
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml

@@ -22,7 +22,7 @@
             FontSize="20"
             FontStyle="Normal"
             FontWeight="SemiBold"
-            Text="{Binding CodeType}" />
+            Text="{Binding CodeTypeName}" />
         <TextBlock
             Width="162"
             Height="22"

+ 7 - 2
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml.cs

@@ -25,10 +25,15 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         public CodeRegion()
         {
             InitializeComponent();
-            text_Code1.Focus();
+            Loaded += Focus_Loaded;
+            
+           
         }
 
-
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
+            text_Code1.Focus();
+        }
         private void Code_TextChanged(object sender, TextChangedEventArgs e)
         {
             if (text_Code1.Text.Length >= 1)

+ 12 - 6
PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml

@@ -286,10 +286,11 @@
                 FontStyle="Normal"
                 FontWeight="SemiBold"
                 Text="Login" />
-            <TextBlock
-                Width="114"
+            <Grid Margin="32,110,0,0" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="Auto">
+                <WrapPanel>
+                    <TextBlock
+                Width="Auto"
                 Height="20"
-                Margin="32,110,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 FontFamily="Segoe UI"
@@ -298,10 +299,10 @@
                 Foreground="#616469"
                 FontStyle="Normal"
                 Text="{Binding LoginEmail}" />
-            <TextBlock
+                <TextBlock
+                    Margin="8,0,0,0"
                 Width="73"
                 Height="20"
-                Margin="154,110,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 FontFamily="Segoe UI"
@@ -310,7 +311,11 @@
                 Foreground="#1770F4"
                 LineHeight="20">
                 <Hyperlink Command="{Binding ChangeEmailCommand}">Change Email</Hyperlink>
-            </TextBlock>
+                    </TextBlock>
+                </WrapPanel>
+                
+            </Grid>
+           
             <TextBlock
                 Width="95"
                 Height="22"
@@ -360,6 +365,7 @@
                 Height="20"
                 Margin="32,212,0,0"
                 HorizontalAlignment="Left"
+                Foreground="#F3465B"
                 VerticalAlignment="Top"
                 Text="{Binding LoginPasswordlook, Mode=TwoWay}" />
 

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

@@ -314,6 +314,7 @@
                 Width="262"
                 Height="20"
                 Margin="32,172,0,0"
+                Foreground="#F3465B"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 Text="{Binding LoginEmaillook, Mode=TwoWay}" />

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

@@ -471,6 +471,7 @@
                 Width="262"
                 Height="20"
                 Margin="32,212,0,0"
+                Foreground="#F3465B"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 Text="{Binding LoginPasswordlook, Mode=TwoWay}" />

+ 4 - 1
PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml

@@ -294,16 +294,18 @@
             HorizontalAlignment="Left"
             VerticalAlignment="Top">
             <TextBox
+                
                 Grid.ColumnSpan="2"
                 help:PasswordBoxHelper.DisplayText="{Binding RegisterEmailMsg, Mode=TwoWay}"
                 Style="{StaticResource RegisterEmailTextBoxStyle}"
                 Text="{Binding RegisterEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding EmailTextVisibility, Mode=TwoWay}" />
+                Visibility="{Binding EmailTextVisibility, Mode=TwoWay}"  />
         </Grid>
         <TextBlock
             Width="262"
             Height="20"
             Margin="32,144,0,0"
+            Foreground="#F3465B"
             HorizontalAlignment="Left"
             Text="{Binding RegisterEmaillook,Mode=TwoWay}"
             VerticalAlignment="Top"/>
@@ -347,6 +349,7 @@
             Height="20"
             Margin="32,204,0,0"
             HorizontalAlignment="Left"
+            Foreground="#F3465B"
             Text="{Binding RegisterePasswordlook,Mode=TwoWay}"
             VerticalAlignment="Top"/>
         <Button

File diff suppressed because it is too large
+ 20 - 3
PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml


+ 7 - 0
PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml.cs

@@ -25,6 +25,13 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         public UserOutCodeRegion()
         {
             InitializeComponent();
+            Loaded += Focus_Loaded;
+
+
+        }
+
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
             text_Code1.Focus();
         }
 

+ 38 - 3
PDF Office/Views/MainWindow.xaml

@@ -234,26 +234,61 @@
                     x:Name="Btn_Register"
                     Width="40"
                     Height="40"
+                    Style="{StaticResource subToolBar}"
                     Background="Transparent"
                     Command="{Binding OpenRegisterCommand}"
                     Visibility="{Binding RegisterVis,Mode=TwoWay}"
-                    Content="注册" />
+                    >
+                    <Border    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}" Width="28" Height="28"  BorderThickness="1" CornerRadius="100" Background="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path
+                            Margin="-3,0,0,0"
+                        Width="20"
+                        Height="20"
+                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
+                        Fill="White" />
+                    </Border>
+                </Button>
                 <Button
                     x:Name="Btn_Login"
                     Width="40"
                     Height="40"
                     Background="Transparent"
+                    Style="{StaticResource subToolBar}"
                     Visibility="{Binding LoginVis,Mode=TwoWay}"
                     Command="{Binding OpenLoginCommand}"
-                    Content="登录" />
+                     >
+                    <Border    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}" Width="28" Height="28"  BorderThickness="1" CornerRadius="100" Background="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path
+                            Margin="-3,0,0,0"
+                        Width="20"
+                        Height="20"
+                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
+                        Fill="White" />
+                    </Border>
+                </Button>
                 <Button
                     x:Name="Btn_User"
                     Width="40"
                     Height="40"
                     Background="Transparent"
+                    Style="{StaticResource subToolBar}"
                     Visibility="{Binding UserVis,Mode=TwoWay}"
                     Command="{Binding OpenUserCommand}"
-                    Content="我的" />
+                    >
+                    <Border    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}" Width="28" Height="28"  BorderThickness="1" CornerRadius="100" Background="#1770F4">
+                        <Path
+                            Margin="-3,0,0,0"
+                        Width="20"
+                        Height="20"
+                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
+                        Fill="White" />
+                    </Border>
+                </Button>
+                <Separator BorderBrush="#94989C" BorderThickness="1">
+                    <Separator.LayoutTransform>
+                        <RotateTransform Angle="90" />
+                    </Separator.LayoutTransform>
+                </Separator>
                 <Button
                     Name="BtnMiniSize"
                     Width="40"