瀏覽代碼

小程序app-订单详情

xupuyuan 10 月之前
父節點
當前提交
b1db72c519
共有 1 個文件被更改,包括 13 次插入9 次删除
  1. 13 9
      app/controller/api/store/order/StoreOrder.php

+ 13 - 9
app/controller/api/store/order/StoreOrder.php

@@ -951,7 +951,6 @@ class StoreOrder extends BaseController
951
         ], $page, $limit));
951
         ], $page, $limit));
952
     }
952
     }
953
 
953
 
954
-
955
     /**
954
     /**
956
      * @param $id
955
      * @param $id
957
      * @return mixed
956
      * @return mixed
@@ -960,14 +959,19 @@ class StoreOrder extends BaseController
960
      */
959
      */
961
     public function detail($id)
960
     public function detail($id)
962
     {
961
     {
963
-        $order = $this->repository->getDetail((int)$id);
964
-//        $order = $this->repository->getDetail((int)$id, $this->request->uid());
965
-        if (!$order)
966
-            return app('json')->fail('订单不存在');
967
-        if ($order->order_type == 1) {
968
-            $order->append(['take']);
969
-        }
970
-        return app('json')->success($order->toArray());
962
+//        $order = $this->repository->getDetail((int)$id);
963
+////        $order = $this->repository->getDetail((int)$id, $this->request->uid());
964
+//        if (!$order)
965
+//            return app('json')->fail('订单不存在');
966
+//        if ($order->order_type == 1) {
967
+//            $order->append(['take']);
968
+//        }
969
+//        return app('json')->success($order->toArray());
970
+        $query = Db::name('store_order')
971
+            ->where('order_sn', $id)
972
+            ->select()
973
+            ->toArray();
974
+        return app('json')->success($query, '获取成功');
971
     }
975
     }
972
 
976
 
973
     /**
977
     /**