Commit 4d0b4fb8 authored by 黄奎's avatar 黄奎

页面修改

parent 68e6e2d4
...@@ -3,9 +3,7 @@ using Edu.Common.Enum; ...@@ -3,9 +3,7 @@ using Edu.Common.Enum;
using Edu.Model.CacheModel; using Edu.Model.CacheModel;
using Edu.Repository.User; using Edu.Repository.User;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
namespace Edu.Cache.User namespace Edu.Cache.User
{ {
...@@ -92,7 +90,6 @@ namespace Edu.Cache.User ...@@ -92,7 +90,6 @@ namespace Edu.Cache.User
/// <returns></returns> /// <returns></returns>
public static UserInfo GetUserLoginInfo(object Id, ApiRequestFromEnum apiRequestFromEnum= ApiRequestFromEnum.WebAdmin) public static UserInfo GetUserLoginInfo(object Id, ApiRequestFromEnum apiRequestFromEnum= ApiRequestFromEnum.WebAdmin)
{ {
UserInfo userInfo = null; UserInfo userInfo = null;
if (Id != null) if (Id != null)
{ {
......
...@@ -71,7 +71,7 @@ namespace Edu.Common ...@@ -71,7 +71,7 @@ namespace Edu.Common
} }
return valueStr; return valueStr;
} }
/// <summary> /// <summary>
/// 异常日志保存路径 /// 异常日志保存路径
/// </summary> /// </summary>
...@@ -130,7 +130,7 @@ namespace Edu.Common ...@@ -130,7 +130,7 @@ namespace Edu.Common
return JwtExpirTime; return JwtExpirTime;
} }
} }
/// <summary> /// <summary>
/// 阿里云oss域名 /// 阿里云oss域名
...@@ -258,5 +258,17 @@ namespace Edu.Common ...@@ -258,5 +258,17 @@ namespace Edu.Common
{ {
get { return "123456"; } get { return "123456"; }
} }
/// <summary>
/// 是否线上
/// </summary>
public static bool IsOnline
{
get
{
bool.TryParse(ReadConfigKey("IsOnline"), out bool _isOnline);
return _isOnline;
}
}
} }
} }
\ No newline at end of file
...@@ -13,7 +13,13 @@ ...@@ -13,7 +13,13 @@
"Microsoft.Extensions.Configuration": "3.1.8", "Microsoft.Extensions.Configuration": "3.1.8",
"Microsoft.Extensions.Configuration.Json": "3.1.8", "Microsoft.Extensions.Configuration.Json": "3.1.8",
"NPOI": "2.5.1", "NPOI": "2.5.1",
"Newtonsoft.Json": "12.0.3" "Newtonsoft.Json": "12.0.3",
"Aspose.Pdf": "8.6.0.0",
"Aspose.Words": "17.7.0.0",
"Spire.License": "1.3.6.40",
"Spire.Pdf": "3.9.130.14040",
"Spire.Presentation": "2.8.13.14040",
"Spire.XLS": "7.12.23.14040"
}, },
"runtime": { "runtime": {
"Edu.Common.dll": {} "Edu.Common.dll": {}
...@@ -874,7 +880,55 @@ ...@@ -874,7 +880,55 @@
"System.Runtime": "4.1.0" "System.Runtime": "4.1.0"
} }
}, },
"System.Threading.Tasks.Extensions/4.5.4": {} "System.Threading.Tasks.Extensions/4.5.4": {},
"Aspose.Pdf/8.6.0.0": {
"runtime": {
"Aspose.Pdf.dll": {
"assemblyVersion": "8.6.0.0",
"fileVersion": "8.6.0.0"
}
}
},
"Aspose.Words/17.7.0.0": {
"runtime": {
"Aspose.Words.dll": {
"assemblyVersion": "17.7.0.0",
"fileVersion": "17.7.0.0"
}
}
},
"Spire.License/1.3.6.40": {
"runtime": {
"Spire.License.dll": {
"assemblyVersion": "1.3.6.40",
"fileVersion": "1.3.6.40"
}
}
},
"Spire.Pdf/3.9.130.14040": {
"runtime": {
"Spire.Pdf.dll": {
"assemblyVersion": "3.9.130.14040",
"fileVersion": "3.9.130.14040"
}
}
},
"Spire.Presentation/2.8.13.14040": {
"runtime": {
"Spire.Presentation.dll": {
"assemblyVersion": "2.8.13.14040",
"fileVersion": "2.8.13.14040"
}
}
},
"Spire.XLS/7.12.23.14040": {
"runtime": {
"Spire.XLS.dll": {
"assemblyVersion": "7.12.23.14040",
"fileVersion": "7.12.23.14040"
}
}
}
} }
}, },
"libraries": { "libraries": {
...@@ -1477,6 +1531,36 @@ ...@@ -1477,6 +1531,36 @@
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"path": "system.threading.tasks.extensions/4.5.4", "path": "system.threading.tasks.extensions/4.5.4",
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512" "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
},
"Aspose.Pdf/8.6.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Aspose.Words/17.7.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Spire.License/1.3.6.40": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Spire.Pdf/3.9.130.14040": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Spire.Presentation/2.8.13.14040": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Spire.XLS/7.12.23.14040": {
"type": "reference",
"serviceable": false,
"sha512": ""
} }
} }
} }
\ No newline at end of file
...@@ -127,15 +127,15 @@ namespace Edu.WebApi.Filter ...@@ -127,15 +127,15 @@ namespace Edu.WebApi.Filter
if (tokenUser != null) if (tokenUser != null)
{ {
var cacheUser = UserReidsCache.GetUserLoginInfo(tokenUser.Uid,apiRequestFromEnum: tokenUser.RequestFrom); var cacheUser = UserReidsCache.GetUserLoginInfo(tokenUser.Uid,apiRequestFromEnum: tokenUser.RequestFrom);
if (cacheUser.ApiRequestFromEnum == tokenUser.RequestFrom && (cacheUser.Token != token||string.IsNullOrWhiteSpace(cacheUser.Token))) if (Common.Config.IsOnline && cacheUser.ApiRequestFromEnum == tokenUser.RequestFrom && (cacheUser.Token != token || string.IsNullOrWhiteSpace(cacheUser.Token)))
{ {
actionContext.Result = new Microsoft.AspNetCore.Mvc.JsonResult( actionContext.Result = new Microsoft.AspNetCore.Mvc.JsonResult(
new ApiResult new ApiResult
{ {
Code = (int)ResultCode.TokenOverdue, Code = (int)ResultCode.TokenOverdue,
Message = "用户凭证失效,请重新登录0", Message = "用户凭证失效,请重新登录0",
Data = null Data = null
}); });
} }
else else
{ {
......
...@@ -30,5 +30,7 @@ ...@@ -30,5 +30,7 @@
"RedisPort": "6379", "RedisPort": "6379",
"RedisPwd": "Viitto2018" "RedisPwd": "Viitto2018"
}, },
"VirtualDirectory": "WebFile" "VirtualDirectory": "WebFile",
//Ƿϻ
"IsOnline": false
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment