二手车交易,直辖市的显示问题

This commit is contained in:
2025-03-17 15:18:31 +08:00
parent 301babc54e
commit b5f01b70b7
2 changed files with 6 additions and 2 deletions

View File

@ -130,11 +130,13 @@ export default {
queryType:this.queryType ,
})
this.detailInfo=res?.data
const municipalities = ['北京市', '天津市', '上海市', '重庆市'];
const isMunicipality = municipalities.some(city => res.data.areaName.includes(city));
this.detailInfo.areaName= isMunicipality ? res.data.areaName?.substring(0, 3) : res.data.areaName;
if(res.data.otherPhoto){
this.imgSrcList=res.data.otherPhoto.split(',') || []
}
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
// console.log("this.imgSrcList",this.imgSrcList)
}
},
destroyed() {