Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-school-app
Commits
8ac2056b
Commit
8ac2056b
authored
Aug 14, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改密码后登出或后退
parent
88042cb9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
6 deletions
+19
-6
index.ts
src/api/index.ts
+1
-1
Vcode.tsx
src/components/Vcode/Vcode.tsx
+2
-2
ChangeHardwareAccount.tsx
src/pages/Password/ChangeHardwareAccount.tsx
+5
-2
ChangePwd.tsx
src/pages/Password/ChangePwd.tsx
+5
-0
ChangeTelAccount.tsx
src/pages/Password/ChangeTelAccount.tsx
+5
-0
ResetPwd.tsx
src/pages/Password/ResetPwd.tsx
+1
-1
No files found.
src/api/index.ts
View file @
8ac2056b
...
@@ -44,7 +44,7 @@ const createFetch = (basePath: string) => {
...
@@ -44,7 +44,7 @@ const createFetch = (basePath: string) => {
return
data
;
return
data
;
}
}
if
(
data
.
code
===
LogoutCode
)
{
if
(
data
.
code
===
LogoutCode
)
{
Taro
.
re
directTo
({
Taro
.
re
Launch
({
url
:
'/pages/Login/Login'
,
url
:
'/pages/Login/Login'
,
});
});
throw
data
;
throw
data
;
...
...
src/components/Vcode/Vcode.tsx
View file @
8ac2056b
...
@@ -98,7 +98,7 @@ class Vcode extends Component {
...
@@ -98,7 +98,7 @@ class Vcode extends Component {
ctx
.
draw
();
ctx
.
draw
();
}
}
clickHandle
()
{
clickHandle
=
()
=>
{
const
{
vcode
,
inputCode
}
=
this
.
state
;
const
{
vcode
,
inputCode
}
=
this
.
state
;
if
(
vcode
&&
vcode
.
toString
()
==
inputCode
)
{
if
(
vcode
&&
vcode
.
toString
()
==
inputCode
)
{
const
{
cellphone
,
positionNum
}
=
this
.
props
;
const
{
cellphone
,
positionNum
}
=
this
.
props
;
...
@@ -126,7 +126,7 @@ class Vcode extends Component {
...
@@ -126,7 +126,7 @@ class Vcode extends Component {
icon
:
'none'
,
icon
:
'none'
,
});
});
}
}
}
}
;
countStart
()
{
countStart
()
{
this
.
setState
({
this
.
setState
({
...
...
src/pages/Password/ChangeHardwareAccount.tsx
View file @
8ac2056b
...
@@ -30,7 +30,7 @@ const ChangeHardwareAccount = () => {
...
@@ -30,7 +30,7 @@ const ChangeHardwareAccount = () => {
const
changeAccountHandle
=
()
=>
{
const
changeAccountHandle
=
()
=>
{
if
(
!
oldPwd
||
oldPwd
.
length
<
6
)
{
if
(
!
oldPwd
||
oldPwd
.
length
<
6
)
{
return
Taro
.
showToast
({
return
Taro
.
showToast
({
title
:
'请输入6-20位
APP
登录密码'
,
title
:
'请输入6-20位登录密码'
,
icon
:
'none'
,
icon
:
'none'
,
});
});
}
}
...
@@ -58,6 +58,9 @@ const ChangeHardwareAccount = () => {
...
@@ -58,6 +58,9 @@ const ChangeHardwareAccount = () => {
Taro
.
showToast
({
Taro
.
showToast
({
title
:
'修改成功'
,
title
:
'修改成功'
,
});
});
setTimeout
(()
=>
{
Taro
.
navigateBack
();
},
2000
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
Taro
.
hideLoading
();
Taro
.
hideLoading
();
...
@@ -71,7 +74,7 @@ const ChangeHardwareAccount = () => {
...
@@ -71,7 +74,7 @@ const ChangeHardwareAccount = () => {
return
(
return
(
<
View
className=
'ChangeHardwareAccount Password'
>
<
View
className=
'ChangeHardwareAccount Password'
>
<
View
className=
'Password-form'
>
<
View
className=
'Password-form'
>
<
View
className=
'Password-title'
>
APP
登录密码
</
View
>
<
View
className=
'Password-title'
>
小程序
登录密码
</
View
>
<
View
className=
'registerBox-item'
>
<
View
className=
'registerBox-item'
>
<
Input
<
Input
className=
'loginBox-input'
className=
'loginBox-input'
...
...
src/pages/Password/ChangePwd.tsx
View file @
8ac2056b
...
@@ -59,6 +59,11 @@ const ChangePwd = () => {
...
@@ -59,6 +59,11 @@ const ChangePwd = () => {
Taro
.
showToast
({
Taro
.
showToast
({
title
:
'修改成功'
,
title
:
'修改成功'
,
});
});
setTimeout
(()
=>
{
Taro
.
reLaunch
({
url
:
'/pages/Login/Login'
,
});
},
2000
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
Taro
.
hideLoading
();
Taro
.
hideLoading
();
...
...
src/pages/Password/ChangeTelAccount.tsx
View file @
8ac2056b
...
@@ -56,6 +56,11 @@ const ChangeTelAccount = () => {
...
@@ -56,6 +56,11 @@ const ChangeTelAccount = () => {
Taro
.
showToast
({
Taro
.
showToast
({
title
:
'修改成功'
,
title
:
'修改成功'
,
});
});
setTimeout
(()
=>
{
Taro
.
reLaunch
({
url
:
'/pages/Login/Login'
,
});
},
2000
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
Taro
.
hideLoading
();
Taro
.
hideLoading
();
...
...
src/pages/Password/ResetPwd.tsx
View file @
8ac2056b
...
@@ -114,7 +114,7 @@ class ResetPwd extends Component {
...
@@ -114,7 +114,7 @@ class ResetPwd extends Component {
this
.
refs
.
ToastBox
.
showToast
(
'修改成功'
);
this
.
refs
.
ToastBox
.
showToast
(
'修改成功'
);
console
.
log
(
'回到登陆'
);
console
.
log
(
'回到登陆'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Taro
.
re
directTo
({
Taro
.
re
Launch
({
url
:
'/pages/Login/Login'
,
url
:
'/pages/Login/Login'
,
});
});
},
2000
);
},
2000
);
...
...
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