Exemplo n.º 1
0
 # 查询商品评论—总数
 #
 # GET	https://<endpoint>/ProductComment/Count/[ProductId]
 #
 $app->get('/Count/:ProductId', function ($ProductId) use($app) {
     $productComment = new ProductComment($app);
     echo $productComment->getCount($ProductId);
 });
 #
 # 查询商品评论列表
 #
 # GET	https://<endpoint>/ProductComment/List/[ProductId]/?offset=0&limit=15
 #
 $app->get('/List/:ProductId/', function ($ProductId) use($app) {
     $productComment = new ProductComment($app);
     echo $productComment->getList($ProductId);
 });
 #
 # 查询某个用户的全部商品评论
 #
 # GET	https://<endpoint>/ProductComment/UserCommentList/[ConsumerId]/?offset=0&limit=15
 #
 $app->get('/UserCommentList/:ConsumerId/', function ($ConsumerId) use($app) {
     $productComment = new ProductComment($app);
     echo $productComment->getUserCommentList($ConsumerId);
 });
 #
 # 查询商品评论—详细信息
 #
 # GET	https://<endpoint>/ProductComment/[CommentId]
 #