commit
652b4ba9fb
@ -94,7 +94,7 @@ class OrderLogic extends BaseLogic
|
||||
$find['top_cate_id']=$find['cate_id'];
|
||||
if($StoreCategory && $StoreCategory['pid']>0){
|
||||
$StoreCategory2=StoreCategory::where('id',$StoreCategory['pid'])->find();
|
||||
if($StoreCategory2 && $StoreCategory['pid']>0){
|
||||
if($StoreCategory2 && $StoreCategory2['pid']>0){
|
||||
$find['top_cate_id']=$StoreCategory2['pid'];
|
||||
}else{
|
||||
$find['top_cate_id']=$StoreCategory['pid'];
|
||||
@ -315,12 +315,12 @@ class OrderLogic extends BaseLogic
|
||||
throw new \Exception('余额不足');
|
||||
}
|
||||
//生成核销码
|
||||
$generator = new BarcodeGeneratorPNG();
|
||||
$barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
|
||||
$findPath = '/image/barcode/' . time() . '.png';
|
||||
$savePath = public_path() . $findPath;
|
||||
file_put_contents($savePath, $barcode);
|
||||
$_order['verify_img'] = $findPath;
|
||||
// $generator = new BarcodeGeneratorPNG();
|
||||
// $barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
|
||||
// $findPath = '/image/barcode/' . time() . '.png';
|
||||
// $savePath = public_path() . $findPath;
|
||||
// file_put_contents($savePath, $barcode);
|
||||
// $_order['verify_img'] = $findPath;
|
||||
Db::startTrans();
|
||||
try {
|
||||
$order = StoreOrder::create($_order);
|
||||
|
Loading…
x
Reference in New Issue
Block a user