微信小程序-wxacode.getUnlimited生成小程序码
目录
微信小程序 wxacode.getUnlimited生成小程序码
1、获取access_token
GET
你的小程序appid&secret=你的小程序secret
2、获取二维码
POST
获取到的access_token
body参数:
scene: ‘a=1’,//跳转带参
path : ‘pages/user/user’//跳转页面
返回图片Buffer数据
3、获取 scene 值
Page({
onLoad (query) {
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
const scene = decodeURIComponent(query.scene)
}
})