This commit is contained in:
szdot 2024-06-06 01:31:23 +08:00
commit 16d06eb2c4

View File

@ -147,4 +147,18 @@ class CheckController extends PublicController
echo json_encode(array('status' => 0, 'msg' => '订单添加失败')); 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' => '暂无订单数据'));
}
}
} }