ApiService.php
776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace App\Services;
use App\Helper\ErrorCode;
use App\Helper\Http;
use App\Helper\Response;
use App\Models\Legal\Company;
use App\Models\Legal\StakeholderIncomeByPayer;
/**
* Class ApiService
* @package App\Services
*/
class ApiService
{
protected static $uri = [
'walletAddIncome'=> '/api/wallet/addIncome', //外部系统入账-外部可调用
];
/**
* 钱包 - 同步收入/支出数据
* @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];
}
}