230320a303 1 month ago
parent
commit
0f12a018df

+ 25 - 13
src/components/chat/com.jsx

@@ -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>
     )
   }

+ 3 - 1
src/pagesHouse/indexDtl.jsx

@@ -538,9 +538,11 @@ class Index extends Component {
     const productTypeArr = product_type.split(',').map(v => {
       return arrToObj(dictData.product_type)[v]
     })
+    const { userInfo } = this.state
+    const uInfo = userInfo || Taro.getStorageSync('APP_userInfo')
     return (
       <View className="dtl-options">
-        {this.renderQrcode()}
+        { uInfo && uInfo.is_sale == 1 ?  '' : this.renderQrcode()}
         <View className="do-title">
           <View className="t">基本信息</View>
           <Navigator url={'/pagesHouse/indexDtlMore?id=' + curId + '&name=' + curObj.estate_name} className="r">更多楼盘详细信息{' >'}</Navigator>

+ 2 - 1
src/pagesHouse/indexDtlMore.jsx

@@ -191,9 +191,10 @@ class Index extends Component {
     const productTypeArr = product_type.split(',').map(v => {
       return arrToObj(dictData.product_type)[v]
     })
+    const uInfo = Taro.getStorageSync('APP_userInfo')
     return (
       <View className="dtl-options">
-        {this.renderQrcode()}
+        { uInfo && uInfo.is_sale == 1 ?  '' : this.renderQrcode()}
         <View className="do-title">
           <View className="t">楼盘详细信息</View>
         </View>

+ 7 - 1
src/pagesHouse/pkDtl.jsx

@@ -72,10 +72,16 @@ class Index extends Component {
   renderTop () {
     const bg = require('./img/pk/bg.jpg')
     const { pkArr } = this.state
+    const uInfo = Taro.getStorageSync('APP_userInfo')
     return (
       <View className="pk-header">
         <View className="scoped-bg" onClick={this.previewQrcodeImageHandle.bind(this)}>
-          <Image src={bg} className="bg" />
+          {
+            uInfo && uInfo.is_sale == 1
+            ? ''
+            : 
+            <Image src={bg} className="bg" />
+          }
         </View>
         <View className="ph-main">  
           {

+ 2 - 1
src/pagesMore/news/tpDtl.jsx

@@ -77,13 +77,14 @@ class Index extends Component {
   renderOptionsInfo () {
     const dictData = Taro.getStorageSync('dictData')
     const { curObj } = this.state
+    const uInfo = Taro.getStorageSync('APP_userInfo')
     return (
       <View className="tp-dtl">
         <View className="td-title">
           <View className="t">土拍详细信息</View>
         </View>
         <View className="td-item">
-          {this.renderQrcode()}
+          { uInfo && uInfo.is_sale == 1 ?  '' : this.renderQrcode()}
           <View className="td-p">
             <View className="k">地块编号</View>
             <View className="v">{curObj.no}</View>

+ 2 - 1
src/pagesRoom/rentdtl.jsx

@@ -163,9 +163,10 @@ class Index extends Component {
       let arr = curObj.house_type.split('-')
       houseTypeStr = `${arr[0]}室${arr[1]}厅${arr[2]}卫`
     }
+    const uInfo = Taro.getStorageSync('APP_userInfo')
     return (
       <View className="scoped-main">
-        {this.renderQrcode()}
+        { uInfo && uInfo.is_sale == 1 ?  '' : this.renderQrcode()}
         <View className="sm-tags">
           {
             tagArr.map((tag, tI) => {