修改存储路径方式

This commit is contained in:
liu 2024-06-12 16:05:49 +08:00
parent 14c588718a
commit b5d860a4c0

View File

@ -232,9 +232,10 @@ class OrderLogic extends BaseLogic
//生成核销码
$generator = new BarcodeGeneratorPNG();
$barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
$savePath = 'public/image/barcode/'.time().'.png';
$findPath = '/image/barcode/'.time().'.png';
$savePath = 'public'.$findPath;
file_put_contents($savePath, $barcode);
$_order['verify_img'] = $savePath;
$_order['verify_img'] = $findPath;
Db::startTrans();
try {
$order = StoreOrder::create($_order);