小程序 获取小程序码
<p>[TOC]</p>
<h5>简要描述</h5>
<h5>请求URL</h5>
<ul>
<li><code>/user/getQRCode</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">path</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>扫码进入的小程序页面路径,最大长度 1024 个字符,不能为空,scancode_time为系统保留参数,不允许配置;对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar",即可在 wx.getLaunchOptionsSync 接口中的 query 参数获取到 {foo:"bar"}。</td>
</tr>
</tbody>
</table>
<p>详见:<a href="https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getQRCode.html">https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getQRCode.html</a></p>
<h5>返回示例</h5>
<pre><code>{
&quot;code&quot;: 1,
&quot;msg&quot;: &quot;&quot;,
&quot;time&quot;: &quot;1741849747&quot;,
&quot;data&quot;: {
&quot;qrcode&quot;: &quot;data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBA&quot;
}
}</code></pre>
<h5>返回参数说明</h5>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>