mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-21 09:02:26 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a4964efac | |||
| f646ab1c6f | |||
| b4e0b6d773 | |||
| 5e5b397251 | |||
| 18c742a9ef | |||
| d634204bd4 | |||
| c20b20407e |
@@ -68,19 +68,19 @@ jobs:
|
||||
run: dotnet --info
|
||||
|
||||
- name: Build BD.WTTS.Client.AppHost
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q /property:WarningLevel=1
|
||||
|
||||
- name: Build BD.WTTS.Client.Plugins.Accelerator.ReverseProxy
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q /property:WarningLevel=1
|
||||
|
||||
- name: Build BD.WTTS.Client.Avalonia.App
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q /property:WarningLevel=1
|
||||
|
||||
- name: Build BD.WTTS.Client.Avalonia.Designer.HostApp
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q /property:WarningLevel=1
|
||||
|
||||
- name: Test
|
||||
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q /property:WarningLevel=1
|
||||
|
||||
# release:
|
||||
# name: Release
|
||||
|
||||
+1
-1
Submodule ref/SteamClient updated: d137c6195b...724b8552cb
+1
-1
Submodule ref/WinAuth updated: f6ad4f84ca...eabbfe1513
@@ -52,10 +52,8 @@ public sealed partial class GameAcceleratorService
|
||||
[Reactive]
|
||||
public DateTime? VipEndTime { get; set; }
|
||||
|
||||
const string VipEndTimeStringDef = "新用户免费试用 2 天";
|
||||
|
||||
[Reactive]
|
||||
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
|
||||
public string? VipEndTimeString { get; set; }
|
||||
|
||||
GameAcceleratorService()
|
||||
{
|
||||
@@ -179,51 +177,54 @@ public sealed partial class GameAcceleratorService
|
||||
.ObserveOn(RxApp.MainThreadScheduler)
|
||||
.Subscribe(async x =>
|
||||
{
|
||||
string vipEndTimeString = VipEndTimeStringDef;
|
||||
try
|
||||
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
||||
return;
|
||||
|
||||
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
||||
if (vipEndTimeResult == null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Log.Error(nameof(GameAcceleratorService),
|
||||
"XunYouSDK.GetVipEndTime is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
||||
if (vipEndTimeResult == null)
|
||||
{
|
||||
Log.Error(nameof(GameAcceleratorService),
|
||||
"XunYouSDK.GetVipEndTime is null.");
|
||||
return;
|
||||
}
|
||||
if (!vipEndTimeResult.IsSuccess || vipEndTimeResult.Content == null)
|
||||
{
|
||||
Toast.Show(ToastIcon.Error, "获取会员时间失败");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vipEndTimeResult.IsSuccess || vipEndTimeResult.Content == null)
|
||||
if (vipEndTimeResult.Content.Code == XunYouBaseResponseCode.成功)
|
||||
{
|
||||
var etime = vipEndTimeResult.Content.Data?.ExpireTime;
|
||||
if (etime.HasValue)
|
||||
{
|
||||
Toast.Show(ToastIcon.Error, "获取会员时间失败");
|
||||
return;
|
||||
}
|
||||
VipEndTime = etime.Value.ToDateTime(UnixTimestampType.Seconds);
|
||||
//var acc_order = (await IMicroServiceClient.Instance.Ordering.GetUserOrderCount([OrderStatus.Paid, OrderStatus.Completed], OrderBusinessType.XunYouOrder)).Content;
|
||||
//if (acc_order <= 0)
|
||||
//{
|
||||
// if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
|
||||
// VipEndTimeString = "试用时长到期";
|
||||
// else
|
||||
// VipEndTimeString = "新用户试用2天";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
||||
//}
|
||||
|
||||
if (vipEndTimeResult.Content.Code == XunYouBaseResponseCode.成功)
|
||||
{
|
||||
var etime = vipEndTimeResult.Content.Data?.ExpireTime;
|
||||
if (etime.HasValue)
|
||||
{
|
||||
VipEndTime = etime.Value.ToDateTime(UnixTimestampType.Seconds);
|
||||
if (VipEndTime.Value > DateTime.Now)
|
||||
{
|
||||
vipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error(nameof(GameAcceleratorService),
|
||||
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
|
||||
vipEndTimeResult.Content.Message,
|
||||
vipEndTimeResult.Content.Code);
|
||||
if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
|
||||
VipEndTimeString = "新用户试用2天";
|
||||
else
|
||||
VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
||||
}
|
||||
}
|
||||
finally
|
||||
else
|
||||
{
|
||||
VipEndTimeString = vipEndTimeString;
|
||||
Log.Error(nameof(GameAcceleratorService),
|
||||
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
|
||||
vipEndTimeResult.Content.Message,
|
||||
vipEndTimeResult.Content.Code);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
-1
@@ -300,7 +300,6 @@ public sealed partial class SteamLoginImportPageViewModel : ViewModelBase
|
||||
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
|
||||
{
|
||||
await SaveAuthenticatorAsync();
|
||||
RevocationCodeText = steamAuthenticator.RecoveryCode;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user