| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <?php
- namespace backend\models;
- class OpenApi extends BaseApi
- {
- public $apiUrl = 'open';
- /**
- * 真实账户申请
- * @param array $data
- * @return array
- */
- public function open($data)
- {
- $result = $this->post($this->apiUrl . '/open', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '真实账户申请成功');
- } else {
- return $this->returnArray(0, $result['data'], $result['message']);
- }
- }
- /**
- * 模拟账户申请
- * @param array $data
- * @return array
- */
- public function openDemo($data)
- {
- $result = $this->post($this->apiUrl . '/opendemo', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '模拟账户申请成功');
- } else {
- return $this->returnArray(0, [], $result['message']);
- }
- }
- /**
- * 开户申请列表
- * @param array $data
- * @return array
- */
- public function getOpenList($data = [])
- {
- $result = $this->get($this->apiUrl.'/get-open-list', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '获取开户申请记录成功');
- } else {
- return $this->returnArray(0, [], '获取开户申请记录失败');
- }
- }
- /**
- * 开户申请详情
- * @param array $data
- * @return array
- */
- public function view($data = [])
- {
- $result = $this->get($this->apiUrl.'/view', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '获取开户申请详情成功');
- } else {
- return $this->returnArray(0, [], '获取开户详情失败');
- }
- }
- /**
- * 删除开户申请
- * @param array $data
- * @return array
- */
- public function openDelete($data = [])
- {
- $result = $this->post($this->apiUrl.'/open-delete', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '删除开户申请成功');
- } else {
- return $this->returnArray(0, [], '删除开户申请失败');
- }
- }
- /**
- * 开户申请审核
- * @param array $data
- * @return array
- */
- public function openAction($data = [])
- {
- $result = $this->get($this->apiUrl.'/open-action', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '审核成功');
- } else {
- return $this->returnArray(0, $result['data'], '审核失败');
- }
- }
- /**
- * 开设MT4账户
- * @param array $data
- * @return array
- */
- public function openAccount($data = [])
- {
- $result = $this->post($this->apiUrl.'/open-account', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], $result['message']);
- } else {
- return $this->returnArray(0, $result['data'], $result['message']);
- }
- }
- /**
- * 开设xtrader账户
- * @param array $data
- * @return array
- */
- public function openMember($data = [])
- {
- $result = $this->post($this->apiUrl.'/open-member', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], $result['message']);
- } else {
- return $this->returnArray(0, [], $result['message']);
- }
- }
- /**
- * 开设xbroker账户
- * @param array $data
- * @return array
- */
- public function openIbMember($data = [])
- {
- $result = $this->post($this->apiUrl.'/open-ib-member', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], $result['message']);
- } else {
- return $this->returnArray(0,$result['data'], $result['message']);
- }
- }
- /**
- * 更新MT4账户
- * @param array $data
- * @return array
- */
- public function updateOpen($data = [])
- {
- $result = $this->post($this->apiUrl.'/update-open', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], $result['message']);
- } else {
- return $this->returnArray(0, [], $result['message']);
- }
- }
- }
|