Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize license Plate Calibration and Bank Calibration by vue

Shulou Source: shulou.com Published: 2022-06-03 16:00:21 10月01日 Update

This article will explain in detail how vue implements license plate verification and bank verification. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

How to use it:

Git clone https://github.com/13725102796/css3-demo.gitcd css3-demonpm I (yarn install) npm start

The browser can access it by opening localhost: 8080.

Let's talk about the verification of the license plate number first. I have been messing about for a long time before, and the online articles are also quite messy. Later, I stumbled upon a more useful library-- plate-number-input

It was directly used to transform it. The specific effects are as follows:

The usage is as follows:

Npm I plate-number-input import PlateNumberInput from 'plate-number-input' const input = new PlateNumberInput ({el: "# plateNumapp", defaultNumber:' default number', isNewpower: false, / / onBtnSaveClick: () = > {/ / Click to save the callback event, and input.getNumber () represents to get the currently entered number console.log (input.getNumber ())}))

The next case-- bank card verification

(note: the bank card can only be verified by the personal card number, but the enterprise card number cannot be verified, because the call is the interface of Alipay verification, and the enterprise can only verify the number of digits)

The specific effects are as follows:

Npm i bankcardinfo import BIN from "bankcardinfo"; BIN.getBankBin (this.form.bank_account) .then (data = > {console.log (data); if (data.bankName) {console.log (data.bankName + data.cardTypeName)}}) .catch (err = > {let errMsg = (err.split (':) [1]). Split (',') [0] console.log (errMsg)})

You still have to write the specific business logic on your own. The corporate bank has to add the bank name of the card on its own, but it cannot be obtained.

This is the end of the article on "how to achieve license plate verification and bank verification in vue". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Bank license plate license plate number enterprise number article card number effect article more bank card good practical messy business personal event representative corporate bank digits Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Xiaomi Docker Linux MariaDB