Skip to content
欢迎扫码关注公众号

JavaScript QR Code 制作名片二维码

名片二维码的格式参照了下面的文章:

  1. 制作属于自己的二维码名片(通讯录)

  2. https://p.rogram.me/js/qrcode/(参照该页面的源代码, 使用的是 MeCard 格式)

关于二维码内容的格式有 MeCardvCard 两种.

vCard 的详细说明:关于 vcard 通讯录格式解析

其它类型的 QR Code 格式可以参照 QR Code possible data types or standards

关于中文乱码的问题请参照:JavaScript QR Code 使用 jquery-qrcode 插件显示含中文的二维码

上面 1 中的 TELTYPE 值不对,在 iOS 中无法识别。应修改成下面的格式:

BEGIN:VCARD
VERSION:3.0
N:姓名;
TEL;TYPE=WORD,VOICE,PREF,MSG:电话号码
EMAIL;TYPE=PREF,INTERNET:邮箱
END:VCARD

把换行符换成 \r\n 后如下:

BEGIN:VCARD\r\nVERSION:3.0\r\nN:姓名;\r\nTEL;TYPE=WORD,VOICE,PREF,MSG:电话号码\r\nEMAIL;TYPE=PREF,INTERNET:邮箱\r\nEND:VCARD

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.