4 Commits

2 changed files with 11 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<div class="headerWrap">
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
<img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
<span>{{detailInfo.status.code !== 6 ? '在售' : '已售出'}}</span>
<span>{{detailInfo?.status?.code !== 6 ? '在售' : '已售出'}}</span>
<div style="opacity: 0;" class="back"></div>
</div>
<van-loading v-show="!detailInfo" class="loadingWrap" type="spinner" color="#1989fa" />
@ -136,6 +136,7 @@ export default {
startTime: null, // 记录进入时间
recordType:1,
isList:false,//是否是首页列表跳转过来的
recordResponseId:'',//信息记录获取的id用于关闭界面掉接口所需参数
}
},
async mounted() {
@ -157,6 +158,7 @@ export default {
queryType:this.queryType ,
})
this.detailInfo=res?.data
// console.log("this.detailInfo",this.detailInfo)
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;
@ -167,6 +169,9 @@ export default {
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
}
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
// console.log('resultresult',result)
this.recordResponseId=result?.data?.id
}
},
destroyed() {
@ -197,7 +202,7 @@ export default {
this.saveRecord(duration,type);
},
async saveRecord(duration,type){
await saveRecord({type: type, carInfoId: this.id, duration})
await saveRecord({type: type, carInfoId: this.id, duration,id:this.recordResponseId || ''})
},
handle(){
this.getDuration(2)

View File

@ -72,6 +72,7 @@ export default {
duration:'',
startTime: null, // 记录进入时间
isList:false,
recordResponseId:'',//信息记录获取的id用于关闭界面掉接口所需参数
}
},
async mounted() {
@ -92,6 +93,8 @@ export default {
queryType: this.queryType,
})
this.detailInfo = res?.data
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
this.recordResponseId=result?.data?.id
}
},
destroyed() {
@ -104,7 +107,7 @@ export default {
this.saveRecord(duration,type);
},
async saveRecord(duration,type){
await saveRecord({type:type,carInfoId:this.id,duration})
await saveRecord({type:type,carInfoId:this.id,duration,id:this.recordResponseId || ''})
},
handle(){
this.getDuration(2)