Authored by 孙凯

add shareType review by daiqiang

... ... @@ -28,10 +28,10 @@ export default class SnapshootShare extends React.Component {
this.shareImage = this.shareImage.bind(this);
}
shareImage(index){
shareImage(shareType){
ReactNative.takeSnapshot(this.refs.container, {format: 'png', quality: 10}).then(
(uri) => {
this.props.shareSnapshootAction && this.props.shareSnapshootAction(index,uri);
this.props.shareSnapshootAction && this.props.shareSnapshootAction(shareType,uri);
}).catch(
(error) => {
Alert.alert('图片生成失败!')
... ... @@ -129,13 +129,13 @@ export default class SnapshootShare extends React.Component {
<View style={styles.shareView}>
<View style={styles.buttons}>
<TouchableOpacity activeOpacity={0.5} style={styles.button1} onPress={() => {
this.shareImage && this.shareImage(0);
this.shareImage && this.shareImage('WXSceneSession');
}}>
<Image source={require('../images/weixin.png')} style={styles.icon} />
<Text style={styles.text}>微信好友</Text>
</TouchableOpacity>
<TouchableOpacity activeOpacity={0.5} style={styles.button2} onPress={() => {
this.shareImage && this.shareImage(1);
this.shareImage && this.shareImage('WXSceneTimeline');
}}>
<Image source={require('../images/share_timeline_icon.png')} style={styles.icon} />
<Text style={styles.text}>微信朋友圈</Text>
... ... @@ -166,6 +166,7 @@ const DEVICE_WIDTH_RATIO = width / 375;
let styles = StyleSheet.create({
modalContainer: {
flex: 1,
width: width,
height: height,
},
... ...
... ... @@ -55,6 +55,12 @@ class GroupPurchaseContainer extends Component {
}
_didTouchBanner(url) {
let params = {
URL: url,
};
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_GROUP_LIST_BANNER_C', params);
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
... ...
... ... @@ -81,9 +81,10 @@ class GroupPurchaseDetailContainer extends Component {
}
}
shareSnapshootAction(index,url) {
shareSnapshootAction(shareType,url) {
let param = {
index,
shareType,
imageUrl: url,
}
... ... @@ -163,8 +164,6 @@ class GroupPurchaseDetailContainer extends Component {
}
let qrCode = host + '/wechat/miniapp/img-check.jpg?param=' + encodeURIComponent(JSON.stringify(param)) + '&miniQrType=4';
console.log(qrCode);
console.log('qrCode');
return (
<View style={styles.container}>
... ...
... ... @@ -67,11 +67,7 @@ export function fetchResourceInfo() {
return (dispatch, getState) => {
let {app} = getState();
dispatch(resourceInfoRequest());
let content_code = 'f99fa98a01fdadb09012bbd2b4a28e91';
if(app.host == 'http://api.yoho.cn'){
content_code = 'ab4ca2161bada40fe7335dce51b8e196';
}
let content_code = 'ab4ca2161bada40fe7335dce51b8e196';//测试:f99fa98a01fdadb09012bbd2b4a28e91
return new GroupPurchaseService(app.host).fetchResourceInfo(content_code)
.then(json => {
dispatch(resourceInfoSuccess(json));
... ...