This commit is contained in:
wong
2025-12-17 17:58:08 +08:00
parent 7f7d5d5c39
commit d8183909ca

View File

@@ -907,9 +907,11 @@ class ChannelController extends BaseController
$scene = substr(md5($token), 0, 32);
// 调用接口生成小程序码
// 注意page 必须是小程序里已经存在且发布过的页面路径
// 根据你的前端约定,改为和 H5 一致的添加渠道页面
$response = $app->app_code->getUnlimit($scene, [
'page' => 'pages/distribution/register', // 小程序页面路径,需要根据实际项目调整
'width' => 430, // 二维码的宽度
'page' => 'pages/channel/add', // 请确保小程序里存在该页面
'width' => 430, // 二维码的宽度
]);
// 成功时返回的是 StreamResponse失败时通常返回数组包含 errcode/errmsg