二手车交易,添加车型品牌显示

This commit is contained in:
2025-03-12 16:40:15 +08:00
parent d008612675
commit 252660c8a8
2 changed files with 9 additions and 5 deletions

View File

@ -23,7 +23,7 @@
<span>{{ detailInfo.vehicleType }}</span>
<span>{{ detailInfo.boardType?.label }}</span>
<span>{{ detailInfo.licenseType?.label }}</span>
<span>{{detailInfo.brandModel}}</span>
<span>{{detailInfo.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]}}</span>
<span>{{ detailInfo.mileage }}公里</span>
<span>{{ detailInfo.emissionStandard?.label }}</span>
</div>
@ -57,7 +57,7 @@
</div>
<div class="descItem descCommon">
<div class="itemInfo">
<span>{{detailInfo.brandModel}}</span>
<span>{{detailInfo.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]}}</span>
<span>牌照类型</span>
</div>
<div class="suGang"></div>

View File

@ -74,8 +74,7 @@
<div class="right">
<div class="title">{{item.vehicleType}}</div>
<div v-if="activeTab==0" class="type">{{ item.boardType?.label }} | {{ item.licenseType?.label }} |
{{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0] }} | {{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
<div v-else class="type">{{ item.boardType?.label }} |
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期 {{item.registerDate?.substring(0,10)}}</div>
@ -161,9 +160,13 @@ export default {
document.addEventListener('visibilitychange', async ( ) => {
let state = document.visibilityState
if (state == 'hidden') { // 用户离开了
console.log("用户离开了")
}
if (state == 'visible') {
this.getList();
console.log("用户visible")
// this.getList();
// this.activeTab=localStorage.getItem('indexActiveTab') || 0
console.log("this.activeTab",this.activeTab)
}
});
},
@ -177,6 +180,7 @@ export default {
}else{//求购查看
this.$router.push({ name: "wantBuySale", query: { type:1 ,id:item.id ,queryType:2}})
}
// localStorage.setItem('indexActiveTab', '');
},
releaseHandle(type){
if(type===1){//车源发布