How to use the antd-mobile/lib/toast.offline function in antd-mobile

To help you get started, we’ve selected a few antd-mobile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1ibrary / 1ibrary-front-end / js / pages / Login.js View on Github external
get validatePassed() {

    // forbid gd
    if (this.state.school_id === 1) {
      Toast.fail('请输入正确的密码', 1)
      return false
    }

    if (this.state.school_id === -1) {
      Toast.offline('请选择你的学校噢~', 1)
      return false
    }

    if (!this.state.account) {
      Toast.offline('请输入学号噢~', 1)
      return false
    }

    if (!this.state.password) {
      Toast.offline('请输入密码噢~', 1)
      return false
    }

    return true
  }
github 1ibrary / 1ibrary-front-end / js / pages / Login.js View on Github external
get validatePassed() {

    // forbid gd
    if (this.state.school_id === 1) {
      Toast.fail('请输入正确的密码', 1)
      return false
    }

    if (this.state.school_id === -1) {
      Toast.offline('请选择你的学校噢~', 1)
      return false
    }

    if (!this.state.account) {
      Toast.offline('请输入学号噢~', 1)
      return false
    }

    if (!this.state.password) {
      Toast.offline('请输入密码噢~', 1)
      return false
    }

    return true
  }
github 1ibrary / 1ibrary-front-end / js / pages / BookCollectAdd.js View on Github external
let params = {
      list_name: this.state.list_name,
      list_content: this.state.list_content
    }
    let response = (await HttpUtils.post(URL, params)) || {}
    if (response.status === 0) {
      Toast.success('创建书单成功!', 1)
      let result = (await HttpUtils.post(URL_SHOW)) || {}
      if (result.msg === '请求成功') {
        let lists = result.data
        await Storage.set('book_list', lists)
        this.props.onCallBack()
        Actions.pop()
      }
    } else {
      Toast.offline(response.msg, 1)
    }
  }
github 1ibrary / 1ibrary-front-end / js / pages / Login.js View on Github external
Toast.fail('请输入正确的密码', 1)
      return false
    }

    if (this.state.school_id === -1) {
      Toast.offline('请选择你的学校噢~', 1)
      return false
    }

    if (!this.state.account) {
      Toast.offline('请输入学号噢~', 1)
      return false
    }

    if (!this.state.password) {
      Toast.offline('请输入密码噢~', 1)
      return false
    }

    return true
  }