Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张文文
6 years ago
Commit
7f50f8523a4f7552b72309a723d1e4795dfc9f27
1 parent
63e10799
ui fix reviewd by 陈林
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
js/newArrival/components/newArrival/BrandCell.js
js/newArrival/components/newArrival/CategorySelector.js
js/newArrival/components/newArrival/NewArrivalHeader.js
js/newArrival/components/newArrival/RecommendCell.js
js/newArrival/components/newArrival/floor/JointCell.js
js/newArrival/components/newArrival/BrandCell.js
View file @
7f50f85
...
...
@@ -13,7 +13,7 @@ import ReactNative, {
Platform
,
}
from
'react-native'
;
import
YH_Image
from
'../../../common/components/YH_Image'
;
import
Immutable
,
{
Map
}
from
'immutable'
;
export
default
class
BrandCell
extends
Component
{
...
...
@@ -27,7 +27,7 @@ export default class BrandCell extends Component {
let
shop_logo
=
data
.
get
(
'shop_logo'
);
let
shops_id
=
data
.
get
(
'shops_id'
);
let
new_product_num
=
data
.
get
(
'new_product_num'
);
shop_logo
=
shop_logo
?
shop_logo
.
replace
(
'{width}'
,
80
).
replace
(
'{height}'
,
40
).
replace
(
'{mode}'
,
2
):
''
;
shop_logo
=
YH_Image
.
getSlicedUrl
(
shop_logo
,
100
,
50
,
2
)
;
let
yh_exposureData
=
data
.
get
(
'yh_exposureData'
);
return
(
<
TouchableOpacity
style
=
{
styles
.
container
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressShop
&&
this
.
props
.
onPressShop
(
data
,
index
);}}
>
...
...
@@ -49,8 +49,8 @@ let styles = StyleSheet.create({
height
:
76
,
width
:
80
,
backgroundColor
:
'white'
,
marginLeft
:
4
,
marginTop
:
10
,
marginRight
:
4
,
},
image
:
{
marginTop
:
0
,
...
...
js/newArrival/components/newArrival/CategorySelector.js
View file @
7f50f85
...
...
@@ -59,8 +59,7 @@ export default class CategorySelector extends Component {
renderRow
(
rowData
,
sectionID
,
rowID
,
highlightRow
)
{
let
marginLeft
=
(
rowID
==
0
)
?
0
:
8
;
let
color
=
rowID
==
this
.
props
.
selectedCategoryIndex
?
'#222222'
:
'#444444'
;
let
fontFamily
=
rowID
==
this
.
props
.
selectedCategoryIndex
?
'PingFang-SC-Medium'
:
'PingFang-SC-Regular'
;
let
fontWeight
=
rowID
==
this
.
props
.
selectedCategoryIndex
?
'bold'
:
'normal'
;
return
(
<
TouchableOpacity
key
=
{
'row'
+
rowID
}
...
...
@@ -76,9 +75,9 @@ export default class CategorySelector extends Component {
}}
>
<
View
style
=
{[
styles
.
categoryContainer
,
{
marginLeft
}]}
>
<
Text
style
=
{[
styles
.
categoryName
,
{
color
,
font
Family
}]}
>
{
rowData
.
get
(
'tab_name'
)}
<
/Text
>
<
Text
style
=
{[
styles
.
categoryName
,
{
color
,
font
Weight
}]}
>
{
rowData
.
get
(
'tab_name'
)}
<
/Text
>
<
/View
>
{
rowID
==
this
.
props
.
selectedCategoryIndex
?
<
View
style
=
{[
styles
.
tabLine
,
{
marginLeft
}]}
/> : null
}
{
rowID
==
this
.
props
.
selectedCategoryIndex
?
<
View
style
=
{[
styles
.
tabLine
,
{
left
:
marginLeft
,
right
:
22
}]}
/> : null
}
<
/TouchableOpacity
>
);
}
...
...
@@ -129,20 +128,19 @@ let styles = StyleSheet.create({
},
categoryName
:
{
fontSize
:
14
,
color
:
'#b0b0b0'
,
},
line
:
{
position
:
'absolute'
,
width
,
height
:
1
,
height
:
0.5
,
left
:
0
,
bottom
:
0
,
backgroundColor
:
'#e5e5e5'
,
},
tabLine
:
{
position
:
'absolute'
,
width
:
28
,
height
:
2
,
left
:
0
,
bottom
:
0
,
backgroundColor
:
'#222222'
,
},
...
...
js/newArrival/components/newArrival/NewArrivalHeader.js
View file @
7f50f85
...
...
@@ -121,9 +121,9 @@ export default class NewArrivalHeader extends Component {
return
(
<
View
style
=
{[
styles
.
container
]}
>
{
this
.
renderFocus
(
focusItem
)}
{
this
.
renderDivideImage
(
divideItem
)}
{
this
.
renderShopList
(
shopItem
)}
{
this
.
renderJointImg
(
jointItem
,
fIndex
)}
{
this
.
renderDivideImage
(
divideItem
)}
<
/View
>
);
...
...
js/newArrival/components/newArrival/RecommendCell.js
View file @
7f50f85
...
...
@@ -33,6 +33,7 @@ export default class RecommendCell extends Component {
render
()
{
let
{
data
}
=
this
.
props
;
if
(
!
data
)
{
return
null
;
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
...
...
@@ -72,11 +73,12 @@ let styles = StyleSheet.create({
color
:
'#222222'
,
width
:
width
,
textAlign
:
'left'
,
fontFamily
:
'PingFang-SC-Medium'
fontFamily
:
'PingFang-SC-Medium'
,
fontWeight
:
'bold'
,
},
contentContainer
:
{
backgroundColor
:
'white'
,
marginLeft
:
1
1
,
marginLeft
:
1
5
,
},
separator
:
{
width
:
width
,
...
...
js/newArrival/components/newArrival/floor/JointCell.js
View file @
7f50f85
...
...
@@ -53,7 +53,7 @@ export default class JointCell extends React.Component {
return
(
<
View
>
<
YH_Image
url
=
{
YH_Image
.
getSlicedUrl
(
source
.
src
,
width
-
marginLeft
*
2
,
ratioHeight
,
2
)}
resizeMode
=
{
'stretch'
}
style
=
{{
width
:
width
-
marginLeft
*
2
,
height
:
ratioHeight
,
marginLeft
:
marginLeft
,
backgroundColor
:
'red'
}}
/
>
<
YH_Image
url
=
{
YH_Image
.
getSlicedUrl
(
source
.
src
,
width
-
marginLeft
*
2
,
ratioHeight
,
2
)}
resizeMode
=
{
'stretch'
}
style
=
{{
width
:
width
-
marginLeft
*
2
,
height
:
ratioHeight
,
marginLeft
:
marginLeft
}}
/
>
<
View
style
=
{{
flexDirection
:
'row'
,
position
:
'absolute'
,
top
:
0
,
left
:
marginLeft
,
bottom
:
0
,
right
:
marginLeft
}}
>
{
list
.
map
((
item
,
i
)
=>
{
let
exposureData
=
{
...
...
Please
register
or
login
to post a comment