| | |
| | | //获取职称 |
| | | this.getpositionalTitle(); |
| | | this.getAgreement(); |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserRole() |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserRole() |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserRole() |
| | | } else { |
| | | wx.switchTab({ |
| | | url: '/pages/home/home', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserRole() |
| | | } |
| | | |
| | | }, |
| | | |
| | |
| | | }) |
| | | this.newGetTeacherInfo() |
| | | }) |
| | | |
| | | }, |
| | | |
| | | |
| | | //获取教师状态 |
| | | newGetTeacherInfo() { |
| | | let that = this; |
| | |
| | | }) |
| | | return |
| | | } |
| | | if (!that.data.teacherInfo.detailedAddress) { |
| | | wx.showToast({ |
| | | title: "请填写详细地址!", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | return |
| | | } |
| | | if (that.data.imgPics.length == 0) { |
| | | wx.showToast({ |
| | | title: "请上传工作证!", |
| | |
| | | } catch (error) {} |
| | | } |
| | | }, |
| | | changeParam(e) { |
| | | this.scrollToInput(0); |
| | | }, |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |