Toggle navigation
Toggle navigation
This project
Loading...
Sign in
罗广聪
/
ProtectGod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
罗广聪
2017-10-01 15:58:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ae8546a5267b801f2f06aecbc0abe2321bfe1be
4ae8546a
1 parent
524f04eb
修bug
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
6 deletions
ios/ProtectGod.xcodeproj/xcshareddata/xcschemes/ProtectGod.xcscheme
src/Components/articleTemplate.js
src/pages/Mine/index.js
ios/ProtectGod.xcodeproj/xcshareddata/xcschemes/ProtectGod.xcscheme
View file @
4ae8546
...
...
@@ -81,7 +81,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration =
"
Debug
"
buildConfiguration =
"
Release
"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
language =
""
...
...
src/Components/articleTemplate.js
View file @
4ae8546
...
...
@@ -40,7 +40,12 @@ export default class ArticleTemplate extends Component {
model
:
this
.
props
.
navigation
.
state
.
params
.
model
,
type
:
this
.
props
.
navigation
.
state
.
params
.
type
,
articleData
:
{
paragraph
:
[]
paragraph
:
[],
NICKNAME
:
""
,
IS_LOGIN
:
""
,
USER_ID
:
""
,
COMPANY
:
""
,
PHONE
:
""
}
};
}
...
...
@@ -100,16 +105,22 @@ export default class ArticleTemplate extends Component {
getAsyncStorage
()
{
const
that
=
this
;
AsyncStorage
.
multiGet
([
"IS_LOGIN"
,
"USER_ID"
],
(
err
,
result
)
=>
{
AsyncStorage
.
multiGet
(
[
"IS_LOGIN"
,
"USER_ID"
,
"NICKNAME"
,
"COMPANY"
,
"PHONE"
],
(
err
,
result
)
=>
{
if
(
err
)
{
console
.
error
(
err
);
}
that
.
setState
({
IS_LOGIN
:
result
[
0
][
1
],
USER_ID
:
result
[
1
][
1
]
!=
null
?
result
[
1
][
1
]
:
""
});
USER_ID
:
result
[
1
][
1
]
!=
null
?
result
[
1
][
1
]
:
""
,
NICKNAME
:
result
[
2
][
1
]
!=
null
?
result
[
2
][
1
]
:
""
,
COMPANY
:
result
[
3
][
1
]
!=
null
?
result
[
3
][
1
]
:
""
,
PHONE
:
result
[
4
][
1
]
!=
null
?
result
[
4
][
1
]
:
""
});
}
);
}
getArticles
()
{
let
that
=
this
,
id
=
this
.
state
.
id
,
...
...
@@ -149,9 +160,28 @@ export default class ArticleTemplate extends Component {
<
Text
style
=
{
styles
.
headerTitle
}
>
{
articleData
.
title
}
<
/Text
>
<
View
style
=
{
styles
.
infoWrapper
}
>
<
Text
style
=
{
styles
.
time
}
>
{
articleData
.
time
}
<
/Text
>
{
this
.
state
.
IS_LOGIN
==
"yes"
?
(
<
Text
style
=
{
styles
.
author
}
>
{
this
.
state
.
NICKNAME
}
<
/Text
>
)
:
null
}
<
Text
style
=
{
styles
.
author
}
>
{
articleData
.
author
}
<
/Text
>
<
/View
>
<
/View
>
{
this
.
state
.
IS_LOGIN
==
"yes"
?
(
<
View
style
=
{
styles
.
businerrCardContaier
}
>
<
Image
style
=
{
styles
.
BCLeftImg
}
source
=
{
require
(
"../assets/Mine/1.png"
)}
/
>
<
View
style
=
{
styles
.
BCRightContaier
}
>
<
Text
style
=
{
styles
.
BCText
}
>
{
this
.
state
.
NICKNAME
}
<
/Text
>
{
this
.
state
.
COMPANY
?
(
<
Text
style
=
{
styles
.
BCText
}
>
{
this
.
state
.
COMPANY
}
<
/Text
>
)
:
null
}
<
Text
style
=
{
styles
.
BCText
}
>
{
this
.
state
.
PHONE
}
<
/Text
>
<
/View
>
<
/View
>
)
:
null
}
<
View
style
=
{
styles
.
contentConatiner
}
>
{
articleData
.
paragraph
.
map
((
item
,
index
)
=>
{
return
(
...
...
@@ -212,6 +242,30 @@ const styles = StyleSheet.create({
fontSize
:
15
,
color
:
"#999999"
},
businerrCardContaier
:
{
flexDirection
:
"row"
,
alignItems
:
"center"
,
marginHorizontal
:
20
,
marginVertical
:
10
,
backgroundColor
:
"#D7D7D7"
,
borderRadius
:
5
,
paddingHorizontal
:
20
,
paddingVertical
:
10
},
BCLeftImg
:
{
width
:
50
,
height
:
50
},
BCRightContaier
:
{
marginLeft
:
20
,
flex
:
1
,
justifyContent
:
"center"
,
},
BCText
:
{
fontSize
:
13
,
lineHeight
:
22
,
color
:
"white"
},
contentConatiner
:
{
marginTop
:
20
,
marginLeft
:
15
,
...
...
src/pages/Mine/index.js
View file @
4ae8546
...
...
@@ -438,7 +438,7 @@ export default class Mine extends Component {
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
发现
<
/Text
>
<
Text
style
=
{
styles
.
leftTitle
}
>
每日一文
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Image
...
...
Please
register
or
login
to post a comment