Skip to content

Commit

Permalink
Revert "✨ AdvertisementDTO 增加带 IsAuth 的版本"
Browse files Browse the repository at this point in the history
This reverts commit e5abea1.
  • Loading branch information
BuknSS committed Nov 20, 2024
1 parent e629bff commit 9843c01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ public sealed class AdvertiseService : ReactiveObject
public static AdvertiseService Current => mCurrent.Value;

[Reactive]
public ObservableCollection<AdvertisementDTOV1>? HorizontalBannerAdvertisements { get; set; }
public ObservableCollection<AdvertisementDTO>? HorizontalBannerAdvertisements { get; set; }

[Reactive]
public ObservableCollection<AdvertisementDTOV1>? VerticalBannerAdvertisements { get; set; }
public ObservableCollection<AdvertisementDTO>? VerticalBannerAdvertisements { get; set; }

[Reactive]
public bool IsInitialized { get; set; }
Expand Down Expand Up @@ -84,10 +84,10 @@ public async Task RefrshAdvertiseAsync()
if (result.IsSuccess && result.Content != null)
{
HorizontalBannerAdvertisements = null;
HorizontalBannerAdvertisements = new ObservableCollection<AdvertisementDTOV1>(result.Content.Where(x => x.Standard == AdvertisementOrientation.Horizontal).OrderBy(x => x.Order));
HorizontalBannerAdvertisements = new ObservableCollection<AdvertisementDTO>(result.Content.Where(x => x.Standard == AdvertisementOrientation.Horizontal).OrderBy(x => x.Order));

VerticalBannerAdvertisements = null;
VerticalBannerAdvertisements = new ObservableCollection<AdvertisementDTOV1>(result.Content.Where(x => x.Standard == AdvertisementOrientation.Vertical).OrderBy(x => x.Order));
VerticalBannerAdvertisements = new ObservableCollection<AdvertisementDTO>(result.Content.Where(x => x.Standard == AdvertisementOrientation.Vertical).OrderBy(x => x.Order));
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/BD.WTTS.Client/UI/ViewModels/Pages/HomePageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed class HomePageViewModel : TabItemViewModel
public ObservableCollection<ArticleItemDTO> Articles { get; set; }

[Reactive]
public ObservableCollection<AdvertisementDTOV1> NavigationBanners { get; set; }
public ObservableCollection<AdvertisementDTO> NavigationBanners { get; set; }

[Reactive]
//public ObservableCollection<List<ShopRecommendGoodItem>> Shops { get; set; }
Expand All @@ -32,7 +32,7 @@ public HomePageViewModel()
#pragma warning disable CS8625 // 初始化3个null 为解决调试报错中断
Articles = new ObservableCollection<ArticleItemDTO>() { null, null, null };
#pragma warning restore CS8625 // 无法将 null 字面量转换为非 null 的引用类型。
NavigationBanners = new ObservableCollection<AdvertisementDTOV1>();
NavigationBanners = new ObservableCollection<AdvertisementDTO>();
//Shops = new ObservableCollection<List<ShopRecommendGoodItem>>();
Shops = new ObservableCollection<ShopRecommendGoodItem>();

Expand Down

0 comments on commit 9843c01

Please sign in to comment.