bourse stock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

<?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);
}
}