Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
15e67e1a
authored
Mar 17, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
登录页面增加查看密码功能
parent
db3475ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
6 deletions
app/containers/login/LoginPage.js
app/images/eye.png
app/images/eye_close.png
ios/BoneHouse_Business_APP.xcodeproj/xcshareddata/xcschemes/BoneHouse_Business_APP.xcscheme
app/containers/login/LoginPage.js
View file @
15e67e1a
...
@@ -8,7 +8,8 @@ import {
...
@@ -8,7 +8,8 @@ import {
Image
,
Image
,
TextInput
,
TextInput
,
TouchableOpacity
,
TouchableOpacity
,
NativeModules
NativeModules
,
TouchableWithoutFeedback
}
from
'react-native'
;
}
from
'react-native'
;
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
{
import
{
...
@@ -42,6 +43,8 @@ class LoginPage extends Component{
...
@@ -42,6 +43,8 @@ class LoginPage extends Component{
this
.
state
=
{
this
.
state
=
{
username
:
''
,
// shi.ming gao.xiaoming
username
:
''
,
// shi.ming gao.xiaoming
password
:
''
,
// sfrx2019
password
:
''
,
// sfrx2019
showPassword
:
false
,
focuOnPw
:
false
,
subTit
:
'登录'
,
subTit
:
'登录'
,
subTitList
:
[
'登录'
,
'登录中...'
],
subTitList
:
[
'登录'
,
'登录中...'
],
isSubLoding
:
false
,
isSubLoding
:
false
,
...
@@ -244,7 +247,7 @@ class LoginPage extends Component{
...
@@ -244,7 +247,7 @@ class LoginPage extends Component{
}
}
render
()
{
render
()
{
let
{
username
,
password
,
isSubLoding
,
subTit
,
isShowDomain
,
version_apk
,
isEnterHomeFlag
}
=
this
.
state
let
{
username
,
password
,
isSubLoding
,
subTit
,
isShowDomain
,
version_apk
,
isEnterHomeFlag
,
showPassword
,
focuOnPw
}
=
this
.
state
let
{
global_domain_config
}
=
this
.
props
let
{
global_domain_config
}
=
this
.
props
let
tempInd
=
global_domain_config
.
indexOf
(
'/'
)
+
2
let
tempInd
=
global_domain_config
.
indexOf
(
'/'
)
+
2
let
tempGlobalDomain
=
global_domain_config
.
slice
(
tempInd
)
let
tempGlobalDomain
=
global_domain_config
.
slice
(
tempInd
)
...
@@ -284,13 +287,26 @@ class LoginPage extends Component{
...
@@ -284,13 +287,26 @@ class LoginPage extends Component{
autoCapitalize
=
'none'
autoCapitalize
=
'none'
placeholder
=
"请输入您的密码"
placeholder
=
"请输入您的密码"
placeholderTextColor
=
{
placehold_text_color
}
placeholderTextColor
=
{
placehold_text_color
}
secureTextEntry
=
{
true
}
returnKeyType
=
"done"
returnKeyType
=
"done"
style
=
{
styles
.
row_input
}
style
=
{
styles
.
row_input
}
defaultValue
=
{
password
}
defaultValue
=
{
password
}
secureTextEntry
=
{
!
showPassword
}
clearButtonMode
=
"while-editing"
clearButtonMode
=
"while-editing"
onChangeText
=
{(
text
)
=>
this
.
handlePassword
(
text
)}
onChangeText
=
{(
text
)
=>
this
.
handlePassword
(
text
)}
onFocus
=
{()
=>
this
.
setState
({
focuOnPw
:
true
})}
onBlur
=
{()
=>
this
.
setState
({
focuOnPw
:
false
})}
/
>
/
>
{
!!
password
&&
focuOnPw
&&
<
TouchableWithoutFeedback
onPress
=
{()
=>
this
.
setState
({
showPassword
:
!
showPassword
})}
style
=
{
styles
.
view_password_btn
}
>
<
Image
source
=
{
require
(
'../../images/eye.png'
)}
style
=
{
styles
.
view_password
}
/
>
<
/TouchableWithoutFeedback
>
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
cont_footer
}
>
<
View
style
=
{
styles
.
cont_footer
}
>
...
@@ -396,7 +412,8 @@ const styles = StyleSheet.create({
...
@@ -396,7 +412,8 @@ const styles = StyleSheet.create({
backgroundColor
:
'#EFEFEF'
,
backgroundColor
:
'#EFEFEF'
,
marginBottom
:
'8%'
,
marginBottom
:
'8%'
,
borderRadius
:
20
,
borderRadius
:
20
,
paddingLeft
:
10
paddingLeft
:
10
,
position
:
'relative'
},
},
input_plholdco
:
{
input_plholdco
:
{
color
:
'#919191'
color
:
'#919191'
...
@@ -404,7 +421,7 @@ const styles = StyleSheet.create({
...
@@ -404,7 +421,7 @@ const styles = StyleSheet.create({
row_input
:
{
row_input
:
{
fontSize
:
third_text_size
,
fontSize
:
third_text_size
,
height
:
38
,
height
:
38
,
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
,
},
},
cont_footer
:
{
cont_footer
:
{
justifyContent
:
'flex-end'
,
justifyContent
:
'flex-end'
,
...
@@ -465,6 +482,13 @@ const styles = StyleSheet.create({
...
@@ -465,6 +482,13 @@ const styles = StyleSheet.create({
width
:
'100%'
,
width
:
'100%'
,
height
:
'100%'
height
:
'100%'
},
},
view_password
:
{
position
:
'absolute'
,
right
:
pxSize
(
25
),
top
:
10
,
width
:
18
,
height
:
18
,
}
})
})
const
mapStateToProps
=
(
state
)
=>
({
const
mapStateToProps
=
(
state
)
=>
({
...
...
app/images/eye.png
0 → 100644
View file @
15e67e1a
4.4 KB
app/images/eye_close.png
0 → 100644
View file @
15e67e1a
3.18 KB
ios/BoneHouse_Business_APP.xcodeproj/xcshareddata/xcschemes/BoneHouse_Business_APP.xcscheme
View file @
15e67e1a
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</Testables>
</Testables>
</TestAction>
</TestAction>
<LaunchAction
<LaunchAction
buildConfiguration =
"
Release
"
buildConfiguration =
"
Debug
"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
launchStyle =
"0"
...
...
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