123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <template>
- <view class="house-list">
- <view class="house-item" v-for="(item,index) in houseList" :key="index">
- <view class="house-item-box">
- <view class="house-item-img">
- <image :src="item.privewImage" mode="aspectFill"></image>
- <view class="house-item-floor">
- <uni-icons type="location" color="#fff" size="12"></uni-icons>
- <text>{{item.projectItemName}}-{{item.projectItemTargetName}}</text>
- </view>
- </view>
- <view class="house-item-info">
- <view class="house-item-name">{{item.name}}</view>
- <view class="house-item-tag">
- <text v-for="(tag,i) in item.tagList" :key="i">
- <text>{{tag}}</text>
- <text class="line" v-if="i < item.tagList.length-1">|</text>
- </text>
- </view>
- <view class="house-item-price">
- <text>{{item.price}}</text>
- <view class="price-type">{{item.priceType}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'houseList',
- data() {
- return {
- houseList: [{
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }, {
- privewImage: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5',
- projectItemName: '一号楼',
- projectItemTargetName: '一层',
- name: '1602,可短租~',
- tagList: ['标签1', '标签2', '标签3'],
- price: '1200',
- priceType: '元/月'
- }]
- }
- },
- onShow() {
- },
- onLoad() {
- }
- }
- </script>
- <style lang="scss">
- .house-list {
- display: flex;
- flex-wrap: wrap;
- margin-top: 30rpx;
- padding-bottom: 60rpx;
- .house-item {
- width: 50%;
- box-sizing: border-box;
- margin-bottom: 30rpx;
- &:nth-child(2n-1) {
- padding-right: 16rpx;
- }
- &:nth-child(2n) {
- padding-left: 16rpx;
- }
- .house-item-box {
- background: $uni-white;
- border-radius: 16rpx;
- overflow: hidden;
- .house-item-img {
- position: relative;
- image {
- width: 100%;
- height: 260rpx !important;
- }
- }
- .house-item-floor {
- position: absolute;
- left: 0;
- bottom: 20rpx;
- width: 100%;
- color: #FFFFFF;
- font-size: 24rpx;
- display: flex;
- align-items: center;
- padding-left: 10rpx;
- }
- .house-item-info {
- padding: 10rpx 0 20rpx 0;
- .house-item-name {
- font-size: 28rpx;
- padding: 0 20rpx;
- }
- .house-item-tag {
- display: flex;
- padding-top: 10rpx;
- padding-left: 20rpx;
- color: $uni-extra-color;
- text {
- font-size: 24rpx;
- }
- .line {
- margin: 0 10rpx;
- }
- }
- .house-item-price {
- display: flex;
- align-items: center;
- padding-top: 6rpx;
- color: $uni-error;
- padding-left: 20rpx;
- text {
- font-weight: bold;
- font-size: 30rpx;
- }
- .price-type {
- display: inline-block;
- font-size: 24rpx;
- scale: 0.9;
- }
- }
- }
- }
- }
- }
- </style>
|