| | |
| | | emailError: false, |
| | | loading: true, //开启骨架屏加载 |
| | | hidden: true, //是否展示内容 |
| | | height: '', |
| | | dialogBox: false, |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding: 0 0 0 16rpx;height:70rpx', |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | this.onTabsChange(event) |
| | | var that = this; |
| | | // 动态获取屏幕高度 |
| | | wx.getSystemInfo({ |
| | | success: (result) => { |
| | | that.setData({ |
| | | height: result.windowHeight |
| | | }); |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | if (value === '0') { |
| | | console.log(value); |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | | }) |
| | | } else if (value === '1') { |
| | | console.log(value); |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | | }) |
| | | } else if (value === '2') { |
| | | console.log(value); |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | | }) |
| | | this.setData({ |
| | | isMore: null, |
| | | tabValue: value, |
| | | }) |
| | | if (value == '0') { |
| | | this.higherGet() |
| | | } else if (value == '1') { |
| | | this.vocationalGet() |
| | | } else if (value == '2') { |
| | | this.teacherGet() |
| | | } |
| | | }, |
| | | //高等教育 |
| | | higherGet(keyword) { |
| | | // console.log(keyword, 'keyword'); |
| | | let searchObj = { |
| | | 'Name*': keyword, |
| | | '||author*': keyword, |
| | |
| | | }, |
| | | SysType: 'CmsItem' |
| | | }).then(res => { |
| | | |
| | | res.datas.forEach(item => { |
| | | item.determine = true |
| | | }) |
| | |
| | | loading: false, //开启骨架屏加载 |
| | | hidden: false, //是否展示内容 |
| | | }) |
| | | if (res.datas.length < 7 && res.datas.length > 0) { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | } |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | |
| | | vocationalList: res.datas, |
| | | vocationalTotal: res.total |
| | | }) |
| | | if (res.datas.length < 7 && this.datas.length > 0) { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | } |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | |
| | | teacherList: res.datas, |
| | | teacherTotal: res.total |
| | | }) |
| | | if (res.datas.length < 7 && this.datas.length > 0) { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | } |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | |
| | | const key = e.currentTarget.dataset.key; |
| | | const item = e.currentTarget.dataset.item; |
| | | this.setData({ |
| | | Md5: item.datas.freeFile.FileList[0].Md5 |
| | | Md5: item.datas.freeFile.FileList[0].Md5, |
| | | dialogBox: true |
| | | }) |
| | | wx.showModal({ |
| | | title: '请输入邮箱', |
| | | content: '', |
| | | confirmColor: '#ff6c00', |
| | | cancelColor: '#949494', |
| | | placeholderText: '请输入邮箱号', |
| | | editable: true, |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | console.log('取消'); |
| | | } |
| | | if (res.confirm) { |
| | | this.setData({ |
| | | input: res.content |
| | | }) |
| | | this.confirmM() |
| | | } |
| | | } |
| | | // wx.showModal({ |
| | | // title: '请输入邮箱', |
| | | // content: '', |
| | | // confirmColor: '#ff6c00', |
| | | // cancelColor: '#949494', |
| | | // placeholderText: '请输入邮箱号', |
| | | // editable: true, |
| | | // complete: (res) => { |
| | | // if (res.cancel) { |
| | | // console.log('取消'); |
| | | // } |
| | | // if (res.confirm) { |
| | | // this.setData({ |
| | | // input: res.content |
| | | // }) |
| | | // this.confirmM() |
| | | // } |
| | | // } |
| | | // }) |
| | | }, |
| | | // 弹窗取消 |
| | | closeDialog() { |
| | | this.setData({ |
| | | dialogBox: false |
| | | }) |
| | | }, |
| | | //提交 |
| | | confirmM(e) { |
| | | const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.input); |
| | | if (isEmailValid && this.data.input) { |
| | | this.setData({ |
| | | dialogBox: false |
| | | }) |
| | | let query = { |
| | | eMail: this.data.input, |
| | | md5s: [this.data.Md5] |
| | |
| | | }); |
| | | } |
| | | }, |
| | | inputChange(e) { |
| | | this.setData({ |
| | | input: e.detail.value |
| | | }) |
| | | } |
| | | }) |