更新记录
1.1.3(2026-04-15) 下载此版本
更新使用说明文档
1.1.2(2026-04-15) 下载此版本
优化已知bug
1.1.0(2026-04-15) 下载此版本
更新使用说明文档
查看更多平台兼容性
云端兼容性
| 阿里云 | 腾讯云 | 支付宝云 |
|---|---|---|
| √ | × | √ |
云函数类插件通用教程
使用云函数类插件的前提是:使用HBuilderX 2.9+
xxm-wx-mp-qrcode
uniCloud云对象生成微信小程序码和***
使用方法
1)从插件市场下载xxm-wx-mp-qrcode插件
2)在uniCloud -> cloudfunctions中找到“xxm-wx-qrcode-co”云对象,修改config.js中的appid和secret,因为该项目是依赖于uni-id的,所以直接从uni-id的congfig.json中导入的appid和secret
const configCenter = require("uni-config-center/uni-id/config.json")
const {
appid,
appsecret: secret
} = configCenter['mp-weixin']['oauth']['weixin'];
如果没有使用uni-id的话,可以直接不导入,在config.js中删除上面两行代码,直接填写自己小程序后台的appid和secret,如下所示:
const appid="wx30f1d3a487cf9323a";
const secret="87a0ee0dc159db5f1b2f6b07a273f3abe";
3)使用该xxm-wx-qrcode-co云对象,示例:
const QRcodePic = ref('');
const qrcodeCloudObj = uniCloud.importObject("xxm-wx-qrcode-co",{ customUI: true });
let imgData = await qrcodeCloudObj.getUnlimited({
path: `pages_vote/detail/detail?cid=123&sid=456`,
width: 300
});
QRcodePic.value = imgData;
<image src="QRcodePic" mode="aspectFill"></image>
各类码生成函数
| 函数名 | 说明 | 参数 |
|---|---|---|
| getwxacode | 获取有数量限制的小程序码 | 参考微信官方文档:getwxacode |
| getUnlimited | 获取不限制数量的小程序码 | 参考微信官方文档:getUnlimited |
| createwxaqrcode | 获取有数量限制的二维码 | 参考微信官方文档:createwxaqrcode |

收藏人数:
https://gitee.com/qingnian8/xxm-plugin/tree/master/uni_modules/xxm-wx-mp-qrcode
下载插件并导入HBuilderX
赞赏(0)
下载 612
赞赏 7
下载 34538
赞赏 155
赞赏
京公网安备:11010802035340号