Files
saasshop/resources/views/admin/settings/channels.blade.php

99 lines
4.5 KiB
PHP

@extends('admin.layouts.app')
@section('title', '渠道配置')
@section('page_title', '渠道配置')
@section('content')
<div class="card mb-20">
<p class="mt-0">渠道配置已经切到数据库读取,当前用于承接多端渠道和平台支付能力的基线定义,并已支持基础编辑。</p>
<div class="muted">当前渠道与支付配置概览已接入缓存读取。</div>
<div class="muted">当前平台商家数:{{ $merchantCount }}</div>
</div>
<div class="card mb-20">
<h3 class="mt-0">渠道基线</h3>
<table>
<thead>
<tr>
<th>渠道编码</th>
<th>渠道名称</th>
<th>类型</th>
<th>状态</th>
<th>入口</th>
<th>登录</th>
<th>支付</th>
<th>分享</th>
<th>备注</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@foreach($channels as $channel)
<tr>
<form method="post" action="/admin/settings/channels/{{ $channel->id }}">
@csrf
<td>{{ $channel->channel_code }}</td>
<td><input name="channel_name" value="{{ old('channel_name', $channel->channel_name) }}"></td>
<td><input name="channel_type" value="{{ old('channel_type', $channel->channel_type) }}"></td>
<td>
<select name="status">
@foreach(['enabled', 'disabled', 'reserved'] as $status)
<option value="{{ $status }}" @selected(old('status', $channel->status) === $status)>{{ $status }}</option>
@endforeach
</select>
</td>
<td><input name="entry_path" value="{{ old('entry_path', $channel->entry_path) }}"></td>
<td><label><input type="checkbox" name="supports_login" value="1" @checked((bool) old('supports_login', $channel->supports_login))> yes</label></td>
<td><label><input type="checkbox" name="supports_payment" value="1" @checked((bool) old('supports_payment', $channel->supports_payment))> yes</label></td>
<td><label><input type="checkbox" name="supports_share" value="1" @checked((bool) old('supports_share', $channel->supports_share))> yes</label></td>
<td><textarea name="remark" rows="2" class="w-full">{{ old('remark', $channel->remark) }}</textarea></td>
<td><button type="submit">保存</button></td>
</form>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card">
<h3 class="mt-0">支付配置基线</h3>
<table>
<thead>
<tr>
<th>支付编码</th>
<th>支付名称</th>
<th>提供方</th>
<th>状态</th>
<th>沙箱</th>
<th>退款</th>
<th>备注</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@foreach($paymentConfigs as $payment)
<tr>
<form method="post" action="/admin/settings/payments/{{ $payment->id }}">
@csrf
<td>{{ $payment->payment_code }}</td>
<td><input name="payment_name" value="{{ old('payment_name', $payment->payment_name) }}"></td>
<td><input name="provider" value="{{ old('provider', $payment->provider) }}"></td>
<td>
<select name="status">
@foreach(['enabled', 'disabled', 'reserved'] as $status)
<option value="{{ $status }}" @selected(old('status', $payment->status) === $status)>{{ $status }}</option>
@endforeach
</select>
</td>
<td><label><input type="checkbox" name="is_sandbox" value="1" @checked((bool) old('is_sandbox', $payment->is_sandbox))> yes</label></td>
<td><label><input type="checkbox" name="supports_refund" value="1" @checked((bool) old('supports_refund', $payment->supports_refund))> yes</label></td>
<td><textarea name="remark" rows="2" class="w-full">{{ old('remark', $payment->remark) }}</textarea></td>
<td><button type="submit">保存</button></td>
</form>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection