diff --git a/BBWY.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs b/BBWY.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs index 1d8d4fcd..0ebfc7cd 100644 --- a/BBWY.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs +++ b/BBWY.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs @@ -36,11 +36,11 @@ namespace BBWY.Server.API.Middlewares if (apiRequirement != null) { if (!context.Request.Headers.TryGetValue("ClientVersion", out StringValues clientVersionStr)) - throw new BusinessException("未读取到ClientVersion"); + throw new BusinessException("缺少版本信息,请更新步步为盈"); if (!int.TryParse(clientVersionStr, out int clientVersion)) - throw new BusinessException("非法ClientVersion"); + throw new BusinessException("版本信息不正确,请更新步步为盈"); if (clientVersion < apiRequirement.MinimumVersion) - throw new BusinessException("当前ClientVersion低于接口最低要求,请升级到最新版"); + throw new BusinessException("当前请求需更新步步为盈~!"); } await _next(context); //调用管道执行下一个中间件 } diff --git a/PJZS/App.xaml.cs b/PJZS/App.xaml.cs index bd92d274..473a4c82 100644 --- a/PJZS/App.xaml.cs +++ b/PJZS/App.xaml.cs @@ -1,17 +1,16 @@ -using BBWY.Common.Http; +using BBWY.Common.Extensions; +using BBWY.Common.Http; using BBWY.Common.Models; -using BBWY.Common.Extensions; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using PJZS.Models; using System; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; using System.Threading.Tasks; using System.Windows; -using PJZS.Models; -using System.Linq; -using System.IO.MemoryMappedFiles; -using System.Diagnostics; using Utils; namespace PJZS