data_center/app/adminapi/controller/shop/UserController.php

48 lines
1.5 KiB
PHP

<?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);
}
}