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
2205526a
authored
Sep 06, 2024
by
scholar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码实现。
parent
f01dc0a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletions
+14
-1
src/api/login/index.ts
+7
-1
src/api/login/types.ts
+7
-0
src/views/Login/components/RegisterForm.vue
+0
-0
No files found.
src/api/login/index.ts
View file @
2205526a
import
request
from
'@/config/axios'
import
{
getRefreshToken
}
from
'@/utils/auth'
import
type
{
UserLoginVO
}
from
'./types'
import
type
{
RegisterVO
,
UserLoginVO
}
from
'./types'
export
interface
SmsCodeVO
{
mobile
:
string
...
...
@@ -17,6 +17,12 @@ export const login = (data: UserLoginVO) => {
return
request
.
post
({
url
:
'/system/auth/login'
,
data
})
}
// 注册
export
const
register
=
(
data
:
RegisterVO
)
=>
{
console
.
log
(
"data: RegisterVO========="
,
data
)
return
request
.
post
({
url
:
'/system/auth/register'
,
data
})
}
// 刷新访问令牌
export
const
refreshToken
=
()
=>
{
return
request
.
post
({
url
:
'/system/auth/refresh-token?refreshToken='
+
getRefreshToken
()
})
...
...
src/api/login/types.ts
View file @
2205526a
...
...
@@ -29,3 +29,10 @@ export type UserVO = {
loginIp
:
string
loginDate
:
string
}
export
type
RegisterVO
=
{
tenantName
:
string
username
:
string
password
:
string
captchaVerification
:
string
}
src/views/Login/components/RegisterForm.vue
View file @
2205526a
This diff is collapsed.
Click to expand it.
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