houses-info.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <template>
  2. <view class="houses-info">
  3. <view class="index-bg"></view>
  4. <view class="swiper-box">
  5. <u-swiper :list="swiperlisi" height="367" border-radius="20"></u-swiper>
  6. </view>
  7. <view class="houses-tabs u-flex u-row-between">
  8. <view class="tabs-item u-flex-col u-col-center" @click="showdijia = true">
  9. <image src="../../static/images/tabs1.png" mode=""></image>
  10. <text>底价详情</text>
  11. </view>
  12. <!-- <view class="tabs-item u-flex-col u-col-center" @click="torizhao">
  13. <image src="../../static/images/tabs2.png" mode=""></image>
  14. <text>日照测评</text>
  15. </view> -->
  16. <view class="tabs-item u-flex-col u-col-center" @click="toyifang">
  17. <image src="../../static/images/tabs3.png" mode=""></image>
  18. <text>一房一价</text>
  19. </view>
  20. <view class="tabs-item u-flex-col u-col-center" @click="tovideo">
  21. <image src="../../static/images/tabs4.png" mode=""></image>
  22. <text>抖音视频</text>
  23. </view>
  24. </view>
  25. <view class="houses-box">
  26. <view class="box-header u-flex u-row-between">
  27. <text>{{detail.name}}</text>
  28. <text @click="toinfo()">详情>></text>
  29. </view>
  30. <view class="box-tips">
  31. 备案名:{{detail.record_name}}
  32. </view>
  33. <view class="u-flex price">
  34. <text>参考均价</text>
  35. <text>{{detail.avg_price}}/㎡</text>
  36. </view>
  37. <view class="houses-data u-flex u-flex-wrap">
  38. <view class="data-item u-flex-col">
  39. <text>{{detail.floor_area}}</text>
  40. <text>占地面积</text>
  41. </view>
  42. <view class="data-item u-flex-col">
  43. <text>{{detail.covered_area}}</text>
  44. <text>总建筑面积</text>
  45. </view>
  46. <view class="data-item u-flex-col">
  47. <text>{{detail.house_min_area}}㎡-{{detail.house_max_area}}㎡</text>
  48. <text>户型面积</text>
  49. </view>
  50. <view class="data-item u-flex-col">
  51. <text>{{detail.greening_rate}}</text>
  52. <text>绿化率</text>
  53. </view>
  54. <view class="data-item u-flex-col">
  55. <text>{{detail.plot_ratio}}</text>
  56. <text>容积率</text>
  57. </view>
  58. </view>
  59. <view class="houses-label u-flex u-flex-wrap">
  60. <text v-for="(item,inde) in detail.trait" :key="index">{{item}}</text>
  61. </view>
  62. <view class="kaifa-box">
  63. <view style="margin-bottom: 24rpx;">开盘日期: {{detail.sale_time}}</view>
  64. <view>开发商: {{detail.developers}}</view>
  65. </view>
  66. </view>
  67. <view class="address-box u-flex">
  68. <u-icon name="map-fill" color="#131415"></u-icon>
  69. <text class="text">{{detail.project_address}}</text>
  70. </view>
  71. <view class="map-box" v-if="detail.latitude && detail.longitude">
  72. <view class="map-title">
  73. 区域地图
  74. </view>
  75. <map @click="tomap" style="width: 100%;height: 376rpx;" :latitude="latitude" :longitude="longitude" :markers="[{id:1,latitude:latitude,longitude:longitude,width:20,height:30}]"></map>
  76. </view>
  77. <view class="huxing-box" v-if="detail.house_type.length > 0">
  78. <view class="huixng-title">
  79. 在售户型
  80. </view>
  81. <view class="scroll-box1" style="position: relative;">
  82. <u-icon name="arrow-left" style="position: absolute;top: 100rpx;left: -20rpx;z-index: 1;"></u-icon>
  83. <scroll-view scroll-x="true" class="huxing-list">
  84. <view class="huxing-item" v-for="(item,index) in detail.house_type" :key="index">
  85. <image :src="item.logo" @click="openimg(item)" class="huxing-img" mode=""></image>
  86. <view class="name">
  87. {{item.house_type_name}}
  88. </view>
  89. <view class="jianyi">
  90. 建面:约{{item.area}}㎡
  91. </view>
  92. </view>
  93. </scroll-view>
  94. <u-icon name="arrow-right" style="position: absolute;top: 100rpx;right: -20rpx;z-index: 1;"></u-icon>
  95. </view>
  96. </view>
  97. <view class="" style="height: 170rpx;"></view>
  98. <view class="houses-btn u-flex u-row-between">
  99. <text @click="opentel">隐私电话</text>
  100. <text @click="tochat">在线咨询</text>
  101. </view>
  102. <u-popup v-model="showdijia" mode="center" background="rgba(0,0,0,0)">
  103. <view class="dijia-box u-flex-col u-col-center">
  104. <image class="dijia-img" src="../../static/images/dijia-bg.png" mode=""></image>
  105. <view class="u-flex-col u-col-center dijia-text">
  106. <text>{{detail.discounts_policy}}</text>
  107. </view>
  108. <u-icon name="close-circle-fill" color="#fff" size="100" @click="showdijia = false"></u-icon>
  109. </view>
  110. </u-popup>
  111. <u-popup v-model="showtocall" mode="center" background="rgba(0,0,0,0)">
  112. <view class="tocall-box u-flex-col u-col-center">
  113. <image class="tocall-img" src="../../static/images/popup1-1.png" mode=""></image>
  114. <view class="u-flex-col u-col-center tocall-text">您是否进行呼叫?</view>
  115. <view class="u-flex u-row-between tocall-btn">
  116. <text @click="showtocall = false">取消</text>
  117. <text @click="totel">确定</text>
  118. </view>
  119. </view>
  120. </u-popup>
  121. <u-popup v-model="showlogin" mode="center" background="rgba(0,0,0,0)">
  122. <view class="tocall-box u-flex-col u-col-center">
  123. <image class="tocall-img" src="../../static/images/popup1-1.png" mode=""></image>
  124. <view class="u-flex-col u-col-center tocall-text">你目前处于未登录状态请前往登录</view>
  125. <view class="u-flex u-row-between tocall-btn">
  126. <text @click="showlogin = false">取消</text>
  127. <text @click="tologin">确定</text>
  128. </view>
  129. </view>
  130. </u-popup>
  131. </view>
  132. </template>
  133. <script>
  134. export default {
  135. data() {
  136. return {
  137. swiperlisi: [],
  138. showdijia: false,
  139. showtocall: false,
  140. id: '',
  141. detail: {
  142. house_type: []
  143. },
  144. showlogin: false
  145. }
  146. },
  147. onLoad(option) {
  148. this.id = option.id
  149. this.getdata()
  150. },
  151. computed: {
  152. latitude() {
  153. return Number(this.detail.latitude) > Number(this.detail.longitude) ? this.detail.longitude : this.detail.latitude
  154. },
  155. longitude() {
  156. return Number(this.detail.latitude) > Number(this.detail.longitude) ? this.detail.latitude : this.detail.longitude
  157. }
  158. },
  159. methods: {
  160. tomap() {
  161. uni.openLocation({
  162. latitude: Number(this.detail.latitude),
  163. longitude: Number(this.detail.longitude)
  164. })
  165. },
  166. openimg(item) {
  167. uni.previewImage({
  168. urls: [item.logo]
  169. })
  170. },
  171. tologin() {
  172. uni.switchTab({
  173. url: "/pages/mine/mine"
  174. })
  175. },
  176. opentel() {
  177. if (uni.getStorageSync("token")) {
  178. this.showtocall = true
  179. } else {
  180. this.showlogin = true
  181. }
  182. },
  183. getdata() {
  184. this.$u.post('/api/Property/property_detail', {
  185. id: this.id
  186. }).then(res => {
  187. this.swiperlisi = res.data.banner
  188. this.detail = res.data
  189. })
  190. },
  191. tovideo() {
  192. uni.navigateTo({
  193. url: "./video?id=" + this.id
  194. })
  195. },
  196. toinfo() {
  197. uni.navigateTo({
  198. url: "./info?id=" + this.id
  199. })
  200. },
  201. tochat() {
  202. if (uni.getStorageSync("token")) {
  203. this.$u.post('/api/Member/consult_record', {
  204. type: 2
  205. })
  206. uni.navigateTo({
  207. url: "./chat?hx_username=" + this.detail.hx_username + "&worker_id=" + this.detail.worker_id
  208. })
  209. } else {
  210. this.showlogin = true
  211. }
  212. },
  213. toyifang() {
  214. uni.navigateTo({
  215. url: "/pages/h5/yifang?id=" + this.id
  216. })
  217. },
  218. torizhao() {
  219. uni.navigateTo({
  220. url: "/pages/h5/rizhao?id=" + this.id
  221. })
  222. },
  223. totel() {
  224. if (uni.getStorageSync("token")) {
  225. this.$u.post('/api/Member/consult_record', {
  226. type: 1
  227. })
  228. uni.makePhoneCall({
  229. phoneNumber: this.detail.privacy_phone
  230. })
  231. } else {
  232. this.showlogin = true
  233. }
  234. }
  235. }
  236. }
  237. </script>
  238. <style lang="scss">
  239. page {
  240. background-color: #F6F6F6;
  241. }
  242. .houses-info {
  243. position: relative;
  244. padding: 1rpx 0;
  245. .tocall-box {
  246. position: relative;
  247. .tocall-img {
  248. width: 650rpx;
  249. height: 476rpx;
  250. }
  251. .tocall-btn {
  252. position: absolute;
  253. bottom: 70rpx;
  254. left: 0;
  255. width: 100%;
  256. padding: 0 48rpx;
  257. text:first-child {
  258. width: 254rpx;
  259. line-height: 80rpx;
  260. background: #FFA120;
  261. border-radius: 20rpx;
  262. text-align: center;
  263. font-size: 34rpx;
  264. font-family: PingFangSC-Medium, PingFang SC;
  265. font-weight: 500;
  266. color: #FFFFFF;
  267. }
  268. text:last-child {
  269. width: 254rpx;
  270. line-height: 80rpx;
  271. background: #1F7EFF;
  272. border-radius: 20rpx;
  273. text-align: center;
  274. font-size: 34rpx;
  275. font-family: PingFangSC-Medium, PingFang SC;
  276. font-weight: 500;
  277. color: #FFFFFF;
  278. }
  279. }
  280. .tocall-text {
  281. text-align: center;
  282. font-size: 24rpx;
  283. font-family: PingFangSC-Regular, PingFang SC;
  284. font-weight: 400;
  285. color: #999999;
  286. position: absolute;
  287. top: 244rpx;
  288. left: 0;
  289. z-index: 10;
  290. width: 100%;
  291. }
  292. }
  293. .dijia-box {
  294. position: relative;
  295. .dijia-text {
  296. position: absolute;
  297. z-index: 10;
  298. top: 120rpx;
  299. left: 0;
  300. width: 100%;
  301. font-size: 28rpx;
  302. font-family: PingFangSC-Medium, PingFang SC;
  303. font-weight: 500;
  304. color: #EC9234;
  305. padding: 0 150rpx;
  306. }
  307. .dijia-img {
  308. width: 650rpx;
  309. height: 520rpx;
  310. margin-bottom: 52rpx;
  311. }
  312. }
  313. .houses-btn {
  314. position: fixed;
  315. bottom: 0;
  316. left: 0;
  317. width: 750rpx;
  318. height: 166rpx;
  319. background: #FFFFFF;
  320. padding: 0 24rpx 54rpx 24rpx;
  321. z-index: 1;
  322. text:first-child {
  323. width: 338rpx;
  324. line-height: 84rpx;
  325. background: #FFA120;
  326. border-radius: 20rpx;
  327. text-align: center;
  328. font-size: 28rpx;
  329. font-family: PingFangSC-Regular, PingFang SC;
  330. font-weight: 400;
  331. color: #FFFFFF;
  332. }
  333. text:last-child {
  334. width: 338rpx;
  335. line-height: 84rpx;
  336. background: #1F7EFF;
  337. border-radius: 20rpx;
  338. text-align: center;
  339. font-size: 28rpx;
  340. font-family: PingFangSC-Regular, PingFang SC;
  341. font-weight: 400;
  342. color: #FFFFFF;
  343. }
  344. }
  345. .huxing-box {
  346. width: 702rpx;
  347. // height: 450rpx;
  348. background: #FFFFFF;
  349. border-radius: 20rpx;
  350. margin: 20rpx auto;
  351. padding: 0 20rpx 30rpx 20rpx;
  352. .huxing-list {
  353. white-space: nowrap;
  354. .huxing-item {
  355. margin-right: 20rpx;
  356. display: inline-block;
  357. .jianyi {
  358. font-size: 24rpx;
  359. font-family: PingFangSC-Regular, PingFang SC;
  360. font-weight: 400;
  361. color: #999999;
  362. }
  363. .name {
  364. margin: 24rpx 0 10rpx 0;
  365. font-size: 24rpx;
  366. font-family: PingFangSC-Medium, PingFang SC;
  367. font-weight: 500;
  368. color: #333333;
  369. }
  370. .huxing-img {
  371. width: 206rpx;
  372. height: 206rpx;
  373. }
  374. }
  375. }
  376. .huixng-title {
  377. padding: 24rpx 0;
  378. font-size: 28rpx;
  379. font-family: PingFangSC-Medium, PingFang SC;
  380. font-weight: 500;
  381. color: #131415;
  382. }
  383. }
  384. .map-box {
  385. width: 702rpx;
  386. background: #FFFFFF;
  387. border-radius: 20rpx;
  388. margin: 20rpx auto;
  389. padding: 0 20rpx 24rpx 20rpx;
  390. .map-title {
  391. padding: 24rpx 0;
  392. font-size: 28rpx;
  393. font-family: PingFangSC-Medium, PingFang SC;
  394. font-weight: 500;
  395. color: #131415;
  396. }
  397. }
  398. .address-box {
  399. width: 702rpx;
  400. height: 82rpx;
  401. background: #FFFFFF;
  402. border-radius: 20rpx;
  403. margin: 20rpx auto;
  404. padding: 0 22rpx;
  405. .text {
  406. flex: 1;
  407. margin-left: 10rpx;
  408. font-size: 24rpx;
  409. font-family: PingFangSC-Regular, PingFang SC;
  410. font-weight: 400;
  411. color: #131415;
  412. }
  413. }
  414. .houses-box {
  415. width: 702rpx;
  416. height: 594rpx;
  417. background: #FFFFFF;
  418. border-radius: 20rpx;
  419. margin: 20rpx auto;
  420. padding: 0 20rpx;
  421. .kaifa-box {
  422. padding: 24rpx 20rpx;
  423. background: #F5F5F5;
  424. border-radius: 20rpx;
  425. view {
  426. font-size: 24rpx;
  427. font-family: PingFangSC-Regular, PingFang SC;
  428. font-weight: 400;
  429. color: #666666;
  430. }
  431. }
  432. .houses-label {
  433. padding: 24rpx 0 14rpx 0;
  434. text {
  435. line-height: 40rpx;
  436. background: #F5F5F5;
  437. border-radius: 8rpx;
  438. padding: 0 10rpx;
  439. font-size: 20rpx;
  440. font-family: PingFangSC-Regular, PingFang SC;
  441. font-weight: 400;
  442. color: #999999;
  443. margin-right: 10rpx;
  444. margin-bottom: 10rpx;
  445. }
  446. }
  447. .houses-data {
  448. padding: 20rpx 0;
  449. // height: 126rpx;
  450. border-bottom: 2rpx solid #F5F5F5;
  451. .data-item {
  452. // width: 134rpx;
  453. // flex: 1;
  454. margin-right: 22rpx;
  455. // margin-right: 10rpx;
  456. text:first-child {
  457. font-size: 30rpx;
  458. font-family: PingFangSC-Medium, PingFang SC;
  459. font-weight: 500;
  460. color: #131415;
  461. margin-bottom: 8rpx;
  462. white-space: nowrap;
  463. }
  464. text:last-child {
  465. font-size: 18rpx;
  466. font-family: PingFangSC-Regular, PingFang SC;
  467. font-weight: 400;
  468. color: #999999;
  469. }
  470. }
  471. .data-item:last-child {
  472. margin-right: 0;
  473. }
  474. }
  475. .price {
  476. padding-bottom: 24rpx;
  477. border-bottom: 2rpx solid #F5F5F5;
  478. text:first-child {
  479. font-size: 20rpx;
  480. font-family: PingFangSC-Regular, PingFang SC;
  481. font-weight: 400;
  482. color: #999999;
  483. margin-right: 8rpx;
  484. }
  485. text:last-child {
  486. font-size: 32rpx;
  487. font-family: DINAlternate-Bold, DINAlternate;
  488. font-weight: bold;
  489. color: #FF3B30;
  490. }
  491. }
  492. .box-tips {
  493. font-size: 24rpx;
  494. font-family: PingFangSC-Medium, PingFang SC;
  495. font-weight: 500;
  496. color: #666666;
  497. margin-bottom: 20rpx;
  498. }
  499. .box-header {
  500. padding: 24rpx 0 12rpx 0;
  501. text:first-child {
  502. font-size: 36rpx;
  503. font-family: PingFangSC-Medium, PingFang SC;
  504. font-weight: 500;
  505. color: #131415;
  506. }
  507. text:last-child {
  508. font-size: 24rpx;
  509. font-family: PingFangSC-Regular, PingFang SC;
  510. font-weight: 400;
  511. color: #1F7EFF;
  512. }
  513. }
  514. }
  515. .houses-tabs {
  516. width: 702rpx;
  517. height: 218rpx;
  518. background: #FFFFFF;
  519. border-radius: 20rpx;
  520. margin: 20rpx auto;
  521. .tabs-item {
  522. flex: 1;
  523. image {
  524. width: 84rpx;
  525. height: 84rpx;
  526. margin-bottom: 20rpx;
  527. }
  528. text {
  529. // margin-top: -34rpx;
  530. font-size: 24rpx;
  531. font-family: PingFangSC-Regular, PingFang SC;
  532. font-weight: 400;
  533. color: #131415;
  534. }
  535. }
  536. }
  537. .swiper-box {
  538. width: 702rpx;
  539. margin: 20rpx auto;
  540. }
  541. .index-bg {
  542. position: absolute;
  543. top: 0;
  544. left: 0;
  545. width: 750rpx;
  546. height: 556rpx;
  547. background: linear-gradient(180deg, #1E7DFF 0%, #F6F6F6 100%);
  548. z-index: -1;
  549. }
  550. }
  551. </style>