house.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <template>
  2. <view class="product">
  3. <view class="product-item" @click="godetails">
  4. <view class="product-box">
  5. <view class="product-img">
  6. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  7. <view class="floor">
  8. <view class="floor-box">
  9. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  10. 1号楼-一层
  11. </view>
  12. </view>
  13. </view>
  14. <view class="product-info">
  15. <view class="title"><text>房源名称</text></view>
  16. <view class="other">
  17. <text>120m²</text>
  18. <text class="line">|</text>
  19. <text>标签1</text>
  20. <text class="line">|</text>
  21. <text>标签2</text>
  22. </view>
  23. <view class="price">
  24. <view class="price-box">
  25. <text>120</text>
  26. <view class="price-text">元/月</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="product-item" @click="godetails">
  33. <view class="product-box">
  34. <view class="product-img">
  35. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  36. <view class="floor">
  37. <view class="floor-box">
  38. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  39. 1号楼-一层
  40. </view>
  41. </view>
  42. </view>
  43. <view class="product-info">
  44. <view class="title"><text>房源名称</text></view>
  45. <view class="other">
  46. <text>120m²</text>
  47. <text class="line">|</text>
  48. <text>标签1</text>
  49. <text class="line">|</text>
  50. <text>标签2</text>
  51. </view>
  52. <view class="price">
  53. <view class="price-box">
  54. <text>120</text>
  55. <view class="price-text">元/月</view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="product-item" @click="godetails">
  62. <view class="product-box">
  63. <view class="product-img">
  64. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  65. <view class="floor">
  66. <view class="floor-box">
  67. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  68. 1号楼-一层
  69. </view>
  70. </view>
  71. </view>
  72. <view class="product-info">
  73. <view class="title"><text>房源名称</text></view>
  74. <view class="other">
  75. <text>120m²</text>
  76. <text class="line">|</text>
  77. <text>标签1</text>
  78. <text class="line">|</text>
  79. <text>标签2</text>
  80. </view>
  81. <view class="price">
  82. <view class="price-box">
  83. <text>120</text>
  84. <view class="price-text">元/月</view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="product-item" @click="godetails">
  91. <view class="product-box">
  92. <view class="product-img">
  93. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  94. <view class="floor">
  95. <view class="floor-box">
  96. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  97. 1号楼-一层
  98. </view>
  99. </view>
  100. </view>
  101. <view class="product-info">
  102. <view class="title"><text>房源名称</text></view>
  103. <view class="other">
  104. <text>120m²</text>
  105. <text class="line">|</text>
  106. <text>标签1</text>
  107. <text class="line">|</text>
  108. <text>标签2</text>
  109. </view>
  110. <view class="price">
  111. <view class="price-box">
  112. <text>120</text>
  113. <view class="price-text">元/月</view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="product-item" @click="godetails">
  120. <view class="product-box">
  121. <view class="product-img">
  122. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  123. <view class="floor">
  124. <view class="floor-box">
  125. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  126. 1号楼-一层
  127. </view>
  128. </view>
  129. </view>
  130. <view class="product-info">
  131. <view class="title"><text>房源名称</text></view>
  132. <view class="other">
  133. <text>120m²</text>
  134. <text class="line">|</text>
  135. <text>标签1</text>
  136. <text class="line">|</text>
  137. <text>标签2</text>
  138. </view>
  139. <view class="price">
  140. <view class="price-box">
  141. <text>120</text>
  142. <view class="price-text">元/月</view>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. <view class="product-item" @click="godetails">
  149. <view class="product-box">
  150. <view class="product-img">
  151. <image src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5" mode="aspectFill"></image>
  152. <view class="floor">
  153. <view class="floor-box">
  154. <uni-icons type="location" color="#fff" size="12"></uni-icons>
  155. 1号楼-一层
  156. </view>
  157. </view>
  158. </view>
  159. <view class="product-info">
  160. <view class="title"><text>房源名称</text></view>
  161. <view class="other">
  162. <text>120m²</text>
  163. <text class="line">|</text>
  164. <text>标签1</text>
  165. <text class="line">|</text>
  166. <text>标签2</text>
  167. </view>
  168. <view class="price">
  169. <view class="price-box">
  170. <text>120</text>
  171. <view class="price-text">元/月</view>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. </template>
  179. <script>
  180. export default {
  181. name: "house",
  182. data() {
  183. return {
  184. productList: []
  185. };
  186. },
  187. methods: {
  188. // 详情
  189. godetails() {
  190. uni.navigateTo({
  191. url: '/pages/houseDetail/houseDetail'
  192. })
  193. },
  194. }
  195. }
  196. </script>
  197. <style lang="scss">
  198. .product {
  199. display: flex;
  200. flex-wrap: wrap;
  201. margin-top: 30rpx;
  202. padding-bottom: 60rpx;
  203. .product-item {
  204. width: 50%;
  205. box-sizing: border-box;
  206. margin-bottom: 30rpx;
  207. }
  208. .product-item:nth-child(2n-1) {
  209. padding-right: 16rpx;
  210. }
  211. .product-item:nth-child(2n) {
  212. padding-left: 16rpx;
  213. }
  214. .product-box {
  215. background: #FFFFFF;
  216. border-radius: 16rpx;
  217. overflow: hidden;
  218. }
  219. .product-img {
  220. position: relative;
  221. }
  222. .product-img image {
  223. width: 100%;
  224. height: 260rpx !important;
  225. }
  226. .floor {
  227. position: absolute;
  228. left: 0;
  229. bottom: 20rpx;
  230. width: 100%;
  231. color: #FFFFFF;
  232. font-size: 24rpx;
  233. }
  234. .floor-box {
  235. display: block;
  236. overflow: hidden;
  237. word-break: keep-all;
  238. white-space: nowrap;
  239. text-overflow: ellipsis;
  240. padding: 0 10rpx;
  241. display: flex;
  242. align-items: center;
  243. }
  244. .floor .iconfont {
  245. color: #FFFFFF;
  246. font-size: 24rpx;
  247. display: inline-block;
  248. margin-right: 4rpx;
  249. }
  250. .product-info {
  251. padding: 10rpx 0 20rpx 0;
  252. .title {
  253. font-size: 28rpx;
  254. padding: 0 20rpx;
  255. }
  256. .other {
  257. display: flex;
  258. padding-top: 10rpx;
  259. padding-left: 20rpx;
  260. color: #aaa;
  261. text {
  262. font-size: 24rpx;
  263. }
  264. .line {
  265. margin: 0 10rpx;
  266. }
  267. }
  268. .price {
  269. display: flex;
  270. align-items: center;
  271. padding-top: 6rpx;
  272. color: red;
  273. padding-left: 20rpx;
  274. }
  275. .price-box {
  276. flex: 1;
  277. }
  278. .price-box text {
  279. font-weight: bold;
  280. font-size: 30rpx;
  281. }
  282. .price-box .price-text {
  283. display: inline-block;
  284. font-size: 24rpx;
  285. scale: 0.9;
  286. }
  287. }
  288. }
  289. </style>