Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

polysoft-nafmii / polysoft-h5

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • polysoft-h5
  • src
  • utils
  • index.js
  • fanx's avatar
    封装发送验证码倒计时 · 77b0c9c7
    fanx committed May 10, 2021
    77b0c9c7 Browse Files
index.js 425 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/**
 * 工具类 
 * import utils from "@/utils";
 */

// 封装接口返回数据
const handlePromise = (promise) => {
    return promise.then(res => {
        return Promise.resolve(res)
    }).catch(e => {
        return Promise.resolve(res)
    })
}

const phoneRegCheck = (phoneNo) => {
    const mobileReg = /1[3-9]\d{9}/;
    return mobileReg.test(phoneNo);
  }

export default {
    handlePromise,
    phoneRegCheck
}