|
@@ -1432,14 +1432,14 @@ class WechatService extends BaseService
|
|
|
* @param bool $refresh 是否重新生成
|
|
* @param bool $refresh 是否重新生成
|
|
|
* @return bool
|
|
* @return bool
|
|
|
*/
|
|
*/
|
|
|
- public static function makeNormalQrcode($str, $refresh = false, $logo='', $size = 3, $margin=0, $level=1)
|
|
|
|
|
|
|
+ public static function makeNormalQrcode($str, $refresh = false, $size = 3, $margin=0, $level=1)
|
|
|
{
|
|
{
|
|
|
$qrFile = '/img/qrcode/';
|
|
$qrFile = '/img/qrcode/';
|
|
|
if (!is_dir('/uploads'.$qrFile)) {
|
|
if (!is_dir('/uploads'.$qrFile)) {
|
|
|
@mkdir('./uploads' . $qrFile, 0755, true);
|
|
@mkdir('./uploads' . $qrFile, 0755, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $qrFile = $qrFile . 'U_' . strtoupper(md5($str . '_' . $size.$logo.$margin.$level)) . '.png';
|
|
|
|
|
|
|
+ $qrFile = $qrFile . 'U_' . strtoupper(md5($str . '_' . $size.$margin.$level)) . '.png';
|
|
|
$cacheKey = "caches:qrcodes:member_".md5($str);
|
|
$cacheKey = "caches:qrcodes:member_".md5($str);
|
|
|
if(RedisService::get($cacheKey) && is_file('/uploads'.$qrFile) && !$refresh){
|
|
if(RedisService::get($cacheKey) && is_file('/uploads'.$qrFile) && !$refresh){
|
|
|
return $qrFile;
|
|
return $qrFile;
|