bourse stock

53 lines
1.2 KiB

3 months ago
<?php
namespace app\home\controller;
use app\home\service\FundService;
use think\response\Json;
//基金
class Fund extends HomeBaseController
{
// 基金列表
public function index(): Json
{
$result = (new FundService())->index($this->request->param());
return json($result);
}
// 基金详情
public function detail(): Json
{
$result = (new FundService())->detail($this->request->param());
return json($result);
}
//历史走势
public function history(): Json
{
$result = (new FundService())->history($this->request->param());
return json($result);
}
// 申购下单
public function order(): Json
{
$result = (new FundService())->order($this->request->param(), $this->request->userId);
return json($result);
}
// 用户基金持仓
public function userFund(): Json
{
$result = (new FundService())->userFund($this->request->param(), $this->request->userId);
return json($result);
}
// 用户基金 - 资产流水
public function userFundAssets(): Json
{
$result = (new FundService())->userFundAssets($this->request->param());
return json($result);
}
}