|
@@ -7,12 +7,17 @@ export default class Comment extends Component {
|
|
|
this.state = {
|
|
|
otherObj: '',
|
|
|
curObj: {},
|
|
|
+ userInfoObj: {},
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
componentWillMount () {
|
|
|
this.props.onRef(this)
|
|
|
+ const userInfoObj = Taro.getStorageSync('APP_userInfo')
|
|
|
+ this.setState({
|
|
|
+ userInfoObj,
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
getData = (otherObj, str) => {
|
|
@@ -102,21 +107,28 @@ export default class Comment extends Component {
|
|
|
|
|
|
|
|
|
render () {
|
|
|
- const { curObj } = this.state
|
|
|
+ const { curObj, userInfoObj } = this.state
|
|
|
const tagStr = curObj.custom_tag ? curObj.custom_tag.substring(0, 8) : ''
|
|
|
return (
|
|
|
- <View className="scoped-sale">
|
|
|
- <View className="ss-img">
|
|
|
- <Image src={curObj.sale_avatar} className="img"/>
|
|
|
- </View>
|
|
|
- <View className="ss-info">
|
|
|
- <View className="p1">{curObj.sale_name}</View>
|
|
|
- <View className="p2">{tagStr}</View>
|
|
|
- </View>
|
|
|
- <View className="ss-r">
|
|
|
- <View className="b" onClick={this.countHandle.bind(this, 'chat')}>在线问</View>
|
|
|
- <View className="b t2" onClick={this.countHandle.bind(this, 'call')}>打电话</View>
|
|
|
- </View>
|
|
|
+ <View>
|
|
|
+ {
|
|
|
+ userInfoObj.is_sale == 1
|
|
|
+ ? ''
|
|
|
+ :
|
|
|
+ <View className="scoped-sale">
|
|
|
+ <View className="ss-img">
|
|
|
+ <Image src={curObj.sale_avatar} className="img"/>
|
|
|
+ </View>
|
|
|
+ <View className="ss-info">
|
|
|
+ <View className="p1">{curObj.sale_name}</View>
|
|
|
+ <View className="p2">{tagStr}</View>
|
|
|
+ </View>
|
|
|
+ <View className="ss-r">
|
|
|
+ <View className="b" onClick={this.countHandle.bind(this, 'chat')}>在线问</View>
|
|
|
+ <View className="b t2" onClick={this.countHandle.bind(this, 'call')}>打电话</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ }
|
|
|
</View>
|
|
|
)
|
|
|
}
|