作者 何书鹏
1 个管道 的构建 失败

生成小程序二维码

... ... @@ -417,17 +417,17 @@ class Index extends Api
mkdir($dir,0777,true);
}
// // 职位小程序码
// $qrcode = $dir.'/qrcode_'.$job_id.'.png';
// if(!file_exists($qrcode)){
// $response = Wechat::miniProgram()->app_code->getUnlimit($job_id, [
// 'page' => 'pages/verificationPage/verificationPage',
// 'width' => 169,
// ]);
// if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) {
// $response->saveAs($dir, str_replace($dir.'/','',$qrcode));
// }
// }
// 职位小程序码
$qrcode = $dir.'/qrcode_'.$job_id.'.png';
if(!file_exists($qrcode)){
$response = Wechat::miniProgram()->app_code->getUnlimit($job_id, [
'page' => 'pages/zhiwei_xq/zhiwei_xq',
'width' => 169,
]);
if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) {
$response->saveAs($dir, str_replace($dir.'/','',$qrcode));
}
}
//将职位封面图保存到本地
$job_cover = $dir.'/cover_'.$job_id.'.png';
file_put_contents($job_cover,file_get_contents($job['cover']));
... ...
... ... @@ -690,17 +690,17 @@ class User extends Api
mkdir($dir,0777,true);
}
// // 用户小程序码
// $qrcode = $dir.'/qrcode_'.$user['id'].'.png';
// if(!file_exists($qrcode)){
// $response = Wechat::miniProgram()->app_code->getUnlimit($user['id'], [
// 'page' => 'pages/verificationPage/verificationPage',
// 'width' => 169,
// ]);
// if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) {
// $response->saveAs($dir, str_replace($dir.'/','',$qrcode));
// }
// }
// 用户小程序码
$qrcode = $dir.'/qrcode_'.$user['id'].'.png';
if(!file_exists($qrcode)){
$response = Wechat::miniProgram()->app_code->getUnlimit($user['id'], [
'page' => 'pages/indexone/indexone',
'width' => 169,
]);
if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) {
$response->saveAs($dir, str_replace($dir.'/','',$qrcode));
}
}
//将用户头像保存到本地
$avatar = $dir.'/avatar_'.$user['id'].'.png';
... ...