index.jsx 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import { useState } from 'react'
  2. import Taro from '@tarojs/taro'
  3. import { Image, Block } from '@tarojs/components'
  4. import { getImgURL } from '@/utils/image'
  5. import '@/assets/css/iconfont.css'
  6. import './index.scss'
  7. export default function SubmitBuyHouseResult (props) {
  8. const { List = [], setting } = props
  9. const handlePhone = () => {
  10. if (!setting?.phone) {
  11. Taro.showToast({
  12. title: '暂不提供相关服务',
  13. icon: 'none',
  14. })
  15. }
  16. Taro.makePhoneCall({
  17. phoneNumber: setting.phone,
  18. })
  19. }
  20. return (
  21. <view className='components SubmitBuyHouseResult'>
  22. <view className='centerLabel'>
  23. <view>
  24. <view>
  25. <view className='Status'>
  26. <text className='iconfont icon-gou'></text>
  27. <text>提交成功</text>
  28. </view>
  29. <view className='Tips'>
  30. <text>已接收到您的需求我们预计将在48小时内联系您!</text>
  31. <text>客服工作时间为周一至周五9:00-17:00</text>
  32. <text>请保持电话畅通;谢谢!</text>
  33. </view>
  34. <view className='Btn flex-h'>
  35. <button className='flex-item' openType='contact'>一键咨询</button>
  36. <text className='flex-item active' onClick={handlePhone}>一键电话</text>
  37. </view>
  38. {/* 匹配楼盘 */}
  39. {
  40. !!List.length &&
  41. <view className='Recommend'>
  42. <view className='Title'>
  43. <view>
  44. <text>匹配楼盘</text>
  45. </view>
  46. </view>
  47. {
  48. List.slice(0, 1).map((item, index) => (
  49. <Block key={`ListItem-${index}`}>
  50. {/* <view className='PlanTitle'>“方案一”</view> */}
  51. <view className='RecommendBuildingItem' onClick={() => {Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${item.buildingId}` })}}>
  52. <view>
  53. <view className='Img'>
  54. <Image mode='aspectFill' src={getImgURL(item.poster || item.preSalePermit)} className='centerLabel'></Image>
  55. </view>
  56. <view className='Title flex-h'>
  57. <view className='flex-item'>
  58. <text>{item.name}</text>
  59. </view>
  60. <view className='Price'><text>{item.price}</text></view>
  61. </view>
  62. <text className='Address'>{item.address}</text>
  63. </view>
  64. </view>
  65. </Block>
  66. ))
  67. }
  68. </view>
  69. }
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. )
  75. }