|
|
@@ -14,7 +14,7 @@ class RechargeChannel extends Controller
|
|
|
//获取充值方式
|
|
|
public function getChannel()
|
|
|
{
|
|
|
- $channel = RechargeChannelModel::where('status', 1)->select(['type','name'])->get()->toArray();
|
|
|
+ $channel = RechargeChannelModel::getChannel();
|
|
|
return $this->success(['total' => count($channel), 'data' => $channel]);
|
|
|
}
|
|
|
|
|
|
@@ -33,7 +33,7 @@ class RechargeChannel extends Controller
|
|
|
->forPage($page, $limit)
|
|
|
->get();
|
|
|
foreach($list as &$item) {
|
|
|
- $item->rechargeChannel = RechargeChannelModel::whereIn('type', $item['type'])->get();
|
|
|
+ $item->rechargeChannel = RechargeChannelModel::getChannel($item['type']);
|
|
|
}
|
|
|
} catch (Exception $e) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
|