修改bug

This commit is contained in:
邓洁
2023-02-27 11:13:46 +08:00
parent e6ac333189
commit 08d66a18d2
3 changed files with 25 additions and 15 deletions

View File

@@ -55,24 +55,33 @@
if (this.btnDisabled == false) {
let name = this.$refs.nameAndphone.model.userInfo.name
let phone = this.$refs.nameAndphone.model.userInfo.phone
console.log('name', name);
console.log('phone', phone);
if (!/^1[3456789]\d{9}$/.test(phone)) {
this.$toast.warn('请输入正确的手机号')
return false
}
this.$apiServe.bindComponyAndUpdate({
uid: 1,
type: 2,
companyName: name,
companyPhone: phone
}).then(res => {
console.log('升级VIP', res.data);
if (res.data.code == 20003) {
this.showM = true
} else if (res.data.code == 20005) {
this.$toast.warn('请完善数据')
}
}).finally(_ => {})
if (name == '') {
this.$toast.warn('请完善数据')
return false
}
if (name && phone) {
console.log('数据已完善');
this.$apiServe.bindComponyAndUpdate({
uid: 1,
type: 2,
companyName: name,
companyPhone: phone
}).then(res => {
console.log('升级VIP', res.data);
if (res.data.code == 20003) {
this.showM = true
} else if (res.data.code == 20005) {
this.$toast.warn('请完善数据')
}
}).finally(_ => {})
}
}
},
confirm() {