H5 code scanning solution - https only

h5-scan (reproduced from github)

The mobile terminal calls the camera, scans the QR code (supports react and native js) encapsulates jsQR, and calls the camera to scan to obtain the QR code

Test address: https://zyzcss.github.io/scan/scan.html

Contains 2 versions: react environment, native js environment

Source code download address: https://github.com/zyzcss/h5-scan

Necessary environment: https, pro-test available

compatibility

https://caniuse.com/#search=getUserMedia

Instructions for use

  1. git clone https://github.com/zyzcss/h5-scan.git
  2. cd h5-scan
  3. yarn & yarn start | npm install & npm run start
  4. Make sure that the pc and the mobile phone are in the same LAN, and use ipconfig to view the ip pointed to by ipv4 Example: 192.168.0.1 Enter the react environment in the mobile browser: https://192.168.0.1:3000/Native  js environment: https://192.168.0.1: 3000/test.html

JS

Instructions for use

The basic scanning function is realized without too much packaging. Seepublic/test.html

Guess you like

Origin blog.csdn.net/qq_26408545/article/details/119827709