diff --git a/WebStarter/Controllers/RfidController.cs b/WebStarter/Controllers/RfidController.cs index 63f7ed0..b496211 100644 --- a/WebStarter/Controllers/RfidController.cs +++ b/WebStarter/Controllers/RfidController.cs @@ -35,8 +35,12 @@ public class RfidController : ControllerBase [Route("ReadRfid")] public async Task> ReadRfid() { - RfidReadModel? rfidReadModel = await RfidApi.ReadRfid(); - if (rfidReadModel != null) return Result.Success(rfidReadModel, "读取成功"); + bool beginRead = await RfidApi.BeginRead(); + if (beginRead) + { + RfidReadModel? rfidReadModel = await RfidApi.ReadRfid(); + if (rfidReadModel != null) return Result.Success(rfidReadModel, "读取成功"); + } return Result.Fail(); } } \ No newline at end of file