diff --git a/FlyCube/Api/Controller/CheckController.class.php b/FlyCube/Api/Controller/CheckController.class.php index f6e12c6..e6b9c9b 100644 --- a/FlyCube/Api/Controller/CheckController.class.php +++ b/FlyCube/Api/Controller/CheckController.class.php @@ -147,4 +147,18 @@ class CheckController extends PublicController echo json_encode(array('status' => 0, 'msg' => '订单添加失败')); } } + /** + * @description: 对应用户的订单列表 + */ + public function getOrderList() + { + $where['openid'] = $this->openid; + $where['status'] = array('neq', 'canceled'); //排除已取消的订单 + $orderDb = D('order'); + if ($orderList = $orderDb->where($where)->select()) { + echo json_encode(array('status' => 1, 'msg' => '访问成功', "orderList" => $orderList)); + } else { + echo json_encode(array('status' => 0, 'msg' => '暂无订单数据')); + } + } }