Skip to content

Commit

Permalink
✨ Mac 支持 UrlSchemes 协议登录
Browse files Browse the repository at this point in the history
  • Loading branch information
Mossimos committed Oct 28, 2023
1 parent d2d04a3 commit 54fc1e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ref/WTTS.MicroServices.ClientSDK
Submodule WTTS.MicroServices.ClientSDK updated 58 files
+37 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleActivityDTO.cs
+73 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleActivityDetailDTO.cs
+25 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleActivityPrizeDTO.cs
+22 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleConditionDTO.cs
+25 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleRegistrationUserDTO.cs
+18 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleResultInfoDTO.cs
+19 −0 src/BD.WTTS.Primitives.Models/Models/Advertisement/Raffle/RaffleResultItemDTO.cs
+14 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/AftersalesBillDTO.cs
+111 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/AftersalesBillDetailDTO.cs
+202 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderBusinessInfoDTO.cs
+83 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderDetailDTO.cs
+46 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderItemInfoDTO.cs
+41 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderPayInfoDTO.cs
+44 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderPaymentCompositionDTO.cs
+26 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderPaymentCompositionInfoDTO.cs
+11 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/OrderRefundMessage.cs
+24 −0 src/BD.WTTS.Primitives.Models/Models/Ordering/UserCouponInfoDTO.cs
+13 −0 src/BD.WTTS.Primitives.Models/Models/Payment/OrderBusinessPaymentMethod.cs
+11 −0 src/BD.WTTS.Primitives.Models/Models/Payment/OrderPaymentSuccessInfo.cs
+0 −0 src/BD.WTTS.Primitives.Models/Models/Payment/PubPayState.cs
+106 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BalanceTradeBusinessOrderDto.cs
+31 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BatchCreateProductKeyRecordRequest.cs
+16 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BatchDisableProductKeyRecordRequest.cs
+61 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BusinessOrderByCDKeyRequest.cs
+79 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BusinessOrderRequest.cs
+19 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BusinessOrderResponse.cs
+108 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/GiftsCardBusinessOrderDto.cs
+45 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/GoodsRechargeCategoryDto.cs
+35 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/ProductKeyRecordDto.cs
+18 −0 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/SteamBotTaskStatusChangedMsg.cs
+0 −4 src/BD.WTTS.Primitives/BD.WTTS.Primitives.csproj
+55 −0 src/BD.WTTS.Primitives/Constants/Constants.Lengths.cs
+34 −0 src/BD.WTTS.Primitives/Constants/Constants.UrlSchemes.cs
+0 −9 src/BD.WTTS.Primitives/Enums/Basics/Order/OrderBusinessType.cs
+0 −8 src/BD.WTTS.Primitives/Enums/Basics/Order/OrderPaymentMethod.cs
+0 −16 src/BD.WTTS.Primitives/Enums/Basics/Order/OrderStatus.cs
+0 −15 src/BD.WTTS.Primitives/Enums/Basics/Order/PaymentMethod.cs
+0 −13 src/BD.WTTS.Primitives/Enums/Basics/Order/PaymentType.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/CouponReleaseScenario.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/CouponRestrictedUserType.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/CouponType.cs
+16 −0 src/BD.WTTS.Primitives/Enums/Order/OrderBusinessType.cs
+29 −0 src/BD.WTTS.Primitives/Enums/Order/OrderStatus.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/OrderType.cs
+18 −0 src/BD.WTTS.Primitives/Enums/Order/RefundChannelType.cs
+28 −0 src/BD.WTTS.Primitives/Enums/Order/RefundStatus.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/UserCouponSource.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Order/UserCouponStatus.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Payment/AliPayPayTradeType.cs
+26 −0 src/BD.WTTS.Primitives/Enums/Payment/PaymentMethod.cs
+17 −0 src/BD.WTTS.Primitives/Enums/Payment/PaymentType.cs
+0 −0 src/BD.WTTS.Primitives/Enums/Payment/WeChatPayTradeType.cs
+17 −0 src/BD.WTTS.Primitives/Enums/Raffle/ActivityType.cs
+32 −0 src/BD.WTTS.Primitives/Enums/Raffle/ConditionType.cs
+7 −0 src/BD.WTTS.Primitives/Enums/SteamRecharge/BusinessSource.cs
+37 −0 src/BD.WTTS.Primitives/Enums/SteamRecharge/GoodsRechargeStatus.cs
+8 −0 src/BD.WTTS.Primitives/Enums/SteamRecharge/GoodsRechargeType.cs
+1 −0 src/BD.WTTS.Primitives/Extensions/CurrencyCodeEnumExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ protected override void OnLoaded(RoutedEventArgs e)
this.ViewModel.Close();
}
}
Application.Current!.UrlsOpened += Current_UrlsOpened;
}

private async void Current_UrlsOpened(object? sender, UrlOpenedEventArgs e)
{
var loginUrl = e.Urls.Where(x => x.StartsWith(Constants.UrlSchemes.Login)).FirstOrDefault();
if (loginUrl != null)
{
var token = loginUrl.Substring(Constants.UrlSchemes.Login.Length, loginUrl.Length - 1);
await ThirdPartyLoginHelper.OnMessageAsync(token);
}
}

protected override void OnDataContextChanged(EventArgs e)
Expand All @@ -64,5 +75,6 @@ protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e
{
vm.RemoveAllDelegate();
}
Application.Current!.UrlsOpened -= Current_UrlsOpened;
}
}

0 comments on commit 54fc1e3

Please sign in to comment.