Former-commit-id: f64da458c04fd30f12f7aed352808e93de255840
Former-commit-id: 16aac8824493eb0f22e3a23ec9d80b5b1843631d
1.0
wanggang 4 years ago
parent edefae0a1a
commit d75765982d

@ -1,4 +1,5 @@
using Microsoft.Extensions.Configuration;
using Infrastructure.Extensions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
@ -26,9 +27,10 @@ namespace Infrastructure.Sms
}
this._logger = logger;
this._appUrl = new Uri(configuration.GetSection("sms")?.GetValue<string>("url"));
this._appKey = configuration.GetSection("sms")?.GetValue<string>("key");
this._appSecret = configuration.GetSection("sms")?.GetValue<string>("secret");
var values = configuration.GetAppSettings("sms");
this._appUrl = new Uri(values["url"]);
this._appKey = values["key"];
this._appSecret = values["secret"];
this._httpClientFactory = httpClientFactory;
}

@ -37,7 +37,7 @@ namespace Platform
services.AddTransient<ISceneTiggerService, CachedSceneTiggerService>();
services.AddTransient<IExecApiService,ExecApiService>();
services.AddTransient<IUserService, UserService>();
if (Env.IsDevelopment() || Configuration.GetSection("AppSettings").GetValue<bool>("debug", false))
if (Env.IsDevelopment())
{
services.AddTransient<IEmailSender, EmptyEmailSender>();
services.AddTransient<ISmsSender, EmptySmsSender>();

@ -10,9 +10,9 @@
{
<router-view></router-view>
@section scripts{
<script src="/js/config.js"></script>
<script src="/js/app.js"></script>
<script src="/js/main.js"></script>
<script src="js/config.js"></script>
<script src="js/app.js"></script>
<script src="js/main.js"></script>
}
}
}

@ -16,7 +16,8 @@
"Database": "MySQL",
"FileServer": "MinIO",
"Cache": "Redis",
"JobDatabase": "MySQL"
"JobDatabase": "MySQL",
"sms": "url=https://api.netease.im/sms/sendcode.action;key=54ebdf1f4364ddd8ff6f82f88d630a76;secret=c49d42b67798@"
},
"ConnectionStrings": {
"SQLite": "Data Source=iotcenter.db",

@ -9,15 +9,10 @@ if(Test-Path dist)
}
echo 'copy src to dist'
Copy-Item ./src/* ./dist -Recurse -Exclude @('./src/linux-x64/publish/log/*','.gitignore','dev.cmd','docker-compose.override.yml','nginx.dev.conf')
Copy-Item ./src/* ./dist -Recurse -Exclude @('.gitignore','dev.cmd','docker-compose.override.yml','nginx.dev.conf')
Remove-Item ./dist/linux-x64/publish/log/* -recurse -force
Remove-Item ./dist/linux-x64/publish/data/* -recurse -force
#$source = (Get-Item -Path './src').FullName
#$dest = (Get-Item -Path './dist').FullName
#$exclude = @('dev.cmd','docker-compose.override.yml','nginx.dev.conf')
#Get-ChildItem $source -Recurse -Exclude $exclude | where {$_.FullName -notlike (Get-Item -Path './src/linux-x64/publish/log/').FullName} | Copy-Item -Destination {Join-Path $dest $_.FullName.Substring($source.length)}
echo 'copy project files to dist folder'
Copy-Item ../projects/WebMVC/wwwroot ./dist/linux-x64/publish/apps/WebMVC/wwwroot -recurse
Copy-Item ../projects/WebSPA/wwwroot ./dist/linux-x64/publish/apps/WebSPA/wwwroot -recurse

Loading…
Cancel
Save