|
...
|
...
|
@@ -324,4 +324,31 @@ class ComController extends BaseController |
|
|
|
Cache::add('login-project-'.$this->user['mobile'],1,300);
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :推荐采购商
|
|
|
|
* @name :recommendedPurchaser
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/3/4 10:10
|
|
|
|
*/
|
|
|
|
public function recommendedPurchaser(){
|
|
|
|
$this->param['keyword'] = 'led';
|
|
|
|
$url = 'https://admin.hagro.cn/api/company_list';
|
|
|
|
$data = [
|
|
|
|
'prod_desc'=>$this->param['keyword'],
|
|
|
|
'total'=>$this->param['now'] ?? 10,
|
|
|
|
];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export(http_build_query($data), true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$token = 'company_list'.date('Y-m-d').http_build_query(arsort($data));
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($token, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$param = [
|
|
|
|
'prod_desc'=>$this->param['keyword'],
|
|
|
|
'token'=>$token,
|
|
|
|
'total'=>$this->param['now'] ?? 10,
|
|
|
|
];
|
|
|
|
$lists = http_post($url,$param);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($token, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|