Files
chatroom/resources/views/admin/marriages/configs.blade.php
lkddi d2797d5b59 功能:婚姻系统第9步(后台管理页面)
Admin/MarriageManagerController:
- index() 总览统计卡片
- list() 婚姻列表(筛选/强制离婚/取消求婚)
- proposals() 求婚记录
- ceremonies() 婚礼红包记录
- claimDetail() 红包领取明细
- intimacyLogs() 亲密度日志(来源筛选)
- configs/updateConfigs 参数配置(批量保存)
- tiers/updateTier 婚礼档位管理

Views(7个页面):admin/marriages/{index|list|configs|tiers|ceremonies|claim-detail|proposals|intimacy-logs}
侧边栏:superlevel 区块新增「💒 婚姻管理」入口
2026-03-01 15:15:03 +08:00

76 lines
3.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{--
文件功能:婚姻参数配置页(所有参数按分组展示,可批量保存)
@author ChatRoom Laravel
@version 1.0.0
--}}
@extends('admin.layouts.app')
@section('title', '婚姻参数配置')
@section('content')
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-xl font-bold text-gray-800">⚙️ 婚姻参数配置</h2>
<p class="text-sm text-gray-500 mt-1">修改参数后点击「保存」生效,参数变更会自动清除缓存</p>
</div>
<a href="{{ route('admin.marriages.index') }}" class="text-sm text-indigo-600 hover:underline"> 返回总览</a>
</div>
@if (session('success'))
<div class="bg-green-50 border border-green-200 text-green-700 rounded-lg px-4 py-3 mb-4 text-sm">
{{ session('success') }}
</div>
@endif
<form action="{{ route('admin.marriages.configs.update') }}" method="POST">
@csrf
@foreach ($groups as $groupName => $configs)
<div class="bg-white rounded-xl shadow-sm border overflow-hidden mb-5">
<div class="px-5 py-3 bg-gray-50 border-b flex items-center gap-2">
<span class="font-bold text-gray-700">{{ $groupName }}</span>
<span class="text-xs text-gray-400">{{ $configs->count() }} 项)</span>
</div>
<div class="divide-y">
@foreach ($configs as $cfg)
<div class="px-5 py-4 flex items-center gap-4">
<div class="flex-1 min-w-0">
<div class="font-bold text-gray-800 text-sm">{{ $cfg->label }}</div>
@if ($cfg->description)
<div class="text-xs text-gray-400 mt-0.5">{{ $cfg->description }}</div>
@endif
<div class="text-xs font-mono text-gray-300 mt-0.5">{{ $cfg->key }}</div>
</div>
<div class="flex items-center gap-2 shrink-0">
@if ($cfg->min !== null)
<span class="text-xs text-gray-400">最小: {{ $cfg->min }}</span>
@endif
<input type="number" name="configs[{{ $cfg->key }}]" value="{{ $cfg->value }}"
@if ($cfg->min !== null) min="{{ $cfg->min }}" @endif
@if ($cfg->max !== null) max="{{ $cfg->max }}" @endif required
class="border rounded-lg px-3 py-1.5 text-sm w-28 text-center font-bold focus:outline-none focus:ring-2 focus:ring-indigo-300">
@if ($cfg->max !== null)
<span class="text-xs text-gray-400">最大: {{ $cfg->max }}</span>
@endif
</div>
</div>
@endforeach
</div>
</div>
@endforeach
<div class="flex justify-end gap-3 mt-2 pb-6">
<a href="{{ route('admin.marriages.index') }}"
class="px-5 py-2.5 border rounded-lg text-sm text-gray-600 hover:bg-gray-50">取消</a>
<button type="submit"
class="px-6 py-2.5 bg-indigo-600 text-white rounded-lg font-bold text-sm hover:bg-indigo-700 shadow-sm transition">
💾 保存所有配置
</button>
</div>
</form>
@endsection