chore(admin-ui): channels settings page uses page header and list card
This commit is contained in:
@@ -4,15 +4,31 @@
|
||||
@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 class="page-header mb-20" data-page="admin.settings.channels">
|
||||
<div class="page-header-main">
|
||||
<div>
|
||||
<div class="page-header-title">渠道配置</div>
|
||||
<div class="page-header-subtitle">用于承接多端渠道与平台支付能力基线(数据库读取);当前已支持基础编辑与保存。</div>
|
||||
</div>
|
||||
<div class="page-header-actions">
|
||||
<a class="btn btn-secondary" href="/admin/settings/system">系统配置</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-20">
|
||||
<h3 class="mt-0">渠道基线</h3>
|
||||
<table>
|
||||
<div class="page-header-meta">
|
||||
<div>当前渠道与支付配置概览已接入缓存读取</div>
|
||||
<div>当前平台商家数:{{ $merchantCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card list-card mb-20">
|
||||
<div class="list-card-header">
|
||||
<div>
|
||||
<h3 class="list-card-title">渠道基线</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-card-body">
|
||||
<table class="list-card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>渠道编码</th>
|
||||
@@ -47,17 +63,23 @@
|
||||
<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>
|
||||
<td><button type="submit" class="btn btn-sm">保存</button></td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3 class="mt-0">支付配置基线</h3>
|
||||
<table>
|
||||
<div class="card list-card">
|
||||
<div class="list-card-header">
|
||||
<div>
|
||||
<h3 class="list-card-title">支付配置基线</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-card-body">
|
||||
<table class="list-card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>支付编码</th>
|
||||
@@ -88,11 +110,12 @@
|
||||
<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>
|
||||
<td><button type="submit" class="btn btn-sm">保存</button></td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminSettingsChannelsPageShouldUsePageHeaderAndListCardTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_admin_settings_channels_page_should_use_page_header_and_list_card(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/settings/channels');
|
||||
$res->assertOk();
|
||||
|
||||
// 护栏:渠道配置页应使用 PageHeader 与 ListCard,保持总台管理风格统一。
|
||||
$res->assertSee('page-header', false);
|
||||
$res->assertSee('page-header-title', false);
|
||||
$res->assertSee('page-header-subtitle', false);
|
||||
$res->assertSee('page-header-actions', false);
|
||||
$res->assertSee('page-header-meta', false);
|
||||
|
||||
$res->assertSee('list-card', false);
|
||||
$res->assertSee('list-card-header', false);
|
||||
$res->assertSee('list-card-body', false);
|
||||
$res->assertSee('list-card-table', false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user