...
|
...
|
@@ -16,8 +16,10 @@ import { |
|
|
Platform,
|
|
|
TextInput,
|
|
|
Alert,
|
|
|
NativeModules,
|
|
|
} from 'react-native'
|
|
|
import UserBrief from '../home/UserBrief';
|
|
|
import PostingService from '../../services/PostingService';
|
|
|
|
|
|
import SPHeaderCell from './SPHeaderCell';
|
|
|
import SubjectContent from './SubjectContent';
|
...
|
...
|
@@ -182,7 +184,32 @@ export default class SubjectPost extends Component { |
|
|
()=>{
|
|
|
this.cidTo = this.props.authorUid;
|
|
|
this.commentId = '';
|
|
|
this.setState({replyState: this.currentReplyState})
|
|
|
NativeModules.YH_CommunityHelper.uid()
|
|
|
.then(uid => {
|
|
|
new PostingService().getPostUser(uid).then(json => {
|
|
|
if (json.forbidSpeaking === 'Y') {
|
|
|
Alert.alert('抱歉','您暂时被禁言,请等待禁言解除哦~');
|
|
|
} else {
|
|
|
this.setState({replyState: this.currentReplyState});
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.setState({replyState: this.currentReplyState});
|
|
|
})
|
|
|
})
|
|
|
.catch(error => {
|
|
|
NativeModules.YH_CommunityHelper.login()
|
|
|
.then(uid => {
|
|
|
new PostingService().getPostUser(uid).then(json => {
|
|
|
if (json.forbidSpeaking === 'Y') {
|
|
|
Alert.alert('抱歉','您暂时被禁言,请等待禁言解除哦~');
|
|
|
} else {
|
|
|
this.setState({replyState: this.currentReplyState});
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.setState({replyState: this.currentReplyState});
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
>
|
...
|
...
|
@@ -307,7 +334,7 @@ export default class SubjectPost extends Component { |
|
|
break;
|
|
|
case 'content':
|
|
|
return(
|
|
|
<SubjectContent blocks={rowData}/>
|
|
|
<SubjectContent onPressLargeImage={this.props.onPressLargeImage} blocks={rowData}/>
|
|
|
);
|
|
|
break;
|
|
|
case 'shareGoods':
|
...
|
...
|
@@ -336,8 +363,6 @@ export default class SubjectPost extends Component { |
|
|
);
|
|
|
break;
|
|
|
case 'comments':
|
|
|
console.log('.............');
|
|
|
console.log(rowData);
|
|
|
return (
|
|
|
<TouchableOpacity
|
|
|
style={styles.commentContainer}
|
...
|
...
|
@@ -345,7 +370,35 @@ export default class SubjectPost extends Component { |
|
|
()=> {
|
|
|
this.cidTo = rowData.cidTo;
|
|
|
this.commentId = rowData.commentId;
|
|
|
this.replyToSomeOneElse(rowData.nickName);
|
|
|
|
|
|
|
|
|
NativeModules.YH_CommunityHelper.uid()
|
|
|
.then(uid => {
|
|
|
new PostingService().getPostUser(uid).then(json => {
|
|
|
if (json.forbidSpeaking === 'Y') {
|
|
|
Alert.alert('抱歉','您暂时被禁言,请等待禁言解除哦~');
|
|
|
} else {
|
|
|
this.replyToSomeOneElse(rowData.nickName);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.replyToSomeOneElse(rowData.nickName);
|
|
|
})
|
|
|
})
|
|
|
.catch(error => {
|
|
|
NativeModules.YH_CommunityHelper.login()
|
|
|
.then(uid => {
|
|
|
new PostingService().getPostUser(uid).then(json => {
|
|
|
if (json.forbidSpeaking === 'Y') {
|
|
|
Alert.alert('抱歉','您暂时被禁言,请等待禁言解除哦~');
|
|
|
} else {
|
|
|
this.replyToSomeOneElse(rowData.nickName);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.replyToSomeOneElse(rowData.nickName);
|
|
|
})
|
|
|
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
>
|
...
|
...
|
|