|
@@ -53,7 +53,7 @@ class MsgComponent extends React.Component {
|
|
|
imgSelect: "",
|
|
|
mediaId: "",
|
|
|
mouseOver: false,
|
|
|
- chooseKey: "",
|
|
|
+ chooseKey: "text",
|
|
|
mediaIdText: mediaIdText,
|
|
|
mediaIdNews: mediaIdNews,
|
|
|
mediaIdMini: mediaIdMini,
|
|
@@ -320,7 +320,7 @@ class MsgComponent extends React.Component {
|
|
|
};
|
|
|
componentDidMount() {
|
|
|
let self = this;
|
|
|
- self.setState({ chooseKey: self.props.chooseKey, _ID: self.props.mediaId }, () => { self.loadImgs() });
|
|
|
+ self.setState({ chooseKey: self.props.chooseKey != null ? self.props.chooseKey : "text" , _ID: self.props.mediaId }, () => { self.loadImgs() });
|
|
|
//隐藏表情弹框
|
|
|
document.addEventListener('click', () => {
|
|
|
self.setState({
|
|
@@ -333,7 +333,7 @@ class MsgComponent extends React.Component {
|
|
|
// 默认选中
|
|
|
if (nextProps.selectKeys == nextProps.tabIndex && !nextProps.type) {
|
|
|
this.setState({
|
|
|
- chooseKey: nextProps.chooseKey,
|
|
|
+ chooseKey:nextProps.chooseKey? nextProps.chooseKey :"text",
|
|
|
})
|
|
|
if (nextProps.mediaId || nextProps.thumbMediaId) {
|
|
|
this.setState({
|
|
@@ -400,6 +400,7 @@ class MsgComponent extends React.Component {
|
|
|
|
|
|
//添加粉丝昵称
|
|
|
addfansName = () => {
|
|
|
+ console.log(this.state.chooseKey,'chooseKey');
|
|
|
if (this.state.chooseKey == 'text') {
|
|
|
let existContent = this.props.form.getFieldValue('content') ? this.props.form.getFieldValue('content') : "";
|
|
|
this.props.form.setFieldsValue({ content: existContent + '|$fansName$|' });
|