wanghousheng 10 months ago
parent 6da2be0b2b
commit e841893e1b
  1. 10
      app/api/service/Identity.php

@ -65,8 +65,8 @@ class Identity extends BaseService
// 获取充值方案列表 // 获取充值方案列表
$model = new \app\api\model\user\Identity(); $model = new \app\api\model\user\Identity();
$planList = $model->getList(['type' => IdentityEnum::MEMBER]); $planList = $model->getList(['type' => IdentityEnum::MEMBER]);
if (!empty($planList)) { if (!$planList->isEmpty()) {
$planList = $this->cheapPrice($planList); $planList = $this->cheapPrice($planList->toArray());
} }
//计算优惠价格 //计算优惠价格
// 根据指定客户端获取可用的支付方式 // 根据指定客户端获取可用的支付方式
@ -80,7 +80,7 @@ class Identity extends BaseService
]; ];
} }
private function cheapPrice($data) private function cheapPrice($data): array
{ {
$one_data = $data[0]; $one_data = $data[0];
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
@ -114,8 +114,8 @@ class Identity extends BaseService
// 获取充值方案列表 // 获取充值方案列表
$model = new \app\api\model\user\Identity(); $model = new \app\api\model\user\Identity();
$planList = $model->getList(['type' => IdentityEnum::DEALER]); $planList = $model->getList(['type' => IdentityEnum::DEALER]);
if (!empty($planList)) { if (!$planList->isEmpty()) {
$planList = $this->cheapPrice($planList); $planList = $this->cheapPrice($planList->toArray());
} }
// 根据指定客户端获取可用的支付方式 // 根据指定客户端获取可用的支付方式
$PaymentModel = new PaymentModel; $PaymentModel = new PaymentModel;

Loading…
Cancel
Save