//获得二维码图片路径
$paths = a::where('order_id' , $id)->column('code_pic');
$paths = array_map(function ($v){
return '.' . $v;
} ,$paths);
$_path = './upfile/zip/' . date("Ymd") . '/';
is_dir($_path) or mkdir($_path , 0777 , true);
$filename = $_path . uniqid() . time() . '.zip';
$archive = new PclZip($filename);
$re = $archive->create(join("," , $paths) , PCLZIP_OPT_REMOVE_PATH , trim($code->basePath . $id , '/') );
if ($re == 0) die('下载错误');
$row->save([
'qrcode_path' => $filename
]);