chore: init saasshop repo + sql migrations runner + gitee go

This commit is contained in:
萝卜
2026-03-10 11:31:02 +00:00
commit 50f15cdea8
210 changed files with 29534 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
@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

View File

@@ -0,0 +1,79 @@
@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">当前配置分组数:{{ $groupedCount }}</div>
</div>
@foreach($systemSettings->groupBy('group') as $group => $items)
<div class="card mb-20">
<h3 class="mt-0">配置分组:{{ $group }}</h3>
<table>
<thead>
<tr>
<th>配置键</th>
<th>名称</th>
<th>配置值</th>
<th>类型</th>
<th>自动加载</th>
<th>备注</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@foreach($items as $item)
@php
$isEditing = $editingConfigId === $item->id;
$configName = $isEditing ? old('config_name', $item->config_name) : $item->config_name;
$configValue = $isEditing ? old('config_value', $item->config_value) : $item->config_value;
$valueType = $isEditing ? old('value_type', $item->value_type) : $item->value_type;
$autoload = $isEditing ? old('autoload', $item->autoload) : $item->autoload;
$remark = $isEditing ? old('remark', $item->remark) : $item->remark;
@endphp
<tr>
<form method="post" action="/admin/settings/system/{{ $item->id }}">
@csrf
<td>{{ $item->config_key }}<input type="hidden" name="group" value="{{ $item->group }}"></td>
<td><input name="config_name" value="{{ $configName }}"></td>
<td>
@if($valueType === 'json')
<textarea name="config_value" rows="4" class="w-full">{{ $configValue }}</textarea>
@if($isEditing && $errors->has('config_value'))
<div class="mt-6 muted" role="alert">{{ $errors->first('config_value') }}</div>
@endif
@elseif($valueType === 'boolean')
<select name="config_value">
<option value="1" @selected($configValue == '1')>true</option>
<option value="0" @selected($configValue == '0')>false</option>
</select>
@elseif($valueType === 'number')
<input type="number" step="any" name="config_value" value="{{ $configValue }}">
@else
<input name="config_value" value="{{ $configValue }}">
@endif
</td>
<td>
<select name="value_type">
@foreach($valueTypeOptions as $type)
<option value="{{ $type }}" @selected($valueType === $type)>{{ $type }}</option>
@endforeach
</select>
</td>
<td>
<label><input type="checkbox" name="autoload" value="1" @checked((bool) $autoload)> yes</label>
</td>
<td><input name="remark" value="{{ $remark }}"></td>
<td><button type="submit">保存</button></td>
</form>
</tr>
@endforeach
</tbody>
</table>
</div>
@endforeach
@endsection