<?php
namespace backend\models;

class RateApi extends BaseApi
{
    public $apiUrl = 'rate';

    /**
     * 获取入金、出金汇率
     * @return array
     */
    public function getRate()
    {
        $result = $this->get($this->apiUrl . '/index', []);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data'], '获取汇率成功');
        } else {
            return $this->returnArray(0, [], '获取汇率失败');
        }
    }
}