From 841d3a632ac828d362feade83f58893e8a3c53ec Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 22 Jul 2024 16:34:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9OrderList=E5=92=8COrd?= =?UTF-8?q?erLogic=E7=B1=BB=E4=BB=A5=E6=94=B9=E8=BF=9B=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E7=9A=84base64=E7=BC=96=E7=A0=81=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/order/OrderList.php | 2 +- app/api/logic/order/OrderLogic.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/lists/order/OrderList.php b/app/api/lists/order/OrderList.php index a17169c20..3a3da76ff 100644 --- a/app/api/lists/order/OrderList.php +++ b/app/api/lists/order/OrderList.php @@ -84,7 +84,7 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface if($item['is_writeoff']==0){ $generator = new BarcodeGeneratorPNG(); $tmpFilename = $generator->getBarcode($item['verify_code'], $generator::TYPE_CODE_128); - $item['verify_base64'] = base64_encode($tmpFilename); + $item['verify_base64'] ='data:image/png;base64,'.base64_encode($tmpFilename); } }) ->toArray(); diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 9435d7f1d..ffcf7aa16 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -509,7 +509,7 @@ class OrderLogic extends BaseLogic if($find['is_writeoff']==0){ $generator = new BarcodeGeneratorPNG(); $tmpFilename = $generator->getBarcode($find['verify_code'], $generator::TYPE_CODE_128); - $find['verify_base64'] = base64_encode($tmpFilename); + $find['verify_base64'] = 'data:image/png;base64,'.base64_encode($tmpFilename); } //处理返回最近的店铺 if ($param['lat'] && $param['long']) {