Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShopERP
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜龙飞
ShopERP
Commits
9770e1bc
Commit
9770e1bc
authored
Jul 18, 2025
by
PC-20220610JUCQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<develop>:(ShopERP 端)<无> 找回密码 功能完善。
parent
74ce4ed4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
2 deletions
+103
-2
CoreCms.Net.Configuration/GlobalConstVars.cs
+10
-0
CoreCms.Net.Model/FromBody/FMUser.cs
+23
-0
CoreCms.Net.Web.Admin/Controllers/Com/LoginController.cs
+55
-0
CoreCms.Net.Web.Admin/Doc.xml
+7
-0
CoreCms.Net.Web.Admin/bin/Debug/net8.0/Doc.xml
+7
-0
CoreCms.Net.Web.Admin/wwwroot/views/user/login.html
+1
-2
No files found.
CoreCms.Net.Configuration/GlobalConstVars.cs
View file @
9770e1bc
...
...
@@ -111,6 +111,16 @@
public
const
string
SendEmailFailure
=
"发送邮件失败!"
;
/// <summary>
///操作成功
/// </summary>
public
const
string
OperSuccess
=
"操作成功"
;
/// <summary>
///操作失败
/// </summary>
public
const
string
OperFailure
=
"操作失败"
;
//缓存数据
/// <summary>
/// 缓存已经排序后台导航
...
...
CoreCms.Net.Model/FromBody/FMUser.cs
View file @
9770e1bc
...
...
@@ -143,6 +143,28 @@ namespace CoreCms.Net.Model.FromBody
public
string
userEmail
{
get
;
set
;
}
}
/// <summary>
/// 重置密码请求报文
/// </summary>
public
class
FMSendResetPasswordPost
{
public
string
userName
{
get
;
set
;
}
public
string
phone
{
get
;
set
;
}
public
string
userEmail
{
get
;
set
;
}
public
string
passWord
{
get
;
set
;
}
/// <summary>
/// 验证码
/// </summary>
public
string
VerifyCode
{
get
;
set
;
}
}
}
\ No newline at end of file
CoreCms.Net.Web.Admin/Controllers/Com/LoginController.cs
View file @
9770e1bc
...
...
@@ -384,5 +384,60 @@ namespace CoreCms.Net.Web.Admin.Controllers
#
endregion
#
region
重置密码
============================================================
// POST: api/login/DoResetPassword
/// <summary>
/// 重置密码
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[
HttpPost
]
[
Description
(
"重置密码"
)]
public
async
Task
<
AdminUiCallBack
>
DoResetPassword
([
FromBody
]
FMSendResetPasswordPost
param
)
{
var
jm
=
new
AdminUiCallBack
();
if
(
string
.
IsNullOrEmpty
(
param
.
phone
))
{
jm
.
msg
=
"请输入用户手机号"
;
return
jm
;
}
var
isHave
=
await
_sysUserServices
.
ExistsAsync
(
p
=>
p
.
phone
==
param
.
phone
);
if
(
isHave
)
{
jm
.
msg
=
"已存在此手机号码"
;
return
jm
;
}
//验证验证码 是否与 账号一致
string
strCacheKey
=
RedisCacheKey
.
ForgetPasswordCacheKey
+
param
.
userName
;
string
dbVerifyCode
=
_redisOperationRepository
.
Get
(
strCacheKey
).
Result
;
if
(!
dbVerifyCode
.
Equals
(
param
.
VerifyCode
))
{
jm
.
msg
=
"验证码错误!"
;
return
jm
;
}
SysUser
entity
=
new
SysUser
();
entity
.
userName
=
param
.
userName
;
entity
.
passWord
=
CommonHelper
.
Md5For32
(
param
.
passWord
);
entity
.
sex
=
0
;
entity
.
phone
=
param
.
phone
;
entity
.
email
=
param
.
userEmail
;
entity
.
createTime
=
DateTime
.
Now
;
entity
.
updateTime
=
DateTime
.
Now
;
var
bl
=
await
_sysUserServices
.
UpdateAsync
(
entity
);
jm
.
code
=
bl
?
0
:
1
;
jm
.
msg
=
bl
?
GlobalConstVars
.
CreateSuccess
:
GlobalConstVars
.
CreateFailure
;
return
jm
;
}
#
endregion
}
}
CoreCms.Net.Web.Admin/Doc.xml
View file @
9770e1bc
...
...
@@ -570,6 +570,13 @@
<param
name=
"email"
></param>
<param
name=
"verificationCode"
></param>
</member>
<member
name=
"M:CoreCms.Net.Web.Admin.Controllers.LoginController.DoResetPassword(CoreCms.Net.Model.FromBody.FMSendResetPasswordPost)"
>
<summary>
重置密码
</summary>
<param
name=
"param"
></param>
<returns></returns>
</member>
<member
name=
"T:CoreCms.Net.Web.Admin.Controllers.ToolsController"
>
<summary>
后端常用方法
...
...
CoreCms.Net.Web.Admin/bin/Debug/net8.0/Doc.xml
View file @
9770e1bc
...
...
@@ -570,6 +570,13 @@
<param
name=
"email"
></param>
<param
name=
"verificationCode"
></param>
</member>
<member
name=
"M:CoreCms.Net.Web.Admin.Controllers.LoginController.DoResetPassword(CoreCms.Net.Model.FromBody.FMSendResetPasswordPost)"
>
<summary>
重置密码
</summary>
<param
name=
"param"
></param>
<returns></returns>
</member>
<member
name=
"T:CoreCms.Net.Web.Admin.Controllers.ToolsController"
>
<summary>
后端常用方法
...
...
CoreCms.Net.Web.Admin/wwwroot/views/user/login.html
View file @
9770e1bc
...
...
@@ -171,7 +171,7 @@
field
.
isDelete
=
field
.
isDelete
==
'on'
;
//提交 Ajax 成功后,关闭当前弹层并重载表格
coreHelper
.
Post
(
"api/login/Do
Create
"
,
field
,
function
(
e
)
{
coreHelper
.
Post
(
"api/login/Do
ResetPassword
"
,
field
,
function
(
e
)
{
console
.
log
(
e
)
if
(
e
.
code
===
0
)
{
...
...
@@ -201,7 +201,6 @@
//用户注册
function
doRegister
()
{
admin
.
popup
({
shadeClose
:
false
,
title
:
'用户注册'
,
...
...
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