success($data); } /** * @SWG\Post( * path="/buy/goods/list", * tags={"电商导购"}, * summary="商品列表接口", * description="商品列表接口", * produces={"application/json"}, * @SWG\Parameter( * name="page", * in="query", * description="第几页", * type="string" * ), * @SWG\Parameter( * name="page_size", * in="query", * description="每页数量", * type="string" * ), * @SWG\Parameter( * name="source", * in="query", * description="来源 jd-京东,vip-唯品会,pdd-拼多多,kaola-考拉,taobao-淘宝", * type="string" * ), * @SWG\Parameter( * name="cat_id", * in="query", * description="分类ID", * type="string" * ), * @SWG\Response( * response="200", * description="success", * @SWG\Schema(ref="#/definitions/GetGoodsListResultBean") * ), * @SWG\Response( * response="403", * description="fail", * @SWG\Schema(ref="#/definitions/ErrorBean") * ) * ) */ public function getGoodsList() { $data = BuyLogic::getGoodsListLogic(); return $this->success($data); } /** * @SWG\Get( * path="/buy/goods/detail", * tags={"电商导购"}, * summary="商品详情页", * description="商品详情页", * produces={"application/json"}, * @SWG\Parameter( * name="source", * in="query", * description="来源 jd-京东,vip-唯品会,pdd-拼多多,kaola-考拉,taobao-淘宝", * type="string" * ), * @SWG\Parameter( * name="goods_id", * in="query", * description="商品ID", * type="string" * ), * @SWG\Response( * response="200", * description="success", * @SWG\Schema( * @SWG\Property( * property="goods_name", * type="string", * description="商品名称" * ), * @SWG\Property( * property="price", * type="string", * description="优惠价" * ), * @SWG\Property( * property="market_price", * type="string", * description="市场价格" * ), * @SWG\Property( * property="discount", * type="string", * description="优惠金额" * ), * @SWG\Property( * property="commission", * type="string", * description="佣金" * ), * @SWG\Property( * property="url", * type="string", * description="购买链接" * ), * @SWG\Property( * property="goods_carousel_pictures", * type="string", * description="商品轮播图(数组)" * ), * @SWG\Property( * property="goods_detail_pictures", * type="string", * description="商品详情图片(数组)" * ), * ) * ), * @SWG\Response( * response="403", * description="fail", * @SWG\Schema(ref="#/definitions/ErrorBean") * ) * ) */ public function getGoodsDetail() { $data = BuyLogic::getGoodsDetailLogic(); return $this->success($data); } /** * @SWG\Post( * path="/buy/goods/search", * tags={"电商导购"}, * summary="商品搜索接口", * description="商品搜索接口", * produces={"application/json"}, * @SWG\Parameter( * name="keyword", * in="query", * description="搜索关键词", * type="string" * ), * @SWG\Parameter( * name="page", * in="query", * description="第几页", * type="string" * ), * @SWG\Parameter( * name="page_size", * in="query", * description="每页数量", * type="string" * ), * @SWG\Parameter( * name="sort", * in="query", * description="1-综合排序,2-价格升序,3-销量降序 默认1", * type="string" * ), * @SWG\Parameter( * name="source", * in="query", * description="来源 jd-京东,vip-唯品会,pdd-拼多多,kaola-考拉,taobao-淘宝", * type="string" * ), * @SWG\Response( * response="200", * description="success", * @SWG\Schema(ref="#/definitions/GetGoodsListResultBean") * ), * @SWG\Response( * response="403", * description="fail", * @SWG\Schema(ref="#/definitions/ErrorBean") * ) * ) */ public function getGoodsSearch() { $data = BuyLogic::getGoodsSearchLogic(); return $this->success($data); } }