闫增涛
2025-03-31 04c7b0163caeae4ab1c5da62e301fa993101cfad
packageDomain/pages/teacherCertification/index.js
@@ -57,17 +57,7 @@
    //获取职称
    this.getpositionalTitle();
    this.getAgreement();
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserRole()
        }
      })
    } else {
      this.getUserRole()
    }
  },
  /**
@@ -81,6 +71,21 @@
   * 生命周期函数--监听页面显示
   */
  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()
    }
  },
@@ -142,8 +147,9 @@
      })
      this.newGetTeacherInfo()
    })
  },
  //获取教师状态
  newGetTeacherInfo() {
    let that = this;
@@ -574,6 +580,14 @@
      })
      return
    }
    if (!that.data.teacherInfo.detailedAddress) {
      wx.showToast({
        title: "请填写详细地址!",
        icon: 'none',
        duration: 1000,
      })
      return
    }
    if (that.data.imgPics.length == 0) {
      wx.showToast({
        title: "请上传工作证!",