feat: 修改OrderList和OrderLogic类以改进验证码的base64编码方式

This commit is contained in:
mkm 2024-07-22 16:34:28 +08:00
parent 3f75281438
commit 841d3a632a
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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']) {