diff --git a/src/api/authentication.js b/src/api/authentication.js
index c84e1544..311d5766 100644
--- a/src/api/authentication.js
+++ b/src/api/authentication.js
@@ -89,7 +89,7 @@ export function getQrCode(key){
//获取服务商的确认状态
export function getConfirmStatus(key){
return request({
- url: '/supplierAppV2/dispatchApp/wechat/getSuppler',
+ url: '/supplierAppV2/dispatchApp/wechat/getSupplier',
method:'GET',
params: key
})
diff --git a/src/views/mine/personList.vue b/src/views/mine/personList.vue
index 41e03f57..f00f9504 100644
--- a/src/views/mine/personList.vue
+++ b/src/views/mine/personList.vue
@@ -60,7 +60,7 @@
*微信号:
修改
-
+
@@ -127,10 +127,11 @@ export default {
}
},
validatePhone(val) {
+ console.log('val',val)
if(!val){
return true
}
- const purePhone = val.replace(/\s|-/g, '');
+ const purePhone = val
// 情况1:11位且1开头 → 合法
if (/^1[0-9]{10}$/.test(purePhone)) {
return true
@@ -151,7 +152,7 @@ export default {
}else if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
this.type=1
}
- this.type=1
+ // this.type=1
let res=await getConfirmPerson({supplierId:this.supplierId})
if(res.data && res.data.length>0){
this.personList=res.data
@@ -161,8 +162,8 @@ export default {
},
async wechatConfirm(){//确认已添加微信按钮
let res=await confirmAddWechat({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
- console.log('----',res)
- this.personList[this.reviseIndex].wechatId='Nov_1122'
+ this.personList[this.reviseIndex].wechatId=res.data?.externalUserId
+ this.personList[this.reviseIndex].wechatName=res.data?.name
await this.cancelHandle()
},
cancelHandle(){
@@ -185,15 +186,15 @@ export default {
this.wechatInfo=res.data || ''
},
async auditHandle(){//提交审批
- let flag=this.personList.every(item => item.name && item.phone1 && item.wechatId)
+ let flag=this.personList.every(item => item.name && item.phone1 && item.wechatId && item.wechatName)
if(!flag){
this.$toast('必填项不可为空')
- // return
+ return
}
let phone1Flag= this.personList.every(item => this.validatePhone(item.phone1))
- let phone2Flag= this.personList.every(item => item.phone2 && this.validatePhone(item.phone2))
- // console.log('phone1Flag',phone1Flag)
- // console.log('phone2Flag',phone2Flag)
+ let phone2Flag= this.personList.every(item => (item.phone2 && this.validatePhone(item.phone2) || !item.phone2))
+ console.log('phone1Flag',phone1Flag)
+ console.log('phone2Flag',phone2Flag)
if(!phone1Flag || !phone2Flag){
return
}