Coder Social home page Coder Social logo

mergeqrcode's Introduction

MergeQRcode

将微信和支付宝的收款码二合一.支持自定义二维码样式,但是没有面板的DIY.

MergeQRcode V1(废案)

该方案为废案,因为二维码的生成实现在了HTML的画布(Cansav)上. 而微信内置浏览器的二维码扫描只能识别<img>标签的图片. 虽然该库提供了方法获取源数据,但是返回的值是Blob类型而我没有系统学习过JS. 因此作废.

使用方法

1.下载源码并部署到自己的网站上

2.获取自己的二维码,通过第三方网站识别获取二维码的内容.

3.将识别出来的链接替换掉源码中的链接即可.

Demo

MergeQRcode V2

相比V1,V2使用的生成库的自定义程度更高. 虽然二维码的生成也是基于画布实现的,但是因为可以导出Base64图片. 不过对二维码的样式更新并没有像上一个方法一样便捷直接提供了update()方法.需要清除二维码,更改参数并重生生成二维码.

使用方法

1.npm install easyqrcodejs

2.剩余步骤同上个方案

Demo

Reference

https://mkblog.cn/922/

mergeqrcode's People

Contributors

cmmmmmmlau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.