RateApi.php 482 B

123456789101112131415161718192021
  1. <?php
  2. namespace backend\models;
  3. class RateApi extends BaseApi
  4. {
  5. public $apiUrl = 'rate';
  6. /**
  7. * 获取入金、出金汇率
  8. * @return array
  9. */
  10. public function getRate()
  11. {
  12. $result = $this->get($this->apiUrl . '/index', []);
  13. if ($result['code'] == 1) {
  14. return $this->returnArray(1, $result['data'], '获取汇率成功');
  15. } else {
  16. return $this->returnArray(0, [], '获取汇率失败');
  17. }
  18. }
  19. }