vue中獲取驗證碼效果

2021-09-25 11:24:22 字數 1439 閱讀 6916

這塊的功能非常簡單,只是挑出來做個備份,方便以後其他專案用到。

用的vue的框架,所以只展示功能部分**.

ui是自己寫的,可以用自己的。

class

="row inputrow"

>

for=

"dianhua"

class

="col-2 col-form-label"

>

**label

>

class

="col-6"

>

class

="form-control m-input"

placeholder

="請輸入手機號"

type

="text"

v-model

="maindata.dianhua"

id="dianhua"

>

div>

class

="col-2"

>

獲取驗證碼button

>

"daojishi"

>

5span

>

秒後重發button

>

div>

div>

class

="row inputrow"

>

for=

"gonghao"

class

="col-2 col-form-label"

>

驗證碼label

>

class

="col-10"

>

class

="form-control m-input"

placeholder

="請輸入驗證碼"

type

="text"

id="yanzhengma"

>

div>

div>

js部分

data()

},methods:

else},

//驗證手機號碼

checkphone()

$/;this

.isphone =1;

if(phone =='')

if(!pattern.

test

(phone))}

,//倒計時

resetcode()

else},

1000);},}

效果

vue中獲取簡訊驗證碼

使用vue vant 寫的註冊頁面 registerform phone circle o maxlength 11 v model addform.userphone placeholder 請輸入手機號 van cell group v model addform.code center cle...

獲取驗證碼

doctype html en utf 8 viewport content width device width,initial scale 1.0 獲取驗證碼 title script head button id btn value 獲取驗證碼 body setinterval 方法可按照指定...

vue中實現驗證碼

目錄 一,vue puzzle vcode外掛程式 1 安裝vue puzzle vcode 2,實現 3,效果圖 二,vue2 verify 三,vue monoplasty slide verify 1,安裝 2,實現 3,效果圖 四 封裝元件 五 基於svg captcha 推薦 六 原生js...