Skip to content

Commit

Permalink
修复热门页错误,调整元素布局 (#480)
Browse files Browse the repository at this point in the history
* update item width

* 修复热门页故障
  • Loading branch information
GD-Slime authored Jan 20, 2024
1 parent c04f6c7 commit 551213f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/BiliLite.UWP/Models/Requests/Api/Home/HotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public ApiModel Popular(string idx = "0", string last_param = "")
baseUrl = $"https://app.bilibili.com/x/v2/show/popular/index",
parameter = ApiHelper.MustParameter(AppKey, true) + $"&idx={idx}&last_param={last_param}"
};
api.parameter = api.parameter.Replace("mobi_app=iphone", "mobi_app=android");
api.parameter += ApiHelper.GetSign(api.parameter, AppKey);
return api;
}
Expand Down
22 changes: 14 additions & 8 deletions src/BiliLite.UWP/Pages/Home/HotPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,31 @@
</MenuFlyout>
</Grid.ContextFlyout>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="160"/>
<ColumnDefinition Width="180"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Margin="4" CornerRadius="{StaticResource ImageCornerRadius}">
<Border Margin="2" CornerRadius="{StaticResource ImageCornerRadius}">
<Grid >
<toolkit:ImageEx IsCacheEnabled="True" PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png" Stretch="UniformToFill" Source="{x:Bind Path=Cover,Converter={StaticResource imageConvert},ConverterParameter='120h'}"></toolkit:ImageEx>
<Border CornerRadius="4" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="4" Padding="4 2" Background="#99000000">
<TextBlock Foreground="White" FontSize="12" Text="{x:Bind TextInfo1}"></TextBlock>
</Border>
</Grid>
</Border>
<StackPanel Grid.Column="1" Margin="4 0 0 0" >
<TextBlock MaxLines="2" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Text="{x:Bind Title}"></TextBlock>
<Border Margin="0 2 0 0" BorderThickness="1" BorderBrush="{x:Bind Path=RcmdReason.BorderColor,Converter={StaticResource colorConvert}}" Background="{x:Bind Path=RcmdReason.BgColor,Converter={StaticResource colorConvert}}" HorizontalAlignment="Left" Padding="4 0" CornerRadius="2">
<Grid Grid.Column="1" Margin="4 0 0 0" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Top" MaxLines="2" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Text="{x:Bind Title}"></TextBlock>
<Border Grid.Row="1" Margin="0 0 0 3" VerticalAlignment="Bottom" BorderThickness="1" BorderBrush="{x:Bind Path=RcmdReason.BorderColor,Converter={StaticResource colorConvert}}" Background="{x:Bind Path=RcmdReason.BgColor,Converter={StaticResource colorConvert}}" HorizontalAlignment="Left" Padding="4 0" CornerRadius="2">
<TextBlock TextWrapping="Wrap" FontSize="12" Foreground="{x:Bind Path=RcmdReason.TextColor,Converter={StaticResource colorConvert}}" TextTrimming="CharacterEllipsis" Text="{x:Bind Path=RcmdReason.Text}"></TextBlock>
</Border>
<TextBlock Margin="0 2 0 0" TextTrimming="CharacterEllipsis" Foreground="Gray" Text="{x:Bind TextInfo2}"></TextBlock>
<TextBlock Margin="0 2 0 0" TextTrimming="CharacterEllipsis" Foreground="Gray" Text="{x:Bind TextInfo3}"></TextBlock>
</StackPanel>
<TextBlock Grid.Row="2" FontSize="13" Margin="0 0 0 0" VerticalAlignment="Bottom" TextTrimming="CharacterEllipsis" Foreground="Gray" Text="{x:Bind TextInfo2}"></TextBlock>
<TextBlock Grid.Row="3" FontSize="13" Margin="0 0 0 0" VerticalAlignment="Bottom" TextTrimming="CharacterEllipsis" Foreground="Gray" Text="{x:Bind TextInfo3}"></TextBlock>
</Grid>
<!--<TextBlock Grid.Row="2" Margin="4 0 4 4" FontSize="12" Foreground="Gray" MaxLines="2" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Text="{Binding desc}"></TextBlock>-->
</Grid>
</DataTemplate>
Expand Down

0 comments on commit 551213f

Please sign in to comment.