| | |
| | | 'contactInfo.phone': JSON.parse(this.data.userInfo.data).phone, |
| | | 'contactInfo.detailedAddress': JSON.parse(this.data.userInfo.data).detailedAddress, |
| | | }) |
| | | } else { |
| | | wx.showModal({ |
| | | title: '尊敬的用户,您好!', //提示的标题 |
| | | content: '请先进行教师认证?', //提示的内容 |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | if (wx.getStorageSync("paperBookList")) { |
| | | this.setData({ |
| | |
| | | const { |
| | | phoneError |
| | | } = this.data; |
| | | 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) { |
| | | 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, |
| | | "contactInfo.phone": e.detail.value, |
| | | }); |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | phoneError: !isPhoneNumber, |
| | | "contactInfo.phone": e.detail.value, |
| | | phoneError: false, |
| | | }); |
| | | } |
| | | }, |
| | |
| | | electronicBookList: [], |
| | | bookList: [], |
| | | }) |
| | | wx.setStorageSync("electronicBookList", []); |
| | | wx.removeStorageSync("electronicBookList") |
| | | } else { |
| | | that.setData({ |
| | | paperBookList: [], |
| | | bookList: [], |
| | | }) |
| | | wx.setStorageSync("paperBookList", []); |
| | | wx.removeStorageSync("paperBookList") |
| | | } |
| | | wx.showModal({ |
| | | title: '提示!', //提示的标题 |