更新中台商品
This commit is contained in:
parent
043ba8e5be
commit
5668887a5c
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
namespace app\adminapi\controller\shop;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use think\response\Json;
|
||||
|
||||
/**
|
||||
* 商城控制器
|
||||
* Class ProductController
|
||||
* @package app\adminapi\controller\finance
|
||||
*/
|
||||
class ProductController extends BaseAdminController
|
||||
{
|
||||
|
||||
protected $shopUrl = 'http://127.0.0.1:8324';
|
||||
|
||||
public function productLstFilter(): Json
|
||||
{
|
||||
$params=$this->request->get();
|
||||
$result = curl_post($this->shopUrl . '/middle/store/product/lst_filter',$params,$this->reqHeader);
|
||||
if(($result['status'] ?? 500) != 200){
|
||||
return $this->fail($result['message'] ?? '非法请求');
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
public function categoryLlist(): Json
|
||||
{
|
||||
$params=$this->request->get();
|
||||
$result = curl_post($this->shopUrl . '/middle/store/category/list',$params,$this->reqHeader);
|
||||
if(($result['status'] ?? 500) != 200){
|
||||
return $this->fail($result['message'] ?? '非法请求');
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
public function productMerSelect(): Json
|
||||
{
|
||||
$params=$this->request->get();
|
||||
$result = curl_post($this->shopUrl . '/middle/store/product/mer_select',$params,$this->reqHeader);
|
||||
if(($result['status'] ?? 500) != 200){
|
||||
return $this->fail($result['message'] ?? '非法请求');
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
public function labelLoption(): Json
|
||||
{
|
||||
$params=$this->request->get();
|
||||
$result = curl_post($this->shopUrl . '/middle/product/label/option',$params,$this->reqHeader);
|
||||
if(($result['status'] ?? 500) != 200){
|
||||
return $this->fail($result['message'] ?? '非法请求');
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
public function productLst(): Json
|
||||
{
|
||||
$params=$this->request->get(['type', 'star', 'svip_price_type', 'us_status', 'hot_type', 'keyword', 'is_trader', 'mer_id', 'page', 'limit', 'pid']);
|
||||
$result = curl_post($this->shopUrl . '/middle/store/product/lst',$params,$this->reqHeader);
|
||||
if(($result['status'] ?? 500) != 200){
|
||||
return $this->fail($result['message'] ?? '非法请求');
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue