|
|
@@ -253,6 +253,10 @@ class User extends UserModel
|
|
|
public static function getQrcode($sid){
|
|
|
$fileName = '/uploads/qrcode/'.$sid.'_'.md5($sid).'.jpg';
|
|
|
$cache = Cache::get('caches:qrcode:'.$sid);
|
|
|
+ if(!is_dir(app()->getRootPath().'public')){
|
|
|
+ mkdir(app()->getRootPath().'public',0755, true);
|
|
|
+ }
|
|
|
+
|
|
|
if($cache && file_exists(app()->getRootPath().'public'.$fileName)){
|
|
|
return getPreview($fileName);
|
|
|
}
|