ll
liukangdong
2024-08-27 2c08a98f7e85ec7c9376f27a7933e75e44d672f7
wechat_staff/pages/login/index.js
@@ -56,6 +56,9 @@
      }, 1000)
    })
  },
  onShow(){
    wx.hideHomeButton()
  },
  handleJudge(e) {
    const flag = e.currentTarget.dataset.flag
    console.log(e);
@@ -116,6 +119,7 @@
      }else{
        wx.showToast({
          title: '你还不是该系统用户,请联系相关管理员注册',
          icon: 'none'
        })
      }
    })
@@ -163,7 +167,7 @@
            } 
          })
        } else {
          wx.navigateTo({
          wx.reLaunch({
            url: '/pages/login/index',
          })
          wx.hideLoading()
@@ -183,17 +187,10 @@
    getWxMiniPhone({
      encryptedData: data.encryptedData,
      iv: data.iv,
      openid:this.data.openid,
      sessionKey: wx.getStorageSync('sessionKey'),
    }).then(res => {
      if (res.data && res.data.token) {
        wx.login({
          timeout: 5000,
          success: (loginRes) =>  {
            if (loginRes.code) {
              this.bindingOpenid(loginRes.code, res.data.token)
            }
          }
        })
      if (res.data && res.data.token) {
        if(res.data.phone){
          res.data.users.phone = res.data.phone || res.data.users.phone
        }
@@ -205,6 +202,7 @@
      }else{
        wx.showToast({
          title: '你还不是该系统用户,请联系相关管理员注册',
          icon: 'none'
        })
      }
@@ -265,13 +263,6 @@
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },