@@ -0,0 +1,392 @@
< template >
< div class = "wrap" >
< div class = "headerWrap" >
< img class = "bg" src = "@/assets/secondHandCar/bg.png" / >
< img class = "mine" src = "@/assets/secondHandCar/mine.png" / >
< el-input
placeholder = "请输入"
v-model = "keyword" >
< img slot = "suffix" class = "search" src = "@/assets/secondHandCar/search.png" / >
< / el-input >
< / div >
< div class = "firstTab" >
< div >
< img class = "big com" v-show = "activeTab === 0" src="@/assets/secondHandCar/cheyuanBig.png" @click="activeTab = 0" / >
< img class = "small com" v-show = "activeTab === 1" src="@/assets/secondHandCar/cheyuanSmall.png" @click="activeTab = 0" />
< img class = "big" v-show = "activeTab === 1" src="@/assets/secondHandCar/qiugouBig.png" @click="activeTab = 1" />
< img class = "small" v-show = "activeTab === 0" src="@/assets/secondHandCar/qiugouSmall.png" @click="activeTab = 1" />
< / div >
< div >
< img class = "suggest" src = "@/assets/secondHandCar/suggest.png" / >
< / div >
< / div >
< div class = "filterWrap" >
< el-select v-model = "plateType" placeholder="牌照类型" class="customSel" >
< el -option
v-for = "item in plateTypeOption"
:key = "item.value"
:label = "item.label"
:value = "item.value" >
< / el-option >
< / el-select >
< el-select v-model = "vehicleType" placeholder="车辆类型" class="customSel" >
< el -option
v-for = "item in vehicleTypeOption"
:key = "item.value"
:label = "item.label"
:value = "item.value" >
< / el-option >
< / el-select >
< el-select v-model = "price" placeholder="价格区间" class="customSel" >
< el -option
v-for = "item in priceOption"
:key = "item.value"
:label = "item.label"
:value = "item.value" >
< / el-option >
< / el-select >
< el-select v-model = "paiFang" placeholder="排放标准" class="customSel" >
< el -option
v-for = "item in paiFangOption"
:key = "item.value"
:label = "item.label"
:value = "item.value" >
< / el-option >
< / el-select >
< el-select v-model = "luoBan" placeholder="落板方式" class="customSel" >
< el -option
v-for = "item in luoBanOption"
:key = "item.value"
:label = "item.label"
:value = "item.value" >
< / el-option >
< / el-select >
< / div >
< div class = "contentWrap" v-show = "!showEmpty" >
< van -pull -refresh v-model = "isLoading" @refresh="onRefresh" style="min-height:85vh" >
< div class = "contentItem" >
< div class = "item" >
< div class = "left" >
< img src = "@/assets/secondHandCar/45angle.png" / >
< / div >
< div class = "right" >
< div class = "title" > 牵引车 < / div >
< div class = "type" > 全落地 | 黄牌 | 粤海 | 18 万km | 国5 < / div >
< div class = "date" > 注册日期 : 2025 - 03 - 07 < / div >
< div class = "price" > < span > ¥ < / span > < span > 10.25 < / span > < span > 万 < / span > < / div >
< / div >
< / div >
< div class = "item" >
< div class = "left" >
< img src = "@/assets/secondHandCar/45angle.png" / >
< / div >
< div class = "right" >
< div class = "title" > 牵引车 < / div >
< div class = "type" > 全落地 | 黄牌 | 粤海 | 18 万km | 国5 < / div >
< div class = "date" > 注册日期 : 2025 - 03 - 07 < / div >
< div class = "price" > < span > ¥ < / span > < span > 10.25 < / span > < span > 万 < / span > < / div >
< / div >
< / div >
< div class = "item" >
< div class = "left" >
< img src = "@/assets/secondHandCar/45angle.png" / >
< / div >
< div class = "right" >
< div class = "title" > 牵引车 < / div >
< div class = "type" > 全落地 | 黄牌 | 粤海 | 18 万km | 国5 < / div >
< div class = "date" > 注册日期 : 2025 - 03 - 07 < / div >
< div class = "price" > < span > ¥ < / span > < span > 10.25 < / span > < span > 万 < / span > < / div >
< / div >
< / div >
< div class = "item" >
< div class = "left" >
< img src = "@/assets/secondHandCar/45angle.png" / >
< / div >
< div class = "right" >
< div class = "title" > 牵引车 < / div >
< div class = "type" > 全落地 | 黄牌 | 粤海 | 18 万km | 国5 < / div >
< div class = "date" > 注册日期 : 2025 - 03 - 07 < / div >
< div class = "price" > < span > ¥ < / span > < span > 10.25 < / span > < span > 万 < / span > < / div >
< / div >
< / div >
< div class = "item" >
< div class = "left" >
< img src = "@/assets/secondHandCar/45angle.png" / >
< / div >
< div class = "right" >
< div class = "title" > 牵引车 < / div >
< div class = "type" > 全落地 | 黄牌 | 粤海 | 18 万km | 国5 < / div >
< div class = "date" v-show = "activeTab==0" > 注册日期 : 2025 -03 -07 < / div >
< div class = "price" > < span > ¥ < / span > < span > 10.25 < / span > < span > 万 < / span > < / div >
< / div >
< / div >
< / div >
< / van-pull-refresh >
< img v-show = "activeTab==0" class="fixImg" src="@/assets/secondHandCar/sellCar.png" / >
< img v-show = "activeTab==1" class="fixImg" src="@/assets/secondHandCar/buyCar.png" / >
< / div >
< / div >
< / template >
< script >
import { myMixins } from "@/utils/myMixins"
export default {
name : "indexList" ,
computed : {
} ,
mixins : [ myMixins ] ,
data ( ) {
return {
pageList : [ ] ,
keyword : '' ,
activeTab : 0 ,
showEmpty : false ,
isLoading : false ,
isFinished : false ,
plateType : '' ,
vehicleType : '' ,
price : '' ,
paiFang : '' ,
luoBan : '' ,
plateTypeOption : [
{ value : 1 , label : '黄牌' } , { value : 2 , label : '绿牌' } , { value : 3 , label : '蓝牌' } ,
] ,
vehicleTypeOption : [
{ value : 1 , label : '拖车' } , { value : 2 , label : '地库车' } , { value : 3 , label : '牵引车' } , { value : 4 , label : '随车吊' } , { value : 5 , label : '其他' } ,
] ,
priceOption : [
{ value : 1 , label : '5~6' } , { value : 2 , label : '7~8' } , { value : 3 , label : '8~9' }
] ,
paiFangOption : [
{ value : 1 , label : '国四' } , { value : 2 , label : '国五' } , { value : 3 , label : '国六' } , { value : 4 , label : '不限' } ,
] ,
luoBanOption : [
{ value : 1 , label : '全落地' } , { value : 2 , label : '斜落地' } , { value : 3 , label : '一般斜板' }
]
}
} ,
mounted ( ) {
const urlParams = new URLSearchParams ( window . location . search ) ;
this . driverId = urlParams . get ( 'driverId' ) ;
// this.getList();
document . addEventListener ( 'visibilitychange' , async ( ) => {
let state = document . visibilityState
if ( state == 'hidden' ) { // 用户离开了
}
if ( state == 'visible' ) {
// this.getList();
}
} ) ;
} ,
methods : {
onRefresh ( ) {
// this.getList()
setTimeout ( ( ) => {
this . $toast ( '刷新成功' ) ;
this . isLoading = false ;
} , 1000 ) ;
} ,
/* async getList(){
let res= await driverTrainList({
driverId:this.driverId,//79639
})
this.pageList=res.data?.list;
if(res.data.assessState == 0){
this.isFinished=false
}else {
this.isFinished=true //是否完成
}
if(this.pageList?.length === 0){
this.showEmpty = true
}else {
this.showEmpty = false
}
},*/
goApp ( ) {
let data = { "action" : "goBack" , "params" : "" }
var u = navigator . userAgent ;
var isiOS = ! ! u . match ( /\(i[^;]+;( U;)? CPU.+Mac OS X/ ) ;
if ( isiOS ) {
window . webkit . messageHandlers . nativeObject . postMessage ( data ) ;
} else {
window . android . sendMessage ( "goBack" ) ;
}
} ,
}
}
< / script >
< style scoped lang = "scss" >
@ import "@/styles/common.scss" ;
@ import "@/styles/mixin.scss" ;
. wrap {
//position: relative;
width : 100 % ;
height : 100 % ;
}
. headerWrap {
width : 100 % ;
display : flex ;
justify - content : space - between ;
align - items : center ;
box - sizing : border - box ;
padding - left : 15 px ;
padding - right : 10 px ;
padding - top : 10 px ;
position : relative ;
. bg {
position : absolute ;
width : 100 % ;
height : 144 px ;
top : 0 ;
left : 0 ;
z - index : - 1 ;
}
. mine {
width : 55 px ;
height : 43 px ;
margin - right : 15 px ;
}
. search {
width : 17 px ;
height : 17 px ;
}
: : v - deep . el - input _ _inner {
background : rgba ( 255 , 255 , 255 , 0.8 ) ;
border - radius : 20 px ;
border : 2 px solid # 264 B94 ;
}
: : v - deep . el - input _ _suffix {
top : 12 px ;
right : 10 px ;
}
}
. firstTab {
width : 100 % ;
padding - top : 18 px ;
display : flex ;
justify - content : space - between ;
align - items : center ;
img {
cursor : pointer ;
}
. big , . small {
width : 52 px ;
height : 21 px ;
}
. com {
margin - left : 32 px ;
margin - right : 25 px ;
}
. suggest {
width : 87 px ;
height : 38 px ;
}
}
. filterWrap {
width : 100 % ;
display : flex ;
justify - content : space - around ;
padding - bottom : 10 px ;
. customSel {
width : 69 px ;
height : 25 px ;
background : # F5F5F5 ;
border - radius : 4 px ;
font - size : 12 px ;
color : # 323233 ;
: : v - deep . el - input _ _inner {
padding : 0 2 px ;
height : 25 px ;
font - size : 12 px ;
background : # F5F5F5 ;
border - radius : 4 px ;
}
: : v - deep . el - input _ _icon {
line - height : 25 px ;
font - size : 12 px ;
width : 18 px ;
}
: : v - deep . el - input _ _suffix {
right : 2 px ;
}
}
}
. contentWrap {
width : 100 % ;
background - color : # F2F2F2 ;
box - sizing : border - box ;
padding : 10 px 6 px 0 ;
position : relative ;
. fixImg {
width : 210 px ;
height : 102 px ;
position : absolute ;
bottom : 20 px ;
left : 50 % ;
transform : translateX ( - 50 % ) ;
z - index : 11 ;
}
. contentItem {
width : 100 % ;
height : 100 % ;
background - color : # FFFFFF ;
//border-top-left-radius: 10px;
//border-top-right-radius: 10px;
border - radius : 10 px ;
box - sizing : border - box ;
padding - left : 8 px ;
padding - top : 18 px ;
. item {
display : flex ;
}
. left {
img {
width : 115 px ;
height : 77 px ;
background : linear - gradient ( 90 deg , rgba ( 5 , 32 , 54 , 0.88 ) 0 % , rgba ( 69 , 87 , 103 , 0.19 ) 64 % , rgba ( 133 , 141 , 152 , 0 ) 100 % ) ;
border - radius : 7 px ;
margin - right : 8 px ;
}
}
. right {
. title {
font - weight : 600 ;
font - size : 14 px ;
color : # 212020 ;
line - height : 20 px ;
}
. type {
font - weight : 400 ;
font - size : 12 px ;
color : # 282828 ;
line - height : 17 px ;
}
. date {
font - weight : 400 ;
font - size : 11 px ;
color : # 999999 ;
line - height : 16 px ;
}
. price {
color : # FF5533 ;
span : first - child {
font - weight : 600 ;
font - size : 13 px ;
}
span : nth - child ( 2 ) {
font - weight : bold ;
font - size : 18 px ;
line - height : 25 px ;
margin - right : 2 px ;
}
span : nth - child ( 3 ) {
font - weight : 600 ;
font - size : 11 px ;
line - height : 16 px ;
}
}
}
}
}
< / style >