Compare commits

..

7 Commits

Author SHA1 Message Date
wangyingpan 7a4964efac 🚑 解决冲突 2024-04-29 13:29:44 +08:00
wangyingpan f646ab1c6f ✨ 替换令牌中添加绑定手机号窜哦做 2024-04-28 16:36:57 +08:00
wangyingpan b4e0b6d773 Merge branch 'fix/authenticator-verifycode-ui' of https://github.com/BeyondDimension/SteamTools into fix/authenticator-verifycode-ui 2024-04-23 14:55:55 +08:00
wangyingpan 5e5b397251 🎨 删除绑定手机号步骤
🐛 修复替换令牌逻辑验证码信息展示错误的问题
2024-04-23 14:54:30 +08:00
wangyingpan 18c742a9ef 🐛 修复添加令牌邮箱/短信验证ui显示 2024-04-23 14:54:30 +08:00
wangyingpan d634204bd4 🎨 删除绑定手机号步骤
🐛 修复替换令牌逻辑验证码信息展示错误的问题
2024-04-23 14:43:44 +08:00
wangyingpan c20b20407e 🐛 修复添加令牌邮箱/短信验证ui显示 2024-04-23 13:55:25 +08:00
5 changed files with 48 additions and 48 deletions
+5 -5
View File
@@ -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
@@ -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);
}
});
@@ -300,7 +300,6 @@ public sealed partial class SteamLoginImportPageViewModel : ViewModelBase
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
{
await SaveAuthenticatorAsync();
RevocationCodeText = steamAuthenticator.RecoveryCode;
return;
}
}