Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2a9290ce
authored
Jan 04, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码优化】支持通过短信重置后台密码
parent
65924bb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/api/login/index.ts
+3
-8
src/views/Login/components/LoginForm.vue
+7
-2
No files found.
src/api/login/index.ts
View file @
2a9290ce
...
@@ -22,11 +22,6 @@ export const register = (data: RegisterVO) => {
...
@@ -22,11 +22,6 @@ export const register = (data: RegisterVO) => {
return
request
.
post
({
url
:
'/system/auth/register'
,
data
})
return
request
.
post
({
url
:
'/system/auth/register'
,
data
})
}
}
// 刷新访问令牌
export
const
refreshToken
=
()
=>
{
return
request
.
post
({
url
:
'/system/auth/refresh-token?refreshToken='
+
getRefreshToken
()
})
}
// 使用租户名,获得租户编号
// 使用租户名,获得租户编号
export
const
getTenantIdByName
=
(
name
:
string
)
=>
{
export
const
getTenantIdByName
=
(
name
:
string
)
=>
{
return
request
.
get
({
url
:
'/system/tenant/get-id-by-name?name='
+
name
})
return
request
.
get
({
url
:
'/system/tenant/get-id-by-name?name='
+
name
})
...
@@ -76,17 +71,17 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
...
@@ -76,17 +71,17 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
})
})
}
}
// 获取验证图片以及 token
// 获取验证图片以及 token
export
const
getCode
=
(
data
)
=>
{
export
const
getCode
=
(
data
:
any
)
=>
{
debugger
debugger
return
request
.
postOriginal
({
url
:
'system/captcha/get'
,
data
})
return
request
.
postOriginal
({
url
:
'system/captcha/get'
,
data
})
}
}
// 滑动或者点选验证
// 滑动或者点选验证
export
const
reqCheck
=
(
data
)
=>
{
export
const
reqCheck
=
(
data
:
any
)
=>
{
return
request
.
postOriginal
({
url
:
'system/captcha/check'
,
data
})
return
request
.
postOriginal
({
url
:
'system/captcha/check'
,
data
})
}
}
// 通过短信重置密码
// 通过短信重置密码
export
const
smsResetPassword
=
(
data
)
=>
{
export
const
smsResetPassword
=
(
data
:
any
)
=>
{
return
request
.
post
({
url
:
'/system/auth/sms-reset-password'
,
data
})
return
request
.
post
({
url
:
'/system/auth/sms-reset-password'
,
data
})
}
}
src/views/Login/components/LoginForm.vue
View file @
2a9290ce
...
@@ -59,8 +59,13 @@
...
@@ -59,8 +59,13 @@
</el-checkbox>
</el-checkbox>
</el-col>
</el-col>
<el-col
:offset=
"6"
:span=
"12"
>
<el-col
:offset=
"6"
:span=
"12"
>
<el-link
style=
"float: right"
type=
"primary"
@
click=
"setLoginState(LoginStateEnum.RESET_PASSWORD)"
>
{{
<el-link
t
(
'login.forgetPassword'
)
}}
</el-link>
style=
"float: right"
type=
"primary"
@
click=
"setLoginState(LoginStateEnum.RESET_PASSWORD)"
>
{{
t
(
'login.forgetPassword'
)
}}
</el-link>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form-item>
</el-form-item>
...
...
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