123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <?php
- namespace App\Http\Controllers\Buy;
- use App\Http\Controllers\BaseController;
- use App\Http\Logic\Buy\BuyLogic;
- class BuyController extends BaseController
- {
- /**
- * @SWG\Get(
- * path="/buy/cate/list",
- * tags={"电商导购"},
- * summary="获取电商平台分类",
- * description="获取电商平台分类",
- * produces={"application/json"},
- * @SWG\Parameter(
- * name="source",
- * in="query",
- * description="来源 jd-京东,vip-唯品会,pdd-拼多多,kaola-考拉,taobao-淘宝",
- * type="string"
- * ),
- * @SWG\Response(
- * response="200",
- * description="success",
- * @SWG\Schema(
- * @SWG\Property(
- * property="id",
- * type="string",
- * description="分类ID"
- * ),
- * @SWG\Property(
- * property="name",
- * type="string",
- * description="分类名称"
- * )
- * )
- * ),
- * @SWG\Response(
- * response="403",
- * description="fail",
- * @SWG\Schema(ref="#/definitions/ErrorBean")
- * )
- * )
- */
- public function getCateList()
- {
- $data = BuyLogic::getCateListLogic();
- return $this->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);
- }
- /**
- * @SWG\Get(
- * path="/buy/transfer/goods",
- * tags={"电商导购"},
- * summary="淘宝分享商品详情页接口",
- * description="淘宝分享商品详情页接口",
- * produces={"application/json"},
- * @SWG\Parameter(
- * name="user_id",
- * in="query",
- * description="分享者用户ID",
- * 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 transferGoods()
- {
- $data = BuyLogic::transferGoodsLogic();
- return $this->success($data);
- }
- }
|