官方api

master
lml 5 months ago
parent f9f15129c1
commit 66a5681ccd

@ -137,3 +137,22 @@
background-color: #00afaf; background-color: #00afaf;
border-radius: 10px; border-radius: 10px;
} }
#code {
max-height: 400px;
overflow-y: hidden;
}
#code:hover {
max-height: 400px;
overflow-y: scroll;
}
#code,.el-table {
scrollbar-width: thin;
scrollbar-color: #00afaf #ecf0f1;
}
#code::-webkit-scrollbar, .el-table::-webkit-scrollbar {
width: 8px;
}
#code::-webkit-scrollbar-thumb, .el-table::-webkit-scrollbar-thumb {
background-color: #00afaf;
border-radius: 10px;
}

@ -1,13 +1,14 @@
<template> <template>
<div> <div>
<div v-if="color==='white'" class="navbarHeight"> <div v-if="color==='white'" class=" navbar-white">
<!-- <video autoplay muted playsinline> <!-- <video autoplay muted playsinline>
<source src="@/assets/video/headBack.mp4" type="video/mp4"> <source src="@/assets/video/headBack.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> --> </video> -->
<!-- START NAVBAR fixed-top --> <!-- START NAVBAR fixed-top -->
<nav class=" navbar navbar-white navbar-expand-lg navbar-custom sticky sticky-dark" id="navbar"> <div class="navbarHeight">
<div class="flx-align" style="width: 100%;"> <nav style="position: relative;" class=" navbar navbar-expand-lg navbar-custom sticky sticky-dark" id="navbar">
<div class="flx-align" style="width: 100%;height: 76px;position: absolute;top: 0;left: 0;">
<!-- LOGO --> <!-- LOGO -->
<div> <div>
<a href="/newsHome"> <a href="/newsHome">
@ -20,33 +21,33 @@
</div> </div>
<div class="collapse navbar-collapse" id="navbarCollapse"> <div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-center" id="mySidenav"> <div class="navbar-nav navbar-center" id="mySidenav">
<li class="nav-item"> <span class="nav-item">
<router-link class="nav-link" to="/newsHome">首页</router-link> <router-link class="nav-link" to="/newsHome">首页</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/business">业务介绍</router-link> <router-link class="nav-link" to="/business">业务介绍</router-link>
</li> </span>
<li class="nav-item"> <span class="nav-item">
<router-link class="nav-link" to="/globalNetwork">智联全球</router-link> <router-link class="nav-link" to="/globalNetwork">智联全球</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/platform">战略合作平台</router-link> <router-link class="nav-link" to="/platform">战略合作平台</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/about">关于我们</router-link> <router-link class="nav-link" to="/about">关于我们</router-link>
</li> </span>
<!-- <li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/developmentDocking">开发对接</router-link> <router-link class="nav-link" to="/developmentDocking">开发对接</router-link>
</li> --> </span>
<!-- Additional links omitted for brevity --> <!-- Additional links omitted for brevity -->
</ul> </div>
<!-- <div class="nav-button "> <!-- <div class="nav-button ">
<ul class="nav navbar-nav navbar-right"> <div class="nav navbar-nav navbar-right">
<li> <span>
<button type="button" class="btn btn-custom navbar-btn btn-rounded">Try it Free</button> <button type="button" class="btn btn-custom navbar-btn btn-rounded">Try it Free</button>
</li> </span>
</ul> </div>
</div> --> </div> -->
</div> </div>
<div class="nav-people" @click="goClient"> <div class="nav-people" @click="goClient">
@ -54,6 +55,7 @@
</div> </div>
</div> </div>
</nav> </nav>
</div>
<!-- <div class="container" style='position:relative'> <!-- <div class="container" style='position:relative'>
<div class="titleImages" v-show="show"></div> <div class="titleImages" v-show="show"></div>
@ -64,8 +66,8 @@
<div v-else-if="color==='black'" class="navbarHeightWhite"> <div v-else-if="color==='black'" class="navbarHeightWhite">
<nav class="navbar nav-white navbar-expand-lg navbar-custom sticky sticky-dark" id="navbar"> <nav style="position: relative;" class="navbar nav-white navbar-expand-lg navbar-custom sticky sticky-dark" id="navbar">
<div class="flx-align" style="width: 100%;"> <div class="flx-align" style="width: 100%;height: 76px;position: absolute;top: 0;left: 0;">
<!-- LOGO --> <!-- LOGO -->
<div> <div>
<a href="/newsHome"> <a href="/newsHome">
@ -78,33 +80,33 @@
</div> </div>
<div class="collapse1 navbar-collapse" id="navbarCollapse1"> <div class="collapse1 navbar-collapse" id="navbarCollapse1">
<ul class="navbar-nav navbar-center" id="mySidenav1"> <div class="navbar-nav navbar-center" id="mySidenav1">
<li class="nav-item"> <span class="nav-item">
<router-link class="nav-link" to="/newsHome">首页</router-link> <router-link class="nav-link" to="/newsHome">首页</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/business">业务介绍</router-link> <router-link class="nav-link" to="/business">业务介绍</router-link>
</li> </span>
<li class="nav-item"> <span class="nav-item">
<router-link class="nav-link" to="/globalNetwork">智联全球</router-link> <router-link class="nav-link" to="/globalNetwork">智联全球</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/platform">战略合作平台</router-link> <router-link class="nav-link" to="/platform">战略合作平台</router-link>
</li> </span>
<li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/about">关于我们</router-link> <router-link class="nav-link" to="/about">关于我们</router-link>
</li> </span>
<!-- <li class="nav-item" > <span class="nav-item" >
<router-link class="nav-link" to="/developmentDocking">开发对接</router-link> <router-link class="nav-link" to="/developmentDocking">开发对接</router-link>
</li> --> </span>
<!-- Additional links omitted for brevity --> <!-- Additional links omitted for brevity -->
</ul> </div>
<!-- <div class="nav-button "> <!-- <div class="nav-button ">
<ul class="nav navbar-nav navbar-right"> <div class="nav navbar-nav navbar-right">
<li> <span>
<button type="button" class="btn btn-custom navbar-btn btn-rounded">Try it Free</button> <button type="button" class="btn btn-custom navbar-btn btn-rounded">Try it Free</button>
</li> </span>
</ul> </div>
</div> --> </div> -->
</div> </div>
<div class="nav-people" @click="goClient"> <div class="nav-people" @click="goClient">

