Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
11040f6a
Commit
11040f6a
authored
Sep 02, 2021
by
季圣华
Browse files
优化登录接口
parent
bdd70fe8
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/components/tools/UserPassword.vue
View file @
11040f6a
...
...
@@ -40,6 +40,7 @@
<
script
>
import
{
putAction
}
from
'
@/api/manage
'
import
md5
from
'
md5
'
export
default
{
name
:
"
UserPassword
"
,
...
...
@@ -111,6 +112,8 @@
this
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
that
.
confirmLoading
=
true
;
values
.
oldpassword
=
md5
(
values
.
oldpassword
)
values
.
password
=
md5
(
values
.
password
)
let
params
=
Object
.
assign
({
userId
:
this
.
userId
},
values
)
console
.
log
(
"
修改密码提交数据
"
,
params
)
putAction
(
this
.
url
,
params
).
then
((
res
)
=>
{
...
...
jshERP-web/src/views/user/Login.vue
View file @
11040f6a
...
...
@@ -55,6 +55,7 @@
</
template
>
<!-- BY cao_yu_li -->
<
script
>
import
md5
from
"
md5
"
import
api
from
'
@/api
'
import
TwoStepCaptcha
from
'
@/components/tools/TwoStepCaptcha
'
import
{
mapActions
}
from
"
vuex
"
...
...
@@ -132,7 +133,7 @@
that
.
form
.
validateFields
([
'
loginName
'
,
'
password
'
,
'
rememberMe
'
],
{
force
:
true
},
(
err
,
values
)
=>
{
if
(
!
err
)
{
loginParams
.
loginName
=
values
.
loginName
loginParams
.
password
=
values
.
password
loginParams
.
password
=
md5
(
values
.
password
)
//loginParams.remember_me = values.rememberMe
console
.
log
(
"
登录参数
"
,
loginParams
)
that
.
Login
(
loginParams
).
then
((
res
)
=>
{
...
...
jshERP-web/src/views/user/Register.vue
View file @
11040f6a
...
...
@@ -80,6 +80,7 @@
import
{
mixinDevice
}
from
'
@/utils/mixin.js
'
import
{
getAction
,
postAction
}
from
'
@/api/manage
'
import
{
checkOnlyUser
}
from
'
@/api/api
'
import
md5
from
'
md5
'
const
levelNames
=
{
0
:
'
低
'
,
...
...
@@ -232,7 +233,7 @@
if
(
values
.
inputCode
==
this
.
randCode
)
{
let
register
=
{
loginName
:
values
.
username
,
password
:
values
.
password
password
:
md5
(
values
.
password
)
};
postAction
(
"
/user/registerUser
"
,
register
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
...
...
Write
Preview
Supports
Markdown
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