qb-verify
Installing
Using npm:
$ npm install qb-verify
Usage
(In main.js)
import QbVerify from 'qb-verify'
Vue.use(QbVerify, {
appId: 'your appId'
})
(In your controller)
let params = {
mobile: 'user mobile',
type: 'register'
}
this.$verification.getVerifyCode(params).then(_ => {
}).catch(err => {
if (err && err.status) {
switch (err.status) {
case 1:
break
case 3:
break
default:
break
}
} else {
}
})
let params = {
mobile: 'user mobile',
verifyCode: '1234',
type: 'register'
}
this.$verification.checkVerifyCode(params).then(res => {
}).catch(err => {
})