@extends('base.base') @section('base')

{{ __('auto.查看渠道') }}

{!! csrf_field() !!}
@foreach($list as $k => $v) @php $remarks = []; if (!empty($v->remarks)) { $decoded = \GuzzleHttp\json_decode($v->remarks, true); if (is_array($decoded)) { $remarks = $decoded; } } $weights = $remarks['weight'] ?? ($remarks['weights'] ?? []); $payTypes = (int)($v->pay_types ?? 0); $payRate = config('pay.' . ($v->config_key ?? '') . '.pay_rate', []); $rateText = function ($method) use ($payRate) { $methodRate = $payRate[$method] ?? null; if (is_array($methodRate) && count($methodRate) >= 2) { return $methodRate[0] . '%+' . $methodRate[1]; } return '-'; }; @endphp @endforeach
ID {{ __('auto.渠道名称') }} Cash(1) PayPal(2) Apple(4) Google(8) {{ __('auto.当前状态') }}
{{ $v->id }} {{ $v->name }}
{{ $rateText(1) }}
{{ $rateText(2) }}
{{ $rateText(4) }}
{{ $rateText(8) }}
@component('components.select', [ 'name' => "config[{$v->id}][status]", 'class' => $v->status == 1 ? 'btn-primary' : 'btn-danger', 'options' => [1 => __('auto.开启'), -1 => __('auto.关闭')], 'default' => $v->status]) @endcomponent
@endsection