| | |
| | | const { |
| | | phoneError |
| | | } = this.data; |
| | | if (e.detail.value) { |
| | | const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value); |
| | | if (phoneError === isPhoneNumber) { |
| | | this.setData({ |
| | | phoneError: !isPhoneNumber, |
| | | mannder: e.detail.value, |
| | | }); |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | phoneError: false, |
| | | mannder: '' |
| | | }); |
| | | } |
| | | }, |
| | |
| | | if (this.data.mannder.replace(/^\s*|\s*$/g, "") == '') { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "联系方式不能为空", |
| | | title: "反馈内容不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |