# "Comment":"评论内容", # "ConsumerId":"评论用户" # } # $app->post('/', function () use($app) { $productComment = new ProductComment($app); echo $productComment->post(); }); # # 查询商品评论—总数 # # 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 #