The actual process of generating a QR code for payment

One, the actual effect:

Insert picture description here

Second, the specific realization ideas

Insert picture description here
Insert picture description here
However, this timer has not been turned off. This timer should be turned off at the appropriate location.
Insert picture description here
Because the transmitted data is in base64 format, it also needs to be drawn as a QR code on the page.
The html tag used is canvas, which provides an API that can draw on the element using js code,
and then use

npm install --save qrcode

You can draw a QR code:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42349568/article/details/113700029