|
|
@@ -257,6 +257,7 @@ class UserBillController
|
|
|
$imageInfo = null;
|
|
|
SystemAttachment::where(['name' => $name])->delete();
|
|
|
}
|
|
|
+ @file_put_contents('quanju.txt', json_encode($imageInfo) . "-什么东西\r\n", 8);
|
|
|
if (!$imageInfo) {
|
|
|
try {
|
|
|
$qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
|
|
|
@@ -269,7 +270,9 @@ class UserBillController
|
|
|
SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
|
|
$urlCode = $imageInfo['dir'];
|
|
|
}
|
|
|
+ @file_put_contents('quanju.txt', "-1\r\n", 8);
|
|
|
} catch (\Exception $e) {
|
|
|
+ @file_put_contents('quanju.txt', "-2\r\n", 8);
|
|
|
$codeUrl = set_http_type($siteUrl . '?spread=' . $user['uid'], 1);//二维码链接
|
|
|
$imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
|
|
if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
|
|
|
@@ -283,6 +286,7 @@ class UserBillController
|
|
|
'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
|
|
'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
|
|
];
|
|
|
+ @file_put_contents('quanju.txt', "-3\r\n", 8);
|
|
|
if (!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
|
|
|
if (!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
|
|
|
foreach ($routineSpreadBanner as $key => &$item) {
|
|
|
@@ -323,17 +327,21 @@ class UserBillController
|
|
|
),
|
|
|
'background' => $item['pic']
|
|
|
);
|
|
|
+ @file_put_contents('quanju.txt', "-4\r\n", 8);
|
|
|
$resWap = $resWap && $posterInfo = UtilService::setSharePoster($config, 'wap/spread/poster');
|
|
|
if (!is_array($posterInfo)) return app('json')->fail($posterInfo);
|
|
|
SystemAttachment::attachmentAdd($posterInfo['name'], $posterInfo['size'], $posterInfo['type'], $posterInfo['dir'], $posterInfo['thumb_path'], 1, $posterInfo['image_type'], $posterInfo['time'], 2);
|
|
|
+ @file_put_contents('quanju.txt', "-5\r\n", 8);
|
|
|
if ($resWap) {
|
|
|
if ($posterInfo['image_type'] == 1)
|
|
|
$item['wap_poster'] = $siteUrl . $posterInfo['thumb_path'];
|
|
|
else
|
|
|
$item['wap_poster'] = UtilService::setHttpType($posterInfo['thumb_path'], 1);
|
|
|
}
|
|
|
+ @file_put_contents('quanju.txt', "-6\r\n", 8);
|
|
|
}
|
|
|
}
|
|
|
+ @file_put_contents('quanju.txt', json_encode($routineSpreadBanner)."-7\r\n", 8);
|
|
|
if ($resRoutine && $resWap) return app('json')->successful($routineSpreadBanner);
|
|
|
else return app('json')->fail('生成图片失败');
|
|
|
} catch (\Exception $e) {
|