|
@@ -386,109 +386,148 @@
|
|
|
<!-- 左侧导航 -->
|
|
<!-- 左侧导航 -->
|
|
|
<div class="docs-sidebar">
|
|
<div class="docs-sidebar">
|
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
|
- <div class="sidebar-section">
|
|
|
|
|
- <h3>认证</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li @click="activeSection = 'auth'" :class="{ active: activeSection === 'auth' }">
|
|
|
|
|
- 认证方式
|
|
|
|
|
- </li>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'signature'"
|
|
|
|
|
- :class="{ active: activeSection === 'signature' }"
|
|
|
|
|
- >
|
|
|
|
|
- 签名验证
|
|
|
|
|
- </li>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'notes'"
|
|
|
|
|
- :class="{ active: activeSection === 'notes' }"
|
|
|
|
|
- >
|
|
|
|
|
- 注意事项
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="sidebar-section">
|
|
|
|
|
- <h3>账户接口</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'transfer'"
|
|
|
|
|
- :class="{ active: activeSection === 'transfer' }"
|
|
|
|
|
- >
|
|
|
|
|
- 发起转账
|
|
|
|
|
- </li>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'transfer_query'"
|
|
|
|
|
- :class="{ active: activeSection === 'transfer_query' }"
|
|
|
|
|
- >
|
|
|
|
|
- 查询转账
|
|
|
|
|
- </li>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'balance'"
|
|
|
|
|
- :class="{ active: activeSection === 'balance' }"
|
|
|
|
|
- >
|
|
|
|
|
- 账户余额
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="sidebar-section">
|
|
|
|
|
- <h3>回调通知</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'callback'"
|
|
|
|
|
- :class="{ active: activeSection === 'callback' }"
|
|
|
|
|
- >
|
|
|
|
|
- 通知接口
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
<!--
|
|
<!--
|
|
|
- 下面两组各由一支切片器从**各自的** md 切出来 —— 侧边栏、卡片标题、正文
|
|
|
|
|
- 三处同源。标题在 md 里被改字则对应条目自动消失(不是留下一个空白页)。
|
|
|
|
|
- 两条通道是两个产品、两份文档,不合并(2026-09-24 拆分)。
|
|
|
|
|
|
|
+ 7 组可收起;默认全部收起(openedDocGroups 为空数组)。
|
|
|
|
|
+ 组名与视觉顺序固定为 auth / account / callback / har / collection / unified / other。
|
|
|
-->
|
|
-->
|
|
|
-
|
|
|
|
|
- <!-- 支付宝收单(harDoc.ts ← docs/har-openapi.md)—— 2026-09-30 由「门店与订单」改名 -->
|
|
|
|
|
- <div class="sidebar-section">
|
|
|
|
|
- <h3>支付宝收单</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li
|
|
|
|
|
- v-for="(section, key) in harSections"
|
|
|
|
|
- :key="key"
|
|
|
|
|
- @click="activeSection = key"
|
|
|
|
|
- :class="{ active: activeSection === key }"
|
|
|
|
|
- >
|
|
|
|
|
- {{ section.title }}
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 银联收单(collectionDoc.ts ← docs/collection-openapi.md)—— 2026-09-30 由「收付款接口」改名并露出 -->
|
|
|
|
|
- <div v-if="SHOW_COLLECTION_DOC" class="sidebar-section">
|
|
|
|
|
- <h3>银联收单</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li
|
|
|
|
|
- v-for="(section, key) in collectionSections"
|
|
|
|
|
- :key="key"
|
|
|
|
|
- @click="activeSection = key"
|
|
|
|
|
- :class="{ active: activeSection === key }"
|
|
|
|
|
- >
|
|
|
|
|
- {{ section.title }}
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="sidebar-section">
|
|
|
|
|
- <h3>其他</h3>
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li
|
|
|
|
|
- @click="activeSection = 'errors'"
|
|
|
|
|
- :class="{ active: activeSection === 'errors' }"
|
|
|
|
|
- >
|
|
|
|
|
- 常见错误
|
|
|
|
|
- </li>
|
|
|
|
|
- <li @click="activeSection = 'php'" :class="{ active: activeSection === 'php' }">
|
|
|
|
|
- PHP示例代码
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-collapse v-model="openedDocGroups" class="docs-collapse">
|
|
|
|
|
+ <el-collapse-item title="认证" name="auth">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'auth'"
|
|
|
|
|
+ :class="{ active: activeSection === 'auth' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 认证方式
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'signature'"
|
|
|
|
|
+ :class="{ active: activeSection === 'signature' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 签名验证
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'notes'"
|
|
|
|
|
+ :class="{ active: activeSection === 'notes' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 注意事项
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ <el-collapse-item title="账户接口" name="account">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'transfer'"
|
|
|
|
|
+ :class="{ active: activeSection === 'transfer' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 发起转账
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'transfer_query'"
|
|
|
|
|
+ :class="{ active: activeSection === 'transfer_query' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查询转账
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'balance'"
|
|
|
|
|
+ :class="{ active: activeSection === 'balance' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 账户余额
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ <el-collapse-item title="回调通知" name="callback">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'callback'"
|
|
|
|
|
+ :class="{ active: activeSection === 'callback' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 通知接口
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ <!--
|
|
|
|
|
+ 下面三组各由一支切片器从**各自的** md 切出来 —— 侧边栏、卡片标题、正文
|
|
|
|
|
+ 三处同源。标题在 md 里被改字则对应条目自动消失(不是留下一个空白页)。
|
|
|
|
|
+ 三条产品线是三份文档,不合并(2026-09-24 拆分两条,2026-10-20 增加统一支付)。
|
|
|
|
|
+ -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 支付宝收单(harDoc.ts ← docs/har-openapi.md)—— 2026-09-30 由「门店与订单」改名 -->
|
|
|
|
|
+ <el-collapse-item title="支付宝收单" name="har">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ v-for="(section, key) in harSections"
|
|
|
|
|
+ :key="key"
|
|
|
|
|
+ @click="activeSection = key"
|
|
|
|
|
+ :class="{ active: activeSection === key }"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ section.title }}
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 银联收单(collectionDoc.ts ← docs/collection-openapi.md)—— 2026-09-30 由「收付款接口」改名并露出 -->
|
|
|
|
|
+ <el-collapse-item
|
|
|
|
|
+ v-if="SHOW_COLLECTION_DOC"
|
|
|
|
|
+ title="银联收单"
|
|
|
|
|
+ name="collection"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ v-for="(section, key) in collectionSections"
|
|
|
|
|
+ :key="key"
|
|
|
|
|
+ @click="activeSection = key"
|
|
|
|
|
+ :class="{ active: activeSection === key }"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ section.title }}
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 统一支付收单(unifiedDoc.ts ← docs/unified-openapi.md)—— 2026-10-20 新增,R52 排在 collection 之后 -->
|
|
|
|
|
+ <el-collapse-item title="统一支付收单" name="unified">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ v-for="(section, key) in unifiedSections"
|
|
|
|
|
+ :key="key"
|
|
|
|
|
+ @click="activeSection = key"
|
|
|
|
|
+ :class="{ active: activeSection === key }"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ section.title }}
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-collapse-item title="其他" name="other">
|
|
|
|
|
+ <div class="sidebar-section">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'errors'"
|
|
|
|
|
+ :class="{ active: activeSection === 'errors' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ 常见错误
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li
|
|
|
|
|
+ @click="activeSection = 'php'"
|
|
|
|
|
+ :class="{ active: activeSection === 'php' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ PHP示例代码
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -1388,6 +1427,7 @@ import ApiKeyAPI, {
|
|
|
import OpenAPI from "@/api/module_payment/openapi";
|
|
import OpenAPI from "@/api/module_payment/openapi";
|
|
|
import { collectionSections } from "./collectionDoc";
|
|
import { collectionSections } from "./collectionDoc";
|
|
|
import { harSections } from "./harDoc";
|
|
import { harSections } from "./harDoc";
|
|
|
|
|
+import { unifiedSections } from "./unifiedDoc";
|
|
|
import type { DocSection } from "./docSlicer";
|
|
import type { DocSection } from "./docSlicer";
|
|
|
import CrudToolbarLeft from "@/components/CURD/CrudToolbarLeft.vue";
|
|
import CrudToolbarLeft from "@/components/CURD/CrudToolbarLeft.vue";
|
|
|
import CrudToolbarRight from "@/components/CURD/CrudToolbarRight.vue";
|
|
import CrudToolbarRight from "@/components/CURD/CrudToolbarRight.vue";
|
|
@@ -1408,6 +1448,12 @@ defineOptions({
|
|
|
const activeTab = ref("management");
|
|
const activeTab = ref("management");
|
|
|
const activeSection = ref("auth");
|
|
const activeSection = ref("auth");
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 文档侧边栏展开的组名。空数组 = 默认全部收起(spec §10.1)。
|
|
|
|
|
+ * 收起只影响侧边栏导航,右侧正文仍照常显示当前 activeSection。
|
|
|
|
|
+ */
|
|
|
|
|
+const openedDocGroups = ref<string[]>([]);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 「银联收单」这一组是否露出。
|
|
* 「银联收单」这一组是否露出。
|
|
|
*
|
|
*
|
|
@@ -1422,9 +1468,13 @@ const activeSection = ref("auth");
|
|
|
*/
|
|
*/
|
|
|
const SHOW_COLLECTION_DOC = true;
|
|
const SHOW_COLLECTION_DOC = true;
|
|
|
|
|
|
|
|
-// 两条通道的正文合成一张查找表:正文渲染与卡片标题只认 key,不关心它属于哪一组。
|
|
|
|
|
-// 侧边栏仍按通道分两组渲染(见模板)。
|
|
|
|
|
-const mdSections: Record<string, DocSection> = { ...collectionSections, ...harSections };
|
|
|
|
|
|
|
+// 三条产品线的正文合成一张查找表:正文渲染与卡片标题只认 key,不关心它属于哪一组。
|
|
|
|
|
+// 侧边栏仍按通道/产品分组渲染(见模板)。
|
|
|
|
|
+const mdSections: Record<string, DocSection> = {
|
|
|
|
|
+ ...collectionSections,
|
|
|
|
|
+ ...harSections,
|
|
|
|
|
+ ...unifiedSections,
|
|
|
|
|
+};
|
|
|
const { searchRef, contentRef, handleQueryClick, handleResetClick, refreshList } = useCrudList();
|
|
const { searchRef, contentRef, handleQueryClick, handleResetClick, refreshList } = useCrudList();
|
|
|
const dataFormRef = ref();
|
|
const dataFormRef = ref();
|
|
|
const submitLoading = ref(false);
|
|
const submitLoading = ref(false);
|
|
@@ -1518,7 +1568,7 @@ function toggleExpand(section: string) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function getSectionTitle() {
|
|
function getSectionTitle() {
|
|
|
- // 两条通道的标题都与侧边栏同源(collectionDoc.ts / harDoc.ts),不在这里再抄一份
|
|
|
|
|
|
|
+ // 三条产品线的标题都与侧边栏同源(collectionDoc.ts / harDoc.ts / unifiedDoc.ts),不在这里再抄一份
|
|
|
const md = mdSections[activeSection.value];
|
|
const md = mdSections[activeSection.value];
|
|
|
if (md) return md.title;
|
|
if (md) return md.title;
|
|
|
const titles: Record<string, string> = {
|
|
const titles: Record<string, string> = {
|
|
@@ -1809,6 +1859,26 @@ function downloadApiKeyCsv() {
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/* 侧边栏折叠:只压掉 el-collapse 自带的边框与 header 高度,不动全局 collapse 样式 */
|
|
|
|
|
+.docs-collapse {
|
|
|
|
|
+ border: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.docs-collapse :deep(.el-collapse-item__header) {
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ line-height: 36px;
|
|
|
|
|
+ border-bottom: none;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.docs-collapse :deep(.el-collapse-item__wrap) {
|
|
|
|
|
+ border-bottom: none;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.docs-collapse :deep(.el-collapse-item__content) {
|
|
|
|
|
+ padding-bottom: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.sidebar-section {
|
|
.sidebar-section {
|
|
|
margin-bottom: 24px;
|
|
margin-bottom: 24px;
|
|
|
padding: 0 20px;
|
|
padding: 0 20px;
|