Authored by Zhu-Arthur

拼团详情页打开时事件

... ... @@ -49,7 +49,10 @@ export default function native(platform) {
} else if (type === 'detail') {
return (
<Provider store={store}>
<GroupPurchaseDetailContainer/>
<GroupPurchaseDetailContainer
FP_NAME={this.props.FP_NAME}
FP_PARAM={this.props.FP_PARAM}
/>
</Provider>
);
}
... ...
... ... @@ -62,7 +62,7 @@ class GroupPurchaseDetailContainer extends Component {
async componentDidMount() {
this.props.actions.getProductList();
this.props.actions.fetchActivityGroupDetail();
this.props.actions.fetchActivityGroupDetail(this.props.FP_NAME, this.props.FP_PARAM);
// this.props.actions.fetchResourceInfo();
}
... ...
... ... @@ -108,7 +108,7 @@ export function activityGroupDetailFailure(error) {
}
}
export function fetchActivityGroupDetail() {
export function fetchActivityGroupDetail(FP_NAME, FP_PARAM) {
return (dispatch, getState) => {
let {app,groupPurchaseDetail} = getState();
let {groupNo} = groupPurchaseDetail;
... ... @@ -117,6 +117,18 @@ export function fetchActivityGroupDetail() {
dispatch(activityGroupDetailRequest());
return new GroupPurchaseService(app.host).fetchActivityGroupDetail(groupNo ,uid)
.then(json => {
try {
let event_params = {
FP_NAME,
FP_PARAM,
PRD_ID: '',
PRD_SKN: json.membershipItems[0].productSkn,
PRD_TYPE: 1,
}
YH_CommonHelper.logEvent('YB_GDS_DT_INFO', event_params);
} catch (e) {
console.log(e);
}
dispatch(activityGroupDetailSuccess(json));
})
.catch(error => {
... ...