diff --git a/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/SQLHepler/SqlSugarHelper.cs b/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/SQLHepler/SqlSugarHelper.cs index 70e625a..d5a3e55 100644 --- a/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/SQLHepler/SqlSugarHelper.cs +++ b/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/SQLHepler/SqlSugarHelper.cs @@ -9,7 +9,7 @@ namespace linesider_screen_bankend.Services.SQLHepler { var config = new ConnectionConfig() { - ConnectionString = "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308", // 替换为你的MySQL连接字符串 + ConnectionString = "Data Source=192.168.50.163;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306", // 替换为你的MySQL连接字符串 DbType = DbType.MySql, // 数据库类型设置为MySQL IsAutoCloseConnection = true, // 自动释放 InitKeyType = InitKeyType.Attribute // 从实体特性读取主键信息 diff --git a/linesider_screen_bankend/linesider_screen_bankend.Core/linesider_screen_bankend.Core.csproj b/linesider_screen_bankend/linesider_screen_bankend.Core/linesider_screen_bankend.Core.csproj index e214dee..21ad943 100644 --- a/linesider_screen_bankend/linesider_screen_bankend.Core/linesider_screen_bankend.Core.csproj +++ b/linesider_screen_bankend/linesider_screen_bankend.Core/linesider_screen_bankend.Core.csproj @@ -4,10 +4,19 @@ true - + tlbimp 0 - 11 + 1 + 20033d6a-7b24-41e5-a4d9-1c626b07876b + 0 + false + true + + + tlbimp + 1 + 10 d58562c1-e51b-11cf-8941-00a024a9083f 0 false diff --git a/linesider_screen_bankend/linesider_screen_bankend/App.config b/linesider_screen_bankend/linesider_screen_bankend/App.config new file mode 100644 index 0000000..0c7d30e --- /dev/null +++ b/linesider_screen_bankend/linesider_screen_bankend/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs b/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs index 345b5cf..e0e2e49 100644 --- a/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs +++ b/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs @@ -26,11 +26,12 @@ namespace linesider_screen_bankend.Controller { private readonly Action _logAction; // 准备打印数据 - string templatePath = ConfigurationManager.AppSettings["label_path"]; + string templatePath = null; public OnlyPrintProductLabelController(Action logAction) { _logAction = logAction; + templatePath = ConfigurationManager.AppSettings["label_path"]; } [Route(HttpVerbs.Get, "/hello")] @@ -91,7 +92,7 @@ namespace linesider_screen_bankend.Controller // 返回成功响应 - await this.HttpContext.SendApiSuccessAsync(null); + await this.HttpContext.SendApiSuccessAsync("ok"); } else { diff --git a/linesider_screen_bankend/linesider_screen_bankend/Resources/gxassembly_production_label.btw b/linesider_screen_bankend/linesider_screen_bankend/Resources/gxassembly_production_label.btw index dd60197..6c9e306 100644 Binary files a/linesider_screen_bankend/linesider_screen_bankend/Resources/gxassembly_production_label.btw and b/linesider_screen_bankend/linesider_screen_bankend/Resources/gxassembly_production_label.btw differ 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 cf252fc..5feb40f 100644 --- a/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs +++ b/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs @@ -92,9 +92,9 @@ namespace linesider_screen_bankend.Views .WithUrlPrefix(url) .WithMode(HttpListenerMode.EmbedIO)) .WithCors( - origins: "http://localhost:7005", - headers: "content-type,authorization", - methods: "GET,POST,PUT,DELETE" + origins: "*", + headers: "*", + methods: "*" ) .WithWebApi("/print_api", m => m .WithController(() => new PrintCommunicationController(AddLog)) diff --git a/linesider_screen_bankend/linesider_screen_bankend/appsettings.json b/linesider_screen_bankend/linesider_screen_bankend/appsettings.json index afad165..265a880 100644 --- a/linesider_screen_bankend/linesider_screen_bankend/appsettings.json +++ b/linesider_screen_bankend/linesider_screen_bankend/appsettings.json @@ -1,7 +1,7 @@ { - "label_path": "./Resources/gxassembly_production_label.btw" //标签路径 + "label_path": ".\\Resources\\gxassembly_production_label.btw" //标签路径 } \ No newline at end of file