zlpt_app/pages/myItem/myItem.vue

199 lines
4.0 KiB
Vue

<template>
<view>
<view class="upper-switch">
<view
:class="[{ active: upperStatus == 1 }]"
@click="switchUpper(1)"
>
待上架({{ waitSaleList.length }})
</view>
<view
:class="[{ active: upperStatus == 2 }]"
@click="switchUpper(2)"
>
待审核
</view>
<view
:class="[{ active: upperStatus == 3 }]"
@click="switchUpper(3)"
>
待租赁
</view>
<view
:class="[{ active: upperStatus == 4 }]"
@click="switchUpper(4)"
>
租赁中
</view>
</view>
<view
class="wait-sale"
v-show="upperStatus == 1"
v-for="(waitsale, index) in waitSaleList"
:key="index"
>
<view class="upper">
<view class="upper-lef">
<image :src="waitsale.pic" mode=""></image>
</view>
<view class="upper-rig">
<view class="rig-name">{{ waitsale.name }}</view>
<view class="rig-pay">
<text>¥{{ waitsale.cash }}<span style="color: #000;">/月</span></text>
<span style="color: #959795; font-size: 12px;">
<uni-icons type="location" style="color: #959795;" size="20"></uni-icons>
{{ waitsale.location }}
</span>
</view>
</view>
</view>
<view class="lower">
<view class="lower-lef">创建时间:{{ waitsale.time }}</view>
<view class="lower-rig">
<view style="margin-right: 15rpx; background-color: #7D9EFF;">编辑</view>
<view style="background-color: #4FBE66;">上架</view>
</view>
</view>
<view class="rig-top-stick">待上架</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
upperStatus: 1,
waitSaleList: [
{
name: '出租G160SDY-13柴动空压机',
cash: '2000',
location: '河北省保定市',
pic: '/static/bg1.jpg',
time: '2023-12-14 07:45:09'
},
{
name: '出租G160SDY-13柴动空压机',
cash: '4000',
location: '广东省汕头市',
pic: '/static/bg2.jpg',
time: '2023-12-16 15:47:27'
},
{
name: '出租G160SDY-13柴动空压机',
cash: '3000',
location: '湖南省郴州市',
pic: '/static/bg3.jpg',
time: '2023-12-19 20:56:39'
}
]
}
},
methods: {
switchUpper (count) {
this.upperStatus = count
}
}
}
</script>
<style lang="scss">
body{
background-color: #F7F7F7;
}
.upper-switch{
width: 90%;
margin: 20rpx auto;
display: flex;
justify-content: space-around;
view{
box-sizing: border-box;
padding: 4rpx 0;
}
.active{
color: #009DFF;
border-bottom: 3px solid #009DFF;
}
}
.wait-sale{
width: 95%;
margin: 20rpx auto;
box-sizing: border-box;
padding: 15rpx;
background-color: #fff;
border-radius: 15rpx;
display: flex;
flex-direction: column;
position: relative;
.upper{
width: 100%;
display: flex;
box-sizing: border-box;
padding-bottom: 20rpx;
border-bottom: 1px solid #DADADA;
.upper-lef{
width: 25%;
height: 10vh;
border-radius: 15rpx;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
}
.upper-rig{
flex: 1;
box-sizing: border-box;
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.rig-name{
color: #333333;
}
.rig-pay{
display: flex;
align-items: center;
text{
font-weight: bold;
margin-right: 15rpx;
color: #EE1D1D;
}
}
}
}
.lower{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding-top: 20rpx;
.lower-lef{
font-size: 12px;
}
.lower-rig{
display: flex;
view{
box-sizing: border-box;
padding: 6rpx 15rpx;
font-size: 14px;
border-radius: 10rpx;
color: #fff;
}
}
}
.rig-top-stick{
position: absolute;
top: 0;
right: 0;
box-sizing: border-box;
padding: 6rpx 12rpx;
border-radius: 0 15rpx 0 15rpx;
border: 1px solid #CBB632;
color: #CBB632;
font-size: 14px;
}
}
</style>