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