Skip to content

Commit

Permalink
feat:增加抢购预约
Browse files Browse the repository at this point in the history
  • Loading branch information
bingtianyiyan committed Jul 6, 2024
1 parent cc50500 commit 72a8f76
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions IMaoTai/Pages/UserData.razor
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ else
<ItemColContent>
@if (context.Header.Value == "actions")
{
<MButton Small
Class="mr-2"
OnClick="()=>ReserveItem(context.Item)">预约</MButton>
<MIcon Small
Class="mr-2"
OnClick="()=>EditItem(context.Item)">mdi-pencil</MIcon>
Expand Down Expand Up @@ -471,6 +474,24 @@ else
Close();
}

/// <summary>
///预约
/// </summary>
/// <param name="item"></param>
public async Task ReserveItem(UserEntity item)
{
try
{
await IMTService.Reservation(item);
_warnMsg = "手动发起预约成功,响应结果请查看日志";
}
catch (Exception e)
{
_warnMsg = "手动发起预约失败,响应结果请查看日志";
}
_dialogWarn = true;
}

/// <summary>
///编辑
/// </summary>
Expand Down

0 comments on commit 72a8f76

Please sign in to comment.