Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EduSpider
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
viitto
EduSpider
Commits
f5a4f448
Commit
f5a4f448
authored
Jun 01, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
59875dfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
LoginController.cs
EduSpider.WebApi/Controllers/User/LoginController.cs
+6
-6
No files found.
EduSpider.WebApi/Controllers/User/LoginController.cs
View file @
f5a4f448
...
...
@@ -78,7 +78,7 @@ namespace EduSpider.WebApi.Controllers
}
#
region
获取进阶思维小程序端
token
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Id
};
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Unique
Id
};
string
token
=
JwtHelper
.
CreateToken
(
UserInfo
,
Config
.
JwtSecretKey
,
Config
.
JwtExpirTime
);
#
endregion
...
...
@@ -94,7 +94,7 @@ namespace EduSpider.WebApi.Controllers
UserMobile
=
model
.
Account
,
UserIcon
=
model
.
UserIcon
,
};
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Id
,
obj
,
Config
.
JwtExpirTime
);
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Unique
Id
,
obj
,
Config
.
JwtExpirTime
);
return
ApiResult
.
Success
(
data
:
obj
);
}
}
...
...
@@ -152,7 +152,7 @@ namespace EduSpider.WebApi.Controllers
}
#
region
获取进阶思维小程序端
token
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Id
};
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Unique
Id
};
string
token
=
JwtHelper
.
CreateToken
(
UserInfo
,
Config
.
JwtSecretKey
,
Config
.
JwtExpirTime
);
#
endregion
...
...
@@ -168,7 +168,7 @@ namespace EduSpider.WebApi.Controllers
UserMobile
=
model
.
Account
,
UserIcon
=
model
.
UserIcon
,
};
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Id
,
obj
,
Config
.
JwtExpirTime
);
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Unique
Id
,
obj
,
Config
.
JwtExpirTime
);
return
ApiResult
.
Success
(
data
:
obj
);
}
}
...
...
@@ -332,7 +332,7 @@ namespace EduSpider.WebApi.Controllers
}
#
region
获取进阶思维小程序端
token
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Id
};
BaseUserInfo
UserInfo
=
new
()
{
BaseUserId
=
model
.
Unique
Id
};
string
token
=
JwtHelper
.
CreateToken
(
UserInfo
,
Config
.
JwtSecretKey
,
Config
.
JwtExpirTime
);
#
endregion
...
...
@@ -348,7 +348,7 @@ namespace EduSpider.WebApi.Controllers
UserMobile
=
model
.
Account
,
UserIcon
=
model
.
UserIcon
,
};
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Id
,
obj
,
Config
.
JwtExpirTime
);
Cache
.
User
.
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Unique
Id
,
obj
,
Config
.
JwtExpirTime
);
return
ApiResult
.
Success
(
data
:
obj
);
}
}
...
...
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