Compare commits
4 Commits
5668887a5c
...
fe8d809364
Author | SHA1 | Date |
---|---|---|
yaooo | fe8d809364 | |
yaooo | a7d48d31c1 | |
yaooo | 956eb7abb6 | |
yaooo | 1f2b24969e |
|
@ -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'))
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue