ApiService.php
657 Bytes
<?php
namespace App\Services;
use App\Helper\Http;
/**
* Class ApiService
* @package App\Services
*/
class ApiService
{
protected static $uri = [
'walletAddIncome'=> '/api/income/addIncomeAndDetail', //外部系统入账-外部可调用
];
/**
* 钱包 - 同步收入/支出数据
* @param $data
* @return array
*/
public static function walletAddIncome($data)
{
return Http::post(self::getUri(__FUNCTION__), $data);
}
/**
* 获取uri
* @param $method
* @return mixed
*/
private static function getUri($method)
{
return self::$uri[$method];
}
}