二手车交易,声明的添加,测试的优化

This commit is contained in:
2025-03-12 16:06:27 +08:00
parent f8ad6a109b
commit 5754e05a7f
8 changed files with 188 additions and 18 deletions

View File

@ -3,12 +3,13 @@
<div class="headerWrap">
<img class="bg" src="@/assets/secondHandCar/bg.png" />
<div class="navWrap">
<img class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
<div v-if="isWeb" style="opacity: 0;" class="back"></div>
<img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
<!-- 切图问题图片需更换-->
<img class="navIcon" src="@/assets/secondHandCar/cheyuan_big.png" />
<div style="opacity: 0;" class="back"></div>
</div>
<div class="audit" v-if="type!=1 && auditRemark">
<div class="audit" v-if="status==3 && auditRemark">
<span><img class="noAudit" src="@/assets/secondHandCar/noAudit.png" />审核不通过</span>
<span>{{auditRemark}}</span>
</div>
@ -116,11 +117,11 @@
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
<span>我已阅读并同意</span>
<span>xxxxx条款</span>
<span @click="viewPrivacy">二手车交易条款</span>
</div>
<div class="btnWrap" >
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
<div v-else class="auditBtn">
<div v-if="type==2" class="auditBtn">
<div class="commonBtn" @click="noMultipleClicks(auditHandle,0)">审核不通过</div>
<div class="commonBtn" @click="noMultipleClicks(auditHandle,1)"><span style="margin-right: 6px"></span>审核通过</div>
</div>
@ -184,6 +185,8 @@ export default {
vehicleLicensePhotoList:[],
vehicleAnglePhotoList:[],
otherImgSrcList:[],
status:'',
isWeb:false,
}
},
async mounted() {
@ -201,14 +204,49 @@ export default {
this.form.boardType=res.data.boardType?.code
this.form.emissionStandard=res.data.emissionStandard?.code
this.auditRemark=res.data?.auditRemark
this.status=res.data?.status?.code
this.areaName=res.data?.areaName
this.otherImgSrc=res.data?.otherPhoto?.split(',')
this.otherImgSrc?.map(item=>this.otherImgSrcList.push({url:item}))
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
}
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (!isMobile) {// 是移动端不变
this.isWeb=true
}else {
this.isWeb=false
}
},
methods:{
viewPrivacy(){
// let host = window.location.host
let url='';
if (window.location.href.includes('www.sinoassist.com')) {
url = 'https://www.sinoassist.com'
} else if (window.location.href.includes('ccreview.sino-assist.com')) {
url = 'https://ccreview.sino-assist.com'
} else if (window.location.href.includes('uat.sino-assist.com')) {
url = 'https://api-uat.sino-assist.com'
} else {
// url = 'https://crm1.sino-assist.com'
url = 'http://localhost:8080'
}
window.location.href=url + '/h5/supplier/dispatch/res/privacy.html'
},
closeParentDialog() {
if (window.parent) {
// 检查是否有父组件监听 'closeDialog' 事件
const hasListener = window.parent.dispatchEvent(new Event('checkCloseDialog'));
if (hasListener) {
// 如果有监听器,向父组件发送消息以请求关闭 dialog
window.parent.postMessage('closeDialog', '*');
} else {
// 如果没有监听器,则执行 history.back()
window.history.back();
}
}
},
confirmHandle(val){
let data=val.length
// console.log("val",val)
@ -297,11 +335,17 @@ export default {
otherPhoto:this.otherImgSrc?.join(',')
})
if(res.code == 200 && !res.msg){
this.h5GoBack()
if(this.isWeb){
setTimeout(()=>{
this.closeParentDialog()
},2000)
}else{
this.h5GoBack()
}
}else{
this.$toast(res.msg)
}
console.log("publishCarInfo",res)
console.log("车源发布publishCarInfo",res)
} finally {
console.log(111)
}