初始化项目
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 管理系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2023 https://www.zizai.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 自在科技
|
||||
// +----------------------------------------------------------------------
|
||||
declare (strict_types=1);
|
||||
|
||||
namespace app\api\controller\syb;
|
||||
|
||||
use app\api\controller\Controller;
|
||||
|
||||
/**
|
||||
* 加油e卡通基础数据
|
||||
* Class SybBase
|
||||
* @package app\api\controller
|
||||
*/
|
||||
class SybBase extends Controller
|
||||
{
|
||||
/** 油站查询
|
||||
* @param $data
|
||||
* @return array|mixed|string[]
|
||||
*/
|
||||
public function baseGasStationList($data)
|
||||
{
|
||||
$header = [
|
||||
'method' => 'syb.base.gasStation.list',
|
||||
];
|
||||
$body = [
|
||||
'province' => $data['province']??'',
|
||||
'city' => $data['city']??'',
|
||||
'longitude' => $data['longitude']??'',
|
||||
'latitude' => $data['latitude']??'',
|
||||
'pageLimit' => $data['pageLimit']??'',
|
||||
'pageNum' => $data['pageNum']??'',
|
||||
];
|
||||
|
||||
$response = $this->sendRequest(config('crypto.url').'/api/1.0.0/base/gasStationList', $body, $header);
|
||||
$this->saveLog("油站查询".json_encode($response,320));
|
||||
return $response;
|
||||
}
|
||||
|
||||
/** 文件上传接口
|
||||
* @param $data
|
||||
* @return array|mixed|string[]
|
||||
*/
|
||||
public function baseFileUpload($data)
|
||||
{
|
||||
$header = [
|
||||
'method' => 'syb.base.file.upload',
|
||||
];
|
||||
$body = [
|
||||
'orgNo' => config('crypto.company_no'),
|
||||
'file' => request()->file('file'),
|
||||
];
|
||||
|
||||
$response = $this->sendRequest(config('crypto.url').'/api/1.0.0/base/uploadFile', $body, $header);
|
||||
$this->saveLog("文件上传接口".json_encode($response,320));
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user