houseDetail.vue 7.3 KB

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