作者 何书鹏

拆单订单号显示

@@ -629,7 +629,7 @@ trait OrderOper @@ -629,7 +629,7 @@ trait OrderOper
629 $user = User::info(); 629 $user = User::info();
630 extract($params); 630 extract($params);
631 631
632 - $order = (new self())->with('item')->where('user_id', $user->id); 632 + $order = (new self())->withTrashed()->with('item')->where('user_id', $user->id);
633 633
634 if (isset($order_sn)) { 634 if (isset($order_sn)) {
635 $order = $order->where('order_sn', $order_sn); 635 $order = $order->where('order_sn', $order_sn);
@@ -638,7 +638,7 @@ trait OrderOper @@ -638,7 +638,7 @@ trait OrderOper
638 $order = $order->where('id', $id); 638 $order = $order->where('id', $id);
639 } 639 }
640 640
641 - $order = $order->withTrashed()->find(); 641 + $order = $order->find();
642 642
643 if (!$order) { 643 if (!$order) {
644 throw new Exception('订单不存在'); 644 throw new Exception('订单不存在');