ContactsInfoMobile.js
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React from 'react';
import { connect } from 'dva';
import ContactsInfoMobileComponent from '../../../mobile/common/ContactsInfoMobile';
import * as commonUtils from '../../../utils/utils';
function ContactsInfoMobile({
dispatch, app, content, location, sModelsId, sModelType,
}) {
function removePane(changePanes, currentPane) {
dispatch({ type: 'app/removePane', payload: { changePanes, currentPane } });
}
// const sParam = JSON.parse(location.state.sParam);
let sParam = {};
if (location.state.sParam) {
sParam = commonUtils.convertStrToObj(location.state.sParam);
} else {
sParam = commonUtils.convertStrToObj(location.state);
}
const ContactsInfoMobileProps = {
app,
content,
dispatch,
sModelsId,
sModelType,
personPic: sParam.personPic,
formRoute: '/contactsInfo',
peopleInfosId: sParam.sId,
peopleInfoData: sParam.slaveData,
onRemovePane: removePane,
};
return (
<ContactsInfoMobileComponent {...ContactsInfoMobileProps} />
);
}
export default connect(({ routing, app, content }) =>
({ routing, app, content }))(ContactsInfoMobile);