二手车交易,车源发布做缓存

This commit is contained in:
2025-03-14 11:40:25 +08:00
parent 90c0852ace
commit 558e3e3e8c
2 changed files with 45 additions and 9 deletions

View File

@ -215,16 +215,30 @@ export default {
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}] this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
console.log("th",this.form) console.log("th",this.form)
} }
// this.form=JSON.parse(sessionStorage.getItem('formInfo')) if(this.$route.params.form){
// this.areaName=sessionStorage.getItem('areaName') this.form={...this.$route.params.form}
// this.vehicleLicensePhotoList=JSON.parse(sessionStorage.getItem('vehicleLicensePhotoList')) }
// this.vehicleAnglePhotoList=JSON.parse(sessionStorage.getItem('vehicleAnglePhotoList')) if(this.$route.params.radio){
// this.otherImgSrcList=JSON.parse(sessionStorage.getItem('otherImgSrcList')) this.radio=this.$route.params.radio
// this.otherImgSrc=JSON.parse(sessionStorage.getItem('otherImgSrc')) }
if(this.$route.params.areaName){
this.areaName=this.$route.params.areaName
}
if(this.$route.params.vehicleLicensePhotoList){
this.vehicleLicensePhotoList=this.$route.params.vehicleLicensePhotoList
}
if(this.$route.params.vehicleAnglePhotoList){
this.vehicleAnglePhotoList=this.$route.params.vehicleAnglePhotoList
}
if(this.$route.params.otherImgSrcList){
this.otherImgSrcList=this.$route.params.otherImgSrcList
}
if(this.$route.params.otherImgSrc){
this.otherImgSrc=this.$route.params.otherImgSrc
}
}, },
methods:{ methods:{
viewPrivacy(){ viewPrivacy(){
// let host = window.location.host
let url=''; let url='';
if (window.location.href.includes('www.sinoassist.com')) { if (window.location.href.includes('www.sinoassist.com')) {
url = 'https://www.sinoassist.com' url = 'https://www.sinoassist.com'
@ -244,7 +258,15 @@ export default {
sessionStorage.setItem('otherImgSrc',JSON.stringify(this.otherImgSrc)) sessionStorage.setItem('otherImgSrc',JSON.stringify(this.otherImgSrc))
let urls=url + '/h5/supplier/dispatch/res/privacy.html' let urls=url + '/h5/supplier/dispatch/res/privacy.html'
this.$router.push({ name: "privacyComponent", query: {url:urls}}) this.$router.push({ name: "privacyComponent", query: {url:urls,type:1},params: {
form: this.form,radio:this.radio,
areaName:this.areaName,
vehicleLicensePhotoList:this.vehicleLicensePhotoList,
vehicleAnglePhotoList:this.vehicleAnglePhotoList,
otherImgSrcList:this.otherImgSrcList,
otherImgSrc:this.otherImgSrc,
}})
}, },
closeParentDialog() { closeParentDialog() {
if (window.parent) { if (window.parent) {

View File

@ -31,7 +31,21 @@ export default {
}, },
methods:{ methods:{
backHandle(){ backHandle(){
this.$router.push({ name:this.$route.query.type == 1 ? 'carSource' : 'wantBuy',query: {type:1},params: { form: this.$route.params.form,radio:this.$route.params.radio } }) if(this.$route.query.type == 1){
this.$router.push({ name: 'carSource',query: {type:1},params: {
form: this.$route.params.form,
radio:this.$route.params.radio ,
areaName:this.$route.params.areaName ,
vehicleLicensePhotoList:this.$route.params.vehicleLicensePhotoList ,
vehicleAnglePhotoList:this.$route.params.vehicleAnglePhotoList ,
otherImgSrcList:this.$route.params.otherImgSrcList ,
otherImgSrc:this.$route.params.otherImgSrc ,
} })
}else{
this.$router.push({ name: 'wantBuy',query: {type:1},params: { form: this.$route.params.form,radio:this.$route.params.radio } })
}
}, },
} }
} }