工作259:uni--页面--验证码添加
生活随笔
收集整理的這篇文章主要介紹了
工作259:uni--页面--验证码添加
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
第一步:驗證碼樣式
<u-form-item><u-input class="inp" type="text" v-model="code" placeholder="請輸入驗證碼"></u-input><canvas :style="{width:width+'px',height:height+'px'}" canvas-id="canvas" @click="changeCode" @error="canvasIdErrorCallback"></canvas></u-form-item>第二步:驗證碼邏輯
if (this.code.toLowerCase() != uni.getStorageSync('imgcode').toLowerCase()) {uni.showToast({icon: 'none',position: 'bottom',title: '驗證碼不正確'});return false;?
總結
以上是生活随笔為你收集整理的工作259:uni--页面--验证码添加的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: RM遥控器接收程序的分析
- 下一篇: Window OS-拾贝