diff --git a/src/views/secondHandCar/forSale.vue b/src/views/secondHandCar/forSale.vue index 69cd04f1..c8e4d00f 100644 --- a/src/views/secondHandCar/forSale.vue +++ b/src/views/secondHandCar/forSale.vue @@ -136,6 +136,7 @@ export default { startTime: null, // 记录进入时间 recordType:1, isList:false,//是否是首页列表跳转过来的 + recordResponseId:'',//信息记录获取的id,用于关闭界面掉接口所需参数 } }, async mounted() { @@ -167,6 +168,8 @@ 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:''}); + this.recordResponseId=result?.data?.id } }, destroyed() { @@ -197,7 +200,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) diff --git a/src/views/secondHandCar/wantBuySale.vue b/src/views/secondHandCar/wantBuySale.vue index 5237a164..b94341ea 100644 --- a/src/views/secondHandCar/wantBuySale.vue +++ b/src/views/secondHandCar/wantBuySale.vue @@ -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)