Skip to content

Commit

Permalink
修复因为不同账号差异化带来的参数不同解析报错导致登陆失效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKZL committed Jun 23, 2024
1 parent 757fe38 commit 5a88937
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 149 deletions.
7 changes: 7 additions & 0 deletions Core/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ static Config()

lock (varMap)
foreach (var fieldInfo in _Config)
{
varMap.Add(fieldInfo.Name, fieldInfo);
if (!fieldInfo.Name.ToLower().Contains("Access"))
{
string ConfigText = $"从配置文件获取参数初始化:{fieldInfo.Name}={fieldInfo.GetValue(null)}";
Log.Info(nameof(Config), ConfigText);
}
}
Thread.Sleep(500);
ReadConfiguration();
RoomConfig.LoadRoomConfigurationFile();
Expand Down
6 changes: 5 additions & 1 deletion Core/LogModule/log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ await Task.Run(() =>
if (logClass.Type <= LogLevel && logClass.Type != LogClass.LogType.Info_Transcod && logClass.IsDisplay && ( Config.Core_RunConfig._DebugMode || logClass.Type< LogType.Debug))
#endif
{
//LogList.Add(logClass);
LogList.Add(logClass);
string _ = $"{logClass.Time}:[{Enum.GetName(typeof(LogClass.LogType), (int)logClass.Type)}][{logClass.Source}]{logClass.Message}";
console.Write($"{logClass.Time}:", ConsoleColor.White);
Expand Down Expand Up @@ -236,6 +236,10 @@ await Task.Run(() =>
}
}
else
{
;
}
});
}
}
Expand Down
149 changes: 2 additions & 147 deletions Core/Network/Methods/Nav.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,157 +64,12 @@ public class Nav_Class

public class Data
{
public bool isLogin { get; set; }
[JsonIgnore]
public long email_verified { get; set; }
public string face { get; set; }
[JsonIgnore]
public long face_nft { get; set; }
[JsonIgnore]
public long face_nft_type { get; set; }
[JsonIgnore]
public Level_Info level_info { get; set; }

public long mid { get; set; }
[JsonIgnore]
public long mobile_verified { get; set; }
[JsonIgnore]
public double money { get; set; }
[JsonIgnore]
public long moral { get; set; }
[JsonIgnore]
public Official official { get; set; }
[JsonIgnore]
public OfficialVerify officialVerify { get; set; }
[JsonIgnore]
public Pendant pendant { get; set; }
[JsonIgnore]
public long scores { get; set; }
public string uname { get; set; }
[JsonIgnore]
public long vipDueDate { get; set; }
[JsonIgnore]
public long vipStatus { get; set; }
[JsonIgnore]
public long vipType { get; set; }
[JsonIgnore]
public long vip_pay_type { get; set; }
[JsonIgnore]
public long vip_theme_type { get; set; }
[JsonIgnore]
public Vip_Label vip_label { get; set; }
[JsonIgnore]
public long vip_avatar_subscript { get; set; }
[JsonIgnore]
public string vip_nickname_color { get; set; }
[JsonIgnore]
public Vip vip { get; set; }
[JsonIgnore]
public Wallet wallet { get; set; }
[JsonIgnore]
public bool has_shop { get; set; }
[JsonIgnore]
public string shop_url { get; set; }
[JsonIgnore]
public long allowance_count { get; set; }
[JsonIgnore]
public long answer_status { get; set; }
[JsonIgnore]
public long is_senior_member { get; set; }

[JsonIgnore]
public Wbi_Img wbi_img { get; set; }
[JsonIgnore]
public bool is_jury { get; set; }
}

public class Level_Info
{
public long current_level { get; set; }
public long current_min { get; set; }
public long current_exp { get; set; }
}

public class Official
{
public long role { get; set; }
public string title { get; set; }
public string desc { get; set; }
public long type { get; set; }
}

public class OfficialVerify
{
public long type { get; set; }
public string desc { get; set; }
}

public class Pendant
{
public long pid { get; set; }
public string name { get; set; }
public string image { get; set; }
public long expire { get; set; }
public string image_enhance { get; set; }
public string image_enhance_frame { get; set; }
public long n_pid { get; set; }
}

public class Vip_Label
{
public string path { get; set; }
public string text { get; set; }
public string label_theme { get; set; }
public string text_color { get; set; }
public long bg_style { get; set; }
public string bg_color { get; set; }
public string border_color { get; set; }
public bool use_img_label { get; set; }
public string img_label_uri_hans { get; set; }
public string img_label_uri_hant { get; set; }
public string img_label_uri_hans_static { get; set; }
public string img_label_uri_hant_static { get; set; }
}

public class Vip
{
public long type { get; set; }
public long status { get; set; }
public long due_date { get; set; }
public long vip_pay_type { get; set; }
public long theme_type { get; set; }
public Label label { get; set; }
public long avatar_subscript { get; set; }
public string nickname_color { get; set; }
public long role { get; set; }
public string avatar_subscript_url { get; set; }
public long tv_vip_status { get; set; }
public long tv_vip_pay_type { get; set; }
public long tv_due_date { get; set; }
}

public class Label
{
public string path { get; set; }
public string text { get; set; }
public string label_theme { get; set; }
public string text_color { get; set; }
public long bg_style { get; set; }
public string bg_color { get; set; }
public string border_color { get; set; }
public bool use_img_label { get; set; }
public string img_label_uri_hans { get; set; }
public string img_label_uri_hant { get; set; }
public string img_label_uri_hans_static { get; set; }
public string img_label_uri_hant_static { get; set; }
}

public class Wallet
{
public long mid { get; set; }
public long bcoin_balance { get; set; }
public long coupon_balance { get; set; }
public long coupon_due_time { get; set; }
}

public class Wbi_Img
{
public string img_url { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Desktop/Views/Pages/LogPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>


Expand Down

0 comments on commit 5a88937

Please sign in to comment.