# @qtk-ui/qb-verify

> A simple scroll verify vue component for vanchu tech. Readme for usage.

Latest version **0.2.1** (published 2018-01-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @qtk-ui/qb-verify
pnpm add @qtk-ui/qb-verify
yarn add @qtk-ui/qb-verify
bun add @qtk-ui/qb-verify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2018-01-04 |
| First published | 2018-01-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alan Huang |
| Maintainers | qtk-ui |
| Keywords | scroll, verify, vue |

## Links

- npm: https://www.npmjs.com/package/@qtk-ui/qb-verify
- npm.io page: https://npm.io/package/@qtk-ui/qb-verify

## Recent versions

- 0.2.1 (latest) — 2018-01-04

## README

# qb-verify

## Installing

Using npm:

```bash
$ npm install qb-verify
```

## Usage
    
(In main.js)
```js
import QbVerify from 'qb-verify'

Vue.use(QbVerify, {
  appId: 'your appId' // require
})
```

(In your controller)
```js
// getVerifyCode
  let params = {
    mobile: 'user mobile', // require
    type: 'register'       // require, such as 'register'
  }
  this.$verification.getVerifyCode(params).then(_ => {
    // 飘字提示 发送成功
  }).catch(err => {
    if (err && err.status) {
      switch (err.status) {
        case 1: // denied 禁止发送验证码
          // 飘字提示
          break
        case 3: // FREQUENCY_LIMIT(频率限制)
          // 飘字提示
          break
        default:
          break
      }
    } else {
      // 未知错误
    }
  })

// checkVerifyCode
  let params = {
    mobile: 'user mobile', // require
    verifyCode: '1234',    // require, captcha
    type: 'register'       // require, such as 'register'
  }
  this.$verification.checkVerifyCode(params).then(res => {
  }).catch(err => {
  })
```

---
_Source: https://npm.io/package/@qtk-ui/qb-verify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
