Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
4d0b4fb8
Commit
4d0b4fb8
authored
Nov 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
68e6e2d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
15 deletions
+110
-15
UserReidsCache.cs
Edu.Cache/User/UserReidsCache.cs
+0
-3
Config.cs
Edu.Common/Config.cs
+14
-2
Edu.Common.deps.json
Edu.Common/bin/Release/netcoreapp3.0/Edu.Common.deps.json
+86
-2
ApiFilterAttribute.cs
Edu.WebApi/Filter/ApiFilterAttribute.cs
+7
-7
appsettings.json
Edu.WebApi/appsettings.json
+3
-1
No files found.
Edu.Cache/User/UserReidsCache.cs
View file @
4d0b4fb8
...
...
@@ -3,9 +3,7 @@ using Edu.Common.Enum;
using
Edu.Model.CacheModel
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Cache.User
{
...
...
@@ -92,7 +90,6 @@ namespace Edu.Cache.User
/// <returns></returns>
public
static
UserInfo
GetUserLoginInfo
(
object
Id
,
ApiRequestFromEnum
apiRequestFromEnum
=
ApiRequestFromEnum
.
WebAdmin
)
{
UserInfo
userInfo
=
null
;
if
(
Id
!=
null
)
{
...
...
Edu.Common/Config.cs
View file @
4d0b4fb8
...
...
@@ -71,7 +71,7 @@ namespace Edu.Common
}
return
valueStr
;
}
/// <summary>
/// 异常日志保存路径
/// </summary>
...
...
@@ -130,7 +130,7 @@ namespace Edu.Common
return
JwtExpirTime
;
}
}
/// <summary>
/// 阿里云oss域名
...
...
@@ -258,5 +258,17 @@ namespace Edu.Common
{
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
Edu.Common/bin/Release/netcoreapp3.0/Edu.Common.deps.json
View file @
4d0b4fb8
...
...
@@ -13,7 +13,13 @@
"Microsoft.Extensions.Configuration"
:
"3.1.8"
,
"Microsoft.Extensions.Configuration.Json"
:
"3.1.8"
,
"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"
:
{
"Edu.Common.dll"
:
{}
...
...
@@ -874,7 +880,55 @@
"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"
:
{
...
...
@@ -1477,6 +1531,36 @@
"sha512"
:
"sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
,
"path"
:
"system.threading.tasks.extensions/4.5.4"
,
"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
Edu.WebApi/Filter/ApiFilterAttribute.cs
View file @
4d0b4fb8
...
...
@@ -127,15 +127,15 @@ namespace Edu.WebApi.Filter
if
(
tokenUser
!=
null
)
{
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
(
new
ApiResult
{
Code
=
(
int
)
ResultCode
.
TokenOverdue
,
Message
=
"用户凭证失效,请重新登录0"
,
Data
=
null
});
new
ApiResult
{
Code
=
(
int
)
ResultCode
.
TokenOverdue
,
Message
=
"用户凭证失效,请重新登录0"
,
Data
=
null
});
}
else
{
...
...
Edu.WebApi/appsettings.json
View file @
4d0b4fb8
...
...
@@ -30,5 +30,7 @@
"RedisPort"
:
"6379"
,
"RedisPwd"
:
"Viitto2018"
},
"VirtualDirectory"
:
"WebFile"
"VirtualDirectory"
:
"WebFile"
,
//Ƿϻ
"IsOnline"
:
false
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment