修改小程序bug

This commit is contained in:
邓洁
2023-02-28 00:02:59 +08:00
parent 08d66a18d2
commit 077801fd6f
7 changed files with 77 additions and 69 deletions

View File

@@ -21,32 +21,32 @@
}
},
methods: {
handleSureClick() {
let name = this.$refs.nameAndphone.model.userInfo.name
let phone = this.$refs.nameAndphone.model.userInfo.phone
if (!/^1[3456789]\d{9}$/.test(phone)) {
this.$toast.warn('请输入正确的手机号')
return false
}
this.$apiServe.bindComponyAndUpdate({
uid: 1,
type: 1,
companyName: name,
companyPhone: phone
}).then(res => {
console.log('绑定公司', res.data);
if (res.data.code == 20003) {
this.showM = true
} else if (res.data.code == 20005) {
this.$toast.warn('请完善数据')
}
}).finally(_ => {})
},
confirm() {
uni.reLaunch({
url: '/pages/my/my'
})
}
// handleSureClick() {
// let name = this.$refs.nameAndphone.model.userInfo.name
// let phone = this.$refs.nameAndphone.model.userInfo.phone
// if (!/^1[3456789]\d{9}$/.test(phone)) {
// this.$toast.warn('请输入正确的手机号')
// return false
// }
// // this.$apiServe.bindComponyAndUpdate({
// // uid: 1,
// // type: 1,
// // companyName: name,
// // companyPhone: phone
// // }).then(res => {
// // console.log('绑定公司', res.data);
// // if (res.data.code == 20003) {
// // this.showM = true
// // } else if (res.data.code == 20005) {
// // this.$toast.warn('请完善数据')
// // }
// // }).finally(_ => {})
// },
// confirm() {
// uni.reLaunch({
// url: '/pages/my/my'
// })
// }
}
}
</script>