houseDetail.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <template>
  2. <view class="content">
  3. <view class="position-details">
  4. <!-- 滚动广告图 -->
  5. <view class="banner">
  6. <swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000"
  7. indicator-color="#fff" indicator-active-color="#74e0fa" class="banner-swiper"
  8. @change="swiperchange">
  9. <swiper-item>
  10. <view class="swiper-item" @click="previewImage('https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5')">
  11. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill" class="banner-swiper-img">
  12. </image>
  13. </view>
  14. </swiper-item>
  15. <swiper-item>
  16. <view class="swiper-item" @click="previewImage('https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5')">
  17. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill" class="banner-swiper-img">
  18. </image>
  19. </view>
  20. </swiper-item>
  21. </swiper>
  22. <view class="indicator-dots">
  23. <text>{{current + 1}}/4</text>
  24. </view>
  25. </view>
  26. <view class="info">
  27. <view class="title">name【village_name】</view>
  28. <view class="price">
  29. <view class="price-text">¥</view>
  30. <text>120</text>
  31. <view class="price-text">元/月</view>
  32. </view>
  33. <!-- 房源信息 -->
  34. <view class="information">
  35. <view class="head-tilte">房源信息</view>
  36. <view class="information-list">
  37. <view class="information-box">
  38. <text class="information-title">房型:</text>
  39. <text class="information-text">housing</text>
  40. </view>
  41. <view class="information-box">
  42. <text class="information-title">押付:</text>
  43. <text class="information-text">oshitsuke</text>
  44. </view>
  45. <view class="information-box">
  46. <text class="information-title">楼层:</text>
  47. <text class="information-text">floor楼</text>
  48. </view>
  49. <view class="information-box">
  50. <text class="information-title">朝向:</text>
  51. <text class="information-text">orientation_name</text>
  52. </view>
  53. <view class="information-box">
  54. <text class="information-title">建面:</text>
  55. <text class="information-text">aream²</text>
  56. </view>
  57. <view class="information-box">
  58. <text class="information-title">电梯:</text>
  59. <text class="information-text">elevator</text>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 房屋介绍 -->
  64. <view class="desc">
  65. <view class="head-tilte">房屋介绍</view>
  66. <view class="desc-text"><text>goods_desc</text></view>
  67. </view>
  68. </view>
  69. <!-- 底部按钮 -->
  70. <view class="btn">
  71. <view class="share color01"><text>预约看房</text>
  72. </view>
  73. <view class="share color02"><text>电话咨询</text></view>
  74. <view class="share"><text>留言</text></view>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. export default {
  81. data() {
  82. return {
  83. current: 0,
  84. }
  85. },
  86. methods: {
  87. swiperchange(e) {
  88. this.current = e.detail.current
  89. },
  90. // 去预约
  91. gobook(id, name) {
  92. uni.navigateTo({
  93. url: `/pages/book/book?id=${id}&name=${name}`
  94. })
  95. },
  96. // 拨打电话
  97. isPhoneCall() {
  98. uni.makePhoneCall({
  99. phoneNumber: '10086' //仅为示例
  100. });
  101. },
  102. // 去首页
  103. gohome() {
  104. uni.reLaunch({
  105. url: '/pages/index/index'
  106. })
  107. },
  108. // 预览图片
  109. previewImage(url) {
  110. uni.previewImage({
  111. urls: url,
  112. showmenu: false
  113. })
  114. },
  115. }
  116. }
  117. </script>
  118. <style lang="scss">
  119. .content {
  120. display: flex;
  121. flex-direction: column;
  122. align-items: center;
  123. justify-content: center;
  124. background: #fff;
  125. }
  126. .position-details {
  127. width: 100%;
  128. padding-bottom: 140upx;
  129. }
  130. .banner {
  131. position: relative;
  132. width: 100%;
  133. }
  134. .banner-swiper {
  135. height: 650upx;
  136. }
  137. .banner-swiper-img {
  138. height: 650upx !important;
  139. }
  140. .swiper-item image {
  141. width: 100%;
  142. }
  143. .indicator-dots {
  144. position: absolute;
  145. bottom: 30upx;
  146. left: 0;
  147. right: 0;
  148. display: flex;
  149. justify-content: center;
  150. align-items: center;
  151. }
  152. .indicator-dots text {
  153. font-size: 24upx;
  154. color: #FFFFFF;
  155. background: rgba(0, 0, 0, 0.5);
  156. border-radius: 50upx;
  157. width: 64upx;
  158. text-align: center;
  159. }
  160. /deep/ .uni-swiper-dot {
  161. width: 40upx;
  162. height: 4upx;
  163. border-radius: 20upx;
  164. }
  165. wx-swiper .wx-swiper-dot {
  166. width: 40upx;
  167. height: 4upx;
  168. border-radius: 20upx;
  169. }
  170. .info {
  171. position: relative;
  172. padding: 30upx;
  173. border-top-left-radius: 20upx;
  174. border-top-right-radius: 20upx;
  175. background: #FFFFFF;
  176. margin-top: -20upx;
  177. }
  178. .info .title {
  179. font-size: 38upx;
  180. font-weight: bold;
  181. }
  182. .price {
  183. padding-top: 20upx;
  184. color: red;
  185. }
  186. .price text {
  187. font-size: 40upx;
  188. }
  189. .price .price-text {
  190. display: inline-block;
  191. font-size: 26upx;
  192. scale: 0.8;
  193. }
  194. .information {
  195. padding-top: 30upx;
  196. }
  197. .head-tilte {
  198. font-size: 30upx;
  199. font-weight: bold;
  200. }
  201. .information-list {
  202. display: flex;
  203. flex-wrap: wrap;
  204. padding: 20upx 30upx 0;
  205. }
  206. .information-box {
  207. width: 50%;
  208. display: flex;
  209. padding: 20upx 0;
  210. }
  211. .information-title {
  212. font-size: 26upx;
  213. color: #b4b4b4;
  214. }
  215. .information-text {
  216. font-size: 26upx;
  217. color: #2d2d2d;
  218. }
  219. .arrangement {
  220. padding-top: 30upx;
  221. }
  222. .arrangement-list {
  223. display: flex;
  224. flex-wrap: wrap;
  225. padding: 20upx 0;
  226. }
  227. .arrangement-box {
  228. width: 20%;
  229. padding-top: 20upx;
  230. text-align: center
  231. }
  232. .arrangement-icon {
  233. color: red;
  234. font-size: 64upx;
  235. }
  236. .arrangement-text {
  237. padding-top: 6upx;
  238. font-size: 24upx;
  239. }
  240. .desc {
  241. padding-top: 20upx;
  242. }
  243. .desc-text {
  244. padding: 30upx 30upx 20upx 30upx;
  245. }
  246. .desc-text text {
  247. line-height: 44upx;
  248. font-size: 28upx;
  249. }
  250. .map {
  251. padding: 30upx 0 0 0;
  252. }
  253. .btn {
  254. position: fixed;
  255. bottom: 0;
  256. left: 0;
  257. right: 0;
  258. display: flex;
  259. justify-content: center;
  260. align-items: center;
  261. padding: 20upx 1%;
  262. background: #fff;
  263. }
  264. .share {
  265. flex: 1;
  266. text-align: center;
  267. background: #4a55fd;
  268. border-radius: 8upx;
  269. height: 90upx;
  270. text-align: center;
  271. margin: 0 1%;
  272. display: flex;
  273. justify-content: center;
  274. align-items: center;
  275. }
  276. .share text {
  277. font-size: 26upx;
  278. color: #fff;
  279. }
  280. .share button {
  281. padding: 0;
  282. margin: 0;
  283. color: #fff;
  284. font-size: 26upx;
  285. border-radius: 8upx;
  286. height: 90upx;
  287. background: #4a55fd;
  288. line-height: 90upx;
  289. }
  290. .color01 {
  291. background: linear-gradient(to right, #fea733, #feb34d, #fdc46b);
  292. }
  293. .color02 {
  294. background: linear-gradient(to right, #ff4761, #fe606e, #fc706f);
  295. }
  296. .bnt-box {
  297. position: fixed;
  298. right: 20upx;
  299. bottom: 12%;
  300. button {
  301. display: flex;
  302. justify-content: center;
  303. align-items: center;
  304. padding: 0;
  305. margin: 14upx 0;
  306. width: 76upx;
  307. height: 76upx;
  308. border-radius: 50%;
  309. background: rgba(255, 255, 255, 1);
  310. box-shadow: 0px 2px 4px #e9e9e9;
  311. text {
  312. color: #666666;
  313. }
  314. }
  315. .kefunv {
  316. color: #666666;
  317. font-size: 40upx;
  318. }
  319. }
  320. .recommend-list {
  321. padding: 0 10upx;
  322. }
  323. </style>