修改bug 完成
parent
b748a2af0d
commit
41db15cf70
|
@ -6,6 +6,12 @@
|
|||
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
||||
<LangVersion>default</LangVersion>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<Copyright>上海展影医疗科技有限公司版权所有</Copyright>
|
||||
<AssemblyVersion></AssemblyVersion>
|
||||
<FileVersion>1.0.1.0412</FileVersion>
|
||||
<Product>IRC影像系统(EICS)</Product>
|
||||
<Version>1.0.1.0412</Version>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -39,11 +45,27 @@
|
|||
<None Remove="GrpcToken.proto" />
|
||||
<None Remove="IRaCIS.Core.API.xml" />
|
||||
<None Remove="Protos\GrpcToken.proto" />
|
||||
<None Remove="sql\bin.bat" />
|
||||
<None Remove="sql\data.sql" />
|
||||
<None Remove="sql\dbo.sql" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="GrpcToken.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="sql\bin.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="sql\data.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="sql\dbo.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="wwwroot\swagger\ui\abp.js">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace IRaCIS.Core.API
|
|||
|
||||
#region 数据库连接写入配置文件
|
||||
|
||||
//var currentDicectory = AppContext.BaseDirectory;
|
||||
var currentDicectory = AppContext.BaseDirectory;
|
||||
|
||||
//var rootPath = (Directory.GetParent(currentDicectory.TrimEnd('\\'))).FullName;
|
||||
//var configPath = Path.Combine(rootPath, "resources/config.json");
|
||||
|
@ -90,7 +90,8 @@ namespace IRaCIS.Core.API
|
|||
var dbPwd = jsonObject["password"].ToString();
|
||||
|
||||
|
||||
var appsettingsJson = File.ReadAllText("appsettings.CertificateApply.json");
|
||||
var certificateApplyPath = Path.Combine(currentDicectory, "appsettings.CertificateApply.json");
|
||||
var appsettingsJson = File.ReadAllText(certificateApplyPath);
|
||||
|
||||
// 解析 JSON 字符串
|
||||
var jObject = JObject.Parse(appsettingsJson);
|
||||
|
@ -109,7 +110,7 @@ namespace IRaCIS.Core.API
|
|||
{
|
||||
connection.Open();
|
||||
|
||||
File.WriteAllText("appsettings.CertificateApply.json", jObject.ToString());
|
||||
File.WriteAllText(certificateApplyPath, jObject.ToString());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
|
@ -104,22 +104,22 @@ namespace Start
|
|||
private void activeBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string nginxPath = @"C:\nginx\nginx.exe";
|
||||
string workingDirectory = @"C:\nginx";
|
||||
string configFile = @"C:\nginx\conf\nginx.conf";
|
||||
//string nginxPath = @"C:\nginx\nginx.exe";
|
||||
//string workingDirectory = @"C:\nginx";
|
||||
//string configFile = @"C:\nginx\conf\nginx.conf";
|
||||
|
||||
ProcessStartInfo psi = new ProcessStartInfo();
|
||||
psi.FileName = nginxPath;
|
||||
psi.WorkingDirectory = workingDirectory;
|
||||
psi.Arguments = "-c \"" + configFile + "\"";
|
||||
//ProcessStartInfo psi = new ProcessStartInfo();
|
||||
//psi.FileName = nginxPath;
|
||||
//psi.WorkingDirectory = workingDirectory;
|
||||
//psi.Arguments = "-c \"" + configFile + "\"";
|
||||
|
||||
Process.Start(psi);
|
||||
//Process.Start(psi);
|
||||
|
||||
|
||||
var configObj = new
|
||||
{
|
||||
Key = this.machineTextBox.Text,
|
||||
Value = this.KeySecreteTextBox.Text.Trim(),
|
||||
key = this.machineTextBox.Text,
|
||||
value = this.KeySecreteTextBox.Text.Trim(),
|
||||
user = usernameTextBox.Text,
|
||||
server = serverTextBox.Text,
|
||||
password = passwordTextBox.Text,
|
||||
|
@ -176,7 +176,8 @@ namespace Start
|
|||
process.StandardInput.WriteLine(Path.Combine(AppContext.BaseDirectory, "sql/bin.bat"));
|
||||
|
||||
|
||||
|
||||
// 执行 sc start 启动服务
|
||||
process.StandardInput.WriteLine($"sc start {jObject["serviceName"].ToString()}");
|
||||
|
||||
|
||||
// 关闭进程流并等待进程退出
|
||||
|
|
Loading…
Reference in New Issue