liukangdong
2024-07-30 e3a8d46ed7f215a7ad1d61d7e6d3a853e3922361
wechat_staff/pages/login/index.js
@@ -64,6 +64,25 @@
      code,
      phone
    } = this.data
    if (!this.data.agreementFalg) {
      return wx.showToast({
        title: '请先阅读并同意相关协议',
        icon: 'none'
      })
    }
    if (phone.length != 11) {
      return wx.showToast({
        title: '请输入正确的手机号',
        icon: 'none'
      })
    }
    if (!code) {
      return wx.showToast({
        title: '请输入验证码',
        icon: 'none'
      })
    }
    loginByPhone({
      code,
      phone
@@ -98,12 +117,6 @@
    })
  },
  changeStatus() {
    if (!this.data.agreementFalg) {
      return wx.showToast({
        title: '请先阅读并同意相关协议',
        icon: 'none'
      })
    }
    this.setData({
      status: '1'
    })
@@ -128,7 +141,7 @@
    getWxMiniPhone({
      encryptedData: data.encryptedData,
      iv: data.iv,
      sessionKey: wx.getStorageSync('sessionKey') || data.iv,
      sessionKey: wx.getStorageSync('sessionKey'),
    }).then(res => {
      if (res.data && res.data.token) {
        wx.login({