jimmy.jiang@vinno.com 8 months ago
parent
commit
d8072d591d

+ 20 - 2
Client/PC/vStation/URMStationRelevant/RPCShell.cs

@@ -5,6 +5,7 @@ using JsonRpcLite.Services;
 using MyMD5;
 using Newtonsoft.Json;
 using NPOI;
+using Syncfusion.CompoundFile.DocIO.Native;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -396,7 +397,7 @@ namespace vStation.URMStationRelevant
                             oldState.user.isAutoLogin = true;
                             oldState.user.isAgreeClause = true;
                             oldState.user.code = result2.UserCode;
-                            oldState.user.token = result.Token;
+                            oldState.user.token = result.Token.Substring(1,5);
                             File.WriteAllText(URMConfig.StatesPath, JsonConvert.SerializeObject(oldState));
                         }
                         catch (Exception ex)
@@ -415,7 +416,7 @@ namespace vStation.URMStationRelevant
                         {
                             locale = new List<string> { "zh", "CN" },
                             issFollowSystemLocale = false,
-                            enableVidLoopPlayback = false
+                            enableVidLoopPlayback = false                            
                         };
                         newState.user = new user()
                         {
@@ -507,6 +508,14 @@ namespace vStation.URMStationRelevant
                         NewPassword = SymmetryEncrypt(newPassword),
                         OldPassword = SymmetryEncrypt(_oldAdminPassword)
                     });
+                    if (result)
+                    {
+                        var resultLogin = await AdminLogin(account, newPassword);
+                        if (resultLogin == "Success")
+                        {
+                            return true;
+                        }
+                    }
                     return result;
                 }
                 else
@@ -518,6 +527,15 @@ namespace vStation.URMStationRelevant
                         NewPassword = SymmetryEncrypt(newPassword),
                         AnyAccount = account,                        
                     });
+                    if (result)
+                    {
+                        Logger.WriteLineInfo("Reset password success");
+                        var resultLogin = await ClientLogin(account, newPassword);
+                        if (resultLogin== "success")
+                        { 
+                            return true;
+                        }
+                    }
                     return result;
                 }
 

BIN
URMStationOutput/vStation/vStation.exe


BIN
URMStationOutput/vStation/vStation.pdb


BIN
URMStationOutput/vStation/vStation11.exe