二手车交易,测试优化
This commit is contained in:
@ -43,7 +43,7 @@
|
||||
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="form.vehicleType=='拖车'">
|
||||
<span> <span class="star">*</span>落板方式 </span>
|
||||
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
|
||||
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
|
||||
@ -74,6 +74,7 @@
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>行驶里程 </span>
|
||||
<van-field
|
||||
type="number"
|
||||
class="radioWrap"
|
||||
v-model="form.mileage"
|
||||
input-align="right"
|
||||
@ -86,6 +87,7 @@
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>联系号码 </span>
|
||||
<van-field
|
||||
type="number"
|
||||
class="radioWrap"
|
||||
v-model="form.contactNumber"
|
||||
input-align="right"
|
||||
@ -95,6 +97,7 @@
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>售价</span>
|
||||
<van-field
|
||||
type="number"
|
||||
style="border: none"
|
||||
class="radioWrap"
|
||||
v-model="form.maxPrice"
|
||||
@ -174,18 +177,18 @@ export default {
|
||||
},
|
||||
radio: 0,
|
||||
type:'',//1为发布&修改 2为审核
|
||||
id:'',
|
||||
queryType:'',
|
||||
areaList: areaList,
|
||||
areaShow:false,
|
||||
areaName:'',
|
||||
noClick:true,
|
||||
otherImgSrc:[],
|
||||
id:'',
|
||||
auditRemark:'',
|
||||
auditReason:'',
|
||||
queryType:'',
|
||||
areaName:'',
|
||||
vehicleLicensePhotoList:[],
|
||||
vehicleAnglePhotoList:[],
|
||||
otherImgSrcList:[],
|
||||
otherImgSrc:[],
|
||||
status:'',
|
||||
}
|
||||
},
|
||||
@ -211,6 +214,12 @@ export default {
|
||||
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
|
||||
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
|
||||
}
|
||||
this.form=JSON.parse(sessionStorage.getItem('formInfo'))
|
||||
this.areaName=sessionStorage.getItem('areaName')
|
||||
this.vehicleLicensePhotoList=JSON.parse(sessionStorage.getItem('vehicleLicensePhotoList'))
|
||||
this.vehicleAnglePhotoList=JSON.parse(sessionStorage.getItem('vehicleAnglePhotoList'))
|
||||
this.otherImgSrcList=JSON.parse(sessionStorage.getItem('otherImgSrcList'))
|
||||
this.otherImgSrc=JSON.parse(sessionStorage.getItem('otherImgSrc'))
|
||||
},
|
||||
methods:{
|
||||
viewPrivacy(){
|
||||
@ -226,6 +235,13 @@ export default {
|
||||
url = 'https://crm1.sino-assist.com'
|
||||
// url = 'http://localhost:8080'
|
||||
}
|
||||
sessionStorage.setItem('formInfo',JSON.stringify(this.form))
|
||||
sessionStorage.setItem('areaName',this.areaName)
|
||||
sessionStorage.setItem('vehicleLicensePhotoList',JSON.stringify(this.vehicleLicensePhotoList))
|
||||
sessionStorage.setItem('vehicleAnglePhotoList',JSON.stringify(this.vehicleAnglePhotoList))
|
||||
sessionStorage.setItem('otherImgSrcList',JSON.stringify(this.otherImgSrcList))
|
||||
sessionStorage.setItem('otherImgSrc',JSON.stringify(this.otherImgSrc))
|
||||
|
||||
let urls=url + '/h5/supplier/dispatch/res/privacy.html'
|
||||
this.$router.push({ name: "privacyComponent", query: {url:urls}})
|
||||
},
|
||||
@ -296,7 +312,7 @@ export default {
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.closeParentDialog()
|
||||
},2000)
|
||||
},1000)
|
||||
} finally {
|
||||
console.log(type)
|
||||
}
|
||||
@ -320,6 +336,12 @@ export default {
|
||||
this.$toast(flag)
|
||||
return
|
||||
}
|
||||
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
|
||||
this.$toast('落板方式不能为空')
|
||||
return
|
||||
}else{
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
@ -331,12 +353,21 @@ export default {
|
||||
otherPhoto:this.otherImgSrc?.join(',')
|
||||
})
|
||||
if(res.code == 200 && !res.msg){
|
||||
sessionStorage.setItem('formInfo','')
|
||||
sessionStorage.setItem('areaName','')
|
||||
sessionStorage.setItem('vehicleLicensePhotoList','')
|
||||
sessionStorage.setItem('vehicleAnglePhotoList','')
|
||||
sessionStorage.setItem('otherImgSrcList','')
|
||||
sessionStorage.setItem('otherImgSrc','')
|
||||
this.$toast('发布完成')
|
||||
if(this.isWebFunc()){
|
||||
setTimeout(()=>{
|
||||
this.closeParentDialog()
|
||||
},2000)
|
||||
},1000)
|
||||
}else{
|
||||
this.h5GoBack()
|
||||
setTimeout(()=>{
|
||||
this.$router.push({ name: "mineRelease",query:{activeTab : 1}})
|
||||
},1000)
|
||||
}
|
||||
}else{
|
||||
this.$toast(res.msg)
|
||||
@ -367,7 +398,6 @@ export default {
|
||||
validationRules() {
|
||||
return [
|
||||
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
|
||||
{ value: this.form.boardType, name: '落板方式不能为空' },
|
||||
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
|
||||
{ value: this.form.areaCode, name: '所在城市不能为空' },
|
||||
{ value: this.form.mileage, name: '行驶里程不能为空' },
|
||||
@ -549,6 +579,7 @@ export default {
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn{
|
||||
width: 296px;
|
||||
|
Reference in New Issue
Block a user