14 Commits

11 changed files with 106 additions and 442 deletions

View File

@ -44,10 +44,10 @@
<body>
<div class="container">
<h3>声明</h3>
<p>本平台为二手车买卖双方提供免费信息发布服务。在您使用本平台之前,请仔细阅读并理解本免责声明。一旦使用本平台,即视为您已阅读、理解并同意接受本免责声明的所有条款。</p>
<p>本平台为二手车买卖双方提供免费信息发布服务。在您使用本平台之前,请仔细阅读并理解本免责声明。一旦使用本平台,即视为您已阅读、理解并同意接受本免责声明的所有条款。</p>
<h4>一、平台性质</h4>
<p>1. 本平台仅为信息发布平台,不参与任何二手车交易环节,包括但不限于交易洽谈、合同签订、款项支付、车辆交付等,实际交易价格由买卖双方自行协商确定。</p>
<p>1. 本平台仅为信息发布平台,不参与任何二手车交易环节,包括但不限于交易洽谈、合同签订、款项支付、车辆交付等,实际交易价格由买卖双方自行协商确定。</p>
<p>2. 本平台不对发布信息的真实性、准确性、完整性、合法性进行任何形式的担保或保证,用户应自行判断信息的真实性并承担由此产生的风险。</p>
<h4>二、用户责任</h4>

View File

