@extends('layouts.admin') @section('title', $item->exists ? '编辑采集规则' : '新建采集规则') @section('head') @include('admin.partials.modern-form-head') @endsection @section('scripts') @endsection @section('content')

{{ $item->exists ? '编辑采集规则' : '新建采集规则' }}

返回列表
@csrf @if($method !== 'POST') @method($method) @endif @php $entryUrls = old('entry_urls', is_array($item->entry_urls) ? implode("\n", $item->entry_urls) : ''); $headersJson = old('headers_json', json_encode($item->headers ?? [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); $cookiesJson = old('cookies_json', json_encode($item->cookies ?? [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); $extractorConfig = is_array($item->extractor_config) ? $item->extractor_config : []; $extractorJson = old('extractor_json', json_encode($extractorConfig, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); $mappingJson = old('mapping_json', json_encode($item->mapping_config ?? [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); $dedupeJson = old('dedupe_json', json_encode($item->dedupe_config ?? [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); $extractorAi = is_array($extractorConfig['ai'] ?? null) ? $extractorConfig['ai'] : []; $mode = old('extractor_mode', $extractorConfig['mode'] ?? 'xpath'); @endphp

基础配置

enabled))>

抓取与 AI 配置

ai_fallback_enabled))>

Extractor / Mapping / 预览选元素

未加载预览
未选择
建议流程:加载预览 -> 点选元素写 XPath -> AI 补全规则 -> 保存。
@endsection