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
dfd79ada7aca258ba3fbc4f4cd4031323c813b2e
1 parent
36f65526
商品详情页分享可赚显示最高返
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
8 deletions
js/alliance/Alliance.js
js/alliance/components/ShareDetail.js
js/alliance/components/recommend/ProductCell.js
js/alliance/containers/HomeContainer.js
js/alliance/containers/RecommendContainer.js
js/alliance/containers/ShareDetailContainer.js
js/alliance/Alliance.js
View file @
dfd79ad
...
...
@@ -115,7 +115,8 @@ export default function native(platform) {
product_skn
=
{
this
.
props
.
product_skn
}
product_id
=
{
this
.
props
.
product_id
}
collage_activity_id
=
{
this
.
props
.
collage_activity_id
}
collage_price
=
{
this
.
props
.
collage_price
}
/
>
collage_price
=
{
this
.
props
.
collage_price
}
collage_rebates_amount
=
{
this
.
props
.
collage_rebates_amount
}
/
>
<
/Provider
>
);
}
else
if
(
type
===
'recommendProduct'
)
{
...
...
js/alliance/components/ShareDetail.js
View file @
dfd79ad
...
...
@@ -24,6 +24,7 @@ export default class ShareDetail extends Component {
}
_renderBottom
(
productInfo
,
isCollect
)
{
let
rebatesPrice
=
this
.
props
.
collage_activity_id
&&
this
.
props
.
collage_activity_id
!=
-
1
?
this
.
props
.
collage_rebates_amount
:
productInfo
.
rebatesAmount
;
return
(
<
View
style
=
{
styles
.
bottomBar
}
>
<
View
style
=
{[
styles
.
favContainer
,
styles
.
center
]}
>
...
...
@@ -43,7 +44,7 @@ export default class ShareDetail extends Component {
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
this
.
props
.
showShareView
(
productInfo
)}
>
<
View
style
=
{[
styles
.
button
,
styles
.
center
,
styles
.
red
]}
>
<
Text
style
=
{
styles
.
btnText
}
>
{
'分享可赚¥'
+
productInfo
.
rebatesAmount
}
<
/Text
>
<
Text
style
=
{
styles
.
btnText
}
>
{
'分享可赚¥'
+
rebatesPrice
}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
...
...
js/alliance/components/recommend/ProductCell.js
View file @
dfd79ad
...
...
@@ -17,9 +17,9 @@ export default class ProductCell extends Component {
let
yh_exposureData
=
this
.
props
.
yh_exposureData
?
this
.
props
.
yh_exposureData
:
null
;
let
activityId
=
data
.
get
(
'collage_activity_id'
);
let
salesPrice
=
activityId
&&
activityId
!=
0
?
data
.
get
(
'collage_price'
)
:
data
.
get
(
'sales_price'
);
let
rebatesPrice
=
activityId
&&
activityId
!=
0
?
data
.
get
(
'collage_rebates_amount'
)
:
data
.
get
(
'rebates_amount'
);
let
groupWidth
=
activityId
&&
activityId
!=
0
?
50
:
0
;
let
salesPrice
=
activityId
||
activityId
==
0
?
data
.
get
(
'collage_price'
)
:
data
.
get
(
'sales_price'
);
let
rebatesPrice
=
activityId
||
activityId
==
0
?
data
.
get
(
'collage_rebates_amount'
)
:
data
.
get
(
'rebates_amount'
);
let
groupWidth
=
activityId
||
activityId
==
0
?
50
:
0
;
return
(
<
View
>
<
View
style
=
{
styles
.
fatherContainer
}
>
...
...
js/alliance/containers/HomeContainer.js
View file @
dfd79ad
...
...
@@ -133,6 +133,7 @@ class HomeContainer extends Component {
//拼团需要传递的字段
let
collage_activity_id
=
product
&&
product
.
get
(
'collage_activity_id'
,
-
1
);
let
collage_price
=
product
&&
product
.
get
(
'collage_price'
,
0
);
let
collage_rebates_amount
=
product
&&
product
.
get
(
'collage_rebates_amount'
,
0
);
if
(
!
productSkn
)
{
return
;
...
...
@@ -143,7 +144,7 @@ class HomeContainer extends Component {
pageName
=
'aFP_Alliance'
;
}
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"
, "collage_rebates_amount":"${collage_rebates_amount}"
}}`;
ReactNative
.
NativeModules
.
YH_CommonHelper
.
jumpWithUrl
(
url
);
...
...
js/alliance/containers/RecommendContainer.js
View file @
dfd79ad
...
...
@@ -78,6 +78,7 @@ class RecommendContainer extends Component {
//拼团需要传递的字段
let
collage_activity_id
=
product
&&
product
.
get
(
'collage_activity_id'
,
-
1
);
let
collage_price
=
product
&&
product
.
get
(
'collage_price'
,
0
);
let
collage_rebates_amount
=
product
&&
product
.
get
(
'collage_rebates_amount'
,
0
);
if
(
!
productSkn
)
{
return
;
...
...
@@ -88,7 +89,7 @@ class RecommendContainer extends Component {
pageName
=
'aFP_Alliance'
;
}
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id": "${collage_activity_id}" ,"collage_price":"${collage_price}"}}`;
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id": "${collage_activity_id}" ,"collage_price":"${collage_price}"
, "collage_rebates_amount":"${collage_rebates_amount}"
}}`;
ReactNative
.
NativeModules
.
YH_CommonHelper
.
jumpWithUrl
(
url
);
}
...
...
js/alliance/containers/ShareDetailContainer.js
View file @
dfd79ad
...
...
@@ -94,6 +94,7 @@ class ShareDetailContainer extends Component {
//拼团需要传递的字段
let
collage_activity_id
=
product
&&
product
.
get
(
'collage_activity_id'
,
-
1
);
let
collage_price
=
product
&&
product
.
get
(
'collage_price'
,
0
);
let
collage_rebates_amount
=
product
&&
product
.
get
(
'collage_rebates_amount'
,
0
);
if
(
!
productSkn
)
{
return
;
...
...
@@ -104,7 +105,7 @@ class ShareDetailContainer extends Component {
pageName
=
'aFP_Alliance'
;
}
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
let
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"
, "collage_rebates_amount":"${collage_rebates_amount}"
}}`;
ReactNative
.
NativeModules
.
YH_CommonHelper
.
jumpWithUrl
(
url
);
}
...
...
Please
register
or
login
to post a comment