二手拖车,进入详情页调保存信息记录接口,获取id,关闭页面,id传入接口
This commit is contained in:
@ -136,6 +136,7 @@ export default {
|
|||||||
startTime: null, // 记录进入时间
|
startTime: null, // 记录进入时间
|
||||||
recordType:1,
|
recordType:1,
|
||||||
isList:false,//是否是首页列表跳转过来的
|
isList:false,//是否是首页列表跳转过来的
|
||||||
|
recordResponseId:'',//信息记录获取的id,用于关闭界面掉接口所需参数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -167,6 +168,8 @@ export default {
|
|||||||
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
|
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
|
||||||
}
|
}
|
||||||
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
||||||
|
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
|
||||||
|
this.recordResponseId=result?.data?.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
@ -197,7 +200,7 @@ export default {
|
|||||||
this.saveRecord(duration,type);
|
this.saveRecord(duration,type);
|
||||||
},
|
},
|
||||||
async 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(){
|
handle(){
|
||||||
this.getDuration(2)
|
this.getDuration(2)
|
||||||
|
@ -72,6 +72,7 @@ export default {
|
|||||||
duration:'',
|
duration:'',
|
||||||
startTime: null, // 记录进入时间
|
startTime: null, // 记录进入时间
|
||||||
isList:false,
|
isList:false,
|
||||||
|
recordResponseId:'',//信息记录获取的id,用于关闭界面掉接口所需参数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -92,6 +93,8 @@ export default {
|
|||||||
queryType: this.queryType,
|
queryType: this.queryType,
|
||||||
})
|
})
|
||||||
this.detailInfo = res?.data
|
this.detailInfo = res?.data
|
||||||
|
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
|
||||||
|
this.recordResponseId=result?.data?.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
@ -104,7 +107,7 @@ export default {
|
|||||||
this.saveRecord(duration,type);
|
this.saveRecord(duration,type);
|
||||||
},
|
},
|
||||||
async 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(){
|
handle(){
|
||||||
this.getDuration(2)
|
this.getDuration(2)
|
||||||
|
Reference in New Issue
Block a user