|
|
@@ -37,10 +37,9 @@
|
|
|
<tr>
|
|
|
<th style="min-width: 80px;">ID</th>
|
|
|
<th style="min-width: 180px;">{{ __('auto.渠道名称') }}</th>
|
|
|
- <th style="min-width: 120px;">Cash(1)</th>
|
|
|
- <th style="min-width: 120px;">PayPal(2)</th>
|
|
|
- <th style="min-width: 120px;">Apple(4)</th>
|
|
|
- <th style="min-width: 120px;">Google(8)</th>
|
|
|
+ @foreach(config('payment.methods', []) as $methodKey => $method)
|
|
|
+ <th style="min-width: 120px;">{{ $method['name'] }}({{ $methodKey }})</th>
|
|
|
+ @endforeach
|
|
|
<th style="min-width: 150px;">{{ __('auto.当前状态') }}</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
@@ -69,50 +68,19 @@
|
|
|
<td>{{ $v->id }}</td>
|
|
|
<td>{{ $v->name }}</td>
|
|
|
<input type="hidden" name="config[{{$v->id}}][sort]" value="{{$v->sort}}">
|
|
|
+ @foreach(config('payment.methods', []) as $methodKey => $method)
|
|
|
<td>
|
|
|
<div style="display:flex; align-items:center; gap:6px;">
|
|
|
<input class="form-control form-control-sm" type="number" min="0"
|
|
|
style="width:72px;"
|
|
|
- name="config[{{$v->id}}][weight][1]"
|
|
|
- value="{{ $weights['type_1'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 1) === 1) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 1) === 1) ? '' : 'disabled' }}>
|
|
|
- <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(1) }}</small>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div style="display:flex; align-items:center; gap:6px;">
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- style="width:72px;"
|
|
|
- name="config[{{$v->id}}][weight][2]"
|
|
|
- value="{{ $weights['type_2'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 2) === 2) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 2) === 2) ? '' : 'disabled' }}>
|
|
|
- <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(2) }}</small>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div style="display:flex; align-items:center; gap:6px;">
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- style="width:72px;"
|
|
|
- name="config[{{$v->id}}][weight][4]"
|
|
|
- value="{{ $weights['type_4'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 4) === 4) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 4) === 4) ? '' : 'disabled' }}>
|
|
|
- <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(4) }}</small>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div style="display:flex; align-items:center; gap:6px;">
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- style="width:72px;"
|
|
|
- name="config[{{$v->id}}][weight][8]"
|
|
|
- value="{{ $weights['type_8'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 8) === 8) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 8) === 8) ? '' : 'disabled' }}>
|
|
|
- <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(8) }}</small>
|
|
|
+ name="config[{{$v->id}}][weight][{{ $methodKey }}]"
|
|
|
+ value="{{ $weights['type_' . $methodKey] ?? '' }}"
|
|
|
+ placeholder="{{ (($payTypes & $methodKey) === $methodKey) ? '0' : 'N/A' }}"
|
|
|
+ {{ (($payTypes & $methodKey) === $methodKey) ? '' : 'disabled' }}>
|
|
|
+ <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText($methodKey) }}</small>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @endforeach
|
|
|
<td>
|
|
|
@component('components.select', [
|
|
|
'name' => "config[{$v->id}][status]",
|