@ -54,14 +54,14 @@ export function userFeedback(data){
data
})
}
//二手车信息擦亮
//二手车信息擦亮
export function usedCarPolish(data){
return request({
url: `/toc-user/car-app/usedCarPolish/${data}`,
method:'POST',
})
}
//二手车信息下架
//二手车信息下架
export function usedCarRemove(data){
return request({
url: '/toc-user/car-app/usedCarRemove',
@ -70,7 +70,7 @@ export function usedCarRemove(data){
data
})
}
//二手车信息重新上架
//二手车信息重新上架
export function usedCarReShelf(data){
return request({
url: `/toc-user/car-app/usedCarReShelf/${data}`,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -25,8 +25,6 @@
:text="'行驶证照片'" :multiple="false" :files.sync="vehicleLicensePhotoList"/>
<upload-common @success2="getPlateColor" @delete2="deleteImg2"
:text="'车辆45度照'" :multiple="false" :files.sync="vehicleAnglePhotoList" />
<upload-common @success4="getBackPhoto" @delete4="deleteImgBack"
:text="'车辆后方45度'" :multiple="false" :files.sync="vehicleRearPhotoList" />
<upload-common @success3="getOtherImg" @delete3="handleDeleteOtherImg"
:text="'其他照片0/6'" :multiple="true" :files.sync="otherImgSrcList"/>
</div>
@ -42,18 +40,18 @@
<div class="item vehicleTypeItem">
<span> <span class="star">*</span>车辆类型 </span>
<van-radio-group v-model="form.vehicleType" direction="horizontal" class="radioWrap">
<van-radio name="平板拖车" :class="{'checked':form.vehicleType=='平板拖车','vehicleRadio':true}">平板拖车</van-radio>
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">拖车</van-radio>
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
</van-radio-group>
</div>
<div class="item" v-if="form.vehicleType=='平板拖车'">
<div class="item" v-if="form.vehicleType=='拖车'">
<span> <span class="star">*</span>落板方式 </span>
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落一体</van-radio>
<van-radio name="3" :class="{'checked':form.boardType==3}">普通斜</van-radio>
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落</van-radio>
<van-radio name="3" :class="{'checked':form.boardType==3}">一般平</van-radio>
</van-radio-group>
</div>
<div class="item">
@ -65,13 +63,6 @@
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
</van-radio-group>
</div>
<div class="item">
<span> <span class="star">*</span>刹车系统 </span>
<van-radio-group v-model="form.brakeSystem" direction="horizontal" class="radioWrap">
<van-radio name="1" :class="{'checked':form.brakeSystem==1}">气刹</van-radio>
<van-radio name="2" :class="{'checked':form.brakeSystem==2}">油刹</van-radio>
</van-radio-group>
</div>
<div class="item">
<span> <span class="star">*</span>所在城市 </span>
<van-field
@ -108,9 +99,10 @@
> </van-field>
</div>
<div class="item">
<span> <span class="star">*</span>售价(含税)</span>
<span> <span class="star">*</span>售价</span>
<van-field
type="number"
style="border: none"
class="radioWrap"
v-model="form.minPrice"
@input="validatePrice"
@ -121,15 +113,6 @@
</template>
</van-field>
</div>
<div class="item" style="margin-bottom:20px">
<span> <span class="star">*</span>底盘品牌</span>
<van-field
class="radioWrap"
v-model="form.underpanBrand"
input-align="right"
>
</van-field>
</div>
</div>
<div class="line lastLine"></div>
<div class="threeContent content">
@ -143,7 +126,7 @@
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
<span>我已阅读并同意</span>
<span @click="viewPrivacy">二手车交易条款</span>
<span @click="viewPrivacy">二手车交易条款</span>
</div>
<div class="btnWrap" >
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
@ -180,7 +163,6 @@ export default {
type:1,
vehicleLicensePhoto:'',
vehicleAnglePhoto:'',
vehicleRearPhoto: '',
otherPhoto:'',
licenseType:'',
brandModel:'',
@ -196,8 +178,6 @@ export default {
contactNumber:'',
minPrice:'',
desc:'',
underpanBrand: '',
brakeSystem: '',
},
radio: 0,
type:'',//1为发布&修改 2为审核
@ -211,7 +191,6 @@ export default {
areaName:'',
vehicleLicensePhotoList:[],
vehicleAnglePhotoList:[],
vehicleRearPhotoList: [],
otherImgSrcList:[],
otherImgSrc:[],
status:'',
@ -246,7 +225,6 @@ export default {
}
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
this.vehicleRearPhotoList = [{ url: res.data?.vehicleRearPhoto }]
}
let carSourceFormInfo=localStorage.getItem("carSourceFormInfo") ? JSON.parse(localStorage.getItem("carSourceFormInfo")) : ''
if(!carSourceFormInfo){
@ -264,9 +242,6 @@ export default {
}
if(this.form.vehicleAnglePhoto){
this.vehicleAnglePhotoList=[{url:this.form.vehicleAnglePhoto}]
}
if( this.form.vehicleRearPhoto ) {
this.vehicleRearPhotoList = [{url: this.form.vehicleRearPhoto}]
}
// console.log("carSourceFormInfo",carSourceFormInfo)
if(carSourceFormInfo.otherImgSrc0){
@ -344,7 +319,7 @@ export default {
this.form.vinCode=data.info.vin
this.form.plateNumber=data.info.plateNo
this.form.registerDate=data.info.registerDate +' 00:00:00'
// this.form.vehicleType=data.info.vehicleType
this.form.vehicleType=data.info.vehicleType
},
deleteImg1(){
this.form.vehicleLicensePhoto=''
@ -361,13 +336,6 @@ export default {
getOtherImg(data){
this.otherImgSrc.push(data.url)
},
getBackPhoto(data) {
console.log("datadata",data)
this.form.vehicleRearPhoto = data.url
},
deleteImgBack() {
this.form.vehicleRearPhoto = '';
},
handleDeleteOtherImg(file,index) {
this.otherImgSrc = this.otherImgSrc.filter((item,i) => index !== i);
this.otherImgSrcList = this.otherImgSrcList.filter((item,i) => index !== i);
@ -386,36 +354,22 @@ export default {
this.$toast('车辆45度不能为空')
return
}
if(!this.form.vehicleRearPhoto && type == 1) {
this.$toast('车辆后方45度不能为空')
return
}
let flag=this.validateHandle()
if(flag){
this.$toast(flag)
return
}
if (this.form.vehicleType=='平板拖车' && !this.form.boardType) {
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
this.$toast('落板方式不能为空')
return
}else if(this.form.vehicleType !=='平板拖车'){
}else if(this.form.vehicleType !=='拖车'){
this.form.boardType=''
}
let rule
if( type == 1 ) {
rule = this.validationRules.find(item =>
item.value === null ||
item.value === undefined ||
item.value === ''
)
} else {
rule = this.validationRulesSimple.find(item =>
item.value === null ||
item.value === undefined ||
item.value === ''
)
}
let rule = this.validationRules.find(item =>
item.value === null ||
item.value === undefined ||
item.value === ''
)
if(rule){
this.$toast(rule.name)
return
@ -450,19 +404,15 @@ export default {
this.$toast('车辆45度不能为空')
return
}
if(!this.form.vehicleRearPhoto) {
this.$toast('车辆后方45度不能为空')
return
}
let flag=this.validateHandle()
if(flag){
this.$toast(flag)
return
}
if (this.form.vehicleType=='平板拖车' && !this.form.boardType) {
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
this.$toast('落板方式不能为空')
return
}else if(this.form.vehicleType !=='平板拖车'){
}else if(this.form.vehicleType !=='拖车'){
this.form.boardType=''
}
let rule = this.validationRules.find(item =>
@ -519,18 +469,6 @@ export default {
},
computed: {
validationRules() {
return [
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
{ value: this.form.brakeSystem, name: '刹车系统不能为空' },
{ value: this.form.areaCode, name: '所在城市不能为空' },
{ value: this.form.mileage, name: '行驶里程不能为空' },
{ value: this.form.contactNumber, name: '联系方式不能为空' },
{ value: this.form.minPrice, name: '售价不能为空' },
{ value: this.form.underpanBrand, name: '底盘品牌不能为空' },
];
},
validationRulesSimple() {
return [
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
{ value: this.form.emissionStandard, name: '排放标准不能为空' },

View File

@ -89,8 +89,6 @@ export default {
this.$emit("delete1");
} else if (this.text === "车辆45度照") {
this.$emit("delete2");
} else if(this.text == '车辆后方45度') {
this.$emit("delete4");
} else {
console.log("file, detail", file, detail)
this.$emit("delete3", file, detail.index);
@ -124,8 +122,6 @@ export default {
let num = this.getVehicleLicense(result.data.color)
let data = {url: res?.data, colorStr: result.data.color, colorStatus: num, plateType: result.data.number}
this.$emit('success2', data)
} else if(this.text == '车辆后方45度') {
this.$emit('success4', {url: res?.data, uid: file.uid})
} else {
this.$emit('success3', {url: res?.data, uid: file.uid})
}
@ -257,4 +253,4 @@ export default {
::v-deep .van-uploader__preview-delete-icon {
display: none !important; /* 强制隐藏伪元素 */
}
</style>
</style>

View File

@ -8,19 +8,13 @@
</div>
<van-loading v-show="!detailInfo" class="loadingWrap" type="spinner" color="#1989fa" />
<div class="contentWrap" v-show="detailInfo">
<el-carousel v-if="isWebFunc()" trigger="click" height="215px" :autoplay="true">
<el-carousel v-if="isWebFunc()" trigger="click" height="215px" :autoplay="false">
<el-carousel-item v-for="(item,i) in imgSrcList" :key="i">
<el-image
:src="item"
v-if="item"
:preview-src-list="[item]"
class="swipeImg"
/>
<!-- <img v-if="item" class="swipeImg" :src="item" />-->
<img v-if="item" class="swipeImg" :src="item" />
</el-carousel-item>
</el-carousel>
<van-swipe v-else @change="onChange" :autoplay="3000">
<van-swipe-item v-for="(item,i) in imgSrcList" :key="i" @click="showImagePreview(i)">
<van-swipe v-else @change="onChange" >
<van-swipe-item v-for="(item,i) in imgSrcList" :key="i">
<img v-if="item" class="swipeImg" :src="item" />
</van-swipe-item>
<template #indicator>
@ -40,13 +34,9 @@
<div class="time">
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>{{ detailInfo.areaName }}</span><span>发布</span>
</div>
<div class="priceWrap">
<div class="price">
售价含税
<span>{{ formatNumber(detailInfo.minPrice) }}</span>
<span></span>
</div>
<div class="viewNum">{{detailInfo.attentionCount}}人想要<span>{{detailInfo.browseCount}}浏览</span></div>
<div class="price">
<span>{{ formatNumber(detailInfo.minPrice) }}</span>
<span></span>
</div>
</div>
<div class="detailInfoWrap wrapCommon">
@ -61,12 +51,12 @@
<div class="suGang"></div>
<div class="itemInfo">
<span>{{ detailInfo.vehicleType }}</span>
<span>类型</span>
<span>车类型</span>
</div>
<div class="suGang"></div>
<div class="itemInfo">
<span>{{ detailInfo.boardType?.label }}&nbsp;&nbsp;</span>
<span>落板方式</span>
<span>拖车落板</span>
</div>
</div>
<div class="descItem descCommon">
@ -80,24 +70,14 @@
<span>排放标准</span>
</div>
<div class="suGang"></div>
<div class="itemInfo">
<span>{{ detailInfo.brakeSystem == 2 ? '油刹' : '汽刹' }}</span>
<span>刹车系统</span>
</div>
</div>
<div class="descItem descCommon">
<div class="itemInfo">
<span>{{ detailInfo.underpanBrand }}</span>
<span>底盘品牌</span>
</div>
<div class="suGang"></div>
<div class="itemInfo">
<el-tooltip class="item" effect="dark" :content="formatToWan(detailInfo.mileage)+'公里'" placement="top">
<span style="display: inline-block;width:100%;cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ formatToWan(detailInfo.mileage)}}公里</span>
</el-tooltip>
<span>行驶公里</span>
</div>
<div class="suGang"></div>
</div>
<div class="descItem descCommon">
<div class="itemInfo dateItemInfo">
<span>{{ detailInfo.registerDate?.substring(0,10) }}</span>
<span>注册日期</span>
@ -109,7 +89,7 @@
<div class="descCommon desc">{{detailInfo.desc}}</div>
</div>
<div class="btnWrap" >
<div v-if="isList && !detailInfo.selfSupplierPublish && detailInfo.status.code !== 6" class="btn commonBtn" @click="noMultipleClicks(handle)">我想要</div>
<div v-if="isList && !detailInfo.selfSupplierPublish" class="btn commonBtn" @click="noMultipleClicks(handle)">我想要</div>
</div>
</div>
</div>
@ -120,7 +100,7 @@
import {myMixins} from "@/utils/myMixins"
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
import { ImagePreview, Dialog } from 'vant';
import { Dialog } from 'vant';
export default {
name: "forSale",
mixins:[myMixins],
@ -163,9 +143,6 @@ export default {
if(res.data.otherPhoto){
this.imgSrcList=res.data.otherPhoto.split(',') || []
}
if( res?.data?.vehicleRearPhoto ) {
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
}
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
}
},
@ -173,13 +150,6 @@ export default {
this.getDuration(1)
},
methods:{
showImagePreview(index) {
ImagePreview({
images: this.imgSrcList.map(item => item),
startPosition: index,
closeable: true
});
},
formatToWan(num) {
let result = (num / 10000).toString(); // 转换为万单位
if (result.includes('.')) {
@ -203,12 +173,10 @@ export default {
this.getDuration(2)
Dialog.alert({
message:this.detailInfo.contactNumber ,
confirmButtonText:this.isWebFunc() ? '确定' : '拨打电话',
confirmButtonText:'拨打电话',
showCancelButton:true,
}).then(async() => {
if(!this.isWebFunc()){
window.location.href = `tel:${this.detailInfo.contactNumber}`;
}
window.location.href = `tel:${this.detailInfo.contactNumber}`;
}).catch(() => {
// on cancel
});
@ -295,18 +263,6 @@ export default {
margin-left: 10px;
}
}
.priceWrap{
display: flex;
justify-content: space-between;
align-items: center;
.viewNum{
color: #ccc;
margin-right: 15px;
span{
margin-left: 10px;
}
}
}
.price{
color: #FF5533;
line-height: 28px;
@ -347,7 +303,6 @@ export default {
display: flex;
flex-direction: column;
width: 23%;
flex: 1;
span:first-child{
font-weight: bold;
font-size: 14px;
@ -367,7 +322,6 @@ export default {
height: 8px;
border-right: 1px solid #999999;
opacity: 0.5;
margin-right: 30px;
}
.desc{
font-weight: 400;
@ -411,25 +365,5 @@ export default {
.swipeImg{
width: 100%;
height: 100%;
object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */
object-position: center; /* 居中显示 */
}
::v-deep .el-carousel__button {
height: 0.15rem !important;
width: 0.3rem;
}
::v-deep .el-carousel__indicators--horizontal {
padding: 0.32rem 0.08rem;
}
::v-deep .el-carousel__arrow {
background-color: rgba(31, 45, 61, 1);
font-size: 0.5rem;
}
::v-deep .el-carousel__indicators--horizontal {
bottom: 10px;
}
::v-deep .el-image__inner {
object-fit: cover;
object-position: center;
}
</style>

View File

@ -1,16 +1,5 @@
<template>
<div class="wrap">
<div class="navBar">
<van-nav-bar
title="二手拖车信息"
left-arrow
left-arrow-color="#FFFFFF"
:border="false"
:fixed="true"
:safe-area-inset-top="true"
@click-left="goBack"
/>
</div>
<div class="headerWrap">
<img class="bg" src="@/assets/secondHandCar/bg.png" />
<img class="mine" src="@/assets/secondHandCar/mine.png" @click="goMine" />
@ -73,32 +62,6 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="proprietary" placeholder="发布方" :class="{'customSel':true , 'has-value': (proprietary || proprietary === 0) ? true : false }" clearable>
<el-option
v-for="item in proprietaryOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input readonly @focus="areaShow = true" v-model="areaName" placeholder="请选择发布省市" :class="{'customSel':true,'customInput':true , 'has-value': areaName }" >
<template #suffix>
<i
v-if="areaName"
class="el-icon-circle-close el-input__icon"
@click="areaName = ''"
></i>
</template>
</el-input>
<el-input readonly @focus="showDatePicker = true" v-model="dateVal" placeholder="请选择发布日期" :class="{'customSel':true,'customInput':true , 'has-value': dateVal }" >
<template #suffix>
<i
v-if="dateVal"
class="el-icon-circle-close el-input__icon"
@click="dateVal = ''"
></i>
</template>
</el-input>
</div>
<div class="contentWrap" v-show="!show">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
@ -111,8 +74,6 @@
<div class="contentItem">
<div class="item" v-for="(item,index) in pageList" :key="index" @click="viewCarSource(item)">
<div class="left">
<img class="owner_logo" v-if="item.proprietary == 1" src="@/assets/secondHandCar/icon_zdOwner.png" alt="">
<img class="saled_logo" v-if="item.status.code == 6 && item.downReason == '已售出'" src="@/assets/secondHandCar/icon_saled.png" alt="">
<img class="img" v-if="item.vehicleAnglePhoto" :src="item.vehicleAnglePhoto" />
<div v-else class="qiugou">{{item.vehicleType?.substring(0,2)}}</div>
</div>
@ -122,20 +83,11 @@
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/$/, '') }} | {{item.emissionStandard?.label}} | {{ formatToWan(item.mileage) }}公里</div>
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{item.emissionStandard?.label}}</div>
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期 {{item.registerDate?.substring(0,10)}}</div>
<div class="priceWrap" v-if="activeTab==0" >
<div class="price">
售价含税<span></span> <span>{{formatNumber(item.minPrice) }}</span> <span></span>
</div>
<div class="viewNum">{{item.attentionCount}}人想要<span>{{item.browseCount}}浏览</span></div>
</div>
<div v-else class="priceWrap">
<div class="priceRange">
售价含税
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei"></span>
<span class="su">~</span>
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei"></span>
</div>
<div class="viewNum">{{item.attentionCount}}人想卖<span>{{item.browseCount}}浏览</span></div>
<div v-if="activeTab==0" class="price"><span></span> <span>{{formatNumber(item.minPrice) }}</span> <span></span> </div>
<div v-else class="priceRange">
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei"></span>
<span class="su">~</span>
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei"></span>
</div>
<div class="line"></div>
</div>
@ -160,74 +112,20 @@
</div>
</div>
</van-popup>
<van-calendar v-model="showDatePicker" :min-date="minDate"
:max-date="maxDate" type="range" @confirm="onConfirm" />
<van-popup
v-model="areaShow"
position="bottom"
>
<van-area title="标题" :area-list="areaList" :columns-num="2" closeable="true" :value="areaCode ? String(areaCode) : ''"
@cancel="areaShow = false" @confirm="confirmHandle"/>
</van-popup>
</div>
</template>
<script>
import {myMixins} from "@/utils/myMixins"
import {appPageList,userFeedback } from "@/api/secondHandCar"
import {areaList} from "@vant/area-data";
export default {
name: "indexList",
mixins:[myMixins],
data(){
return{
areaList: areaList,
pageList:[],
topSearch:'',
activeTab:0,
isLoading:"",
loading: false,
finished: false,
pageNum:1,
pageSize:10,
total:'',
licenseType:'',
vehicleType:'',
priceSort:'',
emissionStandard:'',
boardType:'',
proprietary: '',
areaCode:'',
areaName:'',
startTime:'',
endTime:'',
licenseTypeOption:[
{value:2,label:'黄牌'},{value:3,label:'绿牌'},{value:1,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'}
],
emissionStandardOption:[
{value:1,label:'不限'},{value:3,label:'国三'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
],
boardTypeOption:[
{value:1,label:'全落地'},{value:2,label:'斜落一体'},{value:3,label:'普通斜板'},{value:9,label:'不限'}
],
proprietaryOption: [{value: 1, label: '中道自营'}, {value: 0, label: '服务商发布'}],
poupShow:false,
suggestContent:'',
dateVal: '',
showDatePicker: false,
areaShow:false,
isClearing:false,
minDate: new Date(1970, 0, 1), // 设置最小可选日期1970年1月1日
maxDate: new Date(2099, 11, 31) // 设置最大可选日期2099年12月31日
}
},
watch:{
/* topSearch(){
this.setSearchVal();
this.getList()
},*/
licenseType(){
this.setSearchVal();
this.getList()
@ -244,29 +142,41 @@ export default {
this.setSearchVal();
this.getList()
},
proprietary() {
this.setSearchVal();
this.getList()
},
areaName() {
if (!this.areaName){
this.areaCode=''
}
this.setSearchVal();
this.getList()
},
dateVal(val){
if(val){
let res= this.formatDateTimeRange(val)
this.startTime=res.startTime
this.endTime=res.endTime
}else{
this.startTime=''
this.endTime=''
}
this.setSearchVal();
this.getList()
},
},
data(){
return{
pageList:[],
topSearch:'',
activeTab:0,
isLoading:"",
loading: false,
finished: false,
pageNum:1,
pageSize:10,
total:'',
licenseType:'',
vehicleType:'',
priceSort:'',
emissionStandard:'',
boardType:'',
licenseTypeOption:[
{value:2,label:'黄牌'},{value:3,label:'绿牌'},{value:1,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'}
],
emissionStandardOption:[
{value:1,label:'不限'},{value:3,label:'国三'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
],
boardTypeOption:[
{value:1,label:'全落地'},{value:2,label:'斜落地'},{value:3,label:'一般斜板'},{value:9,label:'不限'}
],
poupShow:false,
suggestContent:'',
}
},
mounted() {
this.getSearchVal();
@ -276,29 +186,12 @@ export default {
if (state == 'hidden') { // 用户离开了
}
if (state == 'visible') {
// console.log('visible')
console.log('visible')
}
});
},
methods:{
confirmHandle(val){
if(val[0].name.includes('市')){
this.areaName=val[0].name
this.areaCode=val[0].code
}else{
this.areaName=val[0].name +val[1].name
this.areaCode=val[1].code
}
this.areaShow=false
},
formatDate(date) {
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
},
onConfirm(date) {
const [start, end] = date;
this.showDatePicker = false;
this.dateVal = `${this.formatDate(start)} - ${this.formatDate(end)}`;
},
formatToWan(num) {
let result = (num / 10000).toString();
if (result.includes('.')) {
@ -350,10 +243,6 @@ export default {
sessionStorage.setItem('licenseType',String(this.licenseType));
sessionStorage.setItem('emissionStandard',String(this.emissionStandard));
sessionStorage.setItem('boardType',String(this.boardType));
sessionStorage.setItem('proprietary',String(this.proprietary));
sessionStorage.setItem('areaCode',String(this.areaCode));
sessionStorage.setItem('areaName',this.areaName);
sessionStorage.setItem('dateVal',this.dateVal);
},
getSearchVal(){
this.activeTab = Number(sessionStorage.getItem('indexActiveTab')) || 0;
@ -363,10 +252,6 @@ export default {
this.licenseType = Number(sessionStorage.getItem('licenseType')) || '';
this.emissionStandard = Number(sessionStorage.getItem('emissionStandard')) || '';
this.boardType = Number(sessionStorage.getItem('boardType')) || '';
this.proprietary = Number(sessionStorage.getItem('proprietary')) || '';
this.areaCode=Number(sessionStorage.getItem('areaCode')) || '';
this.areaName=sessionStorage.getItem('areaName') || '';
this.dateVal=sessionStorage.getItem('dateVal') || '';
},
goMine(){//我的发布
this.$router.push({ name: "mineRelease"})
@ -406,7 +291,6 @@ export default {
},
onRefresh() {
this.pageNum=1
this.getList()
setTimeout(() => {
this.$toast('刷新成功');
this.isLoading = false;
@ -424,10 +308,6 @@ export default {
priceSort:this.priceSort,
boardType:this.boardType,
emissionStandard:this.emissionStandard,
proprietary: this.proprietary,
areaCode:this.areaCode,
startTime:this.startTime,
endTime:this.endTime,
})
this.total=res.total
if(this.pageNum == 1){// 第一页直接赋值
@ -448,18 +328,7 @@ export default {
window.android.sendMessage("goBack");
}
},
formatDateTimeRange(str) {
const [startStr, endStr] = str.split(' - ').map(s => s.trim());
const startDate = new Date(startStr);
const startTime = `${startDate.getFullYear()}-${(startDate.getMonth() + 1).toString().padStart(2, '0')}-${startDate.getDate().toString().padStart(2, '0')} 00:00:00`;
const endDate = new Date(endStr);
const endTime = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padStart(2, '0')}-${endDate.getDate().toString().padStart(2, '0')} 23:59:59`;
return {
startTime,
endTime
};
},
},
},
computed:{
show() {
return (this.pageList.length < 0 || this.pageList.length == 0); // 判断数组长度是否大于 0
@ -475,18 +344,14 @@ export default {
width: 100%;
height: 100%;
}
.navBar{
margin-bottom: 46px;
}
.fixImg{
width: 210px;
height: 102px;
position: fixed;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
z-index: 11;
cursor: pointer;
}
.headerWrap{
width: 100%;
@ -548,39 +413,28 @@ export default {
}
}
.filterWrap {
width: calc(100% - 5px);
padding-right: 5px;
width: 100%;
display: flex;
/*justify-content: space-around;*/
overflow-x: auto; /* 允许横向滚动 */
white-space: nowrap; /* 防止子元素换行 */
justify-content: space-around;
padding-bottom: 10px;
-webkit-overflow-scrolling: touch; /* 在iOS上平滑滚动 */
scrollbar-width: none; /* Firefox */
padding-bottom: 10px;
&::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}
.customSel {
flex: 0 0 auto; /* 防止子元素被压缩 */
width: 80px;
width: 69px;
height: 25px;
background: #F5F5F5;
border-radius: 4px;
font-size: 10px;
font-size: 12px;
color: #323233;
margin-left: 5px;
::v-deep .el-input__inner{
padding: 0 2px;
height: 25px;
font-size: 10px;
font-size: 12px;
background: #F5F5F5;
border-radius: 4px;
border: none;
}
::v-deep .el-input__icon{
line-height: 25px;
font-size: 10px;
font-size: 12px;
width: 18px;
color: #2A5094;
}
@ -588,9 +442,6 @@ export default {
right: 2px;
}
}
.customInput{
width: 130px;
}
.has-value ::v-deep .el-input__inner{
background: #F1F6FF ;
color: #007BE9;
@ -619,7 +470,7 @@ export default {
}
.contentWrap{
width: 100%;
height: calc(100% - 126px);
height: calc(100% - 80px);
overflow-y: auto;
background-color: #F2F2F2 ;
box-sizing: border-box;
@ -634,12 +485,8 @@ export default {
.item{
display: flex;
justify-content: space-between;
cursor: pointer;
}
.left{
width: 115px;
height: 77px;
position: relative;
.img, .qiugou{
width: 115px;
height: 77px;
@ -654,24 +501,6 @@ export default {
letter-spacing: 5px;
background-color: #6C81CD;
}
.img {
object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */
object-position: center; /* 居中显示 */
}
.owner_logo {
width: 60px;
height: 23px;
position: absolute;
left: -4px;
top: -3px;
}
.saled_logo {
width: 76px;
height: 48px;
position: absolute;
left: 24px;
top: 16px;
}
}
.right{
.title{
@ -714,18 +543,6 @@ export default {
line-height: 16px;
}
}
.priceWrap{
/* display: flex;
justify-content: space-between;
align-items: center;*/
.viewNum{
color: #ccc;
margin-right: 15px;
span{
margin-left: 10px;
}
}
}
.priceRange{
color: #FF5533;
display: flex;

View File

@ -40,9 +40,8 @@
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}}
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
<div v-if="item.type==1" class="price">售价含税<span>{{formatNumber(item.minPrice) }}</span> <span></span> </div>
<div v-if="item.type==1" class="price"><span>{{formatNumber(item.minPrice) }}</span> <span></span> </div>
<div v-else class="priceRange">
售价含税
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei"></span>
<span class="su">~</span>
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei"></span>
@ -329,8 +328,6 @@ export default {
height: 77px;
border-radius: 7px;
margin-right: 10px;
object-fit: cover;
object-position: center;
}
.smallImg{
position: absolute;

View File

@ -24,7 +24,7 @@
<span> <span class="star">*</span>求购类型 </span>
<div class="radioWrap">
<van-radio-group v-model="form.vehicleType" direction="horizontal">
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">平板拖车</van-radio>
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">拖车</van-radio>
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
@ -41,8 +41,8 @@
<span> <span class="star">*</span>落板方式 </span>
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落一体</van-radio>
<van-radio name="3" :class="{'checked':form.boardType==3}">普通斜</van-radio>
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落</van-radio>
<van-radio name="3" :class="{'checked':form.boardType==3}">一般平</van-radio>
<van-radio name="9" :class="{'checked':form.boardType==9}">不限</van-radio>
</van-radio-group>
</div>
@ -93,7 +93,7 @@
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
<span>我已阅读并同意</span>
<span @click="viewPrivacy">二手车交易条款</span>
<span @click="viewPrivacy">二手车交易条款</span>
</div>
<div class="btnWrap" >
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>

View File

@ -14,14 +14,10 @@
<div class="time">
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>发布</span>
</div>
<div class="priceWrap">
<div class="price">
售价含税
<span class="num">{{formatNumber(detailInfo.minPrice) }}</span> <span class="danwei"></span>
<span class="su">~</span>
<span class="num">{{formatNumber(detailInfo.maxPrice) }}</span> <span class="danwei"></span>
</div>
<div class="viewNum">{{detailInfo.attentionCount}}人想卖<span>{{detailInfo.browseCount}}浏览</span></div>
<div class="price">
<span class="num">{{formatNumber(detailInfo.minPrice) }}</span> <span class="danwei"></span>
<span class="su">~</span>
<span class="num">{{formatNumber(detailInfo.maxPrice) }}</span> <span class="danwei"></span>
</div>
</div>
<div class="detailInfoWrap wrapCommon">
@ -33,12 +29,12 @@
<el-tooltip class="item" effect="dark" :content="detailInfo.vehicleType" placement="top">
<span style="cursor: pointer">{{ detailInfo.vehicleType }}</span>
</el-tooltip>
<span>类型</span>
<span>车类型</span>
</div>
<div class="suGang"></div>
<div class="itemInfo">
<span>{{ detailInfo.boardType?.label }}&nbsp;&nbsp;</span>
<span>落板方式</span>
<span>拖车落板</span>
</div>
<div class="suGang"></div>
<div class="itemInfo">
@ -110,12 +106,10 @@ export default {
this.getDuration(2)
Dialog.alert({
message:this.detailInfo.contactNumber ,
confirmButtonText:this.isWebFunc() ? '确定' : '拨打电话',
confirmButtonText:'拨打电话',
showCancelButton:true,
}).then(() => {
if(!this.isWebFunc()){
window.location.href = `tel:${this.detailInfo.contactNumber}`;
}
window.location.href = `tel:${this.detailInfo.contactNumber}`;
}).catch(() => {
// on cancel
});
@ -185,18 +179,6 @@ export default {
margin-right: 20px;
}
}
.priceWrap{
display: flex;
justify-content: space-between;
align-items: center;
.viewNum{
color: #ccc;
margin-right: 15px;
span{
margin-left: 10px;
}
}
}
.price{
color: #FF5533;
font-weight: 600;