From f6e78109d31357e91ae77d46a5dd1ef6aaca087a Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Sun, 6 Apr 2025 14:06:23 +0800 Subject: [PATCH] 1 --- .../Controller/PrintCommunicationController.cs | 8 ++++---- .../linesider_screen_bankend/Views/MainWindow.xaml.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linesider_screen_bankend/linesider_screen_bankend/Controller/PrintCommunicationController.cs b/linesider_screen_bankend/linesider_screen_bankend/Controller/PrintCommunicationController.cs index 47f16b8..ecbc9d3 100644 --- a/linesider_screen_bankend/linesider_screen_bankend/Controller/PrintCommunicationController.cs +++ b/linesider_screen_bankend/linesider_screen_bankend/Controller/PrintCommunicationController.cs @@ -30,7 +30,7 @@ namespace linesider_screen_bankend.Controller } //TODO 出一箱产品标签和一个外箱标签 - [Route(HttpVerbs.Get, "/print_api/print_label")] + [Route(HttpVerbs.Get, "/print_label")] public async Task PrintLabel() { // 获取所有查询参数 @@ -90,7 +90,7 @@ namespace linesider_screen_bankend.Controller } //TODO 补打外箱大标签 - [Route(HttpVerbs.Get, "/print_api/supplement_print_package_label")] + [Route(HttpVerbs.Get, "/supplement_print_package_label")] public async Task SupplementPrintPackageLabel() { // 获取所有查询参数 @@ -150,7 +150,7 @@ namespace linesider_screen_bankend.Controller } //TODO 补打产品小标签 - [Route(HttpVerbs.Get, "/print_api/supplement_print_production_label")] + [Route(HttpVerbs.Get, "/supplement_print_production_label")] public async Task SupplementPrintProductionLabel() { // 获取所有查询参数 @@ -211,7 +211,7 @@ namespace linesider_screen_bankend.Controller //TODO 工单扫码装箱条码详情 - [Route(HttpVerbs.Get, "/print_api/workorder_scan_box_code_info")] + [Route(HttpVerbs.Get, "/workorder_scan_box_code_info")] public async Task workorder_scan_box_code_info() { // 获取所有查询参数 diff --git a/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs b/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs index bbb355a..ba10de4 100644 --- a/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs +++ b/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs @@ -91,8 +91,8 @@ namespace linesider_screen_bankend.Views var server = new WebServer(o => o .WithUrlPrefix(url) .WithMode(HttpListenerMode.EmbedIO)) - .WithWebApi("/api", m => m - .WithController(() => new MyApiController(AddLog))) + .WithWebApi("/print_api", m => m + .WithController(() => new PrintCommunicationController(AddLog))) .WithStaticFolder("/", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot"), true); // 添加请求日志中间件