Compare commits
3 Commits
3438a7f9b3
...
prod-26-01
| Author | SHA1 | Date | |
|---|---|---|---|
| fde16ed45c | |||
| 516841b000 | |||
| 4434ef0a58 |
@@ -1147,8 +1147,8 @@ export default {
|
|||||||
{label: '服务车辆', prop: 'vehicleName'},
|
{label: '服务车辆', prop: 'vehicleName'},
|
||||||
{label: '服务完成状况', prop: 'orderStatusString'},
|
{label: '服务完成状况', prop: 'orderStatusString'},
|
||||||
{label: '案件完成时间', prop: 'finishTime'},
|
{label: '案件完成时间', prop: 'finishTime'},
|
||||||
{label: '省(B)', prop: 'bProvince'},
|
{label: '省(B)', prop: 'bprovince'},
|
||||||
{label: '市(B)', prop: 'bCity'},
|
{label: '市(B)', prop: 'bcity'},
|
||||||
{label: '区(B)', prop: 'area'},
|
{label: '区(B)', prop: 'area'},
|
||||||
]
|
]
|
||||||
} else if (this.active === 6) {//投诉明细
|
} else if (this.active === 6) {//投诉明细
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
let flag=this.validatePhone(val)
|
let flag=this.validatePhone(val)
|
||||||
// console.log('flag',flag)
|
// console.log('flag',flag)
|
||||||
if(!flag){
|
if(!flag){
|
||||||
this.$toast('手机号格式不正确')
|
this.$toast('电话号码格式不正确')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validatePhone(val) {
|
validatePhone(val) {
|
||||||
@@ -129,13 +129,22 @@ export default {
|
|||||||
if(!val){
|
if(!val){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
const purePhone = val
|
const purePhone = String(val).trim()
|
||||||
// 情况1:11位且1开头 → 合法
|
const mobileReg = /^1[3-9]\d{9}$/ // 大陆手机号正则表达式
|
||||||
if (/^1[0-9]{10}$/.test(purePhone)) {
|
const hkMobileReg = /^[569]\d{3}[\s-]?\d{4}$/ // 香港手机号正则表达式,允许使用空格或 "-" 分隔
|
||||||
|
const macauMobileReg = /^6\d{3}[\s-]?\d{4}$/ // 澳门手机号正则表达式,允许使用空格或 "-" 分隔
|
||||||
|
const telReg = /^(0\d{2,3})([\s-])?\d{7,8}$/ // 大陆座机号正则表达式,允许区号和座机号用空格或 "-" 分开
|
||||||
|
const hkTelReg = /^\(?\d{2,4}\)?[\s-]?\d{4}[\s-]?\d{4}$/ // 香港座机号正则表达式,允许使用空格或 "-" 分隔
|
||||||
|
const macauTelReg = /^\(?\d{2,4}\)?[\s-]?\d{4}[\s-]?\d{4}$/ // 澳门座机号正则表达式,允许使用空格或 "-" 分隔
|
||||||
|
const phone400Reg = /^400[\s-]?\d{3}[\s-]?\d{4}$/ // 以 "400" 开头的号码正则表达式,允许使用空格或 "-" 分隔
|
||||||
|
// 情况1:12位且首位是0、第二位是1 → 去0后按大陆手机号校验
|
||||||
|
if (/^01[0-9]{10}$/.test(purePhone)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// 情况2:12位且首位是0、第二位是1 → 去0后合法
|
// 匹配任意一种格式即为合法
|
||||||
if (/^01[0-9]{10}$/.test(purePhone)) {
|
if (mobileReg.test(purePhone) || hkMobileReg.test(purePhone) || macauMobileReg.test(purePhone) ||
|
||||||
|
telReg.test(purePhone) || hkTelReg.test(purePhone) || macauTelReg.test(purePhone) ||
|
||||||
|
phone400Reg.test(purePhone)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// 其他情况 → 不合法
|
// 其他情况 → 不合法
|
||||||
@@ -226,6 +235,7 @@ export default {
|
|||||||
console.log('phone1Flag',phone1Flag)
|
console.log('phone1Flag',phone1Flag)
|
||||||
console.log('phone2Flag',phone2Flag)
|
console.log('phone2Flag',phone2Flag)
|
||||||
if(!phone1Flag || !phone2Flag){
|
if(!phone1Flag || !phone2Flag){
|
||||||
|
this.$toast('电话号码格式不正确')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await submitConfirm({supplierId:this.supplierId,infos:this.personList})
|
await submitConfirm({supplierId:this.supplierId,infos:this.personList})
|
||||||
|
|||||||
@@ -478,6 +478,21 @@ export default {
|
|||||||
otherPhoto:this.otherImgSrc?.join(',')
|
otherPhoto:this.otherImgSrc?.join(',')
|
||||||
})
|
})
|
||||||
this.clearStorageFormInfo()
|
this.clearStorageFormInfo()
|
||||||
|
if(res.code == 200 && !res.msg){
|
||||||
|
this.$toast('发布成功')
|
||||||
|
if(this.isWebFunc()){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.closeParentDialog()
|
||||||
|
},1000)
|
||||||
|
}else{
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.$router.push({ name: "mineRelease"})
|
||||||
|
sessionStorage.setItem('mineActiveTab',String(1) )
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$toast(res.msg)
|
||||||
|
}
|
||||||
console.log("车源发布publishCarInfo",res)
|
console.log("车源发布publishCarInfo",res)
|
||||||
} catch (e){
|
} catch (e){
|
||||||
console.log('e',e)
|
console.log('e',e)
|
||||||
|
|||||||
Reference in New Issue
Block a user