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
dbab3d4f770664361484bba0f9216ffdf34c755f
1 parent
d232f5cb
Add. Share to QQ and Weibo review by chenlin
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
9 deletions
js/groupPurchase/components/ShareViewModal.js
js/groupPurchase/containers/GroupPurchaseContainer.js
js/groupPurchase/containers/GroupPurchaseDetailContainer.js
js/groupPurchase/components/ShareViewModal.js
View file @
dbab3d4
...
...
@@ -44,12 +44,24 @@ export default class ShareViewModal extends React.Component {
<
Image
source
=
{
unionType
?
require
(
'../images/unionShare_wx_icon.png'
)
:
require
(
'../images/weixin.png'
)}
style
=
{
styles
.
icon
}
/
>
<
Text
style
=
{
styles
.
text
}
>
分享给好友
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
0.5
}
style
=
{
styles
.
button
2
}
onPress
=
{()
=>
{
<
TouchableOpacity
activeOpacity
=
{
0.5
}
style
=
{
styles
.
button
1
}
onPress
=
{()
=>
{
this
.
props
.
showSnapshootShare
&&
this
.
props
.
showSnapshootShare
(
true
);
}}
>
<
Image
source
=
{
unionType
?
require
(
'../images/unionShare_qr_icon.png'
)
:
require
(
'../images/pengyou.png'
)}
style
=
{
styles
.
icon
}
/
>
<
Text
style
=
{
styles
.
text
}
>
微信快照
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
0.5
}
style
=
{
styles
.
button1
}
onPress
=
{()
=>
{
this
.
props
.
shareQQApp
&&
this
.
props
.
shareQQApp
();
}}
>
<
Image
source
=
{
unionType
?
require
(
'../images/unionShare_qr_icon.png'
)
:
require
(
'../images/pengyou.png'
)}
style
=
{
styles
.
icon
}
/
>
<
Text
style
=
{
styles
.
text
}
>
QQ
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
0.5
}
style
=
{
styles
.
button1
}
onPress
=
{()
=>
{
this
.
props
.
shareWeiBoApp
&&
this
.
props
.
shareWeiBoApp
();
}}
>
<
Image
source
=
{
unionType
?
require
(
'../images/unionShare_qr_icon.png'
)
:
require
(
'../images/pengyou.png'
)}
style
=
{
styles
.
icon
}
/
>
<
Text
style
=
{
styles
.
text
}
>
微博
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
line
}
/
>
<
TouchableOpacity
activeOpacity
=
{
0.5
}
style
=
{
styles
.
cancel
}
onPress
=
{()
=>
{
...
...
@@ -93,17 +105,13 @@ let styles = StyleSheet.create({
width
,
height
:
115
*
DEVICE_WIDTH_RATIO
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
flexDirection
:
'row'
,
},
button1
:
{
marginLeft
:
(
width
-
180
*
DEVICE_WIDTH_RATIO
)
/
3
,
width
:
90
*
DEVICE_WIDTH_RATIO
,
alignItems
:
'center'
,
},
button2
:
{
marginLeft
:
(
width
-
180
*
DEVICE_WIDTH_RATIO
)
/
3
,
alignItems
:
'center'
,
},
icon
:
{
width
:
45
*
DEVICE_WIDTH_RATIO
,
height
:
45
*
DEVICE_WIDTH_RATIO
,
...
...
js/groupPurchase/containers/GroupPurchaseContainer.js
View file @
dbab3d4
...
...
@@ -48,6 +48,8 @@ class GroupPurchaseContainer extends Component {
this
.
_didTouchProduct
=
this
.
_didTouchProduct
.
bind
(
this
);
this
.
showShareView
=
this
.
showShareView
.
bind
(
this
);
this
.
shareMiniApp
=
this
.
shareMiniApp
.
bind
(
this
);
this
.
shareWeiBoApp
=
this
.
shareWeiBoApp
.
bind
(
this
);
this
.
shareQQApp
=
this
.
shareQQApp
.
bind
(
this
);
this
.
showSnapshootShare
=
this
.
showSnapshootShare
.
bind
(
this
);
this
.
shareSnapshootAction
=
this
.
shareSnapshootAction
.
bind
(
this
);
this
.
jumpToMinePurchaseOrder
=
this
.
jumpToMinePurchaseOrder
.
bind
(
this
);
...
...
@@ -148,6 +150,16 @@ class GroupPurchaseContainer extends Component {
ReactNative
.
NativeModules
.
YH_CommonHelper
.
shareWXMiniProgram
(
param
);
}
shareWeiBoApp
()
{
console
.
log
(
'shareWeiBoApp'
);
this
.
props
.
actions
.
showShareView
(
false
);
}
shareQQApp
()
{
console
.
log
(
'shareQQApp'
);
this
.
props
.
actions
.
showShareView
(
false
);
}
showSnapshootShare
(
show
){
this
.
props
.
actions
.
showShareView
(
false
);
this
.
props
.
actions
.
showSnapshootShare
(
show
);
...
...
@@ -184,7 +196,7 @@ class GroupPurchaseContainer extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
ShareViewModal
show
=
{
showShareView
}
unionType
=
{
unionType
}
showShareView
=
{
this
.
showShareView
}
shareMiniApp
=
{
this
.
shareMiniApp
}
showSnapshootShare
=
{
this
.
showSnapshootShare
}
/
>
<
ShareViewModal
show
=
{
showShareView
}
unionType
=
{
unionType
}
showShareView
=
{
this
.
showShareView
}
shareMiniApp
=
{
this
.
shareMiniApp
}
sh
areWeiBoApp
=
{
this
.
shareWeiBoApp
}
shareQQApp
=
{
this
.
shareQQApp
}
sh
owSnapshootShare
=
{
this
.
showSnapshootShare
}
/
>
<
ListSnapshootShare
show
=
{
showSnapshootShare
}
unionType
=
{
unionType
}
...
...
js/groupPurchase/containers/GroupPurchaseDetailContainer.js
View file @
dbab3d4
...
...
@@ -49,6 +49,8 @@ class GroupPurchaseDetailContainer extends Component {
this
.
didTouchButton
=
this
.
didTouchButton
.
bind
(
this
);
this
.
showShareView
=
this
.
showShareView
.
bind
(
this
);
this
.
shareMiniApp
=
this
.
shareMiniApp
.
bind
(
this
);
this
.
shareWeiBoApp
=
this
.
shareWeiBoApp
.
bind
(
this
);
this
.
shareQQApp
=
this
.
shareQQApp
.
bind
(
this
);
this
.
showSnapshootShare
=
this
.
showSnapshootShare
.
bind
(
this
);
this
.
shareSnapshootAction
=
this
.
shareSnapshootAction
.
bind
(
this
);
...
...
@@ -184,6 +186,16 @@ class GroupPurchaseDetailContainer extends Component {
ReactNative
.
NativeModules
.
YH_CommonHelper
.
shareWXMiniProgram
(
param
);
}
shareWeiBoApp
()
{
console
.
log
(
'shareWeiBoApp'
);
this
.
props
.
actions
.
showShareView
(
false
);
}
shareQQApp
()
{
console
.
log
(
'shareQQApp'
);
this
.
props
.
actions
.
showShareView
(
false
);
}
showSnapshootShare
(
show
){
this
.
props
.
actions
.
showShareView
(
false
);
this
.
props
.
actions
.
showSnapshootShare
(
show
);
...
...
@@ -218,7 +230,7 @@ class GroupPurchaseDetailContainer extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
ShareViewModal
show
=
{
showShareView
}
unionType
=
{
unionType
}
showShareView
=
{
this
.
showShareView
}
shareMiniApp
=
{
this
.
shareMiniApp
}
showSnapshootShare
=
{
this
.
showSnapshootShare
}
/
>
<
ShareViewModal
show
=
{
showShareView
}
unionType
=
{
unionType
}
showShareView
=
{
this
.
showShareView
}
shareMiniApp
=
{
this
.
shareMiniApp
}
sh
areWeiBoApp
=
{
this
.
shareWeiBoApp
}
shareQQApp
=
{
this
.
shareQQApp
}
sh
owSnapshootShare
=
{
this
.
showSnapshootShare
}
/
>
<
SnapshootShare
show
=
{
showSnapshootShare
}
unionType
=
{
unionType
}
...
...
Please
register
or
login
to post a comment