| | |
| | | Page({ |
| | | data: { |
| | | userInfo: null, |
| | | active: 0, |
| | | active: '0', |
| | | description: "", //申请规则 |
| | | teacherInfo: { |
| | | workInfo: null, |
| | | schoolName: "", |
| | | courseName: "", |
| | | detailedAddress: "" |
| | | address: "" |
| | | }, |
| | | contactInfo: { |
| | | fullName: "", |
| | | user: "", |
| | | phone: "", |
| | | detailedAddress: "" |
| | | address: "" |
| | | }, |
| | | phoneError: false, |
| | | paperBookList: [], //样书单纸质书 |
| | |
| | | that.setData({ |
| | | 'teacherInfo.schoolName': JSON.parse(that.data.userInfo.data).schoolName, |
| | | 'teacherInfo.courseName': JSON.parse(that.data.userInfo.data).courseName, |
| | | 'contactInfo.fullName': JSON.parse(that.data.userInfo.data).fullName, |
| | | 'contactInfo.user': JSON.parse(that.data.userInfo.data).fullName, |
| | | 'contactInfo.phone': JSON.parse(that.data.userInfo.data).phone, |
| | | 'contactInfo.detailedAddress': JSON.parse(that.data.userInfo.data).detailedAddress, |
| | | 'contactInfo.address': JSON.parse(that.data.userInfo.data).detailedAddress, |
| | | }) |
| | | } else { |
| | | wx.showModal({ |
| | |
| | | 'teacherInfo.workInfo': res[0].cmsTypeLinks[0].children, |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | //获取当前已申请次数(电子) |
| | |
| | | //姓名 |
| | | onFullNameInput(e) { |
| | | this.setData({ |
| | | "contactInfo.fullName": e.detail.value, |
| | | "contactInfo.user": e.detail.value, |
| | | }); |
| | | }, |
| | | //输入手机号 |
| | |
| | | }); |
| | | } |
| | | }, |
| | | onAddressInput() { |
| | | onAddressInput(e) { |
| | | this.setData({ |
| | | "contactInfo.detailedAddress": e.detail.value, |
| | | "contactInfo.address": e.detail.value, |
| | | }); |
| | | }, |
| | | |
| | | |
| | | submit() { |
| | | let that = this; |
| | | if (that.data.bookList.length > 0) { |
| | |
| | | refType: 'applyBook' |
| | | } |
| | | } else { |
| | | if (!(that.data.contactInfo.fullName && that.data.contactInfo.phone && that.data.contactInfo.detailedAddress)) { |
| | | if (!(that.data.contactInfo.user && that.data.contactInfo.phone && that.data.contactInfo.address)) { |
| | | wx.showToast({ |
| | | title: "请将收货人信息填写完整!", |
| | | icon: 'none', |
| | |
| | | } |
| | | const mailAddress = JSON.stringify(that.data.contactInfo) |
| | | that.setData({ |
| | | 'teacherInfo.detailedAddress': mailAddress |
| | | 'teacherInfo.address': mailAddress |
| | | }) |
| | | |
| | | data = { |