@ -2,8 +2,7 @@
height: 24px; height: 24px;
margin-top: 0px; margin-top: 0px;
padding: 10px 0px !important; padding: 10px 0px !important;
background-color: #fff !important;
box-shadow: 0px 4px 18.3px 0px rgba(222, 222, 222, 0.25);
} }
.nav-people { .nav-people {
width: 150px; width: 150px;
@ -18,12 +17,20 @@
.navbar-custom.navbar-white { .navbar-custom.navbar-white {
background-color: transparent !important; background-color: transparent !important;
} }
.navbar-nav {
display: flex;
min-width: 600px;
justify-content: space-between;
}
.nav-item{
list-style: none;
}
.navbarHeight { .navbarHeight {
position: relative; position: relative;
width: 100%;
height: 700px; height: 700px;
overflow: hidden; overflow: hidden;
background: url('../../../assets/images/home/background.png') no-repeat center/cover; background: url('../../../assets/images/home/background.png') no-repeat center/cover;
padding: 0 50px;
} }
.navbarHeight video { .navbarHeight video {
position: absolute; position: absolute;
@ -38,13 +45,23 @@
} }
.navbarHeightWhite { .navbarHeightWhite {
position: relative; position: relative;
width: 100%; /* width: 100%; */
height: 70px; height: 70px;
padding: 0 50px;
background-color: #fff !important;
box-shadow: 0px 4px 18.3px 0px rgba(222, 222, 222, 0.25);
} }
.navbarHeightWhite .navbar-custom .navbar-nav li a{ .navbarHeightWhite .navbar-custom .navbar-nav li a{
color: #000 ; color: #000 ;
} }
.navbarHeight .nav-link {
color: #fff;
}
.navbarHeightWhite .nav-link {
color: #000;
}
.navbarHeightWhite .navbar-custom .navbar-nav .router-link-active{ .navbarHeightWhite .navbar-custom .navbar-nav .router-link-active{
padding-bottom: 5px;
border-bottom: 2px solid #000; border-bottom: 2px solid #000;
} }

@ -30,8 +30,7 @@ import corporateCulture from "../view/about/components/corporateCulture.vue"
import connection from "../view/about/components/connection.vue" import connection from "../view/about/components/connection.vue"
// 开发对接 // 开发对接
import developmentDocking from "../view/developmentDocking/index.vue" import developmentDocking from "../view/developmentDocking/index.vue"
import mainComponents from '../view/developmentDocking/mainComponents.vue';
Vue.use(VueRouter); Vue.use(VueRouter);
const routes = [ const routes = [
@ -121,9 +120,16 @@ const routes = [
component: inviteJob component: inviteJob
}, },
{ {
path: "/developmentDocking", path: '/developmentDocking',
name: "developmentDocking", name: "developmentDocking",
component: developmentDocking component: developmentDocking,
children: [
{
path: 'main',
name: 'mainComponents',
component: mainComponents
}
]
}, },
{ {
path: "/inviteList", path: "/inviteList",

@ -4,13 +4,114 @@
.version-selector { .version-selector {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
margin-left: 20px;
min-height: 60px;
} }
.version-label {
.version-label {
margin-right: 8px; /* 调整间距 */ margin-right: 8px; /* 调整间距 */
} }
::v-deep .el-input__inner { ::v-deep .el-input__inner {
border: none; border: none;
width: 120px; width: 120px;
} }
.el-main {
padding: 0;
}
.el-aside {
padding: 0;
}
.el-menu-item {
margin:0 6px;
}
::v-deep .el-submenu__title:hover {
background-color: #fff;
}
.el-menu-item.is-active {
border-radius: 6px;
background: #092238;
color: #fff;
}
.el-menu-item:hover {
border-radius: 6px;
background: #F8F8F8;
color: rgba(21, 30, 44, 0.50);
}
.title {
color: #151E2C;
font-family: "PingFang SC";
font-style: normal;
font-weight: 500;
line-height: 46px;
margin-bottom: 24px;
}
.box-main {
width: 100%;
background-color: #f8f8f8;
padding-top: 4px;
}
.main {
margin: 20px;
padding: 36px 40px;
min-height: 500px;
background-color: #fff;
}
.mainTab {
margin-bottom: 54px;
}
.main-title {
font-size: 26px;
margin-top: 54px;
}
.h2-title {
font-size: 20px;
}
.pre-container {
font-size: 100% !important;
}
/* 表格 */
.el-button {
background-color: #00afaf;
}
.el-table {
max-height: 500px;
overflow-y: scroll;
}
.el-table::before {
display: none;
}
::v-deep .el-table .el-table__header th {
background-color: #f8f8f8;
color: #151E2C;
font-family: "PingFang SC";
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 34px; /* 242.857% */
}
.content {
color: #151E2C;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 32px; /* 200% */
margin: 10px 0;
}
.content i {
font-style: normal;
min-width: 120px;
}
.black-content {
width: 100%;
padding: 6px 18px;
border-radius: 4px;
background: #F8F8F8;
}
.span-content {
display: block;
max-height: 30px;
}

@ -1,18 +1,9 @@
<template> <template>
<div class=""> <div class="">
<el-container style=""> <el-container style="background-color: #f8f8f8;">
<el-aside width="300px" style="background-color: #fff;padding: 20px;"> <el-aside width="300px" style="background-color: #fff;margin: 20px 0 20px 20px;">
<!-- <el-input
v-model="searchQuery"
placeholder="搜索"
prefix-icon="el-icon-search"
class="menu-search"
@change="filteredMenuItems"
></el-input> -->
<div class="version-selector"> <div class="version-selector">
<span class="version-label">Version:</span> <span class="version-label">版本:</span>
<el-select v-model="selectedVersion" placeholder=""> <el-select v-model="selectedVersion" placeholder="">
<el-option <el-option
v-for="item in versions" v-for="item in versions"
@ -22,80 +13,51 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<!-- <el-select v-model="selectedVersion" placeholder="Select version" id="version-select"> <div >
<el-option
v-for="item in versions"
:key="item.value"
:label="item.label"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #f44336;" v-if="item.tag">{{ item.tag }}</span>
</el-option>
</el-select> -->
<el-menu <el-menu
:default-openeds="propList" :default-openeds="propList"
class="el-menu-vertical-demo" class="el-menu-vertical-demo"
style="padding: 0;"
:unique-opened="true" :unique-opened="true"
@select="handleSelect" @select="handleSelect"
@open="handleOpen" @open="handleOpen"
v-if="menuItems['3.9']"
@close="handleClose"> @close="handleClose">
<el-submenu v-for="(item,index) in menuItems[selectedVersion]" :key="index" :index="`${index+1}`" > <el-submenu v-for="(item, index) in menuItems[selectedVersion]" :key="index" :index="`${index+1}`">
<template slot="title"> <template slot="title">
<span>{{Object.keys(item)[0]}}</span> <span>{{Object.keys(item)[0]}}</span>
</template> </template>
<el-menu-item-group v-for="(itemGroup, groupIndex) in item[Object.keys(item)[0]]" :key="groupIndex"> <el-menu-item-group v-for="(itemGroup, groupIndex) in item[Object.keys(item)[0]]" :key="groupIndex">
<el-menu-item :index="`${index + 1}-${groupIndex}`">{{ itemGroup.title }}</el-menu-item> <el-menu-item :index="`${index + 1}-${groupIndex}`">{{ itemGroup.title }}</el-menu-item>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
</el-menu> </el-menu>
</div>
</el-aside> </el-aside>
<el-main> <el-main>
<mainComponents></mainComponents> <router-view></router-view>
<!-- More content -->
</el-main> </el-main>
</el-container> </el-container>
</div> </div>
</template> </template>
<script>
import mainComponents from './mainComponents.vue'
/** <script>
* Index-1 component import { useRouter } from 'vue-router';
*/
export default { export default {
name:"developmentDocking", name: "developmentDocking",
components: { data() {
mainComponents
},
onMounted(){
console.log('onMounted');
window.onload = function() {
var pre = document.getElementById('code');
var lines = pre.innerText.split('\n'); //
pre.innerHTML = lines.map(line => `<span>${line}</span>`).join('\n'); // <span>
};
},
created(){
console.log('created',this.menuItems['3.9']);
},
data(){
return { return {
searchQuery:"", searchQuery: "",
selectedVersion: '3.9', selectedVersion: '1.0',
versions: [ versions: [
{ value: 'next', label: 'Next', tag: '' }, // { value: 'next', label: 'Next', tag: '' },
{ value: '3.9', label: '3.9', tag: 'LATEST' }, // { value: '3.9', label: '3.9', tag: 'LATEST' },
{ value: '3.8', label: '3.8', tag: '' }, // { value: '3.8', label: '3.8', tag: '' },
{ value: '3.7', label: '3.7', tag: '' }, // { value: '3.7', label: '3.7', tag: '' },
{ value: '3.6', label: '3.6', tag: '' }, // { value: '3.6', label: '3.6', tag: '' },
{ value: '3.5', label: '3.5', tag: '' }, // { value: '3.5', label: '3.5', tag: '' },
{ value: '3.4', label: '3.4', tag: '' } { value: '1.0', label: '1.0', tag: '' }
], ],
propList:[],
code: `{ code: `{
"shipment": { "shipment": {
"service": "B2B", "service": "B2B",
@ -108,46 +70,78 @@
} }
}`, }`,
menuItems: { menuItems: {
"3.9": [ "1.0": [
{ {
"asa":[ "订单模块": [
{ title: '概览', index: '1' }, { title: '下单接口', index: '1' },
{ title: '系统状态', index: '2' }, // { title: '', index: '2' },
{ title: '配置选项', index: '3' }, // { title: '', index: '3' },
{ title: '用户管理', index: '4' }, // { title: '', index: '4' },
{ title: '日志', index: '5' } // { title: '', index: '5' }
] ]
}, },
{ // {
"hhh":[ // "hhh": [
{ title: '来玩呀', index: '1' }, // { title: '', index: '1' },
{ title: '系统状态', index: '2' }, // { title: '', index: '2' },
{ title: '配置选项', index: '3' }, // { title: '', index: '3' },
{ title: '用户管理', index: '4' }, // { title: '', index: '4' },
{ title: '日志', index: '5' } // { title: '', index: '5' }
] // ]
// },
}, // {
{ // "": [
"小妹妹":[ // { title: '', index: '1' },
{ title: '嘿嘿嘿', index: '1' }, // { title: '', index: '2' },
{ title: '系统状态', index: '2' }, // { title: '', index: '3' },
{ title: '配置选项', index: '3' }, // { title: '', index: '4' },
{ title: '用户管理', index: '4' }, // { title: '', index: '5' }
{ title: '日志', index: '5' } // ]
] // }
],
} // "3.5": [
] // {
} // "asa": [
// { title: '', index: '1' },
// { title: '', index: '2' },
// { title: '', index: '3' },
// { title: '', index: '4' },
// { title: '', index: '5' }
// ]
// },
// {
// "hhh": [
// { title: '', index: '1' },
// { title: '', index: '2' },
// { title: '', index: '3' },
// { title: '', index: '4' },
// { title: '', index: '5' }
// ]
// },
// {
// "": [
// { title: '', index: '1' },
// { title: '', index: '2' },
// { title: '', index: '3' },
// { title: '', index: '4' },
// { title: '', index: '5' }
// ]
// }
// ]
} }
};
},
mounted() {
this.$router.push({ name: 'mainComponents', query: { api: '1-0' } });
}, },
computed: { computed: {
codeLines() { codeLines() {
// //
return this.code.split('\n'); return this.code.split('\n');
}, },
propList() {
return this.menuItems[this.selectedVersion].map((_, index) => `${index + 1}`);
}
}, },
methods: { methods: {
handleOpen(key, keyPath) { handleOpen(key, keyPath) {
@ -157,42 +151,28 @@
// console.log(key, keyPath); // console.log(key, keyPath);
}, },
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.log(key, keyPath,'select'); console.log(key, keyPath, 'select');
this.totalIndex = keyPath[0]; this.totalIndex = keyPath[0];
const section = document.getElementById(`section${key}`); this.$router.push({ name: 'mainComponents', query: { api: key } });
if (section) {
section.scrollIntoView({ behavior: 'smooth' });
}
}, },
filteredMenuItems(val) { filteredMenuItems(val) {
// console.log(val) this.propList = [];
this.propList = []
if (val === "") { if (val === "") {
return this.menuItems; // return this.menuItems; //
} }
const searchLower = `${val}`; const searchLower = `${val}`;
// console.log(searchLower,'searchLower')
const append = this.menuItems.map((item, index) => { const append = this.menuItems.map((item, index) => {
const key = Object.keys(this.menuItems[index])[0]; const key = Object.keys(this.menuItems[index])[0];
const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase()); const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase());
if (eleIndex !== -1) { if (eleIndex !== -1) {
return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] }; return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] };
} }
// console.log('')
//
}); });
const appendData = append.filter(x => x !== undefined);
// console.log(append.filter(x => x !== undefined), 'append'); const index = `${appendData[0].groupIndex + 1}`;
const appendData = append.filter(x => x !== undefined) this.propList.push(index);
// console.log(appendData,'appendData')
const index = `${appendData[0].groupIndex+1}`
// console.log(index,'index')
this.propList.push(index)
} }
} }
}; };
</script> </script>
<style src="./index.css" scoped></style> <style src="./index.css" scoped></style>

