官方api

master
lml 3 months ago
parent f9f15129c1
commit 66a5681ccd

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

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

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

@ -4,13 +4,114 @@
.version-selector {
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
margin-left: 20px;
min-height: 60px;
}
.version-label {
.version-label {
margin-right: 8px; /* 调整间距 */
}
::v-deep .el-input__inner {
border: none;
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,198 +1,178 @@
<template>
<div class="">
<el-container style="">
<el-aside width="300px" style="background-color: #fff;padding: 20px;">
<!-- <el-input
v-model="searchQuery"
placeholder="搜索"
prefix-icon="el-icon-search"
class="menu-search"
@change="filteredMenuItems"
></el-input> -->
<div class="version-selector">
<span class="version-label">Version:</span>
<el-select v-model="selectedVersion" placeholder="">
<el-option
v-for="item in versions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<!-- <el-select v-model="selectedVersion" placeholder="Select version" id="version-select">
<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
:default-openeds="propList"
class="el-menu-vertical-demo"
:unique-opened="true"
@select="handleSelect"
@open="handleOpen"
v-if="menuItems['3.9']"
@close="handleClose">
<el-submenu v-for="(item,index) in menuItems[selectedVersion]" :key="index" :index="`${index+1}`" >
<template slot="title">
<span>{{Object.keys(item)[0]}}</span>
</template>
<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-group>
<div class="">
<el-container style="background-color: #f8f8f8;">
<el-aside width="300px" style="background-color: #fff;margin: 20px 0 20px 20px;">
<div class="version-selector">
<span class="version-label">版本:</span>
<el-select v-model="selectedVersion" placeholder="">
<el-option
v-for="item in versions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div >
<el-menu
:default-openeds="propList"
class="el-menu-vertical-demo"
style="padding: 0;"
:unique-opened="true"
@select="handleSelect"
@open="handleOpen"
@close="handleClose">
<el-submenu v-for="(item, index) in menuItems[selectedVersion]" :key="index" :index="`${index+1}`">
<template slot="title">
<span>{{Object.keys(item)[0]}}</span>
</template>
<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-group>
</el-submenu>
</el-menu>
</div>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
</div>
</template>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
<mainComponents></mainComponents>
<!-- More content -->
</el-main>
</el-container>
</div>
</template>
<script>
import mainComponents from './mainComponents.vue'
/**
* Index-1 component
*/
export default {
name:"developmentDocking",
components: {
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 {
searchQuery:"",
selectedVersion: '3.9',
versions: [
{ value: 'next', label: 'Next', tag: '' },
{ value: '3.9', label: '3.9', tag: 'LATEST' },
{ value: '3.8', label: '3.8', tag: '' },
{ value: '3.7', label: '3.7', tag: '' },
{ value: '3.6', label: '3.6', tag: '' },
{ value: '3.5', label: '3.5', tag: '' },
{ value: '3.4', label: '3.4', tag: '' }
],
propList:[],
code: `{
"shipment": {
"service": "B2B",
"store_id": "",
"client_reference": "",
"parcel_count": 2,
"export_scc": 0,
"import_scc": 0,
"attrs": []
}
}`,
menuItems: {
"3.9": [
{
"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' }
]
<script>
import { useRouter } from 'vue-router';
export default {
name: "developmentDocking",
data() {
return {
searchQuery: "",
selectedVersion: '1.0',
versions: [
// { value: 'next', label: 'Next', tag: '' },
// { value: '3.9', label: '3.9', tag: 'LATEST' },
// { value: '3.8', label: '3.8', tag: '' },
// { value: '3.7', label: '3.7', tag: '' },
// { value: '3.6', label: '3.6', tag: '' },
// { value: '3.5', label: '3.5', tag: '' },
{ value: '1.0', label: '1.0', tag: '' }
],
code: `{
"shipment": {
"service": "B2B",
"store_id": "",
"client_reference": "",
"parcel_count": 2,
"export_scc": 0,
"import_scc": 0,
"attrs": []
}
]
}`,
menuItems: {
"1.0": [
{
"订单模块": [
{ 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' }
// ]
// }
],
// "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: {
codeLines() {
//
return this.code.split('\n');
},
propList() {
return this.menuItems[this.selectedVersion].map((_, index) => `${index + 1}`);
}
},
methods: {
handleOpen(key, keyPath) {
// console.log(key, keyPath);
},
computed: {
codeLines() {
//
return this.code.split('\n');
},
handleClose(key, keyPath) {
// console.log(key, keyPath);
},
methods: {
handleOpen(key, keyPath) {
// console.log(key, keyPath);
},
handleClose(key, keyPath) {
// console.log(key, keyPath);
},
handleSelect(key, keyPath) {
console.log(key, keyPath,'select');
this.totalIndex = keyPath[0];
const section = document.getElementById(`section${key}`);
if (section) {
section.scrollIntoView({ behavior: 'smooth' });
}
},
filteredMenuItems(val) {
// console.log(val)
this.propList = []
if (val === "") {
return this.menuItems; //
}
const searchLower = `${val}`;
// console.log(searchLower,'searchLower')
const append = this.menuItems.map((item, index) => {
const key = Object.keys(this.menuItems[index])[0];
const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase());
if (eleIndex !== -1) {
return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] };
}
// console.log('')
//
});
// 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)
}
handleSelect(key, keyPath) {
console.log(key, keyPath, 'select');
this.totalIndex = keyPath[0];
this.$router.push({ name: 'mainComponents', query: { api: key } });
},
filteredMenuItems(val) {
this.propList = [];
if (val === "") {
return this.menuItems; //
}
const searchLower = `${val}`;
const append = this.menuItems.map((item, index) => {
const key = Object.keys(this.menuItems[index])[0];
const eleIndex = item[key].findIndex(element => searchLower === element.title.toLowerCase());
if (eleIndex !== -1) {
return { groupIndex: index, itemIndex: eleIndex, item: item[key][eleIndex] };
}
});
const appendData = append.filter(x => x !== undefined);
const index = `${appendData[0].groupIndex + 1}`;
this.propList.push(index);
}
};
</script>
<style src="./index.css" scoped></style>
}
};
</script>
<style src="./index.css" scoped></style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save