Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
762a8dc0
Commit
762a8dc0
authored
Oct 08, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复重置密码
parent
51905254
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
PwdModify.vue
src/views/Auth/PwdModify/PwdModify.vue
+2
-0
index.vue
src/views/Auth/index.vue
+6
-5
No files found.
src/views/Auth/PwdModify/PwdModify.vue
View file @
762a8dc0
...
@@ -65,6 +65,7 @@ import CodeInput from "../Login/components/CodeInput/index.vue";
...
@@ -65,6 +65,7 @@ import CodeInput from "../Login/components/CodeInput/index.vue";
import
{
eSmsType
}
from
"@/service/VerificationService"
;
import
{
eSmsType
}
from
"@/service/VerificationService"
;
import
{
tSetPwdFunc
}
from
"../PwdSetting/types"
;
import
{
tSetPwdFunc
}
from
"../PwdSetting/types"
;
import
NavBar
from
"@/components/NavBar/index.vue"
import
NavBar
from
"@/components/NavBar/index.vue"
import
{
Toast
}
from
"vant"
;
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -154,6 +155,7 @@ export default defineComponent({
...
@@ -154,6 +155,7 @@ export default defineComponent({
}
else
if
(
this
.
modifyWay
===
eModifyWay
.
CODE
)
{
}
else
if
(
this
.
modifyWay
===
eModifyWay
.
CODE
)
{
await
this
.
setPwdFunc
(
this
.
phone
,
this
.
code
,
this
.
pwd2
)
await
this
.
setPwdFunc
(
this
.
phone
,
this
.
code
,
this
.
pwd2
)
}
}
Toast
(
'重置成功'
)
this
.
$router
.
back
();
this
.
$router
.
back
();
}
catch
(
err
)
{
}
}
catch
(
err
)
{
}
this
.
loading
=
false
;
this
.
loading
=
false
;
...
...
src/views/Auth/index.vue
View file @
762a8dc0
...
@@ -15,6 +15,7 @@ import { eSmsType, sendVerifyCode } from '@/service/VerificationService'
...
@@ -15,6 +15,7 @@ import { eSmsType, sendVerifyCode } from '@/service/VerificationService'
import
{
eNewRoleRelatedToBackEnd
,
eRole
}
from
'@/types/roleType'
import
{
eNewRoleRelatedToBackEnd
,
eRole
}
from
'@/types/roleType'
import
{
setUserMsg
}
from
'@/utils/userMsg'
import
{
setUserMsg
}
from
'@/utils/userMsg'
import
{
defineComponent
}
from
'vue'
import
{
defineComponent
}
from
'vue'
import
LoginService
from
'./Login/LoginService'
import
{
eAccountType
}
from
'./Login/types'
import
{
eAccountType
}
from
'./Login/types'
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -52,7 +53,7 @@ export default defineComponent({
...
@@ -52,7 +53,7 @@ export default defineComponent({
verify_code
:
code
verify_code
:
code
})
})
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
const
{
accessToken
,
role
,
phone
,
addr
,
pri_key
,
pub_key
}
=
ret
.
data
const
{
accessToken
,
role
,
phone
,
addr
,
pri_key
,
pub_key
}
=
ret
.
data
setUserMsg
({
setUserMsg
({
token
:
accessToken
,
token
:
accessToken
,
role
:
role
===
eNewRoleRelatedToBackEnd
.
ACM
?
eRole
.
staff
:
eRole
.
user
,
role
:
role
===
eNewRoleRelatedToBackEnd
.
ACM
?
eRole
.
staff
:
eRole
.
user
,
...
@@ -95,7 +96,7 @@ export default defineComponent({
...
@@ -95,7 +96,7 @@ export default defineComponent({
}
}
},
},
async
loginByPwdFunc
(
phone
:
string
,
pwd
:
string
)
{
async
loginByPwdFunc
(
phone
:
string
,
pwd
:
string
,
config
=
{
gohome
:
true
}
)
{
const
ret
=
await
userLogin
({
const
ret
=
await
userLogin
({
is_admin
:
false
,
is_admin
:
false
,
use_pwd
:
true
,
use_pwd
:
true
,
...
@@ -103,7 +104,7 @@ export default defineComponent({
...
@@ -103,7 +104,7 @@ export default defineComponent({
phone
:
phone
phone
:
phone
})
})
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
const
{
accessToken
,
phone
,
role
,
addr
,
pub_key
,
pri_key
}
=
ret
.
data
const
{
accessToken
,
phone
,
role
,
addr
,
pub_key
,
pri_key
}
=
ret
.
data
setUserMsg
({
setUserMsg
({
token
:
accessToken
,
token
:
accessToken
,
role
:
eNewRoleRelatedToBackEnd
.
ACM
===
role
?
eRole
.
staff
:
eRole
.
user
,
role
:
eNewRoleRelatedToBackEnd
.
ACM
===
role
?
eRole
.
staff
:
eRole
.
user
,
...
@@ -114,7 +115,7 @@ export default defineComponent({
...
@@ -114,7 +115,7 @@ export default defineComponent({
pri_key
pri_key
}
}
})
})
this
.
$router
.
push
({
config
.
gohome
&&
this
.
$router
.
push
({
name
:
'Home'
name
:
'Home'
})
})
}
else
{
}
else
{
...
@@ -132,7 +133,7 @@ export default defineComponent({
...
@@ -132,7 +133,7 @@ export default defineComponent({
if
(
ret
.
code
!==
200
)
{
if
(
ret
.
code
!==
200
)
{
throw
new
Error
(
ret
.
msg
)
throw
new
Error
(
ret
.
msg
)
}
}
await
this
.
loginByPwdFunc
(
phone
,
pwd
,
{
gohome
:
true
})
},
},
async
modifyPwdFunc
(
phone
:
string
,
originalPwd
:
string
,
newPwd
:
string
)
{
async
modifyPwdFunc
(
phone
:
string
,
originalPwd
:
string
,
newPwd
:
string
)
{
console
.
log
(
phone
,
originalPwd
,
newPwd
)
console
.
log
(
phone
,
originalPwd
,
newPwd
)
...
...
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