@ -1,200 +1,816 @@
<template> <template>
<div class=""> <div class="box-main">
<div id="section1-1" class="content-section">内容一</div> <div class="main">
<h1>调用指南</h1> <div v-for="(item, index) in apiData" :key="index" class="mainTab">
<div class="pre-container"> <div class="title main-title" style="margin-top: 0;">{{ item.mainTitle }}</div>
<div class="title h2-title">{{ item.h2Title }}</div>
<div class="pre-container" style="position: relative;">
<pre id="code" style="background-color: #f2f2f2;"> <pre id="code" style="background-color: #f2f2f2;">
<span v-for="(line, index) in codeLines" :key="index"> <span v-for="(line, idx) in item.codeLines" :key="idx" class="span-content">
{{ index + 1 }} {{ line }}<br> {{ idx + 1 }} {{ line }}<br>
</span> </span>
</pre> </pre>
<el-button @click="copyToClipboard(item.codeLines)" class="copy-button" type="primary" size="mini" style="position: absolute; top: 10px; right: 40px;">复制</el-button>
</div>
<div class="content">
{{ item.description }}
</div>
<div v-for="(it,int) in item.apiDesc" :key="int">
<div class="title main-title">{{ it.h2Title }}</div>
<div class="title h2-title" style="margin-top: 30px;">2-1 请求报文示例</div>
<div class="content flx"><i>接口地址</i>
<div class="black-content" style="flex: 1;"> {{ it.requestUrl }}</div>
</div>
<div class="content flx" v-if="it.description !==''"><i>接口描述</i>
<div class="black-content" style="flex: 1;">{{ it.description }}</div>
</div> </div>
<h2>1-1 HTTP请求头信息</h2> <div class="content flx" v-if="it.type !==''"><i>请求数据类型</i>
<p>Authorization: Bearer ACCESS_TOKEN</p> <div class="black-content" style="flex: 1;">{{ it.type }}</div>
<p>Content-Type: application/json</p> </div>
<p>Accept: application/json</p> <div class="title h2-title" >2-2 请求字段解析</div>
<p>Accept-Language: zh-CN</p> <div class="pre-container " style="position: relative;">
<h1>调用指南</h1> <pre id="code" style="background-color: #f2f2f2;">
<h2>1-1 HTTP请求头信息</h2> <span v-for="(line, idx) in it.codeLines" :key="idx" class="span-content">
<p>Authorization: Bearer ACCESS_TOKEN</p> {{ idx + 1 }} {{ line }}<br>
<p>Content-Type: application/json</p> </span>
<p>Accept: application/json</p> </pre>
<p>Accept-Language: zh-CN</p> <el-button @click="copyToClipboard(it.codeLines)" class="copy-button" type="primary" size="mini" style="position: absolute; top: 10px; right: 40px;">复制</el-button>
<h1>调用指南</h1> </div>
<h2>1-1 HTTP请求头信息</h2> <div class="title h2-title">2-3 请求参数说明</div>
<p>Authorization: Bearer ACCESS_TOKEN</p> <el-table :data="it.tableData" style="width: 100%" row-key="id"
<p>Content-Type: application/json</p> border
<p>Accept: application/json</p> default-expand-all
<p>Accept-Language: zh-CN</p> :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<h1>调用指南</h1> <el-table-column prop="field" width="300" label="参数名称" show-overflow-tooltip />
<h2>1-1 HTTP请求头信息</h2> <el-table-column prop="fieldName" label="参数说明" show-overflow-tooltip />
<p>Authorization: Bearer ACCESS_TOKEN</p> <el-table-column prop="required" label="是否必填" show-overflow-tooltip />
<p>Content-Type: application/json</p> <el-table-column prop="dataType" label="数据类型" show-overflow-tooltip />
<p>Accept: application/json</p> <el-table-column prop="example" label="示例值" show-overflow-tooltip />
<p>Accept-Language: zh-CN</p> <el-table-column prop="description" label="描述" width="300" show-overflow-tooltip />
<h1>调用指南</h1> </el-table>
<h2>1-1 HTTP请求头信息</h2> <div class="title h2-title" style="margin-top: 30px;">2-4 返回示例</div>
<p>Authorization: Bearer ACCESS_TOKEN</p> <div class="pre-container" style="position: relative;">
<p>Content-Type: application/json</p> <pre id="code" style="background-color: #f2f2f2;">
<p>Accept: application/json</p> <span v-for="(line, idx) in it.codeLines1" :key="idx" class="span-content">
<p>Accept-Language: zh-CN</p> {{ idx + 1 }} {{ line }}<br>
<div id="section1-2" class="content-section">内容二</div> </span>
<h1>调用指南</h1> </pre>
<h2>1-1 HTTP请求头信息</h2> <el-button @click="copyToClipboard(it.codeLines1)" class="copy-button" type="primary" size="mini" style="position: absolute; top: 10px; right: 40px;">复制</el-button>
<p>Authorization: Bearer ACCESS_TOKEN</p> </div>
<p>Content-Type: application/json</p> <div v-if="it.codeLines2 !==''">
<p>Accept: application/json</p> <div class="title h2-title" style="margin-top: 30px;">2-5 返回参数说明</div>
<p>Accept-Language: zh-CN</p> <div class="pre-container" style="position: relative;">
<h1>调用指南</h1> <pre id="code" style="background-color: #f2f2f2;">
<h2>1-1 HTTP请求头信息</h2> <span v-for="(line, idx) in it.codeLines2" :key="idx" class="span-content">
<p>Authorization: Bearer ACCESS_TOKEN</p> {{ idx + 1 }} {{ line }}<br>
<p>Content-Type: application/json</p> </span>
<p>Accept: application/json</p> </pre>
<p>Accept-Language: zh-CN</p> <el-button @click="copyToClipboard(it.codeLines2)" class="copy-button" type="primary" size="mini" style="position: absolute; top: 10px; right: 40px;">复制</el-button>
<h1>调用指南</h1> </div>
<h2>1-1 HTTP请求头信息</h2> </div>
<p>Authorization: Bearer ACCESS_TOKEN</p> </div>
<p>Content-Type: application/json</p>
<p>Accept: application/json</p> </div>
<p>Accept-Language: zh-CN</p>
<h1>调用指南</h1>
<h2>1-1 HTTP请求头信息</h2>
<p>Authorization: Bearer ACCESS_TOKEN</p>
<p>Content-Type: application/json</p>
<p>Accept: application/json</p>
<p>Accept-Language: zh-CN</p>
<div id="section1-3" class="content-section">内容三</div>
<h1>调用指南</h1>
<h2>1-1 HTTP请求头信息</h2>
<p>Authorization: Bearer ACCESS_TOKEN</p>
<p>Content-Type: application/json</p>
<p>Accept: application/json</p>
<p>Accept-Language: zh-CN</p>
<!-- More content -->
</div> </div>
</template>
<script>
</div>
</template>
/** <script>
* Index-1 component export default {
*/ name: "mainComponents",
export default { data() {
name:"developmentDocking", return {
components: { searchQuery: "",
}, totalIndex: 1,
onMounted(){ propList: [],
console.log('onMounted'); apiData: []
window.onload = function() {
var pre = document.getElementById('code');
var lines = pre.innerText.split('\n'); //
pre.innerHTML = lines.map(line => `<span>${line}</span>`).join('\n'); // <span>
}; };
}, },
created(){ computed: {
codeLines() {
return this.code.split('\n');
},
},
methods: {
fetchData(api) {
// API
const allData = [
{
api:'1-0',
mainTitle: '账号验证',
h2Title1: '1-1 HTTP请求头格式',
description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。',
codeLines: ` Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
Accept: application/json
Accept-Language: zh-CN`.split('\n'),
apiDesc:[
{
h2Title: '创建订单',
requestUrl: '[POST] /v1/order/aafOrder/regularOrder',
type:"application/json",
description:"",
codeLines: ` {
"transportMode": "AIR",
"countryCode": "GB",
"channelId": "06f73b6cfc914fb1adb80292ca280416",
"custOrderNo": "2406290002",
"isPurchaseInsurance": "0",
"insuranceType": null,
"insuranceCurrency": null,
"insuranceAmount": null,
"isSpecifyDelivery": null,
"deliveryCompanyId": null,
"forecastNumber": 1,
"forecastWeight": 100,
"forecastVolume": 1,
"isArrangeInspection": null,
"declareType": "3",
"taxRefundInfo": null,
"taxRefundRemark": "1",
"taxType": "1",
"orderRemark": null,
"receiveType": "1",
"takeType": "1",
"goodsAttrTypeList": [
"1",
"2"
],
"goodsAttrObj": {
"batteryType": "1",
"documents": "https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/鉴定文件.zip",
"power": "123",
"watts": "123"
},
"orderGoodsList": [
{
"boxNo": "FBAABCD1234U000001",
"referenceId": null,
"boxWeight": 100,
"length": 100,
"width": 100,
"height": 100,
"skuEnglishName": "Bluetooth Earphones",
"skuName": "蓝牙耳机",
"declarePrice": 2.7,
"number": 100,
"exportHscode": "123",
"clearanceHscode": "123",
"brand": "无",
"brandType": "1",
"model": "ABC",
"material": "塑料",
"purpose": "手机配件",
"saleUrl": "https://www.amazon.co.gb/dp/ABCD1234",
"salesPrice": null,
"picUrl": null,
"productWeight": null,
"purchasePrice": 2.7,
"asin": null,
"sku": null,
"isElectric": "0",
"isMagnetic": "0",
"isLiquid": null,
"isPowder": null,
"isHazardous": null,
"isWooden": null,
"declareType": "1"
}
],
"orderReceive": {
"fbaWarehouseCode": "ORF2",
"tpWarehouseCode": null,
"inBoundCode": null,
"state": null,
"city": null,
"receivePostcode": null,
"address": null,
"receiveName": null,
"receivePhone": null,
"receiveLandline": null,
"email": null,
"companyName": null
}, },
data(){ "orderTake": {
return { "warehouseId": "00c8070b70a1475d90a4724331b85w44",
searchQuery:"", "province": null,
totalIndex:1, "city": null,
propList:[], "district": null,
code: `{ "address": null,
"shipment": { "contact": null,
"service": "B2B", "phone": null,
"store_id": "", "takeTime": null
"client_reference": "", }
"parcel_count": 2, }`.split('\n'),
"export_scc": 0, codeLines1: ` {
"import_scc": 0, "success": true,
"attrs": [] "reTry": false,
} "message": "下单成功您的订单是AABB2407010041",
}`, "code": 200,
menuItems: [ "data": "8175052ed64143f093c401feb91346ec",
{ "timestamp": 1719836214170
"asa":[ }`.split('\n'),
{ title: '概览', index: '1' }, codeLines2: ` success:请求成功标志true仅代表请求成功不代表通过
{ title: '系统状态', index: '2' }, message请求描述
{ title: '配置选项', index: '3' }, dode:200则代表请求通过完成下单500则代表校验未通过
{ title: '用户管理', index: '4' }, data:订单id请求成功会返回订单的id`.split('\n'),
{ title: '日志', index: '5' } tableData:[
{ id: 'transportMode', field: 'transportMode', fieldName: '运输方式', required: '是', dataType: 'string', example: 'AIR', description: '海运-OCEAN, 空运-AIR, 铁路-RAIL, 卡航-ROAD' },
{ id: 'countryCode', field: 'countryCode', fieldName: '国家编码', required: '是', dataType: 'string', example: 'GB', description: '国家二字码' },
{ id: 'channelId', field: 'channelId', fieldName: '渠道id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '通过渠道信息接口获取' },
{ id: 'custOrderNo', field: 'custOrderNo', fieldName: '客户订单号', required: '否', dataType: 'string', example: 'GZGM2406171807', description: '客户订单号' },
{ id: 'isPurchaseInsurance', field: 'isPurchaseInsurance', fieldName: '是否购买保险', required: '是', dataType: 'string', example: '1', description: '0:否 1:是' },
{ id: 'insuranceType', field: 'insuranceType', fieldName: '投保类型', required: '否', dataType: 'string', example: '1', description: '1-上架险2-签收险' },
{ id: 'insuranceCurrency', field: 'insuranceCurrency', fieldName: '保险币种', required: '否', dataType: 'string', example: 'CNY', description: '币种' },
{ id: 'insuranceAmount', field: 'insuranceAmount', fieldName: '购买保险金额', required: '否', dataType: 'string', example: '500.00', description: '金额' },
{ id: 'isSpecifyDelivery', field: 'isSpecifyDelivery', fieldName: '是否指定末端快递', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' },
{ id: 'deliveryCompanyId', field: 'deliveryCompanyId', fieldName: '快递公司id', required: '否', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '根据快递公司信息接口获取' },
{ id: 'forecastNumber', field: 'forecastNumber', fieldName: '预报件数', required: '是', dataType: 'integer(int32)', example: '10', description: '订单箱数' },
{ id: 'forecastWeight', field: 'forecastWeight', fieldName: '预报重量', required: '是', dataType: 'number', example: '50.00', description: '重量(KG)' },
{ id: 'forecastVolume', field: 'forecastVolume', fieldName: '预报体积', required: '是', dataType: 'number', example: '1.00', description: '体积(M³)' },
{ id: 'isArrangeInspection', field: 'isArrangeInspection', fieldName: '是否安排商检', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' },
{ id: 'declareType', field: 'declareType', fieldName: '报关方式', required: '是', dataType: 'string', example: '1', description: '1:买单报关 2:退税报关 3:买单+退税' },
{ id: 'taxRefundInfo', field: 'taxRefundInfo', fieldName: '退税资料url', required: '否', dataType: 'string', example: 'https://public-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/退税资料.zip', description: '文件下载地址' },
{ id: 'taxRefundRemark', field: 'taxRefundRemark', fieldName: '退税资料说明', required: '是', dataType: 'string', example: '1', description: '1-一对多(单订单多份资料), 2-一对一(单订单一份资料), 3-多对多(合并报关,多份资料), 4-多对一(合并报关,一份资料);报关方式为买单+退税则必填' },
{ id: 'taxType', field: 'taxType', fieldName: '交税方式', required: '是', dataType: 'string', example: '1', description: '1-不包税2-包税3-自主税号4-自税递延' },
{ id: 'receiveType', field: 'receiveType', fieldName: '收件地址类型', required: '是', dataType: 'string', example: '1', description: '1:FBA地址 2第三方海外仓 3商业地址 4:住宅地址' },
{ id: 'takeType', field: 'takeType', fieldName: '交货方式', required: '是', dataType: 'string', example: '1', description: '1:送货到仓 2:上门提货' },
{ id: 'orderRemark', field: 'orderRemark', fieldName: '客户订单备注', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'goodsAttrTypeList', field: 'goodsAttrTypeList', fieldName: '产品属性列表', required: '是', dataType: 'array', example: '["1","2"]', description: '1-普货 2-带电 3-带磁 4-液体 5-粉末 6-危险品 7-木制品' },
{ id: 'goodsAttrObj', field: 'goodsAttrObj', fieldName: '电池信息', required: '是', dataType: 'object', example: '{}', description: '如果产品属性列表带电,需要填写电池信息',children:[
{ id: 'batteryType', field: 'batteryType', fieldName: '电池类型', required: '是', dataType: 'string', example: '1', description: '1:干电池 2:纽扣电池 3:锂电池 4:镍氢电池' },
{ id: 'documents', field: 'documents', fieldName: '鉴定文件', required: '否', dataType: 'string', example: '', description: '文件下载地址' },
{ id: 'power', field: 'power', fieldName: '功率', required: '是', dataType: 'string', example: '100', description: '电池锂电池、镍氢电池必填' },
{ id: 'watts', field: 'watts', fieldName: '瓦数', required: '是', dataType: 'string', example: '100', description: '电池类型为锂电池、镍氢电池必填' },
] ]
},
{ id: 'orderGoodsList', field: 'orderGoodsList', fieldName: '货物/产品明细', required: '是', dataType: 'array', example: '{}', description: '订单产品信息列表',children:[
{ id: 'boxNo', field: 'boxNo', fieldName: '货箱编号', required: '是', dataType: 'string', example: 'FBAABCD1234U000001', description: '货箱编号如果收件地址类型是FBA需要通过正则校验^FBA[A-Z0-9]+U[0-9]{6}$' },
{ id: 'referenceId', field: 'referenceId', fieldName: 'PO Number', required: '否', dataType: 'string', example: '', description: '亚马逊后台的货件追踪编号' },
{ id: 'boxWeight', field: 'boxWeight', fieldName: '单箱货箱重量(KG)', required: '是', dataType: 'number', example: '10', description: '' },
{ id: 'length', field: 'length', fieldName: '货箱长度(CM)', required: '是', dataType: 'number', example: '100', description: '' },
{ id: 'width', field: 'width', fieldName: '货箱宽度(CM)', required: '是', dataType: 'number', example: '100', description: '' },
{ id: 'height', field: 'height', fieldName: '货箱高度(CM)', required: '是', dataType: 'number', example: '100', description: '' },
{ id: 'skuEnglishName', field: 'skuEnglishName', fieldName: '产品英文品名', required: '是', dataType: 'string', example: 'Bluetooth Earphones', description: '' },
{ id: 'skuName', field: 'skuName', fieldName: '产品中文品名', required: '是', dataType: 'string', example: '蓝牙耳机', description: '' },
{ id: 'declarePrice', field: 'declarePrice', fieldName: '(单个产品)申报单价', required: '是', dataType: 'number', example: '2.7', description: '' },
{ id: 'number', field: 'number', fieldName: '(单箱)申报数量', required: '是', dataType: 'integer', example: '100', description: '' },
{ id: 'exportHscode', field: 'exportHscode', fieldName: '产品海关编码(出口)', required: '是', dataType: 'string', example: '', description: '' },
{ id: 'clearanceHscode', field: 'clearanceHscode', fieldName: '产品海关编码(清关)', required: '是', dataType: 'string', example: '', description: '' },
{ id: 'brand', field: 'brand', fieldName: '产品品牌/商标', required: '是', dataType: 'string', example: '无', description: '' },
{ id: 'brandType', field: 'brandType', fieldName: '品牌类型', required: '是', dataType: 'string', example: '1', description: '1无品牌 2境内自主品牌 3境内收购品牌 4境外品牌贴牌生产 5境外品牌其他' },
{ id: 'model', field: 'model', fieldName: '产品型号', required: '是', dataType: 'string', example: 'ABC', description: '' },
{ id: 'material', field: 'material', fieldName: '产品属性,材质', required: '是', dataType: 'string', example: '塑料', description: '' },
{ id: 'purpose', field: 'purpose', fieldName: '产品用途', required: '是', dataType: 'string', example: '手机配件', description: '' },
{ id: 'saleUrl', field: 'saleUrl', fieldName: '产品销售链接', required: '是', dataType: 'string', example: 'https://www.amazon.co.gb/dp/ABCD1234', description: '' },
{ id: 'salesPrice', field: 'salesPrice', fieldName: '产品销售价格', required: '否', dataType: 'number', example: '', description: '' },
{ id: 'picUrl', field: 'picUrl', fieldName: '产品图片链接', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'productWeight', field: 'productWeight', fieldName: '(单个产品)产品重量(kg)', required: '否', dataType: 'number', example: '', description: '' },
{ id: 'purchasePrice', field: 'purchasePrice', fieldName: '产品采购单价', required: '是', dataType: 'number', example: '2.7', description: '' },
{ id: 'asin', field: 'asin', fieldName: '产品ASIN', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'sku', field: 'sku', fieldName: '客户产品SKU', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'isElectric', field: 'isElectric', fieldName: '是否带电', required: '是', dataType: 'string', example: '1', description: '' },
{ id: 'isMagnetic', field: 'isMagnetic', fieldName: '是否带磁', required: '是', dataType: 'string', example: '0', description: '' },
{ id: 'isLiquid', field: 'isLiquid', fieldName: '是否液体', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'isPowder', field: 'isPowder', fieldName: '是否粉末', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'isHazardous', field: 'isHazardous', fieldName: '是否危险品', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'isWooden', field: 'isWooden', fieldName: '是否木制品', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'declareType', field: 'declareType', fieldName: '出口报关类型', required: '否', dataType: 'string', example: '', description: '1:买单报关 2:退税报关' },
]
},
{ id: 'orderReceive', field: 'orderReceive', fieldName: '收件地址类型详情', required: '是', dataType: '订单收件信息', example: '{}', description: '订单收件信息',children:[
{ id: 'fbaWarehouseCode', field: 'fbaWarehouseCode', fieldName: 'FBA仓库编号', required: '是', dataType: 'string', example: 'ORF2', description: '收件地址类型是FBA则必填' },
{ id: 'tpWarehouseCode', field: 'tpWarehouseCode', fieldName: '第三方海外仓id', required: '是', dataType: 'string', example: '', description: '收件地址类型是第三方海外仓,则必填' },
{ id: 'inBoundCode', field: 'inBoundCode', fieldName: '第三方海外仓的入仓代码', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'state', field: 'state', fieldName: '省/州地区', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'city', field: 'city', fieldName: '城市', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'receivePostcode', field: 'receivePostcode', fieldName: '收件人邮编', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'address', field: 'address', fieldName: '详细地址', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'receiveName', field: 'receiveName', fieldName: '收件人', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'receivePhone', field: 'receivePhone', fieldName: '收件人电话', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'receiveLandline', field: 'receiveLandline', fieldName: '收件人座机号', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'email', field: 'email', fieldName: '邮箱', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' },
{ id: 'companyName', field: 'companyName', fieldName: '商业地址的公司名称', required: '是', dataType: 'string', example: '', description: '商业地址必填' },
]
},
{ id: 'orderTake', field: 'orderTake', fieldName: '提货信息', required: '是', dataType: '提货信息', example: '{}', description: '提货信息' ,children:[
{ id: 'warehouseId', field: 'warehouseId', fieldName: '交货仓库Id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' },
{ id: 'warehouseName', field: 'warehouseName', fieldName: '交货仓库名称', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' },
{ id: 'province', field: 'province', fieldName: '省/州/自治区', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'city', field: 'city', fieldName: '市', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'district', field: 'district', fieldName: '区/县', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'address', field: 'address', fieldName: '详细地址', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'contact', field: 'contact', fieldName: '提货联系人', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'phone', field: 'phone', fieldName: '提货联系电话', required: '否', dataType: 'string', example: '', description: '' },
{ id: 'takeTime', field: 'takeTime', fieldName: '交货时间', required: '否', dataType: 'string', example: '', description: '' }
]
},
]
}, },
{ {
"hhh":[ h2Title: '取消订单',
{ title: '来玩呀', index: '1' }, requestUrl: '[POST] /v1/order/aafOrder/cancelOrderById',
{ title: '系统状态', index: '2' }, type:"application/json",
{ title: '配置选项', index: '3' }, description:"id:下单时返回的订单id",
{ title: '用户管理', index: '4' }, codeLines: `
{ title: '日志', index: '5' } {
] "id" : "e9569b7d755c4eeea069740f997b4c05"
}`.split('\n'),
codeLines1: `
{
"success": true,
"reTry": false,
"message": "操作成功",
"code": 200,
"data": "订单取消成功",
"timestamp": 1719836871024
}`.split('\n'),
codeLines2: '',
tableData:[
{
id: 'id', field: 'id', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' },
]
},
{
h2Title: '根据订单id获取订单详情',
requestUrl: '[GET] /v1/order/aafOrder/querySupplementOrderById',
type:"",
description:"orderId:下单时返回的订单id",
codeLines: `
/v1/order/aafOrder/querySupplementOrderById?orderId=e9569b7d755c4eeea069740f997b4c05`.split('\n'),
codeLines1: `
{
"success": true,
"reTry": false,
"message": "操作成功",
"code": 200,
"data": {
"transportMode": "AIR",
"cabinetType": "1",
"countryCode": "GB",
"orderType": null,
"countryName": "英国",
"channelId": "06f73b6cfc914fb1adb80292ca280416",
"channelName": "英国空派Send-UK-F-不递延",
"cabinetSize": null,
"custOrderNo": "2406290003",
"isUseCustOrderNo": null,
"shipmentId": "FBAABCD1234",
"goodsAttrList": [
{
"id": "7ff7e778112148d38fa8f236a8fd4dd0",
"materialType": "2",
"materialTypeStr": "带电",
"batteryType": "1",
"batteryTypeStr": "干电池",
"power": "123",
"watts": "123",
"documents": "https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/鉴定文件.zip",
"documentsStr": "鉴定文件.zip"
},
{
"id": "d8394d0c13ff4ff891534694bbe1a572",
"materialType": "1",
"materialTypeStr": "普货",
"batteryType": null,
"batteryTypeStr": null,
"power": null,
"watts": null,
"documents": null,
"documentsStr": null
}
],
"goodsAttrTypeList": [
"2",
"1"
],
"forecastNumber": 1,
"declareType": "3",
"receiveType": "1",
"orderReceive": {
"id": "4b3eea4d93a645e3adba35eabf28d82b",
"orderId": "c20c09dafc6d400791e0b91bc1b49d1e",
"orderNo": "aaGM2407010042",
"warehouseCode": "ORF2",
"shipmentType": "1",
"fbaWarehouseCode": "ORF2",
"fbaWarehouseName": null,
"tpWarehouseCode": null,
"tpWarehouseName": null,
"receiveCountryName": null,
"receivePostcode": null,
"state": "VA",
"city": "CHESAPEAKE",
"address": "5045 PORTSMOUTH BLVD",
"receiveAddress": "VA-CHESAPEAKE-5045 PORTSMOUTH BLVD",
"receiveName": null,
"receivePhone": null,
"receiveLandline": null,
"email": null,
"inBoundCode": null,
"companyName": null,
"isDel": "0",
"createTime": "2024-07-01 20:27:13",
"createBy": "admin null",
"updateTime": null,
"updateBy": null
},
"takeType": "1",
"orderTake": {
"id": "b6727d5bf3e740cfb4879e48e695cd16",
"orderId": "c20c09dafc6d400791e0b91bc1b49d1e",
"orderNo": "aaGM2407010042",
"type": "1",
"contact": null,
"phone": null,
"takeTime": null,
"province": null,
"city": null,
"district": null,
"address": null,
"takeAddress": null,
"warehouseId": "00c8070b70a1475d90a4724331b85w44",
"warehouseName": "深圳市美通一号仓",
"remark": null,
"createTime": "2024-07-01 20:27:12",
"createBy": "admin null",
"updateTime": null,
"updateBy": null
}, },
"orderRemark": null,
"docRemark": null,
"orderId": "c20c09dafc6d400791e0b91bc1b49d1e",
"orderDetailId": "903007bf123d492abcfca1adfc09ca89",
"orderNo": "aaGM2407010042",
"importType": "页面录入",
"isPurchaseInsurance": "0",
"insuranceType": null,
"insuranceCurrency": null,
"insuranceAmount": null,
"isSpecifyDelivery": null,
"deliveryCompanyId": null,
"deliveryCompanyStr": null,
"forecastWeight": 100.000,
"forecastVolume": 1.000,
"isArrangeInspection": null,
"goodsAttrObj": {
"batteryType": "1",
"batteryTypeStr": "干电池",
"power": "123",
"watts": "123",
"documents": "https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/鉴定文件.zip",
"documentsStr": "鉴定文件.zip",
"batteryFileList": null
},
"orderGoodsList": [
{
"id": "7eb1b9b4cf5b4fa8b989eff6b28c8d77",
"orderId": "c20c09dafc6d400791e0b91bc1b49d1e",
"orderNo": "aaGM2407010042",
"boxNo": "FBAABCD1234U000002",
"shipmentId": "FBAABCD1234",
"referenceId": null,
"boxWeight": 100.000,
"length": 100.000,
"width": 100.000,
"height": 100.000,
"skuEnglishName": "Bluetooth Earphones",
"skuName": "蓝牙耳机",
"declarePrice": 2.700,
"number": 100,
"exportHscode": "123",
"clearanceHscode": "123",
"brand": "无",
"brandType": "1",
"brandTypeStr": "无品牌",
"model": "ABC",
"material": "塑料",
"purpose": "手机配件",
"saleUrl": "https://www.amazon.co.gb/dp/ABCD1234",
"salesPrice": 0.000,
"picUrl": null,
"productWeight": 0.000,
"purchasePrice": 2.700,
"asin": null,
"sku": null,
"isElectric": "0",
"isElectricStr": "否",
"isMagnetic": "0",
"isMagneticStr": "否",
"isLiquid": null,
"isLiquidStr": null,
"isPowder": null,
"isPowderStr": null,
"isHazardous": null,
"isHazardousStr": null,
"isWooden": null,
"isWoodenStr": null,
"declareType": "1",
"declareTypeStr": "买单报关",
"description": null,
"productId": null,
"country": null,
"addtionalCode": null,
"specialCode": null,
"specialRate": null,
"preTariff": null,
"taxRate": null,
"unit": null,
"costPrice": null,
"totalPrice": null,
"grossWeight": null,
"netWeight": null,
"volume": null,
"materialRate": null,
"maker": null,
"makerAddress": null,
"remark": null,
"mixed": null,
"sort": null,
"size": null,
"isVat": null,
"invoiceCode": null,
"declareTotalPrice": null,
"declareNetWeight": null,
"isDel": "0",
"createTime": "2024-07-01T12:27:13.000+00:00",
"createBy": "admin null",
"updateTime": null,
"updateBy": null
}
],
"taxRefundInfo": null,
"taxRefundInfoStr": null,
"taxRefundFileList": null,
"taxRefundRemark": "1",
"taxType": "1",
"taxTypeStr": "不包税",
"vatNo": null,
"eoriNo": null,
"einNo": null,
"taxNo": null,
"taxId": null
},
"timestamp": 1719885098599
}`.split('\n'),
codeLines2: '',
tableData:[{
id: 'orderId', field: 'orderId', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' }, ]
},
{
h2Title: '获取渠道信息',
requestUrl: '[GET] /v1/sys/bdChannel/queryAllChannelList',
type:"",
description:"无需传参",
codeLines: `
/v1/sys/bdChannel/queryAllChannelList`.split('\n'),
codeLines1: `
{ {
"小妹妹":[ "success": true,
{ title: '嘿嘿嘿', index: '1' }, "reTry": false,
{ title: '系统状态', index: '2' }, "message": "操作成功",
{ title: '配置选项', index: '3' }, "code": 200,
{ title: '用户管理', index: '4' }, "data": [
{ title: '日志', index: '5' } {
"id": "0255c7d5c717461db6deebee27d00bac",
"channelName": "加拿大海运快线-普船卡派",
"transportMode": "OCEAN"
},
{
"id": "05c91b525c9443039d40821251feb147",
"channelName": "德国空派Send-DE-B-Slow-不递延",
"transportMode": "AIR"
},
{
"id": "06f73b6cfc914fb1adb80292ca280416",
"channelName": "英国空派Send-UK-F-不递延",
"transportMode": "AIR"
},
{
"id": "07d664c49d124f41a4dabc31259ff03f",
"channelName": "加拿大海运快线-美森快递派",
"transportMode": "OCEAN"
}
] ]
} }
`.split('\n'),
codeLines2: `
success:请求成功标志,true仅代表请求成功,不代表通过
message:请求描述
code:200则代表请求通过,完成下单,500则代表校验未通过
data:返回数据
id:渠道id
channelName:渠道名称
transportMode:运输方式:OCEAN-海运, AIR-空运, RAIL-铁路, ROAD-卡航
`.split('\n'),
tableData:[ ]
},
{
h2Title: '获取FBA仓库编码',
requestUrl: '[GET] /v1/sys/bdFbaCode/queryAllFbaCode',
type:"",
description:"无需传参",
codeLines: `
/v1/sys/bdFbaCode/queryAllFbaCode`.split('\n'),
codeLines1: `
{
"success": true,
"reTry": false,
"message": "操作成功",
"code": 200,
"data": [
"XFR2",
"SCK4",
"ITX2",
"BWI4",
"ACY2",
"DFW8",
"EWR9",
"VESK",
"TPFD",
"SAMB",
"MAA5",
"CAE1"
] ]
} }
`.split('\n'),
codeLines2: `
success:请求成功标志true仅代表请求成功不代表通过
message请求描述
code:200则代表请求通过完成下单500则代表校验未通过
data:FBA仓库编码列表
`.split('\n'),
tableData:[ ]
}, },
computed: { {
codeLines() { h2Title: '获取订单轨迹',
// requestUrl: '[GET] /v1/track/aafOrderTrack/queryByOrderIdForAnonymous',
return this.code.split('\n'); type:"",
description:"orderNo:下单时返回的订单号",
codeLines: `
/v1/track/aafOrderTrack/queryByOrderIdForAnonymous?orderNo=2405090002`.split('\n'),
codeLines1: `
{
"success":true,
"reTry":false,
"message":"操作成功",
"code":200,
"data":[
{
"trackNode":"1400",
"trackNodeStr":"到港",
"location":"PRINCERUPERT,BC",
"expand":false,
"timeLessInfoVO":{
"transportTime":"3天9小时45分钟",
"transportTimeCompare":null,
"transportTimeCompareType":null
}, },
"childTrackNodeList":[
{
"trackNode":"1401",
"trackNodeStr":"已到港",
"eventTime":"2024-05-1300:00:00",
"eventTimeType":"2",
"location":"PRINCERUPERT,BC"
}
]
},
{
"trackNode":"0300",
"trackNodeStr":"到仓",
"location":"国内地点",
"expand":false,
"timeLessInfoVO":{
"transportTime":"0天0小时1分钟",
"transportTimeCompare":null,
"transportTimeCompareType":null
},
"childTrackNodeList":[
{
"trackNode":"0301",
"trackNodeStr":"已到仓",
"eventTime":"2024-05-0914:14:46",
"eventTimeType":"1",
"location":"国内地点"
}
]
},
{
"trackNode":"0100",
"trackNodeStr":"下单",
"location":"国内地点",
"expand":false,
"timeLessInfoVO":null,
"childTrackNodeList":[
{
"trackNode":"0101",
"trackNodeStr":"已下单",
"eventTime":"2024-05-0914:13:35",
"eventTimeType":"1",
"location":"国内地点"
}
]
}
],
"timestamp":1719974617607
}
`.split('\n'),
codeLines2: `
success:请求成功标志true仅代表请求成功不代表通过
message请求描述
code:200则代表请求通过完成下单500则代表校验未通过
data:订单轨迹数据列表
`.split('\n'),
tableData:[
{ id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1400', description: '节点类型' },
{ id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '到港', description: '节点类型' },
{ id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' },
{ id: 'expand', field: 'expand', fieldName: '前端是否能展开子节点', required: '是', dataType: 'Boolean', example: 'false', description: '前端是否能展开子节点' },
{ id: 'timeLessInfoVO', field: 'timeLessInfoVO', fieldName: '运输时长信息', required: '否', dataType: 'Object', example: '见下方示例', description: '运输时长信息',children:[
{ id: 'transportTime', field: 'transportTime', fieldName: '运输时长', required: '是', dataType: 'String', example: '3天9小时45分钟', description: '运输时长' },
{ id: 'transportTimeCompare', field: 'transportTimeCompare', fieldName: '预计时长对比', required: '否', dataType: 'String', example: '提前3天9小时45分钟', description: '预计时长对比' },
{ id: 'transportTimeCompareType', field: 'transportTimeCompareType', fieldName: '预计时长对比类型', required: '否', dataType: 'String', example: '1', description: '预计时长对比类型 1、提前 2、延迟' },
] },
{ id: 'childTrackNodeList', field: 'childTrackNodeList', fieldName: '订单轨迹子节点', required: '是', dataType: 'array', example: '见下方示例', description: '订单轨迹子节点',children:[
{ id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1401', description: '节点类型' },
{ id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '已到港', description: '节点类型' },
{ id: 'eventTime', field: 'eventTime', fieldName: '事件发生时间', required: '是', dataType: 'Date', example: '2024-05-13 00:00:00', description: '事件发生时间' },
{ id: 'eventTimeType', field: 'eventTimeType', fieldName: '时间发生时间类型', required: '是', dataType: 'String', example: '2', description: '时间发生时间类型 1、实际发生 2、预计发生' },
{ id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' },
] },
]
},
],
},
//
];
// api
this.apiData = allData.filter(item => item.api.includes(api));
},
copyToClipboard (text) {
const code = text.join('\n');
const textArea = document.createElement('textarea');
textArea.value = code;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
this.$message({
message: '代码已复制到剪贴板',
type: 'success',
center: true
});
}, },
methods: {
handleOpen(key, keyPath) { handleOpen(key, keyPath) {
// console.log(key, keyPath); // handle open
}, },
handleClose(key, keyPath) { handleClose(key, keyPath) {
// console.log(key, keyPath); // handle close
}, },
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.log(key, keyPath,'select'); console.log(key, keyPath, 'select');
this.totalIndex = keyPath[0]; this.totalIndex = keyPath[0];
const section = document.getElementById(`section${key}`); this.$router.push({ name: 'developmentDocking', query: { api: key } });
if (section) {
section.scrollIntoView({ behavior: 'smooth' });
}
}, },
filteredMenuItems(val) { filteredMenuItems(val) {
// console.log(val) this.propList = [];
this.propList = []
if (val === "") { if (val === "") {
return this.menuItems; // return this.menuItems; //
} }
const searchLower = `${val}`; const searchLower = `${val}`;
// console.log(searchLower,'searchLower')
const append = this.menuItems.map((item, index) => { const append = this.menuItems.map((item, index) => {
const key = Object.keys(this.menuItems[index])[0]; const key = Object.keys(this.menuItems[index])[0];
const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase()); const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase());
if (eleIndex !== -1) { if (eleIndex !== -1) {
return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] }; return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] };
} }
// console.log('') });
// const appendData = append.filter(x => x !== undefined);
}); const index = `${appendData[0].groupIndex + 1}`;
this.propList.push(index);
// console.log(append.filter(x => x !== undefined), 'append');
const appendData = append.filter(x => x !== undefined)
// console.log(appendData,'appendData')
const index = `${appendData[0].groupIndex+1}`
// console.log(index,'index')
this.propList.push(index)
} }
},
created() {
const api = this.$route.query.api;
if (api) {
this.fetchData(api);
} }
}; },
</script> watch: {
<style src="./index.css" scoped></style> '$route.query.api'(newApi) {
if (newApi) {
this.fetchData(newApi);
}
}
}
};
</script>
<style src="./index.css" scoped></style>

Loading…
Cancel
Save