改用axios请求进行封装

This commit is contained in:
2025-05-07 09:25:51 +08:00
parent 53e82f9159
commit 491e1b119a
50 changed files with 511 additions and 12702 deletions
-834
View File
@@ -1,834 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0064)https://postgrest.postgresql.ac.cn/en/v12/references/errors.html -->
<html lang="zh-hans" class="writer-html5" data-content_root="../" data-theme="light"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/f.txt"></script><script>(l=location)[p='protocol'][5]||(l[p]='https')</script><meta name="referrer" content="no-referrer"><script async="" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/f(1).txt" crossorigin="anonymous" data-checked-head="true"></script>
<script>window.minimalAnalytics={trackingId:'G-M2CNWZ52HJ',autoTrack:true}</script>
<script async="" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/index.js.下载"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>错误 — PostgREST 12.2 文档 - PostgREST 中文</title>
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/pygments.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/theme.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/copybutton.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/custom.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/tabs.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/general.css">
<link rel="stylesheet" type="text/css" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/dark.css">
<link rel="shortcut icon" href="https://postgrest.postgresql.ac.cn/en/v12/_static/favicon.ico">
<link rel="canonical" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html">
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/jquery.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/_sphinx_javascript_frameworks_compat.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/documentation_options.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/doctools.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/sphinx_highlight.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/clipboard.min.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/copybutton.js.下载"></script>
<script async="async" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/readthedocs-doc-embed.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/default_light.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/theme_switcher.js.下载"></script>
<script src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/theme.js.下载"></script>
<link rel="index" title="Index" href="https://postgrest.postgresql.ac.cn/en/v12/genindex.html">
<link rel="search" title="Search" href="https://postgrest.postgresql.ac.cn/en/v12/search.html">
<link rel="next" title="Configuration" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html">
<link rel="prev" title="Schema Cache" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html">
<link rel="stylesheet" href="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/readthedocs-doc-embed.css" type="text/css">
<script type="application/json" id="READTHEDOCS_DATA">{"ad_free": true, "api_host": "https://readthedocs.org", "builder": "sphinx", "canonical_url": null, "docroot": "/docs/", "features": {"docsearch_disabled": false}, "global_analytics_code": "UA-17997319-1", "language": "en", "page": "references/errors", "programming_language": "py", "project": "postgrest", "proxied_api_host": "/_", "source_suffix": ".rst", "subprojects": {}, "theme": "sphinx_rtd_theme", "user_analytics_code": "G-5CGB3QTKF1", "version": "v12"}</script>
<script type="text/javascript">
READTHEDOCS_DATA = JSON.parse(document.getElementById('READTHEDOCS_DATA').innerHTML);
</script>
<script type="text/javascript" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/readthedocs-analytics.js.下载" async="async"></script>
<meta http-equiv="origin-trial" content="AlK2UR5SkAlj8jjdEc9p3F3xuFYlF6LYjAML3EOqw1g26eCwWPjdmecULvBH5MVPoqKYrOfPhYVL71xAXI1IBQoAAAB8eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3NTgwNjcxOTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><meta http-equiv="origin-trial" content="Amm8/NmvvQfhwCib6I7ZsmUxiSCfOxWxHayJwyU1r3gRIItzr7bNQid6O8ZYaE1GSQTa69WwhPC9flq/oYkRBwsAAACCeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3NTgwNjcxOTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><meta http-equiv="origin-trial" content="A9wSqI5i0iwGdf6L1CERNdmsTPgVu44ewj8QxTBYgsv1LCPUVF7YmWOvTappqB1139jAymxUW/RO8zmMqo4zlAAAAACNeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiRmxlZGdlQmlkZGluZ0FuZEF1Y3Rpb25TZXJ2ZXIiLCJleHBpcnkiOjE3MzY4MTI4MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A+d7vJfYtay4OUbdtRPZA3y7bKQLsxaMEPmxgfhBGqKXNrdkCQeJlUwqa6EBbSfjwFtJWTrWIioXeMW+y8bWAgQAAACTeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiRmxlZGdlQmlkZGluZ0FuZEF1Y3Rpb25TZXJ2ZXIiLCJleHBpcnkiOjE3MzY4MTI4MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><script async="" src="https://fundingchoicesmessages.google.com/i/ca-pub-8543159550507237?href=https%3A%2F%2Fpostgrest.postgresql.ac.cn%2Fen%2Fv12%2Freferences%2Ferrors.html&amp;ers=2"></script></head>
<body class="wy-body-for-nav" date="2025-03-27">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="https://postgrest.postgresql.ac.cn/en/v12/index.html" class="icon icon-home">
PostgREST 12.2
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="https://postgrest.postgresql.ac.cn/en/v12/search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">教程</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/tutorials/tut0.html">教程 0 - 启动运行</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/tutorials/tut1.html">教程 1 - 金钥匙</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">参考</span></p>
<ul class="current" aria-expanded="true">
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/auth.html">身份验证</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api.html">API</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/cli.html">CLI</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/transactions.html">事务</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/connection_pool.html">连接池</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html">模式缓存</a></li>
<li class="toctree-l1 current" aria-expanded="true"><a class="reference internal current" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#" aria-expanded="true"><button class="toctree-expand" title="Open/close menu"></button>错误</a><ul>
<li class="toctree-l2"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#errors-from-postgresql"><button class="toctree-expand" title="Open/close menu"></button>来自 PostgreSQL 的错误</a><ul>
<li class="toctree-l3"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#http-status-codes">HTTP 状态码</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#errors-from-postgrest"><button class="toctree-expand" title="Open/close menu"></button>来自 PostgREST 的错误</a><ul>
<li class="toctree-l3"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#postgrest-error-codes"><button class="toctree-expand" title="Open/close menu"></button>PostgREST 错误代码</a><ul>
<li class="toctree-l4"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-0-connection">组 0 - 连接</a></li>
<li class="toctree-l4"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-1-api-request">组 1 - API 请求</a></li>
<li class="toctree-l4"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-2-schema-cache">组 2 - 模式缓存</a></li>
<li class="toctree-l4"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-3-jwt">组 3 - JWT</a></li>
<li class="toctree-l4"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-x-internal">组 X - 内部</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#custom-errors"><button class="toctree-expand" title="Open/close menu"></button>自定义错误</a><ul>
<li class="toctree-l3"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#raise-errors-with-http-status-codes">使用 HTTP 状态码 RAISE 错误</a></li>
<li class="toctree-l3"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#add-http-headers-with-raise">使用 RAISE 添加 HTTP 头</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html">配置</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/observability.html">可观测性</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/admin_server.html">管理服务器</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/listener.html">监听器</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">解释</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/explanations/architecture.html">架构</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/explanations/db_authz.html">数据库授权</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/explanations/install.html">安装</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/explanations/nginx.html">Nginx</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/explanations/schema_isolation.html">模式隔离</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">操作指南</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/sql-user-management.html">SQL 用户管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/sql-user-management-using-postgres-users-and-passwords.html">使用 postgres 的用户和密码进行 SQL 用户管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/working-with-postgresql-data-types.html">使用 PostgreSQL 数据类型</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/create-soap-endpoint.html">创建 SOAP 端点</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/providing-html-content-using-htmx.html">使用 Htmx 提供 HTML 内容</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/how-tos/providing-images-for-img.html"><code class="docutils literal notranslate"><span class="pre">&lt;img&gt;</span></code> 提供图像</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">集成</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/integrations/greenplum.html">Greenplum</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/integrations/jwt_gen.html">外部 JWT 生成</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/integrations/pg-safeupdate.html">pg-safeupdate</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/integrations/systemd.html">systemd</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">生态系统</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html">社区教程</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#templates">模板</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#example-apps">示例应用程序</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#devops">DevOps</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#external-notification">外部通知</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#extensions">扩展</a></li>
<li class="toctree-l1"><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/ecosystem.html#client-side-libraries">客户端库</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="https://postgrest.postgresql.ac.cn/en/v12/index.html">PostgREST 12.2</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="https://postgrest.postgresql.ac.cn/en/v12/index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">错误</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/postgrest/postgrest/blob/v12/docs/references/errors.rst" class="fa fa-github"> 在 GitHub 上编辑</a>
</li>
</ul>
<hr>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="errors">
<span id="error-source"></span><h1>错误<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#errors" title="Link to this heading"></a></h1>
<p>PostgREST 错误消息遵循 PostgreSQL 错误结构。它包括 <code class="docutils literal notranslate"><span class="pre">MESSAGE</span></code><code class="docutils literal notranslate"><span class="pre">DETAIL</span></code><code class="docutils literal notranslate"><span class="pre">HINT</span></code><code class="docutils literal notranslate"><span class="pre">ERRCODE</span></code>,并将向响应添加 HTTP 状态码。</p>
<section id="errors-from-postgresql">
<h2>来自 PostgreSQL 的错误<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#errors-from-postgresql" title="Link to this heading"></a></h2>
<p>PostgREST 将转发来自 PostgreSQL 的错误。例如,在约束失败时</p>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell0"><span></span><span class="nf">POST</span> <span class="nn">/projects</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell0">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell1"><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">400</span> <span class="ne">Bad Request</span>
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json; charset=utf-8</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell1">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<div class="highlight-json notranslate"><div class="highlight"><pre id="codecell2"><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">"code"</span><span class="p">:</span><span class="w"> </span><span class="s2">"23502"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"details"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Failing row contains (null, foo, null)."</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"hint"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"null value in column \"id\" of relation \"projects\" violates not-null constraint"</span>
<span class="p">}</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell2">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<section id="http-status-codes">
<span id="status-codes"></span><h3>HTTP 状态码<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#http-status-codes" title="Link to this heading"></a></h3>
<p>PostgREST 将 <a class="reference external" href="https://postgresql.ac.cn/docs/current/errcodes-appendix.html">PostgreSQL 错误代码</a> 转换为 HTTP 状态,如下所示</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>PostgreSQL 错误代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>错误描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>08*</p></td>
<td><p>503</p></td>
<td><p>pg 连接错误</p></td>
</tr>
<tr class="row-odd"><td><p>09*</p></td>
<td><p>500</p></td>
<td><p>触发操作异常</p></td>
</tr>
<tr class="row-even"><td><p>0L*</p></td>
<td><p>403</p></td>
<td><p>无效授予者</p></td>
</tr>
<tr class="row-odd"><td><p>0P*</p></td>
<td><p>403</p></td>
<td><p>无效角色规范</p></td>
</tr>
<tr class="row-even"><td><p>23503</p></td>
<td><p>409</p></td>
<td><p>外键冲突</p></td>
</tr>
<tr class="row-odd"><td><p>23505</p></td>
<td><p>409</p></td>
<td><p>唯一性冲突</p></td>
</tr>
<tr class="row-even"><td><p>25006</p></td>
<td><p>405</p></td>
<td><p>只读 SQL 事务</p></td>
</tr>
<tr class="row-odd"><td><p>25*</p></td>
<td><p>500</p></td>
<td><p>无效的事务状态</p></td>
</tr>
<tr class="row-even"><td><p>28*</p></td>
<td><p>403</p></td>
<td><p>无效的授权规范</p></td>
</tr>
<tr class="row-odd"><td><p>2D*</p></td>
<td><p>500</p></td>
<td><p>无效的事务终止</p></td>
</tr>
<tr class="row-even"><td><p>38*</p></td>
<td><p>500</p></td>
<td><p>外部例程异常</p></td>
</tr>
<tr class="row-odd"><td><p>39*</p></td>
<td><p>500</p></td>
<td><p>外部例程调用</p></td>
</tr>
<tr class="row-even"><td><p>3B*</p></td>
<td><p>500</p></td>
<td><p>保存点异常</p></td>
</tr>
<tr class="row-odd"><td><p>40*</p></td>
<td><p>500</p></td>
<td><p>事务回滚</p></td>
</tr>
<tr class="row-even"><td><p>53400</p></td>
<td><p>500</p></td>
<td><p>配置限制超出</p></td>
</tr>
<tr class="row-odd"><td><p>53*</p></td>
<td><p>503</p></td>
<td><p>资源不足</p></td>
</tr>
<tr class="row-even"><td><p>54*</p></td>
<td><p>500</p></td>
<td><p>过于复杂</p></td>
</tr>
<tr class="row-odd"><td><p>55*</p></td>
<td><p>500</p></td>
<td><p>对象不在先决条件状态</p></td>
</tr>
<tr class="row-even"><td><p>57*</p></td>
<td><p>500</p></td>
<td><p>操作员干预</p></td>
</tr>
<tr class="row-odd"><td><p>58*</p></td>
<td><p>500</p></td>
<td><p>系统错误</p></td>
</tr>
<tr class="row-even"><td><p>F0*</p></td>
<td><p>500</p></td>
<td><p>配置文件错误</p></td>
</tr>
<tr class="row-odd"><td><p>HV*</p></td>
<td><p>500</p></td>
<td><p>外部数据包装器错误</p></td>
</tr>
<tr class="row-even"><td><p>P0001</p></td>
<td><p>400</p></td>
<td><p>“raise”的默认代码</p></td>
</tr>
<tr class="row-odd"><td><p>P0*</p></td>
<td><p>500</p></td>
<td><p>PL/pgSQL 错误</p></td>
</tr>
<tr class="row-even"><td><p>XX*</p></td>
<td><p>500</p></td>
<td><p>内部错误</p></td>
</tr>
<tr class="row-odd"><td><p>42883</p></td>
<td><p>404</p></td>
<td><p>未定义函数</p></td>
</tr>
<tr class="row-even"><td><p>42P01</p></td>
<td><p>404</p></td>
<td><p>未定义表</p></td>
</tr>
<tr class="row-odd"><td><p>42P17</p></td>
<td><p>500</p></td>
<td><p>无限递归</p></td>
</tr>
<tr class="row-even"><td><p>42501</p></td>
<td><div class="line-block">
<div class="line">如果已认证,则返回 403</div>
<div class="line">否则返回 401</div>
</div>
</td>
<td><p>权限不足</p></td>
</tr>
<tr class="row-odd"><td><p>其他</p></td>
<td><p>400</p></td>
<td></td>
</tr>
</tbody>
</table></div>
</section>
</section>
<section id="errors-from-postgrest">
<h2>来自 PostgREST 的错误<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#errors-from-postgrest" title="Link to this heading"></a></h2>
<p>来自 PostgREST 本身的错误保持相同的结构,但在 <code class="docutils literal notranslate"><span class="pre">code</span></code> 字段中使用 <code class="docutils literal notranslate"><span class="pre">PGRST</span></code> 前缀。例如,当查询在 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html"><span class="doc">schema 缓存</span></a> 中不存在的函数时</p>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell3"><span></span><span class="nf">POST</span> <span class="nn">/rpc/nonexistent_function</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell3">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell4"><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">404</span> <span class="ne">Not Found</span>
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json; charset=utf-8</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell4">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<div class="highlight-json notranslate"><div class="highlight"><pre id="codecell5"><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">"hint"</span><span class="p">:</span><span class="w"> </span><span class="s2">"..."</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"details"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<span class="w"> </span><span class="nt">"code"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PGRST202"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Could not find the api.nonexistent_function() function in the schema cache"</span>
<span class="p">}</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell5">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<section id="postgrest-error-codes">
<span id="pgrst-errors"></span><h3>PostgREST 错误代码<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#postgrest-error-codes" title="Link to this heading"></a></h3>
<p>PostgREST 错误代码的格式为 <code class="docutils literal notranslate"><span class="pre">PGRSTgxx</span></code></p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">PGRST</span></code> 是区分错误与 PostgreSQL 错误的前缀。</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">g</span></code> 是错误组</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">xx</span></code> 是组中的错误标识符。</p></li>
</ul>
<section id="group-0-connection">
<span id="pgrst0"></span><h4>组 0 - 连接<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-0-connection" title="Link to this heading"></a></h4>
<p>与数据库的连接相关。</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p id="pgrst000">PGRST000</p>
</td>
<td><p>503</p></td>
<td><p>由于 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html#db-uri"><span class="std std-ref">db-uri</span></a> 不正确或 PostgreSQL 服务未运行,无法连接到数据库。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst001">PGRST001</p>
</td>
<td><p>503</p></td>
<td><p>由于内部错误,无法连接到数据库。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst002">PGRST002</p>
</td>
<td><p>503</p></td>
<td><p>在构建 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html"><span class="doc">Schema Cache</span></a> 时无法连接到数据库,因为 PostgreSQL 服务未运行。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst003">PGRST003</p>
</td>
<td><p>504</p></td>
<td><p>请求在等待连接池可用时超时。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html#db-pool-acquisition-timeout"><span class="std std-ref">db-pool-acquisition-timeout</span></a></p></td>
</tr>
</tbody>
</table></div>
</section>
<section id="group-1-api-request">
<span id="pgrst1"></span><h4>组 1 - API 请求<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-1-api-request" title="Link to this heading"></a></h4>
<p>与 HTTP 请求元素相关。</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p id="pgrst100">PGRST100</p>
</td>
<td><p>400</p></td>
<td><p>查询字符串参数解析错误。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#h-filter"><span class="std std-ref">水平过滤</span></a><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#operators"><span class="std std-ref">运算符</span></a><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#ordering"><span class="std std-ref">排序</span></a></p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst101">PGRST101</p>
</td>
<td><p>405</p></td>
<td><p>对于 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/functions.html#functions"><span class="std std-ref">函数</span></a>,只允许使用 <code class="docutils literal notranslate"><span class="pre">GET</span></code><code class="docutils literal notranslate"><span class="pre">POST</span></code> 动词。任何其他动词都会抛出此错误。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst102">PGRST102</p>
</td>
<td><p>400</p></td>
<td><p>发送了无效的请求主体(例如空主体或格式错误的 JSON)。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst103">PGRST103</p>
</td>
<td><p>416</p></td>
<td><p><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/pagination_count.html#limits"><span class="std std-ref">限制和分页</span></a> 指定了无效的范围。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst105">PGRST105</p>
</td>
<td><p>405</p></td>
<td><p>执行了无效的 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#upsert-put"><span class="std std-ref">PUT</span></a> 请求。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst106">PGRST106</p>
</td>
<td><p>406</p></td>
<td><p><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/schemas.html#multiple-schemas"><span class="std std-ref">切换模式</span></a> 时指定的模式不存在于 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html#db-schemas"><span class="std std-ref">db-schemas</span></a> 配置变量中。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst107">PGRST107</p>
</td>
<td><p>415</p></td>
<td><p>请求中发送的 <code class="docutils literal notranslate"><span class="pre">Content-Type</span></code> 无效。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst108">PGRST108</p>
</td>
<td><p>400</p></td>
<td><p>过滤器应用于未在查询字符串的 <code class="docutils literal notranslate"><span class="pre">select</span></code> 部分中指定的嵌入式资源。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/resource_embedding.html#embed-filters"><span class="std std-ref">嵌入式过滤器</span></a></p></td>
</tr>
<tr class="row-even"><td><p id="pgrst109">PGRST109</p>
</td>
<td><p>400</p></td>
<td><p>使用限制来限制删除或更新必须包含唯一列的排序。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#limited-update-delete"><span class="std std-ref">限制更新/删除</span></a></p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst110">PGRST110</p>
</td>
<td><p>400</p></td>
<td><p>当使用限制来限制删除或更新时,修改的行数超过限制中指定的最大值。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#limited-update-delete"><span class="std std-ref">限制更新/删除</span></a></p></td>
</tr>
<tr class="row-even"><td><p id="pgrst111">PGRST111</p>
</td>
<td><p>500</p></td>
<td><p>设置了无效的 <code class="docutils literal notranslate"><span class="pre">response.headers</span></code>。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/transactions.html#guc-resp-hdrs"><span class="std std-ref">响应头</span></a></p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst112">PGRST112</p>
</td>
<td><p>500</p></td>
<td><p>状态代码必须是正整数。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/transactions.html#guc-resp-status"><span class="std std-ref">响应状态代码</span></a></p></td>
</tr>
<tr class="row-even"><td><p id="pgrst114">PGRST114</p>
</td>
<td><p>400</p></td>
<td><p>对于使用 PUT 的 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#upsert-put"><span class="std std-ref">UPSERT</span></a>,当使用 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/pagination_count.html#limits"><span class="std std-ref">限制和偏移量</span></a> 时。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst115">PGRST115</p>
</td>
<td><p>400</p></td>
<td><p>对于使用 PUT 的 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#upsert-put"><span class="std std-ref">UPSERT</span></a>,当查询字符串中的主键与主体中的主键不同时。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst116">PGRST116</p>
</td>
<td><p>406</p></td>
<td><p>在请求单个响应时,返回了多个或没有项目。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/resource_representation.html#singular-plural"><span class="std std-ref">单数或复数</span></a></p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst117">PGRST117</p>
</td>
<td><p>405</p></td>
<td><p>请求中使用的 HTTP 动词不受支持。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst118">PGRST118</p>
</td>
<td><p>400</p></td>
<td><p>无法使用相关表对结果进行排序,因为它们之间没有多对一或一对一关系。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst119">PGRST119</p>
</td>
<td><p>400</p></td>
<td><p>无法在相关表上使用扩展运算符,因为它们之间没有多对一或一对一关系。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst120">PGRST120</p>
</td>
<td><p>400</p></td>
<td><p>嵌入式资源只能使用 <code class="docutils literal notranslate"><span class="pre">is.null</span></code><code class="docutils literal notranslate"><span class="pre">not.is.null</span></code> <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#operators"><span class="std std-ref">运算符</span></a> 进行过滤。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst121">PGRST121</p>
</td>
<td><p>500</p></td>
<td><p>PostgREST 无法解析 RAISE <code class="docutils literal notranslate"><span class="pre">PGRST</span></code> 错误中的 JSON 对象。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#raise-headers"><span class="std std-ref">raise 标头</span></a></p></td>
</tr>
<tr class="row-even"><td><p id="pgrst122">PGRST122</p>
</td>
<td><p>400</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">Prefer</span></code> 标头中发现无效的偏好设置,其中 <code class="docutils literal notranslate"><span class="pre">Prefer:</span> <span class="pre">handling=strict</span></code>。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/preferences.html#prefer-handling"><span class="std std-ref">严格或宽松处理</span></a></p></td>
</tr>
</tbody>
</table></div>
</section>
<section id="group-2-schema-cache">
<span id="pgrst2"></span><h4>第 2 组 - 架构缓存<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-2-schema-cache" title="Link to this heading"></a></h4>
<p><a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html#schema-cache"><span class="std std-ref">架构缓存</span></a> 相关。大多数情况下,这些错误可以通过 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html#schema-reloading"><span class="std std-ref">架构缓存重新加载</span></a> 解决。</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p id="pgrst200">PGRST200</p>
</td>
<td><p>400</p></td>
<td><p>由过时的外键关系引起,否则任何嵌入式资源或关系本身可能不存在于数据库中。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst201">PGRST201</p>
</td>
<td><p>300</p></td>
<td><p>发出了不明确的嵌入请求。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/resource_embedding.html#complex-rels"><span class="std std-ref">多个外键关系上的外键连接</span></a></p></td>
</tr>
<tr class="row-even"><td><p id="pgrst202">PGRST202</p>
</td>
<td><p>404</p></td>
<td><p>由过时的函数签名引起,否则该函数可能不存在于数据库中。</p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst203">PGRST203</p>
</td>
<td><p>300</p></td>
<td><p>由于请求具有相同参数名称但类型不同的重载函数,或使用 <code class="docutils literal notranslate"><span class="pre">POST</span></code> 动词请求具有 <code class="docutils literal notranslate"><span class="pre">JSON</span></code><code class="docutils literal notranslate"><span class="pre">JSONB</span></code> 类型未命名参数的重载函数而导致。解决方法是重命名函数或添加/修改参数名称。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst204">PGRST204</p>
</td>
<td><p>400</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">columns</span></code> 查询参数中指定的 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/tables_views.html#specify-columns"><span class="std std-ref"></span></a> 未找到时导致。</p></td>
</tr>
</tbody>
</table></div>
</section>
<section id="group-3-jwt">
<span id="pgrst3"></span><h4>第 3 组 - JWT<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-3-jwt" title="Link to this heading"></a></h4>
<p>与使用 JWT 进行身份验证过程相关。您可以参考 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/tutorials/tut1.html#tut1"><span class="std std-ref">教程 1 - 金钥匙</span></a> 获取有关如何实现身份验证的示例,以及 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/auth.html"><span class="doc">身份验证页面</span></a> 获取有关此过程的更多信息。</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p id="pgrst300">PGRST300</p>
</td>
<td><p>500</p></td>
<td><p>配置中缺少 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html#jwt-secret"><span class="std std-ref">JWT 密钥</span></a></p></td>
</tr>
<tr class="row-odd"><td><p id="pgrst301">PGRST301</p>
</td>
<td><p>401</p></td>
<td><p>与 JWT 验证相关的任何错误,这意味着提供的 JWT 在某种程度上无效。</p></td>
</tr>
<tr class="row-even"><td><p id="pgrst302">PGRST302</p>
</td>
<td><p>401</p></td>
<td><p>尝试在 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html#db-anon-role"><span class="std std-ref">db-anon-role</span></a> 中未设置匿名角色的情况下,在未进行 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/auth.html#client-auth"><span class="std std-ref">身份验证</span></a> 的情况下进行请求。</p></td>
</tr>
</tbody>
</table></div>
</section>
<section id="group-x-internal">
<span id="pgrst-x"></span><h4>第 X 组 - 内部<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#group-x-internal" title="Link to this heading"></a></h4>
<p>内部错误。如果您遇到任何这些错误,您可能遇到了 PostgREST 错误,请 <a class="reference external" href="https://github.com/PostgREST/postgrest/issues">打开一个问题</a>,我们将很乐意修复它。</p>
<div class="wy-table-responsive"><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>代码</p></th>
<th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p id="pgrstx00">PGRSTX00</p>
</td>
<td><p>500</p></td>
<td><p>与用于连接到数据库的库相关的内部错误。</p></td>
</tr>
</tbody>
</table></div>
</section>
</section>
</section>
<section id="custom-errors">
<h2>自定义错误<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#custom-errors" title="Link to this heading"></a></h2>
<p>您可以使用函数上的 <a class="reference external" href="https://postgresql.ac.cn/docs/current/plpgsql-errors-and-messages.html#PLPGSQL-STATEMENTS-RAISE">RAISE 语句</a> 自定义错误。</p>
<section id="raise-errors-with-http-status-codes">
<span id="raise-error"></span><h3>使用 HTTP 状态代码引发错误<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#raise-errors-with-http-status-codes" title="Link to this heading"></a></h3>
<p>可以通过在 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/api/functions.html#functions"><span class="std std-ref">函数</span></a> 中引发 SQL 异常来实现自定义状态代码。例如,以下是一个始终以错误响应的函数</p>
<div class="highlight-postgres notranslate"><div class="highlight"><pre id="codecell6"><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="k">REPLACE</span><span class="w"> </span><span class="k">FUNCTION</span><span class="w"> </span><span class="n">just_fail</span><span class="p">()</span><span class="w"> </span><span class="k">RETURNS</span><span class="w"> </span><span class="nb">void</span>
<span class="w"> </span><span class="k">LANGUAGE</span><span class="w"> </span><span class="n">plpgsql</span>
<span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s">$$</span>
<span class="k">BEGIN</span>
<span class="w"> </span><span class="k">RAISE</span><span class="w"> </span><span class="k">EXCEPTION</span><span class="w"> </span><span class="s1">'I refuse!'</span>
<span class="w"> </span><span class="k">USING</span><span class="w"> </span><span class="n">DETAIL</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'Pretty simple'</span><span class="p">,</span>
<span class="w"> </span><span class="n">HINT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'There is nothing you can do.'</span><span class="p">;</span>
<span class="k">END</span>
<span class="s">$$</span><span class="p">;</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell6">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>调用函数返回 HTTP 400,并带有主体</p>
<div class="highlight-json notranslate"><div class="highlight"><pre id="codecell7"><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="s2">"I refuse!"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"details"</span><span class="p">:</span><span class="s2">"Pretty simple"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"hint"</span><span class="p">:</span><span class="s2">"There is nothing you can do."</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"code"</span><span class="p">:</span><span class="s2">"P0001"</span>
<span class="p">}</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell7">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>自定义 HTTP 状态码的一种方法是根据 PostgREST <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#status-codes"><span class="std std-ref">错误到状态码映射</span></a> 抛出特定异常。例如,<code class="code docutils literal notranslate"><span class="pre">RAISE</span> <span class="pre">insufficient_privilege</span></code> 将根据情况返回 HTTP 401/403。</p>
<p>为了更精确地控制 HTTP 状态码,请抛出 <code class="docutils literal notranslate"><span class="pre">PTxyz</span></code> 类型的异常。例如,要返回 HTTP 402,请抛出 <code class="docutils literal notranslate"><span class="pre">PT402</span></code></p>
<div class="highlight-postgres notranslate"><div class="highlight"><pre id="codecell8"><span></span><span class="n">RAISE</span><span class="w"> </span><span class="n">sqlstate</span><span class="w"> </span><span class="s1">'PT402'</span><span class="w"> </span><span class="k">using</span>
<span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'Payment Required'</span><span class="p">,</span>
<span class="w"> </span><span class="n">detail</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'Quota exceeded'</span><span class="p">,</span>
<span class="w"> </span><span class="n">hint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'Upgrade your plan'</span><span class="p">;</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell8">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>返回值</p>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell9"><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">402</span> <span class="ne">Payment Required</span>
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json; charset=utf-8</span>
<span class="p">{</span>
<span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Payment Required"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"details"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Quota exceeded"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"hint"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Upgrade your plan"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"code"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PT402"</span>
<span class="p">}</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell9">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
</section>
<section id="add-http-headers-with-raise">
<span id="raise-headers"></span><h3>使用 RAISE 添加 HTTP 头<a class="headerlink" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#add-http-headers-with-raise" title="Link to this heading"></a></h3>
<p>为了完全控制头信息和状态,您可以抛出 <code class="docutils literal notranslate"><span class="pre">PGRST</span></code> SQLSTATE 错误。您可以通过在 PostgreSQL 错误消息字段中添加 <code class="docutils literal notranslate"><span class="pre">code</span></code><code class="docutils literal notranslate"><span class="pre">message</span></code><code class="docutils literal notranslate"><span class="pre">detail</span></code><code class="docutils literal notranslate"><span class="pre">hint</span></code> 作为 JSON 对象来实现。这里,<code class="docutils literal notranslate"><span class="pre">details</span></code><code class="docutils literal notranslate"><span class="pre">hint</span></code> 是可选的。类似地,<code class="docutils literal notranslate"><span class="pre">status</span></code><code class="docutils literal notranslate"><span class="pre">headers</span></code> 必须作为 JSON 对象添加到 SQL 错误详细信息字段中。例如</p>
<div class="highlight-postgres notranslate"><div class="highlight"><pre id="codecell10"><span></span><span class="n">RAISE</span><span class="w"> </span><span class="n">sqlstate</span><span class="w"> </span><span class="s1">'PGRST'</span><span class="w"> </span><span class="k">USING</span>
<span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'{"code":"123","message":"Payment Required","details":"Quota exceeded","hint":"Upgrade your plan"}'</span><span class="p">,</span>
<span class="w"> </span><span class="n">detail</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'{"status":402,"headers":{"X-Powered-By":"Nerd Rage"}}'</span><span class="p">;</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell10">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>返回值</p>
<div class="highlight-http notranslate"><div class="highlight"><pre id="codecell11"><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">402</span> <span class="ne">Payment Required</span>
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json; charset=utf-8</span>
<span class="na">X-Powered-By</span><span class="o">:</span> <span class="l">Nerd Rage</span>
<span class="p">{</span>
<span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Payment Required"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"details"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Quota exceeded"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"hint"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Upgrade your plan"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"code"</span><span class="p">:</span><span class="w"> </span><span class="s2">"123"</span>
<span class="p">}</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell11">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>对于非标准 HTTP 状态,您可以选择添加 <code class="docutils literal notranslate"><span class="pre">status_text</span></code> 来描述状态码。对于状态码 <code class="docutils literal notranslate"><span class="pre">419</span></code>,详细信息字段可能如下所示</p>
<div class="highlight-postgres notranslate"><div class="highlight"><pre id="codecell12"><span></span><span class="n">detail</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'{"status":419,"status_text":"Page Expired","headers":{"X-Powered-By":"Nerd Rage"}}'</span><span class="p">;</span>
</pre><button class="copybtn o-tooltip--left" data-tooltip="Copy" data-clipboard-target="#codecell12">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>Copy to clipboard</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="8" y="8" width="12" height="12" rx="2"></rect>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
</svg>
</button></div>
</div>
<p>如果 PostgREST 无法解析 JSON 对象 <code class="docutils literal notranslate"><span class="pre">message</span></code><code class="docutils literal notranslate"><span class="pre">detail</span></code>,它将抛出 <code class="docutils literal notranslate"><span class="pre">PGRST121</span></code> 错误。请参阅 <a class="reference internal" href="https://postgrest.postgresql.ac.cn/en/v12/references/errors.html#pgrst1"><span class="std std-ref">PostgREST 错误</span></a></p>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="https://postgrest.postgresql.ac.cn/en/v12/references/schema_cache.html" class="btn btn-neutral float-left" title="Schema Cache" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> 上一页</a> <a href="https://postgrest.postgresql.ac.cn/en/v12/references/configuration.html" class="btn btn-neutral float-right" title="Configuration" accesskey="n" rel="next">下一页 <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr>
<div role="contentinfo">
<p>© Copyright 2017, Joe Nelson, Steve Chavez. <span class="commit">Revision <code>94f05483</code>. </span></p>
</div>
使用 <a href="https://sphinx-doc.cn/">Sphinx</a><a href="https://github.com/readthedocs/sphinx_rtd_theme">主题</a>(由 <a href="https://readthedocs.org/">Read the Docs</a> 提供)构建。
<a href="https://github.com/MrDogeBro/sphinx_rtd_dark_mode">Dark theme</a> provided by <a href="http://mrdogebro.com/">MrDogeBro</a>.</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span> v: v12 <span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>版本</dt>
<dd><a href="https://postgrest.postgresql.ac.cn/en/latest/">最新</a></dd>
<dd><a href="https://postgrest.postgresql.ac.cn/en/stable/">稳定版</a></dd>
<dd><a href="https://postgrest.postgresql.ac.cn/en/v12/">v12</a></dd>
<dd><a href="https://postgrest.postgresql.ac.cn/en/v11/">v11</a></dd>
<dd><a href="https://postgrest.postgresql.ac.cn/en/v10/">v10</a></dd>
</dl>
<dl>
<dt>下载</dt>
</dl>
<dl>
<dt>在 Read the Docs 上</dt>
<dd>
<a href="https://readthedocs.org/projects/postgrest/?fromdocs=postgrest">项目主页</a>
</dd>
<dd>
<a href="https://readthedocs.org/builds/postgrest/?fromdocs=postgrest">构建</a>
</dd>
</dl>
</div>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<button class="theme-switcher" id="themeSwitcher"><i id="themeMoon" class="fa fa-moon-o"></i><i id="themeSun" class="fa fa-sun-o" style="display: none;"></i></button><ins class="adsbygoogle adsbygoogle-noablate" data-adsbygoogle-status="done" style="display: none !important;" data-ad-status="unfilled"><div id="aswift_0_host" style="border: none; height: 0px; width: 0px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;"><iframe id="aswift_0" name="aswift_0" browsingtopics="true" style="left:0;position:absolute;top:0;border:0;width:undefinedpx;height:undefinedpx;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allow="attribution-reporting; run-ad-auction" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/ads.html" data-google-container-id="a!1" tabindex="0" title="Advertisement" aria-label="Advertisement" data-load-complete="true"></iframe></div></ins><iframe name="googlefcPresent" style="display: none; width: 0px; height: 0px; border: none; z-index: -1000; left: -1000px; top: -1000px;" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/saved_resource.html"></iframe><iframe src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/aframe.html" width="0" height="0" style="display: none;"></iframe></body><iframe id="google_esf" name="google_esf" src="./错误 — PostgREST 12.2 文档 - PostgREST 中文_files/zrt_lookup_fy2021.html" style="display: none;"></iframe></html>
-1339
View File
File diff suppressed because it is too large Load Diff
@@ -1,123 +0,0 @@
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
-3
View File
@@ -1,3 +0,0 @@
<!-- saved from url=(1905)https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-8543159550507237&output=html&adk=1812271804&adf=3025194257&abgtt=6&lmt=1742918816&plat=1%3A16777216%2C2%3A16777216%2C3%3A16%2C4%3A16%2C9%3A134250504%2C16%3A8388608%2C17%3A32%2C24%3A32%2C25%3A32%2C30%3A1081344%2C32%3A32%2C41%3A32%2C42%3A32&format=0x0&url=https%3A%2F%2Fpostgrest.postgresql.ac.cn%2Fen%2Fv12%2Freferences%2Fapi%2Ftables_views.html&pra=5&wgl=1&aihb=0&asro=0&ailel=1~2~4~7~8~9~10~11~12~13~14~15~16~17~18~19~20~21~24~29~30~34&aiael=1~2~3~4~7~8~9~10~11~12~13~14~15~16~17~18~19~20~21~24~29~30~34&aicel=33~38&aifxl=29_18~30_19&aiixl=29_5~30_6&itsi=2&aiapm=0.15&aiapmi=0.33938&aiact=0.6&ailct=0.65&uach=WyJXaW5kb3dzIiwiMTUuMC4wIiwieDg2IiwiIiwiMTM0LjAuNjk5OC4xNzgiLG51bGwsMCxudWxsLCI2NCIsW1siQ2hyb21pdW0iLCIxMzQuMC42OTk4LjE3OCJdLFsiTm90OkEtQnJhbmQiLCIyNC4wLjAuMCJdLFsiR29vZ2xlIENocm9tZSIsIjEzNC4wLjY5OTguMTc4Il1dLDBd&dt=1743586875473&bpp=9&bdt=18&idt=42&shv=r20250401&mjsv=m202503270101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D3cc7d08ea74aaacf%3AT%3D1743563350%3ART%3D1743586695%3AS%3DALNI_MYbZfLN193La06gpdGbWGcLF-geyQ&gpic=UID%3D0000100517b5f12e%3AT%3D1743563350%3ART%3D1743586695%3AS%3DALNI_MZ_DqSWmGT0F3xqdYcK-IpUUt7nyw&eo_id_str=ID%3De98a5540fe5f2598%3AT%3D1743563350%3ART%3D1743586695%3AS%3DAA-AfjZFwr_srXR4du2XMZLugW-_&nras=1&correlator=3071774986153&frm=20&pv=2&u_tz=480&u_his=34&u_h=1080&u_w=1920&u_ah=1032&u_aw=1920&u_cd=24&u_sd=1&dmc=8&adx=-12245933&ady=-12245933&biw=1784&bih=872&scr_x=0&scr_y=0&eid=95355972%2C95355974%2C31091240%2C42531705%2C95353387%2C95354562%2C95356499%2C95356505%2C31091407%2C31089210%2C95356787%2C95356928&oid=2&pvsid=2918862569797426&tmod=1115595993&uas=0&nvt=1&fsapi=1&fc=1920&brdim=24%2C148%2C24%2C148%2C1920%2C0%2C1815%2C967%2C1799%2C872&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=32768&bc=31&bz=1.01&td=1&tdf=2&psd=W251bGwsW251bGwsbnVsbCxudWxsLCJkZXByZWNhdGVkX2thbm9uIl0sbnVsbCwxXQ..&nt=1&ifi=1&uci=a!1&fsb=1&dtd=56 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script>var apcnf = '{"googMsgType":"apcnf","config":"[[],[],null,null,[],null,[],null,null,null,null,null,null,null,null,null,null,[1,null,null,[]],null,null,null,[\\\"zh-CN\\\"],null,null,null,null,null,null,null,null,null,null,[[\\\"\\\\u5c55\\\\u5f00/\\\\u6536\\\\u8d77\\\\u5de5\\\\u5177\\\\u680f\\\",\\\"\\\\u663e\\\\u793a/\\\\u9690\\\\u85cf\\\\u9690\\\\u79c1\\\\u8bbe\\\\u7f6e\\\\u548c\\\\u6cd5\\\\u5f8b\\\\u8bbe\\\\u7f6e\\\",\\\"\\\\u5173\\\\u95ed\\\\u663e\\\\u793a\\\\u9690\\\\u79c1\\\\u8bbe\\\\u7f6e\\\\u548c\\\\u6cd5\\\\u5f8b\\\\u8bbe\\\\u7f6e\\\"]]]"}';window.parent.postMessage(apcnf, '*');</script></head><body marginwidth="0" marginheight="0"></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-95
View File
@@ -1,95 +0,0 @@
/* Copy buttons */
button.copybtn {
position: absolute;
display: flex;
top: .3em;
right: .3em;
width: 1.7em;
height: 1.7em;
opacity: 0;
transition: opacity 0.3s, border .3s, background-color .3s;
user-select: none;
padding: 0;
border: none;
outline: none;
border-radius: 0.4em;
/* The colors that GitHub uses */
border: #1b1f2426 1px solid;
background-color: #f6f8fa;
color: #57606a;
}
button.copybtn.success {
border-color: #22863a;
color: #22863a;
}
button.copybtn svg {
stroke: currentColor;
width: 1.5em;
height: 1.5em;
padding: 0.1em;
}
div.highlight {
position: relative;
}
/* Show the copybutton */
.highlight:hover button.copybtn, button.copybtn.success {
opacity: 1;
}
.highlight button.copybtn:hover {
background-color: rgb(235, 235, 235);
}
.highlight button.copybtn:active {
background-color: rgb(187, 187, 187);
}
/**
* A minimal CSS-only tooltip copied from:
* https://codepen.io/mildrenben/pen/rVBrpK
*
* To use, write HTML like the following:
*
* <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
*/
.o-tooltip--left {
position: relative;
}
.o-tooltip--left:after {
opacity: 0;
visibility: hidden;
position: absolute;
content: attr(data-tooltip);
padding: .2em;
font-size: .8em;
left: -.2em;
background: grey;
color: white;
white-space: nowrap;
z-index: 2;
border-radius: 2px;
transform: translateX(-102%) translateY(0);
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
}
.o-tooltip--left:hover:after {
display: block;
opacity: 1;
visibility: visible;
transform: translateX(-100%) translateY(0);
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
transition-delay: .5s;
}
/* By default the copy button shouldn't show up when printing a page */
@media print {
button.copybtn {
display: none;
}
}
-248
View File
@@ -1,248 +0,0 @@
// Localization support
const messages = {
'en': {
'copy': 'Copy',
'copy_to_clipboard': 'Copy to clipboard',
'copy_success': 'Copied!',
'copy_failure': 'Failed to copy',
},
'es' : {
'copy': 'Copiar',
'copy_to_clipboard': 'Copiar al portapapeles',
'copy_success': '¡Copiado!',
'copy_failure': 'Error al copiar',
},
'de' : {
'copy': 'Kopieren',
'copy_to_clipboard': 'In die Zwischenablage kopieren',
'copy_success': 'Kopiert!',
'copy_failure': 'Fehler beim Kopieren',
},
'fr' : {
'copy': 'Copier',
'copy_to_clipboard': 'Copier dans le presse-papier',
'copy_success': 'Copié !',
'copy_failure': 'Échec de la copie',
},
'ru': {
'copy': 'Скопировать',
'copy_to_clipboard': 'Скопировать в буфер',
'copy_success': 'Скопировано!',
'copy_failure': 'Не удалось скопировать',
},
'zh-CN': {
'copy': '复制',
'copy_to_clipboard': '复制到剪贴板',
'copy_success': '复制成功!',
'copy_failure': '复制失败',
},
'it' : {
'copy': 'Copiare',
'copy_to_clipboard': 'Copiato negli appunti',
'copy_success': 'Copiato!',
'copy_failure': 'Errore durante la copia',
}
}
let locale = 'en'
if( document.documentElement.lang !== undefined
&& messages[document.documentElement.lang] !== undefined ) {
locale = document.documentElement.lang
}
let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT;
if (doc_url_root == '#') {
doc_url_root = '';
}
/**
* SVG files for our copy buttons
*/
let iconCheck = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>${messages[locale]['copy_success']}</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M5 12l5 5l10 -10" />
</svg>`
// If the user specified their own SVG use that, otherwise use the default
let iconCopy = ``;
if (!iconCopy) {
iconCopy = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title>${messages[locale]['copy_to_clipboard']}</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<rect x="8" y="8" width="12" height="12" rx="2" />
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
</svg>`
}
/**
* Set up copy/paste for code blocks
*/
const runWhenDOMLoaded = cb => {
if (document.readyState != 'loading') {
cb()
} else if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', cb)
} else {
document.attachEvent('onreadystatechange', function() {
if (document.readyState == 'complete') cb()
})
}
}
const codeCellId = index => `codecell${index}`
// Clears selected text since ClipboardJS will select the text when copying
const clearSelection = () => {
if (window.getSelection) {
window.getSelection().removeAllRanges()
} else if (document.selection) {
document.selection.empty()
}
}
// Changes tooltip text for a moment, then changes it back
// We want the timeout of our `success` class to be a bit shorter than the
// tooltip and icon change, so that we can hide the icon before changing back.
var timeoutIcon = 2000;
var timeoutSuccessClass = 1500;
const temporarilyChangeTooltip = (el, oldText, newText) => {
el.setAttribute('data-tooltip', newText)
el.classList.add('success')
// Remove success a little bit sooner than we change the tooltip
// So that we can use CSS to hide the copybutton first
setTimeout(() => el.classList.remove('success'), timeoutSuccessClass)
setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon)
}
// Changes the copy button icon for two seconds, then changes it back
const temporarilyChangeIcon = (el) => {
el.innerHTML = iconCheck;
setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon)
}
const addCopyButtonToCodeCells = () => {
// If ClipboardJS hasn't loaded, wait a bit and try again. This
// happens because we load ClipboardJS asynchronously.
if (window.ClipboardJS === undefined) {
setTimeout(addCopyButtonToCodeCells, 250)
return
}
// Add copybuttons to all of our code cells
const COPYBUTTON_SELECTOR = 'div.highlight pre';
const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR)
codeCells.forEach((codeCell, index) => {
const id = codeCellId(index)
codeCell.setAttribute('id', id)
const clipboardButton = id =>
`<button class="copybtn o-tooltip--left" data-tooltip="${messages[locale]['copy']}" data-clipboard-target="#${id}">
${iconCopy}
</button>`
codeCell.insertAdjacentHTML('afterend', clipboardButton(id))
})
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
/**
* Removes excluded text from a Node.
*
* @param {Node} target Node to filter.
* @param {string} exclude CSS selector of nodes to exclude.
* @returns {DOMString} Text from `target` with text removed.
*/
function filterText(target, exclude) {
const clone = target.cloneNode(true); // clone as to not modify the live DOM
if (exclude) {
// remove excluded nodes
clone.querySelectorAll(exclude).forEach(node => node.remove());
}
return clone.innerText;
}
// Callback when a copy button is clicked. Will be passed the node that was clicked
// should then grab the text and replace pieces of text that shouldn't be used in output
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
var regexp;
var match;
// Do we check for line continuation characters and "HERE-documents"?
var useLineCont = !!lineContinuationChar
var useHereDoc = !!hereDocDelim
// create regexp to capture prompt and remaining line
if (isRegexp) {
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
} else {
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
}
const outputLines = [];
var promptFound = false;
var gotLineCont = false;
var gotHereDoc = false;
const lineGotPrompt = [];
for (const line of textContent.split('\n')) {
match = line.match(regexp)
if (match || gotLineCont || gotHereDoc) {
promptFound = regexp.test(line)
lineGotPrompt.push(promptFound)
if (removePrompts && promptFound) {
outputLines.push(match[2])
} else {
outputLines.push(line)
}
gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
if (line.includes(hereDocDelim) & useHereDoc)
gotHereDoc = !gotHereDoc
} else if (!onlyCopyPromptLines) {
outputLines.push(line)
} else if (copyEmptyLines && line.trim() === '') {
outputLines.push(line)
}
}
// If no lines with the prompt were found then just use original lines
if (lineGotPrompt.some(v => v === true)) {
textContent = outputLines.join('\n');
}
// Remove a trailing newline to avoid auto-running when pasting
if (textContent.endsWith("\n")) {
textContent = textContent.slice(0, -1)
}
return textContent
}
var copyTargetText = (trigger) => {
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
// get filtered text
let exclude = '.linenos';
let text = filterText(target, exclude);
return formatCopyText(text, '', false, true, true, true, '', '')
}
// Initialize with a callback so we can modify the text before copy
const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText})
// Update UI with error/success messages
clipboard.on('success', event => {
clearSelection()
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success'])
temporarilyChangeIcon(event.trigger)
})
clipboard.on('error', event => {
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure'])
})
}
runWhenDOMLoaded(addCopyButtonToCodeCells)
-152
View File
@@ -1,152 +0,0 @@
.wy-nav-content {
max-width: initial;
}
#postgrest-documentation > h1 {
display: none;
}
div.wy-menu.rst-pro {
display: none !important;
}
div.highlight {
background: #fff !important;
}
div.line-block {
margin-bottom: 0px !important;
}
#sponsors {
text-align: center;
}
#sponsors h2 {
text-align: left;
}
#sponsors img{
margin: 10px;
width: 13em; /* ".. image::" does not apply width properly to SVGs */
}
#thanks{
text-align: center;
}
#thanks img{
margin: 10px;
}
#thanks h2{
text-align: left;
}
#thanks p{
text-align: left;
}
#thanks ul{
text-align: left;
}
.image-container {
max-width: 800px;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 24px;
}
.wy-table-responsive table td {
white-space: normal !important;
}
.wy-table-responsive {
overflow: visible !important;
}
#tutorials span.caption-text {
display: none;
}
#references span.caption-text {
display: none;
}
#explanations span.caption-text {
display: none;
}
#how-tos span.caption-text {
display: none;
}
#ecosystem span.caption-text {
display: none;
}
#integrations span.caption-text {
display: none;
}
#api span.caption-text {
display: none;
}
/* Tweaks for dark mode from extension: sphinx-rtd-dark-theme */
html[data-theme="dark"] .highlight {
background-color: #17181c !important;
}
html[data-theme="dark"] .sphinx-tabs-tab {
color: var(--dark-link-color);
}
html[data-theme="dark"] .sphinx-tabs-panel {
border: 1px solid #404040;
border-top: 0;
background: #141414;
}
html[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
border: 1px solid #404040;
border-bottom: 1px solid #141414;
background-color: #141414;
}
html[data-theme="dark"] [role="tablist"] {
border-bottom: 1px solid #404040;
}
html[data-theme="dark"] .btn-neutral {
color: white !important;
}
html[data-theme="dark"] .img-dark {
display: inline;
}
html:not([data-theme="dark"]) .img-dark {
display: none;
}
html[data-theme="dark"] .img-light {
display: none;
}
html:not([data-theme="dark"]) .img-light {
display: inline;
}
html[data-theme="dark"] .img-translucent img {
background-color: #cccccc;
}
.img-translucent img {
transition: background-color 0.3s;
margin-bottom: 24px;
}
-521
View File
@@ -1,521 +0,0 @@
:root {
--dark-text-color: #c1c1c1;
--dark-link-color: #249ee8;
}
html[data-theme="dark"] body {
color: #bfbfbf;
}
html[data-theme="dark"] .wy-nav-content-wrap {
background-color: #101010;
}
html[data-theme="dark"] .wy-nav-content {
background-color: #141414;
}
html[data-theme="dark"] .section {
color: var(--dark-text-color);
}
html[data-theme="dark"] .highlight {
background-color: #17181c;
}
html[data-theme="dark"] .highlight .nn {
color: var(--dark-text-color);
}
html[data-theme="dark"] .highlight .nb {
color: #8bb8df;
}
html[data-theme="dark"] .highlight .nv {
color: #40ffff;
}
html[data-theme="dark"] .highlight .kn,
html[data-theme="dark"] .highlight .kc,
html[data-theme="dark"] .highlight .k {
color: #41c2ea;
}
html[data-theme="dark"] .highlight .s1,
html[data-theme="dark"] .highlight .s2 {
color: #b3e87f;
}
html[data-theme="dark"] .highlight .nt {
color: #ccb350;
}
html[data-theme="dark"] .highlight .c1 {
color: #686868;
}
html[data-theme="dark"] .highlight .hll {
background-color: #002c4d;
}
html[data-theme="dark"] .rst-content div[class^="highlight"] {
border-color: #1a1a1a;
}
html[data-theme="dark"] .wy-nav-content a,
html[data-theme="dark"] .wy-nav-content a:visited {
color: var(--dark-link-color);
}
html[data-theme="dark"] .btn-neutral {
background-color: #17181c !important;
}
html[data-theme="dark"] .btn-neutral:hover {
background-color: #101114 !important;
}
html[data-theme="dark"] .btn-neutral:visited {
color: #c1c1c1 !important;
}
html[data-theme="dark"] .btn {
box-shadow: none;
}
html[data-theme="dark"] footer {
color: #bdbdbd;
}
html[data-theme="dark"] .wy-nav-side {
background-color: #0d0d0d;
}
html[data-theme="dark"] .wy-menu-vertical li.current {
background-color: #141414;
}
html[data-theme="dark"] .wy-menu-vertical li.current > a,
html[data-theme="dark"] .wy-menu-vertical li.on a {
background-color: #141415;
color: var(--dark-text-color);
}
html[data-theme="dark"] .wy-menu-vertical li.toctree-l1.current > a,
html[data-theme="dark"] .wy-menu-vertical li.current a {
border-color: #0b0c0d;
}
html[data-theme="dark"] .wy-menu-vertical li.current a {
color: #bbb;
}
html[data-theme="dark"] .wy-menu-vertical li.current a:hover {
background-color: #222;
}
html[data-theme="dark"] .wy-menu-vertical a:hover,
html[data-theme="dark"] .wy-menu-vertical li.current > a:hover,
html[data-theme="dark"] .wy-menu-vertical li.on a:hover {
background-color: #1e1e1e;
}
html[data-theme="dark"] .wy-menu-vertical li.toctree-l2.current > a,
html[data-theme="dark"]
.wy-menu-vertical
li.toctree-l2.current
li.toctree-l3
> a {
background-color: #18181a;
}
html[data-theme="dark"] .wy-side-nav-search {
background-color: #0b152d;
}
html[data-theme="dark"] .wy-side-nav-search .wy-dropdown > a,
html[data-theme="dark"] .wy-side-nav-search > a {
color: #ddd;
}
html[data-theme="dark"] .wy-side-nav-search input[type="text"] {
border-color: #111;
background-color: #141414;
color: var(--dark-text-color);
}
html[data-theme="dark"] .theme-switcher {
background-color: #0b0c0d;
color: var(--dark-text-color);
}
html[data-theme="dark"].writer-html4 .rst-content dl:not(.docutils) > dt,
html[data-theme="dark"].writer-html5
.rst-content
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(
.glossary
):not(.simple)
> dt {
background-color: #0b0b0b;
color: #007dce;
border-color: #282828;
}
html[data-theme="dark"] .rst-content code,
html[data-theme="dark"] .rst-content tt {
color: var(--dark-text-color);
}
html[data-theme="dark"].writer-html4
.rst-content
dl:not(.docutils)
dl:not(.field-list)
> dt,
html[data-theme="dark"].writer-html5
.rst-content
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(
.glossary
):not(.simple)
dl:not(.field-list)
> dt {
background-color: #0f0f0f;
color: #959595;
border-color: #2b2b2b;
}
html[data-theme="dark"] .rst-content code,
html[data-theme="dark"] .rst-content tt,
html[data-theme="dark"] code {
background-color: #2d2d2d;
border-color: #1c1c1c;
}
html[data-theme="dark"] .rst-content code.xref,
html[data-theme="dark"] .rst-content tt.xref,
html[data-theme="dark"] a .rst-content code,
html[data-theme="dark"] a .rst-content tt {
color: #cecece;
}
html[data-theme="dark"] .rst-content .hint,
html[data-theme="dark"] .rst-content .important,
html[data-theme="dark"] .rst-content .tip,
html[data-theme="dark"] .rst-content .wy-alert-success.admonition,
html[data-theme="dark"] .rst-content .wy-alert-success.admonition-todo,
html[data-theme="dark"] .rst-content .wy-alert-success.attention,
html[data-theme="dark"] .rst-content .wy-alert-success.caution,
html[data-theme="dark"] .rst-content .wy-alert-success.danger,
html[data-theme="dark"] .rst-content .wy-alert-success.error,
html[data-theme="dark"] .rst-content .wy-alert-success.note,
html[data-theme="dark"] .rst-content .wy-alert-success.seealso,
html[data-theme="dark"] .rst-content .wy-alert-success.warning,
html[data-theme="dark"] .wy-alert.wy-alert-success {
background-color: #00392e;
}
html[data-theme="dark"] .rst-content .hint .admonition-title,
html[data-theme="dark"] .rst-content .hint .wy-alert-title,
html[data-theme="dark"] .rst-content .important .admonition-title,
html[data-theme="dark"] .rst-content .important .wy-alert-title,
html[data-theme="dark"] .rst-content .tip .admonition-title,
html[data-theme="dark"] .rst-content .tip .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.admonition-todo
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.admonition-todo
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.admonition
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.admonition
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.attention
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.attention
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.caution
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.caution .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-success.danger .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.danger .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-success.error .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.error .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-success.note .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.note .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.seealso
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.seealso .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-success.warning
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-success.warning .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert.wy-alert-success
.admonition-title,
html[data-theme="dark"]
.wy-alert.wy-alert-success
.rst-content
.admonition-title,
html[data-theme="dark"] .wy-alert.wy-alert-success .wy-alert-title {
background-color: #006a56;
}
html[data-theme="dark"] .rst-content .admonition,
html[data-theme="dark"] .rst-content .note,
html[data-theme="dark"] .rst-content .seealso,
html[data-theme="dark"] .rst-content .wy-alert-info.admonition,
html[data-theme="dark"] .rst-content .wy-alert-info.admonition-todo,
html[data-theme="dark"] .rst-content .wy-alert-info.attention,
html[data-theme="dark"] .rst-content .wy-alert-info.caution,
html[data-theme="dark"] .rst-content .wy-alert-info.danger,
html[data-theme="dark"] .rst-content .wy-alert-info.error,
html[data-theme="dark"] .rst-content .wy-alert-info.hint,
html[data-theme="dark"] .rst-content .wy-alert-info.important,
html[data-theme="dark"] .rst-content .wy-alert-info.tip,
html[data-theme="dark"] .rst-content .wy-alert-info.warning,
html[data-theme="dark"] .wy-alert.wy-alert-info {
background-color: #002c4d;
}
html[data-theme="dark"] .rst-content .admonition .admonition-title,
html[data-theme="dark"] .rst-content .note .admonition-title,
html[data-theme="dark"] .rst-content .note .wy-alert-title,
html[data-theme="dark"] .rst-content .seealso .admonition-title,
html[data-theme="dark"] .rst-content .seealso .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-info.admonition-todo
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-info.admonition-todo
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-info.admonition
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.admonition .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.attention .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.attention .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.caution .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.caution .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.danger .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.danger .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.error .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.error .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.hint .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.hint .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.important .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.important .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.tip .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.tip .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-info.warning .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-info.warning .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert.wy-alert-info .admonition-title,
html[data-theme="dark"] .wy-alert.wy-alert-info .rst-content .admonition-title,
html[data-theme="dark"] .wy-alert.wy-alert-info .wy-alert-title {
background-color: #004a7b;
}
html[data-theme="dark"] .rst-content .admonition-todo,
html[data-theme="dark"] .rst-content .attention,
html[data-theme="dark"] .rst-content .caution,
html[data-theme="dark"] .rst-content .warning,
html[data-theme="dark"] .rst-content .wy-alert-warning.admonition,
html[data-theme="dark"] .rst-content .wy-alert-warning.danger,
html[data-theme="dark"] .rst-content .wy-alert-warning.error,
html[data-theme="dark"] .rst-content .wy-alert-warning.hint,
html[data-theme="dark"] .rst-content .wy-alert-warning.important,
html[data-theme="dark"] .rst-content .wy-alert-warning.note,
html[data-theme="dark"] .rst-content .wy-alert-warning.seealso,
html[data-theme="dark"] .rst-content .wy-alert-warning.tip,
html[data-theme="dark"] .wy-alert.wy-alert-warning {
background-color: #533500;
}
html[data-theme="dark"] .rst-content .admonition-todo .admonition-title,
html[data-theme="dark"] .rst-content .admonition-todo .wy-alert-title,
html[data-theme="dark"] .rst-content .attention .admonition-title,
html[data-theme="dark"] .rst-content .attention .wy-alert-title,
html[data-theme="dark"] .rst-content .caution .admonition-title,
html[data-theme="dark"] .rst-content .caution .wy-alert-title,
html[data-theme="dark"] .rst-content .warning .admonition-title,
html[data-theme="dark"] .rst-content .warning .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-warning.admonition
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-warning.admonition
.wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.danger .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.danger .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.error .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.error .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.hint .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.hint .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-warning.important
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-warning.important
.wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.note .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.note .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-warning.seealso
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.seealso .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.tip .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-warning.tip .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert.wy-alert-warning
.admonition-title,
html[data-theme="dark"]
.wy-alert.wy-alert-warning
.rst-content
.admonition-title,
html[data-theme="dark"] .wy-alert.wy-alert-warning .wy-alert-title {
background-color: #803b00;
}
html[data-theme="dark"] .rst-content .danger,
html[data-theme="dark"] .rst-content .error,
html[data-theme="dark"] .rst-content .wy-alert-danger.admonition,
html[data-theme="dark"] .rst-content .wy-alert-danger.admonition-todo,
html[data-theme="dark"] .rst-content .wy-alert-danger.attention,
html[data-theme="dark"] .rst-content .wy-alert-danger.caution,
html[data-theme="dark"] .rst-content .wy-alert-danger.hint,
html[data-theme="dark"] .rst-content .wy-alert-danger.important,
html[data-theme="dark"] .rst-content .wy-alert-danger.note,
html[data-theme="dark"] .rst-content .wy-alert-danger.seealso,
html[data-theme="dark"] .rst-content .wy-alert-danger.tip,
html[data-theme="dark"] .rst-content .wy-alert-danger.warning,
html[data-theme="dark"] .wy-alert.wy-alert-danger {
background-color: #82231a;
}
html[data-theme="dark"] .rst-content .danger .admonition-title,
html[data-theme="dark"] .rst-content .danger .wy-alert-title,
html[data-theme="dark"] .rst-content .error .admonition-title,
html[data-theme="dark"] .rst-content .error .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.admonition-todo
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.admonition-todo
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.admonition
.admonition-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.admonition
.wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.attention
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.attention .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.caution .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.caution .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.hint .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.hint .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert-danger.important
.admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.important .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.note .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.note .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.seealso .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.seealso .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.tip .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.tip .wy-alert-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.warning .admonition-title,
html[data-theme="dark"] .rst-content .wy-alert-danger.warning .wy-alert-title,
html[data-theme="dark"]
.rst-content
.wy-alert.wy-alert-danger
.admonition-title,
html[data-theme="dark"]
.wy-alert.wy-alert-danger
.rst-content
.admonition-title,
html[data-theme="dark"] .wy-alert.wy-alert-danger .wy-alert-title {
background-color: #b9372b;
}
html[data-theme="dark"] .wy-nav-top {
background-color: #0b152d;
}
html[data-theme="dark"] .rst-content table.docutils thead,
html[data-theme="dark"] .rst-content table.field-list thead,
html[data-theme="dark"] .wy-table thead {
color: var(--dark-text-color);
}
html[data-theme="dark"]
.rst-content
table.docutils:not(.field-list)
tr:nth-child(2n-1)
td,
html[data-theme="dark"] .wy-table-backed,
html[data-theme="dark"] html[data-theme="dark"] .wy-table-odd td,
html[data-theme="dark"] .wy-table-striped tr:nth-child(2n-1) td {
background-color: #181818;
}
html[data-theme="dark"] .rst-content table.docutils td,
html[data-theme="dark"] .wy-table-bordered-all td,
html[data-theme="dark"].writer-html5 .rst-content table.docutils th,
html[data-theme="dark"] .rst-content table.docutils,
html[data-theme="dark"] .wy-table-bordered-all {
border-color: #262626;
}
html[data-theme="dark"] .rst-content table.docutils caption,
html[data-theme="dark"] .rst-content table.field-list caption,
html[data-theme="dark"] .wy-table caption {
color: var(--dark-text-color);
}
html[data-theme="dark"] .wy-menu-vertical li.toctree-l3.current > a,
html[data-theme="dark"]
.wy-menu-vertical
li.toctree-l3.current
li.toctree-l4
> a {
background-color: #18181a;
}
html[data-theme="dark"] .guilabel {
background-color: #343434;
border-color: #4d4d4d;
}
@@ -1,13 +0,0 @@
const loadTheme = () => {
let theme = localStorage.getItem('theme');
if (theme !== null) {
if (theme === 'dark')
document.documentElement.setAttribute('data-theme', 'dark');
} else {
localStorage.setItem('theme', 'light');
document.documentElement.setAttribute('data-theme', 'light');
}
};
loadTheme();
-156
View File
@@ -1,156 +0,0 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
};
/**
* Small JavaScript module for the documentation.
*/
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
/**
* i18n support
*/
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
},
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
},
/**
* helper function to focus on search bar
*/
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
},
/**
* Initialise the domain index toggle buttons
*/
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
}
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
}
break;
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
},
};
// quick alias for translations
const _ = Documentation.gettext;
_ready(Documentation.init);
@@ -1,13 +0,0 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-69
View File
@@ -1,69 +0,0 @@
input[type='color'],
input[type='date'],
input[type='datetime-local'],
input[type='datetime'],
input[type='email'],
input[type='month'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='time'],
input[type='url'],
input[type='week'] {
box-shadow: none;
}
.theme-switcher {
border-radius: 50%;
position: fixed;
right: 1.6em;
bottom: 1.4em;
z-index: 3;
border: none;
height: 2.2em;
width: 2.2em;
background-color: #fcfcfc;
font-size: 20px;
-webkit-box-shadow: 0px 3px 14px 4px rgba(0, 0, 0, 0.62);
box-shadow: 0px 3px 14px 4px rgba(0, 0, 0, 0.62);
color: #404040;
transition: all 0.3s ease-in-out;
}
body,
.wy-nav-content-wrap,
.wy-nav-content,
.section,
.highlight,
.rst-content div[class^='highlight'],
.wy-nav-content a,
.btn-neutral,
.btn,
footer,
.wy-nav-side,
.wy-menu-vertical li,
.wy-menu-vertical a,
.wy-side-nav-search .wy-dropdown,
.wy-side-nav-search a,
.wy-side-nav-search input,
html.writer-html4 .rst-content dl:not(.docutils) > dt,
html.writer-html5
.rst-content
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
> dt,
.rst-content code,
.rst-content tt,
html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt,
html.writer-html5
.rst-content
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
dl:not(.field-list)
> dt,
code,
.rst-content code.xref,
.rst-content tt.xref {
transition: all 0.2s ease-in-out;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-75
View File
@@ -1,75 +0,0 @@
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #333333 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #208050 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06287e } /* Name.Function.Magic */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
@@ -1,302 +0,0 @@
/* Left for CSS overrides we need to make in the future */
/* Fix badge on RTD Theme */
/* Please keep RTD badge displayed on your site */
.rst-versions.rst-badge {
display: block;
bottom: 50px;
/* Workaround for mkdocs which set a specific height for this element */
height: auto;
}
.rst-other-versions {
text-align: left;
}
.rst-other-versions a {
border: 0;
}
.rst-other-versions dl {
margin: 0;
}
.rtd-current-item {
font-weight: bold;
}
/* Fix RTD theme bottom margin */
.rst-content .line-block {
margin-bottom: 24px
}
/* Fix for nav bottom padding with flyout */
nav.wy-nav-side {
padding-bottom: 3em;
}
/* bookmark icon */
.bookmark-added-msg {display: none;}
.bookmark-active {display: none;}
.bookmark-inactive {display: none;}
/* Read the Docs promotional block, only applicable to RTD.org
To support sphinx_rtd_theme, a `wy-menu` element is added. Other themes are
targeted using the theme identifier and use custom elements instead of a CSS
framework html structure.
*/
div.ethical-sidebar,
div.ethical-footer {
display: block !important;
}
.ethical-sidebar,
.ethical-footer {
padding: 0.5em;
margin: 1em 0;
}
.ethical-sidebar img,
.ethical-footer img {
width: 120px;
height: 90px;
display: inline-block;
}
.ethical-sidebar .ethical-callout,
.ethical-footer .ethical-callout {
padding-top: 1em;
clear: both;
}
.ethical-sidebar .ethical-pixel,
.ethical-footer .ethical-pixel,
.ethical-fixedfooter .ethical-pixel {
display: none !important;
}
.ethical-sidebar .ethical-text,
.ethical-footer .ethical-text {
margin-top: 1em;
}
.ethical-sidebar .ethical-image-link,
.ethical-footer .ethical-image-link {
border: 0;
}
.ethical-sidebar,
.ethical-footer {
background-color: #eee;
border: 1px solid #ccc;
border-radius: 5px;
color: #0a0a0a;
font-size: 14px;
line-height: 20px;
}
/* Techstack badging */
.ethical-sidebar ul {
margin: 0 !important;
padding-left: 0;
list-style: none;
}
.ethical-sidebar ul li {
display: inline-block;
background-color: lightskyblue;
color: black;
padding: 0.25em 0.4em;
font-size: 75%;
font-weight: 700;
margin: 0.25em;
border-radius: 0.25rem;
text-align: center;
vertical-align: baseline;
white-space: nowrap;
line-height: 1.41;
}
.ethical-sidebar ul li:not(:last-child) {
margin-right: .25rem;
}
.ethical-sidebar a,
.ethical-sidebar a:visited,
.ethical-sidebar a:hover,
.ethical-sidebar a:active,
.ethical-footer a,
.ethical-footer a:visited,
.ethical-footer a:hover,
.ethical-footer a:active {
color: #0a0a0a;
text-decoration: none !important;
border-bottom: 0 !important;
}
.ethical-callout a {
color: #707070 !important;
text-decoration: none !important;
}
/* Sidebar promotions */
.ethical-sidebar {
text-align: center;
max-width: 300px;
margin-left: auto;
margin-right: auto;
}
/* Footer promotions */
.ethical-footer {
text-align: left;
font-size: 14px;
line-height: 20px;
}
.ethical-footer img {
float: right;
margin-left: 25px;
}
.ethical-footer .ethical-callout {
text-align: center;
}
.ethical-footer small {
font-size: 10px;
}
/* Fixed footer promotions */
.ethical-fixedfooter {
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
z-index: 100;
background-color: #eee;
border-top: 1px solid #bfbfbf;
font-size: 12px;
line-height: 1.5;
padding: 0.5em 1.5em;
text-align: center;
color: #404040;
width: 100%; /* Fallback for Opera Mini */
width: 100vw;
}
@media (min-width: 769px) {
/* Improve viewing on non-mobile */
.ethical-fixedfooter {
font-size: 13px;
padding: 1em 1.5em;
}
}
.ethical-fixedfooter .ethical-text:before {
margin-right: 4px;
padding: 2px 6px;
border-radius: 3px;
background-color: #4caf50;
color: #fff;
content: "Sponsored";
}
.ethical-fixedfooter .ethical-callout {
color: #999;
padding-left: 6px;
white-space: nowrap;
}
.ethical-fixedfooter a,
.ethical-fixedfooter a:hover,
.ethical-fixedfooter a:active,
.ethical-fixedfooter a:visited {
color: #404040;
text-decoration: none;
}
.ethical-fixedfooter .ethical-close {
position: absolute;
top: 0;
right: 5px;
font-size: 20px;
line-height: 20px;
}
/* RTD Theme specific customizations */
.wy-nav-side .ethical-rtd {
/* RTD theme doesn't correctly set the sidebar width */
max-width: 300px;
padding: 0 1em;
}
.ethical-rtd .ethical-sidebar {
/* RTD theme doesn't set sidebar text color */
color: #b3b3b3;
font-size: 14px;
line-height: 20px;
}
@media (min-width: 769px) {
/* Make sure the fixed footer ad is under the RTD theme version selector */
.wy-body-for-nav .ethical-fixedfooter {
padding-left: 300px;
}
}
/* Alabaster specific customizations */
.ethical-alabaster a.ethical-image-link {
/* Alabaster adds a border even to image links on hover */
border: 0 !important;
}
.ethical-alabaster hr {
/* Alabaster needs some extra spacing before the footer ad */
margin-top: 2em;
}
.ethical-alabaster::before {
/* Alabaster's search box above the ad is floating */
clear: both;
content: '';
display: table;
margin-top: 3em;
}
/* Dark theme */
.ethical-dark-theme .ethical-sidebar {
background-color: #4e4b4b;
border: 1px solid #a0a0a0;
color: #c2c2c2 !important;
}
.ethical-dark-theme a,
.ethical-dark-theme a:visited {
color: #e6e6e6 !important;
border-bottom: 0 !important;
}
.ethical-dark-theme .ethical-callout a {
color: #b3b3b3 !important;
}
/* Ad block nag */
.keep-us-sustainable {
padding: .5em;
margin: 1em auto;
text-align: center;
border: 1px dotted #8ECC4C;
max-width: 300px;
}
.keep-us-sustainable a,
.keep-us-sustainable a:hover,
.keep-us-sustainable a:visited {
text-decoration: none;
}
/* Read the Docs theme specific fixes */
.wy-nav-side .keep-us-sustainable {
margin: 1em 2em 1em 1em;
color: #b3b3b3;
}
.wy-nav-side .keep-us-sustainable a {
color: #efefef;
font-size: 14px;
line-height: 20px;
}
/* Margin between the search results */
.rtd_search_hits_spacing {
margin: 10px 0;
}
-3
View File
@@ -1,3 +0,0 @@
<!-- saved from url=(0011)about:blank -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body></body></html>
@@ -1,154 +0,0 @@
/* Highlighting utilities for Sphinx HTML documentation. */
"use strict";
const SPHINX_HIGHLIGHT_ENABLED = true
/**
* highlight a given string on a node by wrapping it in
* span elements with the given class name.
*/
const _highlight = (node, addItems, text, className) => {
if (node.nodeType === Node.TEXT_NODE) {
const val = node.nodeValue;
const parent = node.parentNode;
const pos = val.toLowerCase().indexOf(text);
if (
pos >= 0 &&
!parent.classList.contains(className) &&
!parent.classList.contains("nohighlight")
) {
let span;
const closestNode = parent.closest("body, svg, foreignObject");
const isInSVG = closestNode && closestNode.matches("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.classList.add(className);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);
if (isInSVG) {
const rect = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
);
const bbox = parent.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
}
}
} else if (node.matches && !node.matches("button, select, textarea")) {
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
}
};
const _highlightText = (thisNode, text, className) => {
let addItems = [];
_highlight(thisNode, addItems, text, className);
addItems.forEach((obj) =>
obj.parent.insertAdjacentElement("beforebegin", obj.target)
);
};
/**
* Small JavaScript module for the documentation.
*/
const SphinxHighlight = {
/**
* highlight the search words provided in localstorage in the text
*/
highlightSearchWords: () => {
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
// get and clear terms from localstorage
const url = new URL(window.location);
const highlight =
localStorage.getItem("sphinx_highlight_terms")
|| url.searchParams.get("highlight")
|| "";
localStorage.removeItem("sphinx_highlight_terms")
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
// get individual terms from highlight string
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
if (terms.length === 0) return; // nothing to do
// There should never be more than one element matching "div.body"
const divBody = document.querySelectorAll("div.body");
const body = divBody.length ? divBody[0] : document.querySelector("body");
window.setTimeout(() => {
terms.forEach((term) => _highlightText(body, term, "highlighted"));
}, 10);
const searchBox = document.getElementById("searchbox");
if (searchBox === null) return;
searchBox.appendChild(
document
.createRange()
.createContextualFragment(
'<p class="highlight-link">' +
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
_("Hide Search Matches") +
"</a></p>"
)
);
},
/**
* helper function to hide the search marks again
*/
hideSearchWords: () => {
document
.querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
localStorage.removeItem("sphinx_highlight_terms")
},
initEscapeListener: () => {
// only install a listener if it is really needed
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
SphinxHighlight.hideSearchWords();
event.preventDefault();
}
});
},
};
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
-90
View File
@@ -1,90 +0,0 @@
.sphinx-tabs {
margin-bottom: 1rem;
}
[role="tablist"] {
border-bottom: 1px solid #a0b3bf;
}
.sphinx-tabs-tab {
position: relative;
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
color: #1D5C87;
line-height: 24px;
margin: 0;
font-size: 16px;
font-weight: 400;
background-color: rgba(255, 255, 255, 0);
border-radius: 5px 5px 0 0;
border: 0;
padding: 1rem 1.5rem;
margin-bottom: 0;
}
.sphinx-tabs-tab[aria-selected="true"] {
font-weight: 700;
border: 1px solid #a0b3bf;
border-bottom: 1px solid white;
margin: -1px;
background-color: white;
}
.sphinx-tabs-tab:focus {
z-index: 1;
outline-offset: 1px;
}
.sphinx-tabs-panel {
position: relative;
padding: 1rem;
border: 1px solid #a0b3bf;
margin: 0px -1px -1px -1px;
border-radius: 0 0 5px 5px;
border-top: 0;
background: white;
}
.sphinx-tabs-panel.code-tab {
padding: 0.4rem;
}
.sphinx-tab img {
margin-bottom: 24 px;
}
/* Dark theme preference styling */
@media (prefers-color-scheme: dark) {
body[data-theme="auto"] .sphinx-tabs-panel {
color: white;
background-color: rgb(50, 50, 50);
}
body[data-theme="auto"] .sphinx-tabs-tab {
color: white;
background-color: rgba(255, 255, 255, 0.05);
}
body[data-theme="auto"] .sphinx-tabs-tab[aria-selected="true"] {
border-bottom: 1px solid rgb(50, 50, 50);
background-color: rgb(50, 50, 50);
}
}
/* Explicit dark theme styling */
body[data-theme="dark"] .sphinx-tabs-panel {
color: white;
background-color: rgb(50, 50, 50);
}
body[data-theme="dark"] .sphinx-tabs-tab {
color: white;
background-color: rgba(255, 255, 255, 0.05);
}
body[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
border-bottom: 2px solid rgb(50, 50, 50);
background-color: rgb(50, 50, 50);
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,39 +0,0 @@
const createThemeSwitcher = () => {
let btn = document.createElement('BUTTON');
btn.className = 'theme-switcher';
btn.id = 'themeSwitcher';
btn.innerHTML =
'<i id=themeMoon class="fa fa-moon-o"></i><i id=themeSun class="fa fa-sun-o"></i>';
document.body.appendChild(btn);
if (localStorage.getItem('theme') === 'dark') $('#themeMoon').hide(0);
else $('#themeSun').hide(0);
};
$(document).ready(() => {
createThemeSwitcher();
$('#themeSwitcher').click(switchTheme);
$('footer').html(
$('footer').html() +
'<a href="https://github.com/MrDogeBro/sphinx_rtd_dark_mode">Dark theme</a> provided by <a href="http://mrdogebro.com">MrDogeBro</a>.'
);
});
const switchTheme = () => {
if (localStorage.getItem('theme') === 'dark') {
localStorage.setItem('theme', 'light');
document.documentElement.setAttribute('data-theme', 'light');
$('#themeSun').fadeOut(200, () => {
$('#themeMoon').fadeIn(200);
});
} else {
localStorage.setItem('theme', 'dark');
document.documentElement.setAttribute('data-theme', 'dark');
$('#themeMoon').fadeOut(200, () => {
$('#themeSun').fadeIn(200);
});
}
};
-23
View File
@@ -1,23 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0090)https://googleads.g.doubleclick.net/pagead/html/r20250401/r20190131/zrt_lookup_fy2021.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script>
(function(){'use strict';/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var p=this||self;function q(){var a=p.navigator;return a&&(a=a.userAgent)?a:""};function x(a,b){Array.prototype.forEach.call(a,b,void 0)};function y(a){y[" "](a);return a}y[" "]=function(){};var aa=q().toLowerCase().indexOf("webkit")!=-1&&q().indexOf("Edge")==-1;function ba(a){var b=window;b.addEventListener&&b.addEventListener("load",a,!1)};/*
Copyright Google LLC
SPDX-License-Identifier: Apache-2.0
*/
let z=globalThis.trustedTypes,B;function ca(){let a=null;if(!z)return a;try{const b=c=>c;a=z.createPolicy("goog#html",{createHTML:b,createScript:b,createScriptURL:b})}catch(b){}return a};var C=class{constructor(a){this.g=a}toString(){return this.g+""}};function D(a){if(a instanceof C)return a.g;throw Error("");};var da=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function E(a){try{var b;if(b=!!a&&a.location.href!=null)a:{try{y(a.foo);b=!0;break a}catch(c){}b=!1}return b}catch{return!1}}function F(a=!1){const b=[p.top],c=[];let d=0,f;for(;f=b[d++];){a&&!E(f)||c.push(f);try{if(f.frames)for(let e=0;e<f.frames.length&&b.length<1024;++e)b.push(f.frames[e])}catch{}}return c}function G(a,b){if(a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)}function ea(a=document){return a.createElement("img")};function fa(a){p.google_image_requests||(p.google_image_requests=[]);const b=ea(p.document);b.src=a;p.google_image_requests.push(b)};let H=null;function ha(){if(!H)b:{var a=F();for(var b=0;b<a.length;b++)try{const c=a[b].frames.google_esf;if(c&&E(c)){H=c;break b}}catch(c){}H=null}(a=H)?((b=a.esf_propArray)||(b=a.esf_propArray={}),a=b):a=null;return a?.[2]};var J=window;var K=/#(R?S)-(.*)/,ma=/^(\d+)-(.*)/;var na=class{constructor(a,b){this.error=a;this.meta={};this.context=b.context;this.msg=b.message||"";this.id=b.id||"jserror"}};function L(a){let b=a.toString();a.name&&b.indexOf(a.name)==-1&&(b+=": "+a.name);a.message&&b.indexOf(a.message)==-1&&(b+=": "+a.message);if(a.stack)a:{a=a.stack;var c=b;try{a.indexOf(c)==-1&&(a=c+"\n"+a);let d;for(;a!=d;)d=a,a=a.replace(RegExp("((https?:/..*/)[^/:]*:\\d+(?:.|\n)*)\\2"),"$1");b=a.replace(RegExp("\n *","g"),"\n");break a}catch(d){b=c;break a}b=void 0}return b};const oa=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)(\\?|/|$)");var pa=class{constructor(a,b){this.g=a;this.h=b}},qa=class{constructor(a,b){this.url=a;this.g=!!b;this.depth=null}};let M=null;function ra(){const a=p.performance;return a&&a.now&&a.timing?Math.floor(a.now()+a.timing.navigationStart):Date.now()}function sa(){const a=p.performance;return a&&a.now?a.now():null};var ta=class{constructor(a,b){var c=sa()||ra();this.label=a;this.type=b;this.value=c;this.duration=0;this.taskId=this.slotId=void 0;this.uniqueId=Math.random()}};const N=p.performance,ua=!!(N&&N.mark&&N.measure&&N.clearMarks),Q=function(a){let b=!1,c;return function(){b||(c=a(),b=!0);return c}}(()=>{var a;if(a=ua){var b;a=window;if(M===null){M="";try{let c="";try{c=a.top.location.hash}catch(d){c=a.location.hash}c&&(M=(b=c.match(/\bdeid=([\d,]+)/))?b[1]:"")}catch(c){}}b=M;a=!!b.indexOf&&b.indexOf("1337")>=0}return a});function va(a){a&&N&&Q()&&(N.clearMarks(`goog_${a.label}_${a.uniqueId}_start`),N.clearMarks(`goog_${a.label}_${a.uniqueId}_end`))};function R(a,b){const c={};c[a]=b;return[c]}function wa(a,b,c,d,f){const e=[];G(a,(g,l)=>{(g=xa(g,b,c,d,f))&&e.push(`${l}=${g}`)});return e.join(b)}
function xa(a,b,c,d,f){if(a==null)return"";b=b||"&";c=c||",$";typeof c==="string"&&(c=c.split(""));if(a instanceof Array){if(d||(d=0),d<c.length){const e=[];for(let g=0;g<a.length;g++)e.push(xa(a[g],b,c,d+1,f));return e.join(c[d])}}else if(typeof a==="object")return f||(f=0),f<2?encodeURIComponent(wa(a,b,c,d,f+1)):"...";return encodeURIComponent(String(a))}function ya(a){let b=1;for(const c in a.h)c.length>b&&(b=c.length);return 3997-b-a.i.length-1}
function za(a,b){let c="https://pagead2.googlesyndication.com"+b,d=ya(a)-b.length;if(d<0)return"";a.g.sort((e,g)=>e-g);b=null;let f="";for(let e=0;e<a.g.length;e++){const g=a.g[e],l=a.h[g];for(let h=0;h<l.length;h++){if(!d){b=b==null?g:b;break}let m=wa(l[h],a.i,",$");if(m){m=f+m;if(d>=m.length){d-=m.length;c+=m;f=a.i;break}b=b==null?g:b}}}a="";b!=null&&(a=`${f}${"trn"}=${b}`);return c+a}var S=class{constructor(){this.i="&";this.h={};this.j=0;this.g=[]}};var Ba=class{constructor(a=null){this.l=T;this.h=a;this.g=null;this.i=!1;this.m=this.j}j(a,b,c,d,f){f=f||"jserror";let e=void 0;try{const t=new S;var g=t;g.g.push(1);g.h[1]=R("context",a);b.error&&b.meta&&b.id||(b=new na(b,{message:L(b)}));g=b;if(g.msg){b=t;var l=g.msg.substring(0,512);b.g.push(2);b.h[2]=R("msg",l)}var h=g.meta||{};l=h;if(this.g)try{this.g(l)}catch(n){}if(d)try{d(l)}catch(n){}d=t;h=[h];d.g.push(3);d.h[3]=h;var m;if(!(m=r)){d=p;h=[];l=null;do{var k=d;if(E(k)){var v=k.location.href;
l=k.document&&k.document.referrer||null}else v=l,l=null;h.push(new qa(v||""));try{d=k.parent}catch(n){d=null}}while(d&&k!==d);for(let n=0,ia=h.length-1;n<=ia;++n)h[n].depth=ia-n;k=p;if(k.location&&k.location.ancestorOrigins&&k.location.ancestorOrigins.length===h.length-1)for(v=1;v<h.length;++v){const n=h[v];n.url||(n.url=k.location.ancestorOrigins[v-1]||"",n.g=!0)}m=h}var r=m;let I=new qa(p.location.href,!1);m=null;const O=r.length-1;for(k=O;k>=0;--k){var u=r[k];!m&&oa.test(u.url)&&(m=u);if(u.url&&
!u.g){I=u;break}}u=null;const Ga=r.length&&r[O].url;I.depth!==0&&Ga&&(u=r[O]);e=new pa(I,u);if(e.h){r=t;var w=e.h.url||"";r.g.push(4);r.h[4]=R("top",w)}var P={url:e.g.url||""};if(e.g.url){const n=e.g.url.match(da);var A=n[1],ja=n[3],ka=n[4];w="";A&&(w+=A+":");ja&&(w+="//",w+=ja,ka&&(w+=":"+ka));var la=w}else la="";A=t;P=[P,{url:la}];A.g.push(5);A.h[5]=P;Aa(this.l,f,t,this.i,c)}catch(t){try{Aa(this.l,f,{context:"ecmserr",rctx:a,msg:L(t),url:e?.g.url??""},this.i,c)}catch(I){}}return!0}};function Aa(a,b,c,d=!1,f){if((d?a.g:Math.random())<(f||.01))try{let e;c instanceof S?e=c:(e=new S,G(c,(l,h)=>{var m=e;const k=m.j++;l=R(h,l);m.g.push(k);m.h[k]=l}));const g=za(e,"/pagead/gen_204?id="+b+"&");g&&fa(g)}catch(e){}}function Ca(){var a=T,b=window.google_srt;b>=0&&b<=1&&(a.g=b)}var Da=class{constructor(){this.g=Math.random()}};let T,U;
const V=new class{constructor(a,b){this.h=[];this.i=b||p;let c=null;b&&(b.google_js_reporting_queue=b.google_js_reporting_queue||[],this.h=b.google_js_reporting_queue,c=b.google_measure_js_timing);this.g=Q()||(c!=null?c:Math.random()<a)}start(a,b){if(!this.g)return null;a=new ta(a,b);b=`goog_${a.label}_${a.uniqueId}_start`;N&&Q()&&N.mark(b);return a}end(a){if(this.g&&typeof a.value==="number"){a.duration=(sa()||ra())-a.value;var b=`goog_${a.label}_${a.uniqueId}_end`;N&&Q()&&N.mark(b);!this.g||this.h.length>
2048||this.h.push(a)}}}(1,window);function Ea(){window.google_measure_js_timing||(V.g=!1,V.h!==V.i.google_js_reporting_queue&&(Q()&&x(V.h,va),V.h.length=0))}(function(a){T=a??new Da;typeof window.google_srt!=="number"&&(window.google_srt=Math.random());Ca();U=new Ba(V);U.g=()=>{};U.i=!0;window.document.readyState==="complete"?Ea():V.g&&ba(()=>{Ea()})})();function Fa(a){U.g=b=>{x(a,c=>{c(b)})}};function Ha(a){a=a===null?"null":a===void 0?"undefined":a;B===void 0&&(B=ca());var b=B;return new C(b?b.createHTML(a):a)};var W;if(W=aa){var X="IFRAME",Ia=document;X=String(X);Ia.contentType==="application/xhtml+xml"&&(X=X.toLowerCase());W="srcdoc"in Ia.createElement(X)}const Ja=W;function Ka(a,b){a.open("text/html","replace");b=Ha(String(b));a.write(D(b));a.close()};function La(a){var b=F(!0).find(c=>!!c.google_reactive_sra_lookup)?.google_reactive_sra_lookup;return b?b[a]:(b=ha())?b[a]:null};(function(a){try{const b=/\/(r\d+|dev)\/r\d+\/zrt_lookup\.html/.exec(a.location.pathname);b&&b[1]&&Fa([c=>{c.shv=b[1]}])}catch(b){}})(window);function Ma(){var a=(K.exec("#"+J.name)||K.exec(J.location.href))?.[2];if(a&&(a=decodeURIComponent(a),a=ma.exec(a))&&(a=+a[1],!isNaN(a)&&(a=La(a)))){a=a.creative;let c=null;try{c=J.frameElement}catch(d){}var b;if(b=c)try{b=E(c.contentWindow)}catch(d){b=!1}b?(b=c,Ja?(a=Ha(a),b.srcdoc=D(a)):(b=b.contentWindow)&&Ka(b.document,a)):Ka(J.document,a)}}var Y=U;let Z;
try{Y.h&&Y.h.g?(Z=Y.h.start((200).toString(),3),Ma(),Y.h.end(Z)):Ma()}catch(a){let b=!0;try{va(Z),b=Y.m(200,new na(a,{message:L(a)}),void 0,void 0)}catch(c){Y.j(217,c)}if(b)window.console?.error?.(a);else throw a;};}).call(this);
</script>
</head><body></body></html>
+358
View File
@@ -0,0 +1,358 @@
import axios, { AxiosRequestConfig, AxiosResponse, isAxiosError } from 'axios';
import { mockData, type MockApiResponse } from './mock';
/**
* API响应类型
*/
export type ApiResponse<T> = {
data?: T;
error?: string;
status: number;
headers?: Record<string, string>;
};
export type QueryParams = Record<string, string | number | boolean | undefined>;
// 获取 API 基础 URL
// const API_BASE_URL = 'http://172.18.0.100:3000';
const API_BASE_URL = 'http://nas.7bm.co:3000';
// const API_BASE_URL = 'http://172.16.0.119:9000/admin';
// export const API_BASE_URL = 'http://nas.7bm.co:3000';
// 文档URL前缀
export const DOCUMENT_URL = 'http://172.18.0.100:9000/docauditai/';
// 是否使用模拟数据(开发环境使用)
const USE_MOCK_DATA = false; // 设置为true使用模拟数据,避免API连接问题
// 创建 axios 实例
const axiosInstance = axios.create({
baseURL: API_BASE_URL,
timeout: 10000, // 10秒超时
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
/**
* 将编码后的URL解码为可读格式
* @param url 编码后的URL
* @returns 解码后的可读URL
*/
function decodeUrlForDisplay(url: string): string {
try {
// 首先解码整个URL
const decodedUrl = decodeURIComponent(url);
// 如果URL中包含@符号作为前缀,则移除它
if (decodedUrl.startsWith('@')) {
return decodedUrl.substring(1);
}
return decodedUrl;
} catch (error) {
// 如果解码失败,返回原始URL
console.error('URL解码失败:', error);
return url;
}
}
/**
* 构建完整的 API URL
*/
function buildUrl(endpoint: string, params?: QueryParams): string {
let fullUrl;
// 检查endpoint是否已经是完整URL
if (endpoint.startsWith('http')) {
fullUrl = endpoint;
} else {
// 确保API_BASE_URL格式正确
const baseUrl = API_BASE_URL.endsWith('/') ? API_BASE_URL.slice(0, -1) : API_BASE_URL;
const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;
fullUrl = `${baseUrl}${path}`;
}
try {
// 创建URL对象
const url = new URL(fullUrl);
// 添加查询参数
if (params) {
Object.entries(params).forEach(([key, value]) => {
if (value !== undefined) {
url.searchParams.append(key, String(value));
}
});
}
return url.toString();
} catch (error) {
console.error('URL构建错误:', fullUrl, error);
throw new Error(`无法构建URL: ${fullUrl}, 错误: ${error}`);
}
}
/**
* 获取模拟响应数据
*/
function getMockResponse<T>(endpoint: string): ApiResponse<T> {
console.log(`[开发模式] 使用模拟数据: ${endpoint}`);
// 移除开头的斜杠以便于匹配
const path = endpoint.startsWith('/') ? endpoint.substring(1) : endpoint;
// 查找匹配的模拟数据
for (const mockPath in mockData) {
const normalizedMockPath = mockPath.startsWith('/') ? mockPath.substring(1) : mockPath;
if (path === normalizedMockPath || path.startsWith(normalizedMockPath + '/')) {
// 如果是详情查询 (如 /evaluation_points/1)
if (path.includes('/') && path !== normalizedMockPath) {
const id = parseInt(path.split('/')[1]);
const mockDataItem = mockData[mockPath as keyof typeof mockData] as MockApiResponse<unknown>;
if (Array.isArray(mockDataItem.data)) {
const item = mockDataItem.data.find((item: {id: number}) => item.id === id);
if (item) {
return {
data: {
code: 0,
msg: "成功",
data: item
} as unknown as T,
status: 200
};
}
}
return { error: '未找到数据', status: 404 };
}
// 返回列表数据
return {
data: mockData[mockPath as keyof typeof mockData] as unknown as T,
status: 200
};
}
}
return { error: '没有匹配的模拟数据', status: 404 };
}
/**
* 扩展AxiosRequestConfig类型,以支持body参数
*/
interface ExtendedAxiosRequestConfig extends AxiosRequestConfig {
body?: string;
}
/**
* 通用 API 请求函数
*/
export async function apiRequest<T>(
endpoint: string,
options: ExtendedAxiosRequestConfig = {},
params?: QueryParams
): Promise<ApiResponse<T>> {
// 如果使用模拟数据,直接返回模拟响应
if (USE_MOCK_DATA) {
return getMockResponse<T>(endpoint);
}
try {
// 构建 URL
const url = buildUrl(endpoint, params);
// 设置默认请求头
const headers = options.headers || {};
if (!headers['Content-Type'] && options.method !== 'GET') {
headers['Content-Type'] = 'application/json';
}
if (!headers['Accept']) {
headers['Accept'] = 'application/json';
}
// 针对 PostgREST 的额外处理
if (endpoint.includes('evaluation_point_groups') && (options.method === 'POST' || options.method === 'PATCH')) {
console.log('使用 PostgREST 特定配置处理请求');
// 确保请求体是有效的 JSON 对象
if (options.body && typeof options.body === 'string') {
try {
JSON.parse(options.body); // 验证 JSON 是否有效
} catch (e) {
console.error('请求体不是有效的 JSON:', options.body);
throw new Error('请求体必须是有效的 JSON');
}
}
}
console.log(`📦 axios-client.ts->请求URL: ${decodeUrlForDisplay(url)}`);
console.log(`axios-client.ts->发送 ${options.method || 'GET'} 请求到: ${decodeUrlForDisplay(url)}`);
// 处理body参数,转换为data
if (options.body) {
console.log(`axios-client.ts->请求体: \n${options.body}`);
options.data = options.body;
} else if (options.data) {
console.log(`axios-client.ts->请求体: \n${typeof options.data === 'string' ? options.data : JSON.stringify(options.data)}`);
}
// 发送请求
const config: AxiosRequestConfig = {
...options,
url,
params,
headers
};
// 删除body属性,避免axios警告
if ('body' in config) {
delete (config as ExtendedAxiosRequestConfig).body;
}
const response: AxiosResponse = await axiosInstance(config);
// 收集响应头信息
const responseHeaders: Record<string, string> = {};
Object.entries(response.headers).forEach(([key, value]) => {
if (typeof value === 'string') {
responseHeaders[key] = value;
}
});
// 打印响应信息
// console.log(`响应状态: ${response.status}`);
// console.log(`响应头:`, responseHeaders);
// console.log(`响应体:`, response.data);
// 检查 PostgREST 特定错误
if (response.status >= 400) {
if (response.status === 400) {
console.error('PostgREST 错误 - 无效请求:', response.data);
return {
error: response.data?.message || response.data?.msg || '无效的请求格式,请检查数据格式是否正确',
status: response.status,
headers: responseHeaders
};
} else if (response.status === 401) {
console.error('PostgREST 错误 - 未授权:', response.data);
return {
error: response.data?.message || response.data?.msg || '未授权,请检查认证信息',
status: response.status,
headers: responseHeaders
};
} else if (response.status === 403) {
console.error('PostgREST 错误 - 禁止访问:', response.data);
return {
error: response.data?.message || response.data?.msg || '没有权限执行此操作',
status: response.status,
headers: responseHeaders
};
} else if (response.status === 404) {
console.error('PostgREST 错误 - 资源不存在:', response.data);
return {
error: response.data?.message || response.data?.msg || '请求的资源不存在',
status: response.status,
headers: responseHeaders
};
} else {
console.error(`HTTP请求失败: ${response.status} - ${url}`, response.data);
return {
error: response.data?.message || response.data?.msg || `请求失败: ${response.status}`,
status: response.status,
headers: responseHeaders
};
}
}
// 检查API返回的状态码
const data = response.data;
if (data && 'code' in data && data.code !== 0) {
console.error(`API请求失败: ${data.message || data.msg || '未知错误'} - ${url}`);
return {
error: data.message || data.msg || '请求失败',
status: response.status,
headers: responseHeaders
};
}
return {
data,
status: response.status,
headers: responseHeaders
};
} catch (error: unknown) {
console.error('API请求失败:', error);
if (isAxiosError(error)) {
const status = error.response?.status || 500;
const errorData = error.response?.data;
// 如果超时或网络错误,使用模拟数据(仅开发环境)
if (error.code === 'ECONNABORTED' && process.env.NODE_ENV !== 'production') {
console.warn('自动使用模拟数据作为回退');
return getMockResponse<T>(endpoint);
}
return {
error: errorData?.message || errorData?.msg || error.message || '未知错误',
status
};
}
// 如果超时或网络错误,使用模拟数据(仅开发环境)
if (process.env.NODE_ENV !== 'production') {
console.warn('自动使用模拟数据作为回退');
return getMockResponse<T>(endpoint);
}
return {
error: error instanceof Error ? error.message : '未知错误',
status: 500
};
}
}
// GET请求简化方法
export async function get<T>(endpoint: string, params?: QueryParams): Promise<ApiResponse<T>> {
return apiRequest<T>(endpoint, { method: 'GET' }, params);
}
// POST请求简化方法
export async function post<T>(endpoint: string, data?: unknown, params?: QueryParams): Promise<ApiResponse<T>> {
return apiRequest<T>(endpoint, { method: 'POST', data }, params);
}
// PUT请求简化方法
export async function put<T>(endpoint: string, data?: unknown, params?: QueryParams): Promise<ApiResponse<T>> {
return apiRequest<T>(endpoint, { method: 'PUT', data }, params);
}
// PATCH请求简化方法
export async function patch<T>(endpoint: string, data?: unknown, params?: QueryParams): Promise<ApiResponse<T>> {
return apiRequest<T>(endpoint, { method: 'PATCH', data }, params);
}
// DELETE请求简化方法
export async function del<T>(endpoint: string, params?: QueryParams): Promise<ApiResponse<T>> {
return apiRequest<T>(endpoint, { method: 'DELETE' }, params);
}
// 下载文件的方法
export async function downloadFile(path: string): Promise<Blob> {
const downloadUrl = `${DOCUMENT_URL}${path}`;
try {
console.log(`📦 axios-client.ts->下载文件: ${decodeUrlForDisplay(downloadUrl)}`);
const response = await axios.get(downloadUrl, {
responseType: 'blob'
});
return response.data;
} catch (error) {
console.error('下载文件失败:', error);
throw error;
}
}
+5 -4
View File
@@ -139,7 +139,7 @@ export async function getHomeData(): Promise<HomeStatistics> {
select: 'count',
filter: {
and: `(audit_status.neq.0,audit_status.neq.2)`,
created_at: `gte.${startOfThisMonth}`,
updated_at: `gte.${startOfThisMonth}`,
is_test_document: `eq.false`
}
};
@@ -156,7 +156,7 @@ export async function getHomeData(): Promise<HomeStatistics> {
select: 'count',
filter: {
or: `(audit_status.eq.1,audit_status.eq.-1)`,
and: `(created_at.gte.${startOfLastMonth},created_at.lte.${endOfLastMonth})`,
and: `(updated_at.gte.${startOfLastMonth},updated_at.lte.${endOfLastMonth})`,
is_test_document: `eq.false`
}
};
@@ -171,7 +171,8 @@ export async function getHomeData(): Promise<HomeStatistics> {
// 计算同比增长
let reviewGrowthValue = 0;
let reviewGrowthIsUp = true;
// console.log('lastMonthReviewed-------', lastMonthReviewed);
// console.log('monthlyReviewedFiles-------', monthlyReviewedFiles);
if (lastMonthReviewed > 0) {
const growthRate = ((monthlyReviewedFiles - lastMonthReviewed) / lastMonthReviewed) * 100;
reviewGrowthValue = Math.abs(parseFloat(growthRate.toFixed(1)));
@@ -205,7 +206,7 @@ export async function getHomeData(): Promise<HomeStatistics> {
select: 'count',
filter: {
audit_status: `eq.1`,
and: `(created_at.gte.${startOfLastMonth},created_at.lte.${endOfLastMonth})`,
and: `(updated_at.gte.${startOfLastMonth},updated_at.lte.${endOfLastMonth})`,
is_test_document: `eq.false`
}
};
+1 -1
View File
@@ -1,5 +1,5 @@
// app/api/postgrest-client.ts
import { apiRequest, type QueryParams } from './client';
import { apiRequest, type QueryParams } from './axios-client';
import { handleApiError } from './error-handler';
/**
+3 -3
View File
@@ -80,9 +80,9 @@ export function FileInfo({ fileInfo, onConfirmResults }: FileInfoProps) {
navigate(returnTo);
};
const handleExportReport = () => {
alert('导出评查报告功能');
};
// const handleExportReport = () => {
// alert('导出评查报告功能');
// };
return (
<div className="mb-4 file-info-header">
+2 -1
View File
@@ -71,7 +71,8 @@ interface FilePreviewProps {
targetPage?: number; // 新增目标页码参数
}
export function FilePreview({ fileContent, reviewPoints, activeReviewPointResultId, targetPage }: FilePreviewProps) {
// export function FilePreview({ fileContent, reviewPoints, activeReviewPointResultId, targetPage }: FilePreviewProps) {
export function FilePreview({ fileContent, activeReviewPointResultId, targetPage }: FilePreviewProps) {
const [zoomLevel, setZoomLevel] = useState(100);
// const [highlightsVisible, setHighlightsVisible] = useState(true);
const contentRef = useRef<HTMLDivElement>(null);
+8 -8
View File
@@ -86,7 +86,7 @@ export function ReviewPointsList({
const [searchText, setSearchText] = useState(''); // 搜索文本
const [statusFilter, setStatusFilter] = useState<string | null>(null); // 状态过滤
const [suggestionTexts, setSuggestionTexts] = useState<Record<string, string>>({}); // 存储每个评查点的建议文本
// const [suggestionTexts, setSuggestionTexts] = useState<Record<string, string>>({}); // 存储每个评查点的建议文本
// 添加重新审核意见的状态/ 用户输入的修改内容 / 用户提前写好的修改内容
const [manualReviewNotes, setManualReviewNotes] = useState<Record<string, string>>({});
@@ -99,7 +99,7 @@ export function ReviewPointsList({
reviewPoints.forEach(point => {
suggestions[point.id] = point.suggestion || '';
});
setSuggestionTexts(suggestions);
// setSuggestionTexts(suggestions);
// 使用函数式更新,不再需要外部 manualReviewNotes 变量
setManualReviewNotes(prev => {
@@ -112,12 +112,12 @@ export function ReviewPointsList({
}, [reviewPoints]);
// 处理建议文本变更
const handleSuggestionChange = (reviewPointId: string, text: string) => {
setSuggestionTexts(prev => ({
...prev,
[reviewPointId]: text
}));
};
// const handleSuggestionChange = (reviewPointId: string, text: string) => {
// setSuggestionTexts(prev => ({
// ...prev,
// [reviewPointId]: text
// }));
// };
/**
* 处理评查点审核操作
+2 -2
View File
@@ -22,14 +22,14 @@ export function ReviewTabs({ activeTab, onTabChange, children }: ReviewTabsProps
>
<i className="ri-file-text-line"></i>
</button>
<button
{/* <button
className={`tab-nav-item ${activeTab === 'analysis' ? 'active' : ''}`}
onClick={() => onTabChange('analysis')}
type="button"
aria-pressed={activeTab === 'analysis'}
>
<i className="ri-lightbulb-line"></i> AI智能分析
</button>
</button> */}
<button
className={`tab-nav-item ${activeTab === 'fileinfo' ? 'active' : ''}`}
onClick={() => onTabChange('fileinfo')}
+6 -6
View File
@@ -34,12 +34,12 @@ export const meta: MetaFunction = () => {
};
// API 响应的类型定义
interface StatsData {
totalFiles: number;
reviewedFiles: number;
pendingFiles: number;
passRate: number;
}
// interface StatsData {
// totalFiles: number;
// reviewedFiles: number;
// pendingFiles: number;
// passRate: number;
// }
// 模拟数据,实际项目中应该从API获取
export async function loader() {
+39 -5
View File
@@ -629,7 +629,17 @@ function getMockReviewData(): ReviewData {
groupName: "付款条款清晰性",
// location: "交货与付款条款",
status: "error",
content: "乙方应在收到货物之日起5个工作日内支付合同款项,甲方应在收到乙方全部付款后开具增值税专用发票,乙方应在收到发票后支付剩余款项。",
editAuditStatus: 0,
content: {
'anjia':{
page: 1,
value: { text: "乙方应在收到货物之日起5个工作日内支付合同款项,甲方应在收到乙方全部付款后开具增值税专用发票,乙方应在收到发票后支付剩余款项。" }
},
'yijia':{
page: 1,
value: { text: "乙方应在收到货物之日起5个工作日内支付合同款项,甲方应在收到乙方全部付款后开具增值税专用发票,乙方应在收到发票后支付剩余款项。" }
}
},
suggestion: "乙方应在收到货物验收合格之日起5个工作日内支付合同总额的70%,甲方收到该部分款项后3个工作日内向乙方开具等额增值税专用发票;乙方应在收到发票之日起5个工作日内支付剩余30%款项。",
position: { section: "交货与付款", index: 2 },
result: false
@@ -640,7 +650,13 @@ function getMockReviewData(): ReviewData {
title: "违约责任条款缺失",
groupName: "合同权利义务对等性",
status: "warning",
content: "如合同发生纠纷,双方应协商解决。",
editAuditStatus: 0,
content: {
'clause': {
page: 1,
value: { text: "如合同发生纠纷,双方应协商解决。" }
}
},
suggestion: "如合同发生纠纷,双方应友好协商解决;协商不成的,任何一方均有权向甲方所在地人民法院提起诉讼。任何一方未能履行本合同约定义务,应向守约方支付合同总金额的10%作为违约金;给对方造成损失的,还应赔偿由此产生的全部损失。",
position: { section: "争议解决", index: 0 },
result: false
@@ -651,7 +667,13 @@ function getMockReviewData(): ReviewData {
title: "签章不完整",
groupName: "合同签署规范性",
status: "warning",
content: "乙方(盖章):YY贸易有限公司\n代表人签字:李YY\n日期:2023年10月20日",
editAuditStatus: 0,
content: {
'signature': {
page: 5,
value: { text: "乙方(盖章):YY贸易有限公司\n代表人签字:李YY\n日期:2023年10月20日" }
}
},
suggestion: "需要联系甲方补充公章",
needsHumanReview: true,
humanReviewNote: "需要联系甲方补充公章",
@@ -664,7 +686,13 @@ function getMockReviewData(): ReviewData {
title: "交货方式描述模糊",
groupName: "履行条款明确性",
status: "success",
content: "3.4 运输方式:陆运,运费由甲方承担。",
editAuditStatus: 0,
content: {
'delivery': {
page: 3,
value: { text: "3.4 运输方式:陆运,运费由甲方承担。" }
}
},
suggestion: "建议补充具体的运输方式和时间",
needsHumanReview: true,
humanReviewNote: "经核实,该交货方式虽然描述不够详细,但符合行业惯例且双方已经多次合作,不会造成实际履行障碍。",
@@ -679,7 +707,13 @@ function getMockReviewData(): ReviewData {
title: "法律适用条款缺失",
groupName: "争议解决条款完整性",
status: "error",
content: "",
editAuditStatus: 0,
content: {
'missing': {
page: 0,
value: { text: "" }
}
},
suggestion: "第十三条 法律适用\n本合同的订立、效力、解释、履行及争议的解决均适用中华人民共和国法律。因本合同引起的或与本合同有关的任何争议,双方应友好协商解决。协商不成的,提交甲方所在地人民法院诉讼解决。",
position: { section: "缺失", index: 0 },
result: false
+4 -11
View File
@@ -17,7 +17,8 @@ import {
} from "~/api/evaluation_points/rules-files";
import { getDocumentTypes } from "~/api/document-types/document-types";
import { toastService } from "~/components/ui/Toast";
import { DOCUMENT_URL } from "~/api/client";
// 导入axios下载文件方法
import { downloadFile } from "~/api/axios-client";
export const links = () => [
{ rel: "stylesheet", href: rulesFilesStyles }
@@ -241,16 +242,8 @@ export default function RulesFiles() {
// 下载文件
const handleDownload = async (path: string) => {
try {
const downloadUrl = `${DOCUMENT_URL}${path}`;
// 使用fetch获取文件内容
const response = await fetch(downloadUrl);
if (!response.ok) {
throw new Error(`下载失败: ${response.status} ${response.statusText}`);
}
// 将响应转换为Blob
const blob = await response.blob();
// 使用axios封装的下载方法
const blob = await downloadFile(path);
// 创建Blob URL
const blobUrl = URL.createObjectURL(blob);
-1058
View File
File diff suppressed because it is too large Load Diff
-200
View File
@@ -1,200 +0,0 @@
{
"__meta": {
"completed": true,
"is_digital": true,
"page_count": 41,
"result_url": "http://172.18.0.100:9000/documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/ocr_result.json",
"elapsed_time": 0.5567266941070557
},
"ocr_result": {
"公告": Object{...},
"举报记录表": Object{...},
"卷内备考表": Object{...},
"案件移送函": Object{...},
"立案报告表": Object{...},
"结案报告表": Object{...},
"不予立案报告表": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/16_不予立案报告表.jpg"
],
"pages": [
16
],
"ocr_text": "16\n广东省新兴县烟草专卖局\n不予立案报告表\n云新烟不立(2024)第1号\n案由\n涉嫌非法经营罪\n案件来源\n投诉举报\nG2518深岑高速往广州方向\n案发时间\n2024年1月20日13时40分\n案发地点\n新城服务区路段\n姓名\n现场未发现当事人\n性别\n年龄\n当事\n个人(个\n/\n民族\n联系电话\n体工商\n人\n证件类型及号码\n户)\n住址\n2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专卖局稽查支\n队统一指挥部署下,我局执法人员联合云浮市公安局交通警察支队高速公路四大队\n执法人员在G2518深岑高速往广州方向新城服务区路段对挂牌号为桂A8R6Z2的白色\n五菱牌小型普通客车进行检查,随车人员弃车逃跑。经检查发现该涉案车辆装载有\n卷烟。因道路安全问题,执法人员将涉案车辆带回云浮市公安局交通警察支队高速\n公路四大队大院内作进一步调查处理。经查:1、在挂牌号为桂A8R6Z2的白色五菱\n牌小型普通客车上查获涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软\n蓝)100条、利群(新版)200条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软\n经典)50条、红塔山(硬经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、\n牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬新精品二代)\n案情摘要\n50条、南京(炫赫门)360条(经初步检查,上述卷烟存在字体印刷模糊、包装松散\n等现象);2、在该涉案车辆中未发现运输该批涉案卷烟的烟草专卖品准运证及合法\n有效的证明。鉴于上述情况,当事人涉嫌违反了《中华人民共和国烟草专卖法》第\n二十一条的规定。经局领导批准同意,我局执法人员依法对涉案卷烟进行证据先行\n登记保存并抽样送检,整个调查过程均有执法记录。\n根据《国家烟草专卖局关于印发涉案烟草制品价格管理规定的通知》(国烟计\n[2021]93号)、《广东省烟草专卖局涉案烟草制品价格管理规定》(粤烟计[2021]55\n号)和《广东省烟草专卖局关于发布2024年度全省涉案烟草专卖品价值估算的价格\n计算标准及有关事项的通知》(粤烟计[2024]1号)等相关规定,涉案卷烟价值初步\n估算为246100元。\n鉴于该案案值估算为246100元已达刑事案件标准,根据《烟草专卖行政处\n罚程序规定》第十三条第二款、第三十六条第(二)项的规定,建议不予\n承办人\n立案,直接移送新兴县公安局调查处理。\n意见\n谢元学\n苏东锦\n签名:\n日期:2024年1月22日\n同意不予立案,移送新兴县公安局调查处理,请领导审批。\n承办部门\n意见\n签名:\n日期:2024年1月22日\n同意。\n负责人\n郭翔\n意见\n签名:\n日期:2024年1月22日"
},
"案件处理审批表": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/36_案件处理审批表.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/37_案件处理审批表.jpg"
],
"pages": [
36,
37
],
"ocr_text": "36\n广东省新兴县烟草专卖局\n案件处理审批表\n案由\n对无主烟草专卖品的处理(假冒)\n案件来源\n投诉举报\n立案编号\n云新烟立[2024]第8号\n立案日期\n2024年1月26日\n姓名\n性别\n年龄\n当事人\n个人(个\n民族\n联系电话\n/\n体工商\n证件类型及号码\n户)\n住址\n同案人\n2024年1月20日13时40分,根据群众举报信息,在云浮\n市烟草专卖局稽查支队统一指挥部署下,我局执法人员联合云\n浮市公安局交通警察支队高速公路四大队执法人员在G2518深\n岑高速往广州方向新城服务区路段对挂牌号为桂A8R6Z2的白\n色五菱牌小型普通客车进行检查,随车人员弃车逃跑。经检查\n发现该涉案车辆装载有卷烟。因道路安全问题,执法人员将涉\n案车辆带回云浮市公安局交通警察支队高速公路四大队大院\n内作进一步调查处理。经查:1、在挂牌号为桂A8R6Z2的白色\n五菱牌小型普通客车上查获涉案卷烟共计13个品种,数量1470\n条,其中:黄鹤楼(软蓝)100条、利群(新版)200条、云烟(紫)100\n条、双喜(硬经典1906)200条、双喜(软经典)50条、红塔山(硬\n经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、\n违法事实\n牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、白\n沙(硬新精品二代)50条、南京(炫赫门)360条(经初步检查,\n上述卷烟存在字体印刷模糊、包装松散等现象);2、在该涉案\n车辆中未发现运输该批涉案卷烟的烟草专卖品准运证及合法\n有效的证明。鉴于上述情况,当事人涉嫌违反了《中华人民共\n和国烟草专卖法》第二十一条的规定。经局领导批准同意,我\n局执法人员依法对涉案卷烟进行证据先行登记保存并抽样送\n检,整个调查过程均有执法记录。\n经查,涉案卷烟价值初步估算为246100元,鉴于涉案金\n额较大,已达到刑事案件标准,当事人的行为涉嫌构成非法经\n营罪。2024年1月22日,我局将该案直接移送新兴县公安局\n调查处理。新兴县公安局经济犯罪侦查大队要求我局三天内补\n充以下材料:1、该案嫌疑人的基本情况(姓名、性别、身份\n第1页/共2页\n\n证号码及现住地址等);2、该案嫌疑人是否知道该车辆所运烟\n草专卖品的货主有否获得烟草专卖部门的准许,鉴于我局无法\n在规定期限内收集到上述证据材料,目前该案由我局自行调查\n处理。\n2024年1月26日我局在公告栏上张贴公告要求当事人于\n公告发布之日起60日内到广东省新兴县烟草专卖局接受调查\n处理。2024年3月29日,公告期满,当事人未到我局接受处\n理。经查,涉案卷烟经检验为假冒注册商标且伪劣卷烟,在法\n律性质上属假冒商标烟草制品,价值为246100元。\n处罚(处理)\n《烟草专卖行政处罚程序规定》第七十三条、《烟草专卖法实\n依据\n施条例》第三十条\n依据《烟草专卖行政处罚程序规定》第七十三条及《烟草\n专卖法实施条例》第三十条有关规定,建议对涉案烟草专卖品\n作出如下处理:\n将涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼\n(软蓝)100条、利群(新版)200条、云烟(紫)100条、双喜(硬\n承办人\n经典1906)200条、双喜(软经典)50条、红塔山(硬经典100)50\n意见\n条、玉溪(软)50条、双喜(硬金五叶神)50条、牡丹(软)50\n条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬新精\n品二代)50条、南京(炫赫门)360条全部予以公开销毁。\n何松凳\n签名:\n日期:2024年3月29日\n同意承办人意见,请领导审批。\n承办部门\n意见\n签名:\n日期:2024年3月29日\n该案事实清楚,定性准确,法律适用正确,程序合法,同意承办人意见。\n法制部门\n陈嘉怡\n审核人签名:\n负责人签名:\n意见\n日期:2024年3月29日\n同意。\n负责人\n意见\n了乐\n签名:\n日期:2024年3月29日\n备注\n/\n第2页/共2页"
},
"涉案物品核价表": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/24_涉案物品核价表.jpg"
],
"pages": [
24
],
"ocr_text": "24\n广东省云浮市烟草专卖局\n涉案物品核价表\n广东省新兴县烟草专卖局于2024年1月20日立案(立案编号:云新烟立(\n2024)第8号)的涉嫌无烟草专卖品准运证运输烟草专卖品的案件中,涉\n案物品价格如下:\n序号\n品名规格\n数量(条)\n单价(元)\n合计(元)\n备注\n1\n黄鹤楼(软蓝)\n100\n190.00\n19000.00\n条盒条形码:6901028180580\n2\n利群(新版)\n200\n150.00\n30000.00\n条盒条形码:6901028118187\n3\n云烟(紫)\n100\n130.00\n13000.00\n条盒条形码:6901028046893\n4\n双喜(硬经典1906\n200\n170.00\n34000.00\n条盒条形码:6901028001625\n5\n双喜(软经典)\n50\n110.00\n5500.00\n条盒条形码:6901028000833\n6\n红塔山(硬经典100)\n50\n110.00\n5500.00\n条盒条形码:6901028315432\n7\n玉溪(软)\n50\n230.00\n11500.00\n条盒条形码:6901028317177\n8\n双喜(硬金五叶神)\n50\n140.00\n7000.00\n条盒条形码:6901028005036\n9\n牡丹(软)\n50\n130.00\n6500.00\n条盒条形码:6901028075053\n10\n贵烟(跨越)\n160\n230.00\n36800.00\n条盒条形码:6901028221450\n11\n双喜(莲香)\n50\n150.00\n7500.00\n条盒条形码:6901028005159\n12\n白沙(硬新精品二代)\n50\n100.00\n5000.00\n条盒条形码:6901028063371\n13\n南京(炫赫门)\n360\n180.00\n64800.00\n条盒条形码:6901028111270\n合计\n1470\n246100.00\n价格证明依据:根据《国家烟草专卖局关于印发涉案烟草制品价格管理规定的通知》\n(国烟计[2021]93号)、《广东省烟草专卖局涉案烟草制品价格管理规定》(粤烟计\n[2021]55号)和《广东省烟草专卖局关于发布2024年度全省涉案烟草专卖品价值估算\n的价格计算标准及有关事项的通知》(粤烟计[2024]1号)等相关规定\n经办人:美众纬\n市烟\nLms01261\n192104052010\n云浮市烟草专卖局涉案卷烟价\n格管理小组(印章)\n2024年1月26日"
},
"行政处理决定书": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/1_行政处理决定书.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/2_行政处理决定书.jpg"
],
"pages": [
1,
2
],
"ocr_text": "广东省新兴县烟草专卖局\n行政处理决定书\n云新烟处理[2024]第1号\n当事人:/\n案由:对无主烟草专卖品的处理(假冒)\n2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专卖局稽查支队\n统一指挥部署下,我局执法人员联合云浮市公安局交通警察支队高速公路四大队执法\n人员在G2518深岑高速往广州方向新城服务区路段对挂牌号为桂A8R6Z2的白色五菱牌\n小型普通客车进行检查,随车人员弃车逃跑。经检查发现该涉案车辆装载有卷烟。因\n道路安全问题,执法人员将涉案车辆带回云浮市公安局交通警察支队高速公路四大队\n大院内作进一步调查处理。经查:1、在挂牌号为桂A8R6Z2的白色五菱牌小型普通客\n车上查获涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新\n版)200条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经典)50条、红塔山(硬\n经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、牡丹(软)50条、贵烟(跨\n越)160条、双喜(莲香)50条、白沙(硬新精品二代)50条、南京(炫赫门)360条\n(经初步检查,上述卷烟存在字体印刷模糊、包装松散等现象);2、在该涉案车辆中\n未发现运输该批涉案卷烟的烟草专卖品准运证及合法有效的证明。鉴于上述情况,当\n事人涉嫌违反了《中华人民共和国烟草专卖法》第二十一条的规定。经局领导批准同\n意,我局执法人员依法对涉案卷烟进行证据先行登记保存并抽样送检,整个调查过程\n均有执法记录。\n经查,涉案卷烟价值初步估算为246100元,鉴于涉案金额较大,已达到刑事案件\n标准,当事人的行为涉嫌构成非法经营罪。2024年1月22日,我局将该案直接移送新\n兴县公安局调查处理。新兴县公安局经济犯罪侦查大队要求我局三天内补充以下材料:\n1、该案嫌疑人的基本情况(姓名、性别、身份证号码及现住地址等);2、该案嫌疑\n人是否知道该车辆所运烟草专卖品的货主有否获得烟草专卖部门的准许,鉴于我局无\n法在规定期限内收集到上述证据材料,目前该案由我局自行调查处理。\n2024年1月26日我局在公告栏上张贴公告要求当事人于公告发布之日起60日内\n到广东省新兴县烟草专卖局接受调查处理。2024年3月29日,公告期满,当事人未到\n我局接受处理。经查,涉案卷烟经检验为假冒注册商标且伪劣卷烟,在法律性质上属\n假冒商标烟草制品,价值为246100元。\n以上事实有:1.《现场笔录》;2.《证据先行登记保存通知书》;3.涉案卷烟1470\n条;4.《抽样取证物品清单》;5.证据复制(提取)单;6.《涉案物品核价表》;7.\n案件移送函及相关材料;8.《卷烟、雪茄烟鉴别检验报告》;9.《公告》等证据予以\n证明。\n本案立案时间为:2024年1月26日,执法人员:谢元学(19210452010),苏庆锦\n\n2\n19210452007)。并依照《烟草专卖行政处罚程序规定》第七十三条的规定于2024年1\n月26日进行公告,鉴于公告期满仍无法找到案件当事人,我局将依据《烟草专卖行政\n处罚程序规定》第七十三条及《烟草专卖法实施条例》第三十条有关规定,依法对涉案\n烟草专卖品作出如下处理:\n将涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新\n版)200条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经典)50条、红塔山(硬\n经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、牡丹(软)50条、贵烟(跨\n越)160条、双喜(莲香)50条、白沙(硬新精品二代)50条、南京(炫赫门)360条\n全部予以公开销毁。\n新兴县烟瓷\n广东省新兴县烟草专卖局\n2024年3月2日\n附相关条文\n《烟草专卖行政处罚程序规定》第七十三条\n《烟草专卖法实施条例》第三十条"
},
"抽样取证物品清单": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/15_抽样取证物品清单.jpg"
],
"pages": [
15
],
"ocr_text": "15\n广东省新兴县烟草专卖局\n抽样取证物品清单\n根据《中华人民共和国行政处罚法》第五十六条的规定,现对下列物品予以抽样取证:\n当事人\n现场未发现当事人\n立案编号\n抽样方法\n随机抽样\n抽样目的\n鉴别检验\n抽样时间\n抽样地点\n云浮市公安局交通警察支队高速公路四大队大院内\n样品基数\n样品数量\n品种规格\n包装形式\n样品情况\n(单位)\n(单位)\n条形码为\n黄鹤楼(软蓝)\n条盒软盒\n100条\n1条\n6901028180580\n条形码为\n利群(新版)\n条盒硬盒\n200条\n1条\n6901028118187\n条形码为\n云烟(紫)\n条盒硬盒\n100条\n1条\n6901028046893\n条形码为\n双喜(硬经典1906\n条盒硬盒\n200条\n1条\n6901028001625\n条形码为\n双喜(软经典)\n条盒软盒\n50条\n1条\n6901028000833\n条形码为\n红塔山(硬经典100\n条盒硬盒\n50条\n1条\n6901028315432\n条形码为\n玉溪(软)\n条盒软盒\n50条\n1条\n6901028317177\n条形码为\n双喜(硬金五叶神)\n条盒硬盒\n50条\n1条\n6901028005036\n条形码为\n牡丹(软)\n条盒软盒\n50条\n1条\n6901028075053\n条形码为\n贵烟(跨越)\n条盒硬盒\n160条\n1条\n6901028221450\n条形码为\n双喜(莲香)\n条盒硬盒\n50条\n1条\n6901028005159\n条形码为\n白沙(硬新精品二代)\n条盒硬盒\n50条\n1条\n6901028063371\n条形码为\n南京(炫赫门)\n条盒硬盒\n360条\n1条\n6901028111270\n备注\n现场未发现当事人且找不到见证人作见证。抽取样品已依法封存。\n承信\n承办人(签名):\n执法证号:792052010\n2024年1月20日\n执法证号:121527\n2024年1月20日\n/\n年\n1月/日\n当事人(签名):\n见证人(签名):\n1年/月1日\n送达方式:\n送达地点:\n广东省新兴县烟草专卖局(印章)\n2024年1月20日\n第1页/共1页"
},
"案件调查终结报告": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/32_案件调查终结报告.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/33_案件调查终结报告.jpg"
],
"pages": [
32,
33
],
"ocr_text": "32\n广东省新兴县烟草专卖局\n案件调查终结报告\n案由\n涉嫌对无主烟草专卖品的处理(假冒)\n案件来源\n投诉举报\n立案日期\n2024年1月26日\n姓名\n/\n性别\n个人(个\n/\n年龄\n事\n民族\n体工商\n联系电话\n/\n证件类型及号码\n人\n户)\n住址\n调查人\n谢元学(19210452010),苏庆锦(19210452007\n2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专\n卖局稽查支队统一指挥部署下,我局执法人员联合云浮市公安局交\n通警察支队高速公路四大队执法人员在G2518深岑高速往广州方向\n新城服务区路段对挂牌号为桂A8R6Z2的白色五菱牌小型普通客车\n进行检查,随车人员弃车逃跑。经检查发现该涉案车辆装载有卷烟。\n因道路安全问题,执法人员将涉案车辆带回云浮市公安局交通警察\n支队高速公路四大队大院内作进一步调查处理。经查:1、在挂牌\n号为桂A8R6Z2的白色五菱牌小型普通客车上查获涉案卷烟共计13\n个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新版)200\n条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经典)50\n条、红塔山(硬经典100)50条、玉溪(软)50条、双喜(硬金五叶神)\n50条、牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、\n白沙(硬新精品二代)50条、南京(炫赫门)360条(经初步检查,\n上述卷烟存在字体印刷模糊、包装松散等现象);2、在该涉案车辆\n中未发现运输该批涉案卷烟的烟草专卖品准运证及合法有效的证\n明。鉴于上述情况,当事人涉嫌违反了《中华人民共和国烟草专卖\n调查事实\n法》第二十一条的规定。经局领导批准同意,我局执法人员依法对\n涉案卷烟进行证据先行登记保存并抽样送检,整个调查过程均有\n执法记录。\n经查,涉案卷烟价值初步估算为246100元,鉴于涉案金额较大,\n已达到刑事案件标准,当事人的行为涉嫌构成非法经营罪。2024\n年1月22日,我局将该案直接移送新兴县公安局调查处理。新兴县\n公安局经济犯罪侦查大队要求我局三天内补充以下材料:1、该案\n嫌疑人的基本情况(姓名、性别、身份证号码及现住地址等);2、\n该案嫌疑人是否知道该车辆所运烟草专卖品的货主有否获得烟草\n专卖部门的准许,鉴于我局无法在规定期限内收集到上述证据材\n料,目前该案由我局自行调查处理。\n2024年1月26日我局在公告栏上张贴公告要求当事人于公告\n发布之日起60日内到广东省新兴县烟草专卖局接受调查处理。2024\n年3月29日,公告期满,当事人未到我局接受处理。经查,涉案卷\n烟经检验为假冒注册商标且伪劣卷烟,在法律性质上属假冒商标烟\n草制品,价值为246100元。\n第1页/共2页\n\n33\n以上事实有:1.《现场笔录》;2.《证据先行登记保存通知书》;\n3.涉案卷烟1470条;4.《抽样取证物品清单》;5.证据复制(提取)\n单;6.《涉案物品核价表》;7.案件移送函及相关材料;8.《卷烟、\n雪茄烟鉴别检验报告》;9.《公告》等证据予以证明。\n案件性质\n对无主烟草专卖品的处理(假冒)\n《烟草专卖行政处罚程序规定》第七十三条、《烟草专卖法实施条\n处罚(处理)依据\n例》第三十条\n本案属我局管辖。鉴于公告期满仍无法找到案件当事人,依据\n《烟草专卖行政处罚程序规定》第七十三条及《烟草专卖法实施条\n例》第三十条有关规定,建议依法对涉案烟草专卖品作出如下处理:\n将涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软\n蓝)100条、利群(新版)200条、云烟(紫)100条、双喜(硬经典\n1906)200条、双喜(软经典)50条、红塔山(硬经典100)50条、玉溪\n(软)50条、双喜(硬金五叶神)50条、牡丹(软)50条、贵烟(跨越)\n处理意见\n160条、双喜(莲香)50条、白沙(硬新精品二代)50条、南京(炫\n赫门)360条全部予以公开销毁。\n谢元学\n苏庆锦\n承办人签名:\n日期:2024年3月29日\n备注\n第2页/共2页"
},
"证据复制(提取)单": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/7_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/8_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/9_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/10_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/11_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/12_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/13_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/14_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/26_证据复制(提取)单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/31_证据复制(提取)单.jpg"
],
"pages": [
7,
8,
9,
10,
11,
12,
13,
14,
26,
31
],
"ocr_text": "广东省新兴县烟草专卖局\n证据复制(提取)单\n桂A·8R6Z2\n说明事项:此证据为本案涉案车辆的照片,由执法人员2024年1月20日拍照\n采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日13时55分\n执法人员及执法证号:T3\n19210452010\n19212452\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\n桂A·8R6Z2\n说明事项:此证据为本案涉案车辆的照片,由执法人员2024年1月20日拍照\n采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日13时55分\n执法人员及执法证号:课\n921245257\n19218452010\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\n说明事项:此证据为在涉案车辆内发现有涉案卷烟的照片,由执法人员2024\n年1月20日拍照采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日13时55分\n执法人员及执法证号:湖\n19210457060\n1921045207\n\n10\n广东省新兴县烟草专卖局\n证据复制(提取)单\nGX508A\nGX508A\nGX508A\nGX508A\nGX508A\n说明事项:此证据为执法人员依法对涉案卷烟进行清点调查的照片,由执法\n人员2024年1月20日拍照采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日14时10分\n执法人员及执法证号:课\n19210452010\n14212452007\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\n说明事项:此证据为在涉案车辆查获的涉案卷烟的照片,由执法人员2024年\n1月20日拍照采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日14时15分\n苏女邻\n执法人员及执法证号:\n19210452010\n19212452057\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\n皖A·8R672\n说明事项:此证据为执法人员依法对涉案卷烟进行抽样的照片,由执法人员\n2024年1月20日拍照采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日14时20分\n苏女纯\n执法人员及执法证号:\n1920452010\n19212452\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\nIUAHOXI\nIXIA\n说明事项:此证据为本案抽样送检卷烟的照片,由执法人员2024年1月20\n日拍照采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日14时25分\n执法人员及执法证号:\n19210452010\n14212452007\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\nSEUANOXO\nXnX\n说明事项:此证据为本案抽样卷烟的照片,由执法人员2024年1月20日拍照\n采集。\n复制(提取)地点:云浮市公安局交通警察支队高速公路四大队大院内\n复制(提取)时间:2024年1月20日14时25分\n讲信\n执法人员及执法证号:?\n19210452010\n19210520-\n\n东\n证据复制(提取)单\n新兴县烟草专卖局(分公司)公告栏\n说明事项:此证据为2024年1月26日我局在公告栏张贴公告的照\n片,公告内容为要求当事人于公告发布之日起60日内到广东省新\n兴县烟草专卖局接受调查处理。\n复制(提取)地点:新兴县烟草专卖局。\n复制(提取)时间:\n2024年1月26日9时10分\n美众年\n执法人员及执法证号:\n19210452007\n19210452010\n\n广东省新兴县烟草专卖局\n证据复制(提取)单\n新兴县烟草专卖局(分公司)公告栏\n说明事项:此证据为2024年1月26日我局在公告栏张贴公告的照\n片,公告内容为要求当事人于公告发布之日起60日内到广东省新\n兴县烟草专卖局接受调查处理。2024年3月29日,公告期满,当\n事人未到我局接受处理。\n复制(提取)地点:新兴县烟草专卖局。\n复制(提取)时间:2024年3月29日9时15分\n执法人员及执法证号:\n19240452010"
},
"证据先行登记保存批准书": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/5_证据先行登记保存批准书.jpg"
],
"pages": [
5
],
"ocr_text": "广东省新兴县烟草专卖局\n证据先行登记保存批准书\n因现场未发现当事人涉嫌无烟草专卖品准运证运输烟草专卖品行为,违反\n《中华人民共和国烟草专卖法》及其实施条例的有关规定,根据《中华人民共\n和国行政处罚法》第五十六条的规定,现拟对下列证据予以先行登记保存:\n品种规格\n单位\n数量\n品种规格\n单位\n数量\n黄鹤楼(软蓝)\n条\n100\n利群(新版)\n条\n200\n云烟(紫)\n条\n100\n双喜(硬经典1906\n条\n200\n双喜(软经典)\n条\n50\n红塔山(硬经典100)\n条\n50\n玉溪(软)\n条\n50\n双喜(硬金五叶神)\n条\n50\n牡丹(软)\n条\n50\n贵烟(跨越)\n条\n160\n双喜(莲香)\n条\n50\n白沙(硬新精品二代)\n条\n50\n南京(炫赫门)\n条\n360\n/\n/\n共计:(品种)13个\n总计:(数量)1470条\n备注\n现场未发现当事人,且找不到见证人作见证。\n对先行登记保存的证据,应当在七日内及时作出处理决定。\n承办人(签名):苏庆锦执法证号:192104520072024年1月20日\n谢元学执法证号:19210452010\n2024年1月20日\n负责人意见并签名:同意\n郭翔\n2024年1月20日\n第1页/共1页"
},
"证据先行登记保存通知书": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/6_证据先行登记保存通知书.jpg"
],
"pages": [
6
],
"ocr_text": "广东省新兴县烟草专卖局\n证据先行登记保存通知书\n云新烟存通(224)第8号\n因你(单位)涉嫌无姆草续品之证运输辉军专卖品\n的行为,\n违反《中华人民共和国烟草专卖法》及实施条例的有关规定,根据《中\n华人民共和国行政处罚法》第五十六条的规定,本局决定对下列证据\n予以先行登记保存。\n品种规格\n单位\n数量\n品种规格\n单位\n数量\n苗鹤楼(软蓝)\n壹佰\n条\n利群(新版)\n牡丹(物)\n压拾\n烟(紫)\n青国(跨越)\n壹佰陆拾\n素硬级典)条\n喜《莲香)\n伍拾\n双毒(软红典)\n伍拾\n条\n白沙硬新精品二代)条\n伍拾\n红塔山(典)条\n伍拾\n南京(炫赫汀)条参偷陆拾\n玉溪\n条\n伍拾\n壶拾签不\n共计:(品种)\n总计:(数量)壹升肆佰柒拾条\n备注\n现场找不到见证人作见证且未发现当事人\n对先行登记保存的证据,应当在7日内及时作出处理决定。\n当事人(签名):\n年/月/日\n见证人(签名):\n/年/月/日\n承办人(签名):\n执法证号:20460\n2024年1月20日\n执法证号:19210452w7\n2020年1月20日\n送达方式:\n送达地点:\n广东省新兴县烟专瘤\n(印章)\n20246年\n第/页/共/页\n东"
},
"随函附案件材料清单目录": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/19_随函附案件材料清单目录.jpg"
],
"pages": [
19
],
"ocr_text": "19\n序号\n移送函编号:云新烟移\n9\nS\n4\n3\n广东省新兴县烟草专卖局证据先行登记保存通知书\n广东省新兴县烟草专卖局抽样取证物品清单\n2024.1.20涉嫌非法经营卷烟案调查报告\n广东省新兴县烟草专卖局案件移送函\n(2024)第2号\n广东省新兴县烟草专卖局现场笔录\n证据复制(提取)单\n名称\n移送单位:广东省新兴县烟草专卖局\n1份8页\n1份1页\n1份1页\n1份1页\n1份1页\n1份1页\n数量\n云新烟存通(2024)第8号\n云新烟移(2024)第2号\n时间:2024年1月20日\n时间:2024年1月22日\n时间:2024年1月20日\n时间:2024年1月20日\n特征\n原件\n原件\n原件\n原件\n原件\n原件\n备注"
},
"卷烟、雪茄烟鉴别检验报告": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/29_卷烟、雪茄烟鉴别检验报告.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/30_卷烟、雪茄烟鉴别检验报告.jpg"
],
"pages": [
29,
30
],
"ocr_text": "29\nMA\n东\n180021344160\n广东省烟葛插量监督检测站\n检验报台专用草\n卷烟、雪茄烟鉴别检验报告\n声明:1.报告无“检验报告专用章“无效。\n2.\n报告部分复制无效。\n3.\n报告无主检、审核、批准人签字或等效的标识无效。\n4.报告涂改无效。\n5.若对报告有异议的,应于收到报告之日起十五日内向本站提出。\n6.送样检验仅对接收的样品负责。\n注:广东省烟草质量监督检测站又名中国烟草总公司广东省公司烟草质量监督检测站\n地址:广东省广州市天河区林和东路128号\n邮政编码:510610\n电话:(02035668537\n传真:(02035668564\n报告编号:\nJYBGZW202401612\n第1页共2页\n委托方\n广东省新兴县烟草专卖局\n委托单编号\n经办人\n谢元学、苏庆锦\nWGD240130024\n报告签发日期\n2024年02月02日\n委托方式\n送样检验\n《烟草专卖品鉴别检验管理办法》(国烟科〔2014】285号)、\n鉴别检验依据\n《卷烟产品鉴别检验规程》(国烟科〔2006】894号)、\n对应实物对照样品及相关技术资料\n本报告共有13个样品。\n备\n注\n省烟草质\n东\n序号\n样品编号\n样品名称\n样品状态\n规格及包装\n送样数量\n检验结论\n说明\n描述\nWGD240130\n假冒注册商标\n检验报\n001\n黄鹤楼(软蓝)\n84mm条盒软盒\n1条\n完好\n024001\n且伪劣卷烟\nWGD240130\n假冒注册商标\n002\n玉溪(软)\n84mm条盒软盒\n1条\n完好\n024002\n且伪劣卷烟\nWGD240130\n假冒注册商标\n003\n利群(新版)\n84mm条盒硬盒\n1条\n完好\n024003\n且伪劣卷烟\nWGD240130\n84mm条盒硬盒\n1条\n完好\n假冒注册商标\n004\n双喜(硬金五叶神)\n024004\n且伪劣卷烟\nWGD240130\n1条\n假冒注册商标\n005\n红塔山(硬经典100\n84mm条盒硬盒\n完好\n024005\n且伪劣卷烟\nWGD240130\n完好\n假冒注册商标\n006\n双喜(硬经典1906\n84mm条盒硬盒\n1条\n024006\n且伪劣卷烟\nWGD240130\n假冒注册商标\n007\n双喜(软经典)\n84mm条盒软盒\n1条\n完好\n024007\n且伪劣卷烟\nWGD240130\n完好\n假冒注册商标\n008\n云烟(紫)\n84mm条盒硬盒\n1条\n024008\n且伪劣卷烟\nWGD240130\n假冒注册商标\n600\n牡丹(软)\n84mm条盒软盒\n1条\n完好\n024009\n且伪劣卷烟\nWGD240130\n假冒注册商标\n010\n白沙(硬新精品二代)\n84mm条盒硬盒\n1条\n完好\n024010\n且伪劣卷烟\nWGD240130\n1条\n假冒注册商标\n011\n双喜(莲香)\n84mm条盒硬盒\n完好\n024011\n且伪劣卷烟\nWGD240130\n97mm条盒硬盒\n1条\n完好\n假冒注册商标\n012\n南京(炫赫门)\n024012\n(细支)\n且伪劣卷烟\n\n30\n广东省烟草质量监督检测站\n卷烟、雪茄烟鉴别检验报告\n报告编号:JYBGZW202401612\n第2页共2页\n序号\n样品编号\n样品名称\n样品状态\n规格及包装\n送样数量\n检验结论\n说明\n描述\nWGD240130\n90mm条盒硬盒\n013\n假冒注册商标\n贵烟(跨越)\n1条\n完好\n024013\n(细支)\n且伪劣卷烟\n#\n审核:\n曾究力罗候志木红劳杨力咸\n主检:\n批准:\n报告结束\n量\n专用章"
},
"卷烟、雪茄烟鉴别检验委托单": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/27_卷烟、雪茄烟鉴别检验委托单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/28_卷烟、雪茄烟鉴别检验委托单.jpg"
],
"pages": [
27,
28
],
"ocr_text": "003\n100\n001\n序号\n签\n备\n委托协议\n检验依据\n经办人电话\n经办\n委托方地址广东省新兴县新城镇裕华南路121号新兴县烟草专卖局\n委\n编号:\n收栏\n托\n024003\nWGD240130\n024002\nWGD240130\n024001\nWGD240130\n样品编号\n事\n方广东省新兴县烟草专卖局\nWGD240130024\n注本次委托共接收13个样品,具体见列表。\n人\n0766-6932323\n谢元学、苏庆锦\n4、\n3\n1、鉴别检验完成时间:案情状况为“普通”时,出具报告时间为自样品接受委托起5个工作日:案情状况为“加急”时,出具报告时间为自样品接受委托起2个\n《烟草专卖品鉴别检验管理办法》\n本站保证鉴别检验工作的公正性、科学性和准确性。\n若委托方选择\n送样检验仅对来样负责。\n工作日。\n黄鹤楼(软蓝)\n利群(新版)\n玉溪(软)\n送样名称\n0766-6932323\n“取回”\n新\n检毕样品,\n卖局\n(国烟科〔2014】285号)、《卷烟产品鉴别检验规程》\n则需在检验报告出具6个月内取回,否则视为同意检验机构自行处置检毕样品。\n卷烟、雪茄烟鉴别检验委托单\n广东省烟草质量监督检测站\n黄鹤楼(软蓝)\n利群(新版)\n玉溪(软)\n样品名称\n当事人住址或查获地点G2518深岑高速往广州方向新城服务区路段\n检毕样品处置方式\n案卷编号\n案件编\n委托方式\n84mm条盒硬盒\n84mm条盒软盒\n84mm条盒软盒\n规格及包装\n号\n(国烟科〔2006〕894号)、对应实物对照样品及相关技术资料\n不取回\n2024年度云新烟第8号\n4453210202410008\n送样检验\n6901028118187\n6901028317177\n6901028180580\n条装/盒装条码\n案情状况\n送样单编号S202401343\n申报数量\n200条\n50条\n100条\n普通\n送样数量\n第1页共2页\n1条\n条\n1条\n样品状态描述\n完好\n完好\n完好\n\n28\n013\n012\n011\n010\n009\n008\n007\n006\n005\n004\n序号\n送样人电话:\n编号:\n送样日期:2024年01月30日\nWGD240130\nWGD240130\nWGD240130\nWGD240130\nWGD240130\n样品编号\n送样人:从\nWGD240130\n024012\n024011\n024010\n024009\n024008\nWGD240130\n024007\nWGD240130\n024006\n024005\nWGD240130\n024004\nWGD240130\n024013\nWGD240130024\n白沙(硬新精品二代)\n双喜(硬经典1906)\n红塔山(硬经典100)\n双喜(硬金五叶神)\n南京(炫赫门)\n双喜(软经典)\n贵烟(跨越)\n双喜(莲香)\n牡丹(软)\n云烟(紫)\n送样名称\n卷烟、雪茄烟鉴别检验委托单\n检验机构联系电话(传真):0203566853735668564)\n白沙(硬新精品二代)\n双喜(硬经典1906)\n红塔山(硬经典100)\n双喜(硬金五叶神)\n广东省烟草质量监督检测站\n检验机构接样人:邓李天\n南京(炫赫门)\n双喜(软经典)\n贵烟(跨越)\n双喜(莲香)\n牡丹(软)\n云烟(紫)\n样品名称\n接样日期:2024年01月30日\n90mm条盒硬盒(\n97mm条盒硬盒\n84mm条盒硬盒\n84mm条盒硬盒\n84mm条盒软盒\n84mm条盒硬盒\n84mm条盒软盒\n84mm条盒硬盒\n84mm条盒硬盒\n84mm条盒硬盒\n规格及包装\n细支)\n细支)\n6901028221450\n6901028111270\n6901028005159\n6901028063371\n6901028075053\n6901028046893\n6901028000833\n6901028001625\n6901028315432\n6901028005036\n条装/盒装条码\n申报数量\n报告领取人:多\n领取地点:本地\n领取日期:2024.1.30\n160条\n360条\n100条\n200条\n50条\n50条\n50条\n50条\n50条\n50条\n送样数量样品状态描述\n1条\n条\n条\n条\n条\n条\n条\n1条\n1条\n1条\n第2页共2页\n完好\n完好\n完好\n完好\n完好\n完好\n完好\n完好\n完好\n完好"
},
"卷烟、雪茄烟鉴别检验送样单": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/20_卷烟、雪茄烟鉴别检验送样单.jpg",
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/21_卷烟、雪茄烟鉴别检验送样单.jpg"
],
"pages": [
20,
21
],
"ocr_text": "20\n当事人住址或查获地点G2518深岑高速往广州方向新城服务区路段\n001\n序号\n编号:\n008\n00\n00\n100\n备\n检毕样品处置方式\n案情状况\n委托方地址\n当事人\n委托方(盖章)\nS202401343\n注\n双喜(硬金五叶神)\n红塔山(硬经典100)\n双喜(硬经典1906)\n双喜(软经典)\n利群(新版)\n黄鹤楼(软蓝)\n不取回\n普通\n广东省新兴县新城镇裕华南路121号新兴县烟草专卖局\n现场未发现当享长\n广东省新兴县烟草专卖局\n玉溪(软)\n云烟(紫)\n送样名称\n(2)“普通”情况下自样品接受委托起5个工作日出具报告,\n(1)“加急”指的是已拘留涉案人员并由公安机关出具拘留证。其余情况均为“普通”\n说明:\n卷烟、雪茄烟鉴别检验送样单\n后卖局\n广东省烟草质量监督检测站\n84mm条盒硬盒\n84mm条盒软盒\n84mm条盒硬盒\n84mm条盒软盒\n84mm条盒硬盒\n84mm条盒硬盒\n84mm条盒硬盒\n84mm条盒软盒\n规格及包装\n拟送检验受理点广东省烟草质量监督检测站\n委托方电话\n案卷编号\n案件编号\n6901028005036\n6901028317177\n6901028315432\n6901028000833\n6901028001625\n6901028046893\n6901028118187\n6901028180580\n条装/盒装条码\n“加急”情况下自样品接受委托起2个工作日出具报告。\n0766-6932323\n2024年度云新烟第8号\n4453210202410008\n申报数量\n200条\n100条\n200条\n100条\n50条\n50条\n50条\n50条\n送样数量\n條\n1条\n条\n條\n1条\n样品状态描述\n完好\n完好\n完好\n完好\n完好\n完好\n完好\n完好\n第1页共2页\n\n21\n委托方经办人:谢元学、苏庆锦\n序号\n编号:S202401343\n013\n1\n1\n10\n0\n白沙(硬新精品二代)\n南京(炫赫门)\n双喜(莲香)\n贵烟(跨越)\n牡丹(软)\n送样名称\n卷烟、雪茄烟鉴别检验送样单\n广东省烟草质量监督检测站\n经办人电话:0766-6932323\n97mm条盒硬盒(细支)\n90mm条盒硬盒(细支)\n84mm条盒硬盒\n84mm条盒硬盒\n84mm条盒软盒\n规格及包装\n6901028111270\n6901028063371\n6901028005159\n6901028221450\n6901028075053\n条装/盒装条码\n申报数量\n360条\n50条\n160条\n填单日期:2024年01月22日\n50条\n50条\n送样数量\n條\n条\n條\n条\n样品状态描述\n完好\n完好\n完好\n完好\n完好\n第2页共2页"
},
"重大执法行为法制审核送审表": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/34_重大执法行为法制审核送审表.jpg"
],
"pages": [
34
],
"ocr_text": "34\n重大执法行为法制审核送审表\n送审部门\n新兴县烟草专卖局专卖管理办公室\n(专卖执法机构)\n经办人\n何松尧、苏秋坚\n联系电话\n0766-6932323\n立案号(案件号)\n云新烟立[2024]第8号\n送审时间\n2024年3月29日\n2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专卖\n局稽查支队统一指挥部署下,我局执法人员联合云浮市公安局交通警察支队\n高速公路四大队执法人员在G2518深岑高速往广州方向新城服务区路段对\n挂牌号为桂A8R6Z2的白色五菱牌小型普通客车进行检查,随车人员弃车逃\n跑。经检查发现该涉案车辆装载有卷烟。因道路安全问题,执法人员将涉案\n车辆带回云浮市公安局交通警察支队高速公路四大队大院内作进一步调查\n处理。经查:1、在挂牌号为桂A8R6Z2的白色五菱牌小型普通客车上查获涉\n案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新\n版)200条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经典)50\n条、红塔山(硬经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、\n牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬新精\n品二代)50条、南京(炫赫门)360条(经初步检查,上述卷烟存在字体印刷\n模糊、包装松散等现象);2、在该涉案车辆中未发现运输该批涉案卷烟的烟\n草专卖品准运证及合法有效的证明。鉴于上述情况,当事人涉嫌违反了《中\n华人民共和国烟草专卖法》第二十一条的规定。经局领导批准同意,我局执\n法人员依法对涉案卷烟进行证据先行登记保存并抽样送检,整个调查过程\n均有执法记录。\n经查,涉案卷烟价值初步估算为246100元,鉴于涉案金额较大,已达\n案件基本情况及拟\n到刑事案件标准,当事人的行为涉嫌构成非法经营罪。2024年1月22日,\n我局将该案直接移送新兴县公安局调查处理。新兴县公安局经济犯罪侦查大\n作出的决定\n队要求我局三天内补充以下材料:1、该案嫌疑人的基本情况(姓名、性别、\n身份证号码及现住地址等);2、该案嫌疑人是否知道该车辆所运烟草专卖品\n的货主有否获得烟草专卖部门的准许,鉴于我局无法在规定期限内收集到上\n述证据材料,目前该案由我局自行调查处理。\n2024年1月26日我局在公告栏上张贴公告要求当事人于公告发布之\n日起60日内到广东省新兴县烟草专卖局接受调查处理。2024年3月29日,\n公告期满,当事人未到我局接受处理。经查,涉案卷烟经检验为假冒注册商\n标且伪劣卷烟,在法律性质上属假冒商标烟草制品,价值为246100元。\n本案立案时间为:2024年1月26日,执法人员:谢元学(19210452010),\n苏庆锦(19210452007)。并依照《烟草专卖行政处罚程序规定》第七十三条\n的规定于2024年1月26日进行公告,鉴于公告期满仍无法找到案件当事人,\n我局将依据《烟草专卖行政处罚程序规定》第七十三条及《中华人民共和国\n烟草专卖法实施条例》第三十条有关规定,建议依法对涉案烟草专卖品作出\n如下处理:\n将涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、\n利群(新版)200条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经\n典)50条、红塔山(硬经典100)50条、玉溪(软)50条、双喜(硬金五叶神)\n50条、牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬\n新精品二代)50条、南京(炫赫门)360条全部予以公开销毁。\n1.《现场笔录》;2.《证据先行登记保存通知书》;3.涉案卷烟1470条;4.\n证据材料目录\n《抽样取证物品清单》;5.证据复制(提取)单;6.《涉案物品核价表》;\n(证据材料另附)\n7.案件移送函及相关材料;8.《卷烟、雪茄烟鉴别检验报告》:9.《公告》。\n执法部门盖章\n备注"
},
"重大执法行为法制审核意见反馈表": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/35_重大执法行为法制审核意见反馈表.jpg"
],
"pages": [
35
],
"ocr_text": "35\n重大执法行为法制审核意见反馈表\n云新执审[2024]1号\n送审部门\n新兴县烟草专卖局专卖管理办公室\n立案号\n云新烟立[2024]第8号\n(案件号)\n送审时间\n2024年3月29日\n该案事实清楚、证据确实充分、定性准确、法律适\n用适当、程序正当,同意送审部门意见。\n法律审核\n意见\n盖章或签名\n联系\n0766-69\n反馈\n2024年3月\n经办人\n刘芯仪\n29日\n电话\n66299\n时间"
},
"2024.1.20涉嫌非法经营卷烟案调查报告": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/17_2024.1.20涉嫌非法经营卷烟案调查报告.jpg"
],
"pages": [
17
],
"ocr_text": "17\n广东省新兴县烟草专卖局\n2024.1.20涉嫌非法经营卷烟案调查报告\n2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专卖局\n稽查支队统一指挥部署下,我局执法人员联合云浮市公安局交通警察支队高\n速公路四大队执法人员在G2518深岑高速往广州方向新城服务区路段对挂牌\n号为桂A8R6Z2的白色五菱牌小型普通客车进行检查,随车人员弃车逃跑。\n经检查发现该涉案车辆装载有卷烟。因道路安全问题,执法人员将涉案车辆\n带回云浮市公安局交通警察支队高速公路四大队大院内作进一步调查处理。\n经查:1、在挂牌号为桂A8R6Z2的白色五菱牌小型普通客车上查获涉案卷烟\n共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新版)200\n条、云烟(紫)100条、双喜(硬经典1906)200条、双喜(软经典)50条、红塔\n山(硬经典100)50条、玉溪(软)50条、双喜(硬金五叶神)50条、牡丹(软)50\n条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬新精品二代)50\n条、南京(炫赫门)360条(经初步检查,上述卷烟存在字体印刷模糊、包装\n运证及合法有效的证明。鉴于上述情况,当事人涉嫌违反了《中华人民共和\n国烟草专卖法》第二十一条的规定。经局领导批准同意,我局执法人员依法\n对涉案卷烟进行证据先行登记保存并抽样送检,整个调查过程均有执法记\n录。\n根据《国家烟草专卖局关于印发涉案烟草制品价格管理规定的通知》(国\n烟计[2021]93号)、《广东省烟草专卖局涉案烟草制品价格管理规定》(粤烟\n计[2021]55号)和《广东省烟草专卖局关于发布2024年度全省涉案烟草专\n卖品价值估算的价格计算标准及有关事项的通知》(粤烟计[2024]1号)等相\n关规定,涉案卷烟价值初步估算为246100元,具体核价待云浮市烟草专卖\n局涉案卷烟价格管理小组进一步核定。鉴于涉案金额较大,已达到刑事案件\n标准,当事人的行为涉嫌构成非法经营罪。根据《烟草专卖行政处罚程序规\n定》第十三条第二款相关规定,建议将该案直接移送新兴县公安局调查处理。\n广东省新兴县烟草专卖局\n2024年1月22日"
},
"关于补充云新烟移[2024]第2号案材料的说明": {
"imgs": [
"documents/行政处罚决定书/2025/04月17日/对无主烟草专卖品的处理(假冒)_18时04分38秒/4_关于补充云新烟移[2024]第2号案材料的说明.jpg"
],
"pages": [
4
],
"ocr_text": "广东省新兴县烟草专卖局\n4\n现场笔录\n检查时间:2024年1月20日13时40分至20日15时10分\n检查地点:G2518深岑高速往广州方向新城服务区路段、云浮市公安局交通警察支队高速公\n路四大队大院内\n被检查人名称:\n法定代表人(负责人):\n被检查人姓名:现场未发现当事人性别:/\n证件类型及号码:\n地址:\n联系电话:\n烟草专卖许可证号码:\n现场负责人:\n性别:\n证件类型及号码:\n与被检查人关系:\n告知事项:\n现场情况:2024年1月20日13时40分,根据群众举报信息,在云浮市烟草专卖局稽查支队统一指挥部\n署下,我局执法人员联合云浮市公安局交通警察支队高速公路四大队执法人员在G2518深岑高速往广州方\n向新城服务区路段对挂牌号为桂A8R6Z2的白色五菱牌小型普通客车进行检查,随车人员弃车逃跑。经检\n查发现该涉案车辆装载有卷烟。因道路安全问题,执法人员将涉案车辆带回云浮市公安局交通警察支队高\n速公路四大队大院内作进一步调查处理。经查:1、在挂牌号为桂A8R6Z2的白色五菱牌小型普通客车上查\n获涉案卷烟共计13个品种,数量1470条,其中:黄鹤楼(软蓝)100条、利群(新版)200条、云烟(紫)100\n条、双喜(硬经典1906)200条、双喜(软经典)50条、红塔山(硬经典100)50条、玉溪(软)50条、双喜(硬\n金五叶神)50条、牡丹(软)50条、贵烟(跨越)160条、双喜(莲香)50条、白沙(硬新精品二代)50\n条、南京(炫赫门)360条(经初步检查,上述卷烟存在字体印刷模糊、包装松散等现象);2、在该涉案车\n辆中未发现运输该批涉案卷烟的烟草专卖品准运证及合法有效的证明。鉴于上述情况,当事人涉嫌违反了\n《中华人民共和国烟草专卖法》第二十一条的规定。经局领导批准同意,我局执法人员依法对涉案卷烟进\n行证据先行登记保存并抽样送检,整个调查过程均有执法记录。\n被检查人或者现场负责人意见:\n被检查人或者现场负责人(签名):\n/年/月/日\n见证人(签名):\n(现场找不到见证人作见证)\n7年/月/日\n检查人(签名):\n执法证号:19210457010\n2224年1月20日\n执法证号:121452w7\n220年1月20日"
}
}
}
+80 -1
View File
@@ -15,6 +15,7 @@
"@remix-run/react": "^2.16.2",
"@remix-run/serve": "^2.16.2",
"@uiw/react-codemirror": "^4.23.10",
"axios": "^1.9.0",
"dayjs": "^1.11.13",
"diff": "^7.0.0",
"docx-preview": "^0.3.5",
@@ -4641,6 +4642,12 @@
"node": ">= 0.4"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/autoprefixer": {
"version": "10.4.21",
"resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.21.tgz",
@@ -4701,6 +4708,17 @@
"node": ">=4"
}
},
"node_modules/axios": {
"version": "1.9.0",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/axobject-query": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/axobject-query/-/axobject-query-4.1.0.tgz",
@@ -5256,6 +5274,18 @@
"color-support": "bin.js"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/comma-separated-tokens": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
@@ -5637,6 +5667,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
@@ -6010,7 +6049,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"dev": true,
"dependencies": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
@@ -7101,6 +7139,26 @@
"integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
"dev": true
},
"node_modules/follow-redirects": {
"version": "1.15.9",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"license": "MIT",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/for-each": {
"version": "0.3.5",
"resolved": "https://registry.npmmirror.com/for-each/-/for-each-0.3.5.tgz",
@@ -7143,6 +7201,21 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/form-data": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz",
"integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/format": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/format/-/format-0.2.2.tgz",
@@ -11533,6 +11606,12 @@
"node": ">= 0.10"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
"node_modules/pump": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/pump/-/pump-2.0.1.tgz",
+1
View File
@@ -20,6 +20,7 @@
"@remix-run/react": "^2.16.2",
"@remix-run/serve": "^2.16.2",
"@uiw/react-codemirror": "^4.23.10",
"axios": "^1.9.0",
"dayjs": "^1.11.13",
"diff": "^7.0.0",
"docx-preview": "^0.3.5",
BIN
View File
Binary file not shown.
-158
View File
@@ -1,158 +0,0 @@
// 使用原生Node.js http模块发送请求
import http from 'http';
import { Buffer } from 'buffer';
// 测试GET请求 - 检查API服务器是否正常运行
function testApiConnection() {
console.log('测试API连接...');
// 设置请求选项
const options = {
hostname: '127.0.0.1',
port: 9000,
path: '/admin/evaluation_points',
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': '1234567890'
}
};
// 创建请求
const req = http.request(options, (res) => {
console.log(`状态码: ${res.statusCode}`);
console.log('响应头:', res.headers);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('响应数据:');
try {
const parsedData = JSON.parse(data);
console.log(JSON.stringify(parsedData, null, 2));
} catch (e) {
console.log('无法解析响应为JSON:', data);
}
});
});
req.on('error', (error) => {
console.error('请求错误:', error.message);
if (error.code === 'ECONNREFUSED') {
console.error('无法连接到API服务器 - 请确保服务器已启动并监听端口9000');
}
});
// 完成请求
req.end();
}
// 测试POST请求 - 尝试创建一个测试评查点
function testPostRequest() {
console.log('\n测试POST请求...');
// 创建测试数据
const testData = {
code: 'TEST_CODE',
name: '测试评查点',
risk: 'low',
is_enabled: false,
is_draft: true,
description: '这是一个测试评查点',
references_laws: {
name: '测试法规',
articles: ['第一条'],
content: '测试内容'
},
extraction_config: {
llm: {
fields: ['测试字段1', '测试字段2'],
prompt_setting: {
type: 'system',
template: '测试提示词'
}
},
vlm: {
fields: [
{ name: '图片字段1', type: 'default' }
],
prompt_setting: {
type: 'system',
template: '测试图片提示词'
}
},
regex: {
fields: [
{ field: '正则字段1', pattern: '\\d+' }
]
}
},
evaluation_config: {
logicType: 'and',
customLogic: '',
rules: []
}
};
// 将数据转换为JSON字符串
const postData = JSON.stringify(testData);
// 设置请求选项
const options = {
hostname: '127.0.0.1',
port: 9000,
path: '/admin/evaluation_points',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': '1234567890',
'Content-Length': Buffer.byteLength(postData)
}
};
// 创建请求
const req = http.request(options, (res) => {
console.log(`状态码: ${res.statusCode}`);
console.log('响应头:', res.headers);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('响应数据:');
try {
const parsedData = JSON.parse(data);
console.log(JSON.stringify(parsedData, null, 2));
} catch (e) {
console.log('无法解析响应为JSON:', data);
}
});
});
req.on('error', (error) => {
console.error('请求错误:', error.message);
});
// 发送数据
req.write(postData);
// 完成请求
req.end();
}
// 执行测试
testApiConnection();
// 等待3秒后执行POST测试
setTimeout(() => {
testPostRequest();
}, 3000);
-108
View File
@@ -1,108 +0,0 @@
// 使用原生Node.js http模块发送请求
import http from 'http';
import { Buffer } from 'buffer';
// 测试POST请求 - 尝试创建一个测试评查点
function testPostRequest() {
console.log('测试POST请求...');
// 创建测试数据
const testData = {
code: 'TEST_CODE_' + Date.now(),
name: '测试评查点',
risk: 'low',
is_enabled: false,
description: '这是一个测试评查点',
references_laws: {
name: '测试法规',
articles: ['第一条'],
content: '测试内容'
},
extraction_config: {
llm: {
fields: ['测试字段1', '测试字段2'],
prompt_setting: {
type: 'system',
template: '测试提示词'
}
},
vlm: {
fields: [
{ name: '图片字段1', type: 'default' }
],
prompt_setting: {
type: 'system',
template: '测试图片提示词'
}
},
regex: {
fields: [
{ field: '正则字段1', pattern: '\\d+' }
]
}
},
evaluation_config: {
logicType: 'and',
customLogic: '',
rules: []
},
pass_message: '通过消息',
fail_message: '失败消息',
suggestion_message: '建议消息',
suggestion_message_type: 'warning',
post_action: 'none',
action_config: ''
};
// 将数据转换为JSON字符串
const postData = JSON.stringify(testData);
// 设置请求选项
const options = {
hostname: '127.0.0.1',
port: 9000,
path: '/admin/evaluation_points',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': '1234567890',
'Content-Length': Buffer.byteLength(postData)
}
};
// 创建请求
const req = http.request(options, (res) => {
console.log(`状态码: ${res.statusCode}`);
console.log('响应头:', res.headers);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('响应数据:');
try {
const parsedData = JSON.parse(data);
console.log(JSON.stringify(parsedData, null, 2));
} catch (e) {
console.log('无法解析响应为JSON:', data);
}
});
});
req.on('error', (error) => {
console.error('请求错误:', error.message);
});
// 发送数据
req.write(postData);
// 完成请求
req.end();
}
// 执行测试
testPostRequest();
-47
View File
@@ -1,47 +0,0 @@
// 测试数据库连接
import pkg from 'pg';
const { Client } = pkg;
async function testConnection() {
// 创建PostgreSQL客户端
const client = new Client({
host: 'nas.7bm.co',
port: 54302,
database: 'docauditai',
user: 'api_user',
password: 'your_password_here', // 替换为实际密码
ssl: false // 根据需要设置SSL
});
try {
console.log('正在连接数据库...');
await client.connect();
console.log('连接成功!');
// 测试查询
const result = await client.query('SELECT now() as current_time');
console.log('服务器时间:', result.rows[0].current_time);
// 查看数据库中的表
const tablesResult = await client.query(`
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
`);
console.log('数据库中的表:');
tablesResult.rows.forEach(row => {
console.log(`- ${row.table_name}`);
});
} catch (err) {
console.error('连接或查询失败:', err);
} finally {
// 关闭连接
await client.end();
console.log('连接已关闭');
}
}
// 执行测试
testConnection();
-107
View File
@@ -1,107 +0,0 @@
// 测试 PostgREST API 连接
import { setTimeout } from 'node:timers/promises';
// 配置信息
const apiUrl = 'http://nas.7bm.co:54302/api/docauditai';
const apiToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXBpX3VzZXIifQ.KVLm7rZOF0MuX3MR9LqiYA14gba-MaDK_EQXrJ9u5_Y';
// 增加超时设置
const fetchWithTimeout = async (url, options, timeout = 10000) => {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeout);
try {
const response = await fetch(url, {
...options,
signal: controller.signal
});
clearTimeout(timeoutId);
return response;
} catch (error) {
clearTimeout(timeoutId);
throw error;
}
};
async function testPostgREST() {
try {
console.log('测试 PostgREST API 连接...');
console.log(`API URL: ${apiUrl}`);
// 1. 测试连接超时问题
console.log('\n1. 尝试连接 - 基本网络检查');
try {
console.log(`正在ping ${new URL(apiUrl).hostname}...`);
// 使用简单的fetch检查是否可以连接(即使返回404等错误也表示网络层面是通的)
const pingResponse = await fetchWithTimeout(apiUrl, {
method: 'HEAD',
timeout: 5000
}, 5000);
console.log(`服务器响应:HTTP ${pingResponse.status}`);
} catch (pingError) {
console.error('网络测试失败:', pingError.name, pingError.message);
if (pingError.name === 'AbortError') {
console.error('连接超时 - 请检查服务器地址和端口是否正确,或者服务器是否在线');
}
if (pingError.cause) {
console.error('错误原因:', pingError.cause);
}
// 不要继续测试
return;
}
// 2. 测试健康检查端点
console.log('\n2. 测试健康检查端点');
try {
const healthResponse = await fetchWithTimeout(`${apiUrl}/health`, {
headers: {
'Authorization': `Bearer ${apiToken}`
}
});
if (healthResponse.ok) {
const healthData = await healthResponse.json();
console.log('健康检查响应:', healthData);
} else {
console.log('健康检查失败:', healthResponse.status);
console.log('响应内容:', await healthResponse.text());
}
} catch (healthError) {
console.error('健康检查请求错误:', healthError);
}
// 3. 尝试获取模式信息
console.log('\n3. 尝试获取模式信息');
try {
const schemaResponse = await fetchWithTimeout(`${apiUrl}/`, {
headers: {
'Authorization': `Bearer ${apiToken}`,
'Accept': 'application/json'
}
});
if (schemaResponse.ok) {
const schemaData = await schemaResponse.json();
console.log('获取到数据库模式信息:',
Object.keys(schemaData).length > 0 ? Object.keys(schemaData) : schemaData);
} else {
console.log('获取模式信息失败:', schemaResponse.status);
console.log('响应内容:', await schemaResponse.text());
}
} catch (schemaError) {
console.error('获取模式信息错误:', schemaError);
}
} catch (error) {
console.error('测试过程出现错误:', error);
if (error.cause) {
console.error('错误原因:', error.cause);
}
}
}
// 执行测试
testPostgREST();
-162
View File
@@ -1,162 +0,0 @@
import http from 'http';
import { Buffer } from 'buffer';
// 测试评查点列表接口
function testGetEvaluationPoints() {
const options = {
hostname: '127.0.0.1',
port: 9000,
path: '/admin/evaluation_points',
method: 'GET',
headers: {
'Accept': 'application/json'
}
};
const req = http.request(options, (res) => {
console.log(`状态码: ${res.statusCode}`);
console.log(`响应头: ${JSON.stringify(res.headers)}`);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('获取评查点列表成功!');
try {
const jsonData = JSON.parse(data);
console.log(`共获取 ${jsonData.length} 条评查点数据`);
console.log('第一条数据:', JSON.stringify(jsonData[0], null, 2).substring(0, 200) + '...');
} catch (e) {
console.error('解析JSON数据失败:', e.message);
console.log('原始数据:', data);
}
});
});
req.on('error', (e) => {
console.error(`获取评查点列表请求失败: ${e.message}`);
});
req.end();
}
// 测试创建评查点接口
function testCreateEvaluationPoint() {
const testData = {
name: '测试评查点',
code: 'TEST_RULE_001',
risk: 'medium',
is_enabled: true,
description: '这是一个用于测试接口的评查点',
type: 'content',
references_laws: {
name: '《中华人民共和国民法典》',
articles: ['第五百八十五条', '第五百八十六条'],
content: '当事人应当按照约定全面履行自己的义务。'
},
evaluation_point_groups_id: 1,
extraction_config: {
llm: {
fields: ['合同名称', '合同编号', '签订日期'],
prompt_setting: {
type: 'system',
template: '请从文档中提取以下字段信息:合同名称、合同编号、签订日期'
}
},
vlm: {
fields: [
{ name: '公章', type: 'seal' },
{ name: '签名', type: 'handwriting' }
],
prompt_setting: {
type: 'system',
template: '请识别文档中的公章和签名'
}
},
regex: {
fields: [
{ field: '合同编号', pattern: 'HT-\\d{4}-\\d{6}' }
]
}
},
evaluation_config: {
logicType: 'and',
customLogic: '',
rules: [
{
id: '1',
type: 'exists',
config: {
fields: ['合同名称', '合同编号', '签订日期'],
logic: 'and'
}
}
]
},
pass_message: '文档检查通过,符合规范要求。',
fail_message: '文档存在以下问题,请修改后重新提交。',
suggestion_message: '',
suggestion_message_type: 'warning',
post_action: 'none',
action_config: ''
};
const postData = JSON.stringify(testData);
const options = {
hostname: '127.0.0.1',
port: 9000,
path: '/admin/evaluation_points',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(postData),
'Accept': 'application/json',
'Prefer': 'return=representation'
}
};
const req = http.request(options, (res) => {
console.log(`状态码: ${res.statusCode}`);
console.log(`响应头: ${JSON.stringify(res.headers)}`);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('创建评查点成功!');
try {
const jsonData = JSON.parse(data);
console.log('创建的评查点ID:', jsonData.id);
console.log('创建的评查点数据:', JSON.stringify(jsonData, null, 2).substring(0, 200) + '...');
} catch (e) {
console.error('解析JSON数据失败:', e.message);
console.log('原始数据:', data);
}
});
});
req.on('error', (e) => {
console.error(`创建评查点请求失败: ${e.message}`);
});
req.write(postData);
req.end();
}
// 运行测试
console.log('开始测试评查点API...');
console.log('1. 测试获取评查点列表...');
testGetEvaluationPoints();
// 等待3秒后测试创建评查点
setTimeout(() => {
console.log('\n2. 测试创建评查点...');
testCreateEvaluationPoint();
}, 3000);
+2 -1
View File
@@ -25,6 +25,7 @@ export default defineConfig({
host: '0.0.0.0',
port: 5173,
open: true,
// allowedHosts: ['nas.7bm.co', 'localhost', '127.0.0.1'], // 允许的主机名列表
allowedHosts: ['nas.7bm.co', 'localhost', '127.0.0.1'], // 允许的主机名列表
cors: true,
},
});