Compare commits

...

4 Commits

Author SHA1 Message Date
yaooo fe8d809364 更新中台商城接口 2023-12-04 15:35:07 +08:00
yaooo a7d48d31c1 更新商户接口 2023-12-04 15:30:15 +08:00
yaooo 956eb7abb6 新增中台用户列表 2023-12-04 14:41:02 +08:00
yaooo 1f2b24969e 更新中台商品 2023-12-04 11:13:00 +08:00
4 changed files with 119 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class BaseAdminController extends BaseLikeAdminController
$this->reqHeader = [
"appid:".env('app.app_id'),
"timestamp:".time(),
"sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret'))
"sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()], env('app.app_secret'))
];
}

View File

@ -0,0 +1,69 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
/**
* 商城控制器
* Class ProductController
* @package app\adminapi\controller\finance
*/
class MerchantController extends BaseAdminController
{
protected $shopUrl = 'https://crmeb-test.shop.lihaink.cn';
public function cityGetArea(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/merchant/city/get_area',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function count(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/merchant/count',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function categoryOptions(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/merchant/category/options',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function typeOptions(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/merchant/type/options',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function lst(): Json
{
$params = $this->request->get(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id', 'area_id', 'street_id']);
$result = curl_post($this->shopUrl . '/middle/merchant/lst',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
}

View File

@ -13,7 +13,7 @@ use think\response\Json;
class ProductController extends BaseAdminController
{
protected $shopUrl = 'http://127.0.0.1:8324';
protected $shopUrl = 'https://crmeb-test.shop.lihaink.cn';
public function productLstFilter(): Json
{

View File

@ -0,0 +1,48 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
/**
* 商城控制器
* Class ProductController
* @package app\adminapi\controller\finance
*/
class UserController extends BaseAdminController
{
protected $shopUrl = 'https://crmeb-test.shop.lihaink.cn';
public function groupLst(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/user/group/lst',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function labelLst(): Json
{
$params=$this->request->get();
$result = curl_post($this->shopUrl . '/middle/user/label/lst',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
public function lst(): Json
{
$params=$this->request->get(['nickname', 'phone', 'uid', 'group_id', 'label_id', 'sex', 'is_promoter', 'user_time_type', 'user_time', 'pay_count', 'page', 'limit']);
$result = curl_post($this->shopUrl . '/middle/user/lst',$params,$this->reqHeader);
if(($result['status'] ?? 500) != 200){
return $this->fail($result['message'] ?? '非法请求');
}
return json($result);
}
}