How to use the co.verifyTel function in co

To help you get started, we’ve selected a few co 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 tumars / boilerplate-webpack-react-es6-cssModule / old-verson / old-verson-2.0 / src / module / co-verify / index.js View on Github external
sendClick() {
        const _that = this
        const prop =  this.props

        this.cleartip()

        const mobile = this.PhoneInput.value
        if(!co.verifyTel(mobile)) {
            _that.setState({
                tip: '请输入正确手机号'
            })
            return false
        }

        prop.handleSend(mobile)

        let t = prop.time
        _that.setState({
            isTiming: true
        })
        _that.timer = setInterval(function(){
            t = t-1
            _that.setState({
                time: t
github tumars / boilerplate-webpack-react-es6-cssModule / old-verson / old-verson-2.0 / src / module / co-verify / index.js View on Github external
confirmClick() {
        const _that = this
        const prop =  this.props

        this.cleartip()

        const mobile = this.PhoneInput.value
        if(!co.verifyTel(mobile)) {
            _that.setState({
                tip: '请输入正确手机号'
            })
            return false
        }

        const valid = this.ValidInput.value
        prop.handleConfirm(mobile, valid)
    }