import { View } from "@tarojs/components";
import './index.scss'

export default function ContactConsultant(props) {
  const handleChat = () => {
    const { buildingId } = props

    Taro.navigateTo({
      url: `/pages/card/list/index?buildingId=${buildingId}`
    })
  }

  return (
    <View className="contact" style={props.style} onClick={props.contactClick ? props.contactClick : handleChat}>{props.text || '联系置业顾问'}</View>
  )
}
