diff --git a/src/ShenNius.Share.Models/Dtos/Output/Sys/UserOutput.cs b/src/ShenNius.Share.Models/Dtos/Output/Sys/UserOutput.cs
index 25aa18efb842f155db954727625c3ed799658334..d1d3c170711d5d77337385819cb609200f9763d6 100644
--- a/src/ShenNius.Share.Models/Dtos/Output/Sys/UserOutput.cs
+++ b/src/ShenNius.Share.Models/Dtos/Output/Sys/UserOutput.cs
@@ -6,9 +6,7 @@ namespace ShenNius.Share.Models.Dtos.Input
{
public class UserOutput
{
- ///
- /// 唯一编号
- ///
+
//public int Id { get; set; }
///
@@ -32,9 +30,7 @@ namespace ShenNius.Share.Models.Dtos.Input
///
public string Mobile { get; set; }
- ///
- /// 状态 1=整除 0=不允许登录
- ///
+
//public bool Status { get; set; }
///
diff --git a/src/client/ShenNius.Layui.Admin/Common/HttpHelper.cs b/src/client/ShenNius.Layui.Admin/Common/HttpHelper.cs
index 7a430ad8c2994965158b5bef3561a4ed1d9e478b..b54e18be91de6ba4adb590cfddb4c107bd2e52e6 100644
--- a/src/client/ShenNius.Layui.Admin/Common/HttpHelper.cs
+++ b/src/client/ShenNius.Layui.Admin/Common/HttpHelper.cs
@@ -50,7 +50,8 @@ namespace ShenNius.Layui.Admin.Common
}
catch (Exception ex)
{
- // WebHelper.WriteLog($"\r\n{DateTime.Now}:{ex}");
+
+ LogHelper.WriteLog($"\r\n{DateTime.Now}:{ex}");
return default;
}
diff --git a/src/client/ShenNius.Layui.Admin/Common/LogHelper.cs b/src/client/ShenNius.Layui.Admin/Common/LogHelper.cs
index 778c822c352c4137948974ae173967b6cfdf0925..3d8264bbf30784be2640c613672f54bd255165a6 100644
--- a/src/client/ShenNius.Layui.Admin/Common/LogHelper.cs
+++ b/src/client/ShenNius.Layui.Admin/Common/LogHelper.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Text;
+using System.Threading.Tasks;
namespace ShenNius.Layui.Admin.Common
{
@@ -8,21 +9,24 @@ namespace ShenNius.Layui.Admin.Common
{
public static void WriteLog(string msg)
{
- var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log");
- if (!Directory.Exists(path))
+ Task.Run(() =>
{
- Directory.CreateDirectory(path);
- }
- var newFileName = DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
- var logFile = Path.Combine(path, newFileName);
- using (FileStream fs = new FileStream(logFile, FileMode.Append, FileAccess.Write))
- {
- if (!string.IsNullOrEmpty(msg))
+ var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log");
+ if (!Directory.Exists(path))
+ {
+ Directory.CreateDirectory(path);
+ }
+ var newFileName = DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
+ var logFile = Path.Combine(path, newFileName);
+ using (FileStream fs = new FileStream(logFile, FileMode.Append, FileAccess.Write))
{
- byte[] data = Encoding.Default.GetBytes(msg);
- fs.Write(data, 0, data.Length);
+ if (!string.IsNullOrEmpty(msg))
+ {
+ byte[] data = Encoding.Default.GetBytes(msg);
+ fs.Write(data, 0, data.Length);
+ }
}
- }
+ });
}
}
}