From 2bb7d442ea3b39cbc0b21134b4813d7c66ba98b8 Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Thu, 22 May 2025 16:36:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/json/authMenuList.json | 122 +++- src/layouts/components/Menu/SubMenu.vue | 32 +- .../components/Menu/components/lv2.vue | 112 ++++ .../constant/en_list/public_params.ts | 5 + .../constant/zh_list/public_params.ts | 5 + src/views/foundation/data/en_data/index.ts | 5 + src/views/foundation/data/zh_data/index.ts | 6 +- .../constant/en_list/error_params.ts | 12 +- .../constant/en_list/https_params.ts | 0 .../{ => class}/constant/en_list/https_url.ts | 0 .../{ => class}/constant/en_list/index.ts | 0 .../constant/en_list/public_params.ts | 0 .../constant/en_list/return_params.ts | 0 .../constant/zh_list/error_params.ts | 12 +- .../constant/zh_list/https_params.ts | 0 .../{ => class}/constant/zh_list/https_url.ts | 0 .../{ => class}/constant/zh_list/index.ts | 0 .../constant/zh_list/public_params.ts | 0 .../class}/constant/zh_list/return_params.ts | 2 +- src/views/news/class/data/en_data/index.ts | 117 ++++ src/views/news/class/data/zh_data/index.ts | 87 +++ src/views/news/class/example/index.ts | 170 +++++ src/views/news/class/index.vue | 79 +++ src/views/news/data/en_data/index.ts | 82 --- src/views/news/data/zh_data/index.ts | 79 --- .../details}/constant/en_list/error_params.ts | 12 +- .../details}/constant/en_list/https_params.ts | 0 .../details}/constant/en_list/https_url.ts | 0 .../details}/constant/en_list/index.ts | 0 .../constant/en_list/public_params.ts | 0 .../constant/en_list/return_params.ts | 0 .../details}/constant/zh_list/error_params.ts | 12 +- .../details}/constant/zh_list/https_params.ts | 0 .../details}/constant/zh_list/https_url.ts | 0 .../details}/constant/zh_list/index.ts | 0 .../constant/zh_list/public_params.ts | 0 .../constant/zh_list/return_params.ts | 2 +- src/views/news/details/data/en_data/index.ts | 96 +++ src/views/news/details/data/zh_data/index.ts | 66 ++ src/views/news/details/example/index.ts | 25 + src/views/news/{ => details}/index.vue | 20 +- .../list/constant/en_list/error_params.ts | 20 + .../list/constant/en_list/https_params.ts | 29 + .../news/list/constant/en_list/https_url.ts | 14 + src/views/news/list/constant/en_list/index.ts | 13 + .../list/constant/en_list/public_params.ts | 24 + .../list/constant/en_list/return_params.ts | 25 + .../list/constant/zh_list/error_params.ts | 19 + .../list/constant/zh_list/https_params.ts | 28 + .../news/list/constant/zh_list/https_url.ts | 14 + src/views/news/list/constant/zh_list/index.ts | 13 + .../list/constant/zh_list/public_params.ts | 23 + .../list/constant/zh_list/return_params.ts | 25 + src/views/news/list/data/en_data/index.ts | 117 ++++ src/views/news/list/data/zh_data/index.ts | 87 +++ src/views/news/list/example/index.ts | 564 ++++++++++++++++ src/views/news/list/index.vue | 79 +++ .../class/constant/en_list/error_params.ts | 20 + .../class/constant/en_list/https_params.ts | 29 + .../class/constant/en_list/https_url.ts | 14 + .../product/class/constant/en_list/index.ts | 13 + .../class/constant/en_list/public_params.ts | 24 + .../class/constant/en_list/return_params.ts | 25 + .../class/constant/zh_list/error_params.ts | 19 + .../class/constant/zh_list/https_params.ts | 28 + .../class/constant/zh_list/https_url.ts | 14 + .../product/class/constant/zh_list/index.ts | 13 + .../class/constant/zh_list/public_params.ts | 23 + .../class/constant/zh_list/return_params.ts | 25 + src/views/product/class/data/en_data/index.ts | 117 ++++ src/views/product/class/data/zh_data/index.ts | 87 +++ src/views/product/class/example/index.ts | 614 ++++++++++++++++++ src/views/product/class/index.vue | 79 +++ src/views/product/data/en_data/index.ts | 80 --- src/views/product/data/zh_data/index.ts | 96 --- .../details/constant/en_list/error_params.ts | 20 + .../details/constant/en_list/https_params.ts | 29 + .../details/constant/en_list/https_url.ts | 14 + .../product/details/constant/en_list/index.ts | 13 + .../details/constant/en_list/public_params.ts | 24 + .../details/constant/en_list/return_params.ts | 25 + .../details/constant/zh_list/error_params.ts | 19 + .../details/constant/zh_list/https_params.ts | 28 + .../details/constant/zh_list/https_url.ts | 14 + .../product/details/constant/zh_list/index.ts | 13 + .../details/constant/zh_list/public_params.ts | 23 + .../details/constant/zh_list/return_params.ts | 25 + .../product/details/data/en_data/index.ts | 96 +++ .../product/details/data/zh_data/index.ts | 66 ++ src/views/product/details/example/index.ts | 119 ++++ src/views/product/{ => details}/index.vue | 20 +- .../list/constant/en_list/error_params.ts | 20 + .../list/constant/en_list/https_params.ts | 29 + .../list/constant/en_list/https_url.ts | 14 + .../product/list/constant/en_list/index.ts | 13 + .../list/constant/en_list/public_params.ts | 24 + .../list/constant/en_list/return_params.ts | 25 + .../list/constant/zh_list/error_params.ts | 19 + .../list/constant/zh_list/https_params.ts | 28 + .../list/constant/zh_list/https_url.ts | 14 + .../product/list/constant/zh_list/index.ts | 13 + .../list/constant/zh_list/public_params.ts | 23 + .../list/constant/zh_list/return_params.ts | 25 + src/views/product/list/data/en_data/index.ts | 117 ++++ src/views/product/list/data/zh_data/index.ts | 87 +++ src/views/product/list/example/index.ts | 27 + src/views/product/list/index.vue | 79 +++ 107 files changed, 4291 insertions(+), 388 deletions(-) create mode 100644 src/layouts/components/Menu/components/lv2.vue rename src/views/news/{ => class}/constant/en_list/error_params.ts (69%) rename src/views/news/{ => class}/constant/en_list/https_params.ts (100%) rename src/views/news/{ => class}/constant/en_list/https_url.ts (100%) rename src/views/news/{ => class}/constant/en_list/index.ts (100%) rename src/views/news/{ => class}/constant/en_list/public_params.ts (100%) rename src/views/news/{ => class}/constant/en_list/return_params.ts (100%) rename src/views/news/{ => class}/constant/zh_list/error_params.ts (69%) rename src/views/news/{ => class}/constant/zh_list/https_params.ts (100%) rename src/views/news/{ => class}/constant/zh_list/https_url.ts (100%) rename src/views/news/{ => class}/constant/zh_list/index.ts (100%) rename src/views/news/{ => class}/constant/zh_list/public_params.ts (100%) rename src/views/{product => news/class}/constant/zh_list/return_params.ts (93%) create mode 100644 src/views/news/class/data/en_data/index.ts create mode 100644 src/views/news/class/data/zh_data/index.ts create mode 100644 src/views/news/class/example/index.ts create mode 100644 src/views/news/class/index.vue delete mode 100644 src/views/news/data/en_data/index.ts delete mode 100644 src/views/news/data/zh_data/index.ts rename src/views/{product => news/details}/constant/en_list/error_params.ts (69%) rename src/views/{product => news/details}/constant/en_list/https_params.ts (100%) rename src/views/{product => news/details}/constant/en_list/https_url.ts (100%) rename src/views/{product => news/details}/constant/en_list/index.ts (100%) rename src/views/{product => news/details}/constant/en_list/public_params.ts (100%) rename src/views/{product => news/details}/constant/en_list/return_params.ts (100%) rename src/views/{product => news/details}/constant/zh_list/error_params.ts (69%) rename src/views/{product => news/details}/constant/zh_list/https_params.ts (100%) rename src/views/{product => news/details}/constant/zh_list/https_url.ts (100%) rename src/views/{product => news/details}/constant/zh_list/index.ts (100%) rename src/views/{product => news/details}/constant/zh_list/public_params.ts (100%) rename src/views/news/{ => details}/constant/zh_list/return_params.ts (93%) create mode 100644 src/views/news/details/data/en_data/index.ts create mode 100644 src/views/news/details/data/zh_data/index.ts create mode 100644 src/views/news/details/example/index.ts rename src/views/news/{ => details}/index.vue (81%) create mode 100644 src/views/news/list/constant/en_list/error_params.ts create mode 100644 src/views/news/list/constant/en_list/https_params.ts create mode 100644 src/views/news/list/constant/en_list/https_url.ts create mode 100644 src/views/news/list/constant/en_list/index.ts create mode 100644 src/views/news/list/constant/en_list/public_params.ts create mode 100644 src/views/news/list/constant/en_list/return_params.ts create mode 100644 src/views/news/list/constant/zh_list/error_params.ts create mode 100644 src/views/news/list/constant/zh_list/https_params.ts create mode 100644 src/views/news/list/constant/zh_list/https_url.ts create mode 100644 src/views/news/list/constant/zh_list/index.ts create mode 100644 src/views/news/list/constant/zh_list/public_params.ts create mode 100644 src/views/news/list/constant/zh_list/return_params.ts create mode 100644 src/views/news/list/data/en_data/index.ts create mode 100644 src/views/news/list/data/zh_data/index.ts create mode 100644 src/views/news/list/example/index.ts create mode 100644 src/views/news/list/index.vue create mode 100644 src/views/product/class/constant/en_list/error_params.ts create mode 100644 src/views/product/class/constant/en_list/https_params.ts create mode 100644 src/views/product/class/constant/en_list/https_url.ts create mode 100644 src/views/product/class/constant/en_list/index.ts create mode 100644 src/views/product/class/constant/en_list/public_params.ts create mode 100644 src/views/product/class/constant/en_list/return_params.ts create mode 100644 src/views/product/class/constant/zh_list/error_params.ts create mode 100644 src/views/product/class/constant/zh_list/https_params.ts create mode 100644 src/views/product/class/constant/zh_list/https_url.ts create mode 100644 src/views/product/class/constant/zh_list/index.ts create mode 100644 src/views/product/class/constant/zh_list/public_params.ts create mode 100644 src/views/product/class/constant/zh_list/return_params.ts create mode 100644 src/views/product/class/data/en_data/index.ts create mode 100644 src/views/product/class/data/zh_data/index.ts create mode 100644 src/views/product/class/example/index.ts create mode 100644 src/views/product/class/index.vue delete mode 100644 src/views/product/data/en_data/index.ts delete mode 100644 src/views/product/data/zh_data/index.ts create mode 100644 src/views/product/details/constant/en_list/error_params.ts create mode 100644 src/views/product/details/constant/en_list/https_params.ts create mode 100644 src/views/product/details/constant/en_list/https_url.ts create mode 100644 src/views/product/details/constant/en_list/index.ts create mode 100644 src/views/product/details/constant/en_list/public_params.ts create mode 100644 src/views/product/details/constant/en_list/return_params.ts create mode 100644 src/views/product/details/constant/zh_list/error_params.ts create mode 100644 src/views/product/details/constant/zh_list/https_params.ts create mode 100644 src/views/product/details/constant/zh_list/https_url.ts create mode 100644 src/views/product/details/constant/zh_list/index.ts create mode 100644 src/views/product/details/constant/zh_list/public_params.ts create mode 100644 src/views/product/details/constant/zh_list/return_params.ts create mode 100644 src/views/product/details/data/en_data/index.ts create mode 100644 src/views/product/details/data/zh_data/index.ts create mode 100644 src/views/product/details/example/index.ts rename src/views/product/{ => details}/index.vue (81%) create mode 100644 src/views/product/list/constant/en_list/error_params.ts create mode 100644 src/views/product/list/constant/en_list/https_params.ts create mode 100644 src/views/product/list/constant/en_list/https_url.ts create mode 100644 src/views/product/list/constant/en_list/index.ts create mode 100644 src/views/product/list/constant/en_list/public_params.ts create mode 100644 src/views/product/list/constant/en_list/return_params.ts create mode 100644 src/views/product/list/constant/zh_list/error_params.ts create mode 100644 src/views/product/list/constant/zh_list/https_params.ts create mode 100644 src/views/product/list/constant/zh_list/https_url.ts create mode 100644 src/views/product/list/constant/zh_list/index.ts create mode 100644 src/views/product/list/constant/zh_list/public_params.ts create mode 100644 src/views/product/list/constant/zh_list/return_params.ts create mode 100644 src/views/product/list/data/en_data/index.ts create mode 100644 src/views/product/list/data/zh_data/index.ts create mode 100644 src/views/product/list/example/index.ts create mode 100644 src/views/product/list/index.vue diff --git a/src/assets/json/authMenuList.json b/src/assets/json/authMenuList.json index 8f13305..9f4154f 100644 --- a/src/assets/json/authMenuList.json +++ b/src/assets/json/authMenuList.json @@ -7,7 +7,22 @@ "name": "foundation", "component": "/foundation/index", "hidden": false, - "children":[], + "children":[ + { + "id": 11, + "path": "/index", + "name": "foundation", + "component": "/foundation/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "基础API", + "enTitle":"Base API", + "isKeepAlive": true, + "isAffix":true + } + }], "meta": { "icon": "", "zhTitle": "基础API", @@ -18,11 +33,57 @@ }, { "id": 2, - "path": "/product/index", + "path": "/product", "name": "product", - "component": "/product/index", + "component": "/product", "hidden": false, - "children":[], + "children":[ + { + "id": 21, + "path": "/product/list/index", + "name": "productListIndex", + "component": "/product/list/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "产品列表接口", + "enTitle":"Product List API", + "isKeepAlive": true, + "isAffix":true + } + }, + { + "id": 211, + "path": "/product/details/index", + "name": "productDetailsIndex", + "component": "/product/details/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "产品详情接口", + "enTitle":"Product Details API", + "isKeepAlive": true, + "isAffix":true + } + }, + { + "id": 2111, + "path": "/product/class/index", + "name": "productClassIndex", + "component": "/product/class/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "产品分类接口", + "enTitle":"Product class List API", + "isKeepAlive": true, + "isAffix":true + } + } + ], "meta": { "icon": "", "zhTitle": "产品API", @@ -33,11 +94,58 @@ }, { "id": 3, - "path": "/news/index", + "path": "/news", "name": "news", - "component": "/news/index", + "component": "/news", "hidden": false, - "children":[], + + "children":[ + { + "id": 31, + "path": "/news/list/index", + "name": "newsListIndex", + "component": "/news/list/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "新闻列表接口", + "enTitle":"News List API", + "isKeepAlive": true, + "isAffix":true + } + }, + { + "id": 311, + "path": "/news/details/index", + "name": "newsDetailsIndex", + "component": "/news/details/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "新闻详情接口", + "enTitle":"News Details API", + "isKeepAlive": true, + "isAffix":true + } + }, + { + "id": 2111, + "path": "/news/class/index", + "name": "newsClassIndex", + "component": "/news/class/index", + "hidden": false, + "children":[], + "meta": { + "icon": "", + "zhTitle": "新闻分类接口", + "enTitle":"news class List API", + "isKeepAlive": true, + "isAffix":true + } + } + ], "meta": { "icon": "", "zhTitle": "新闻API", diff --git a/src/layouts/components/Menu/SubMenu.vue b/src/layouts/components/Menu/SubMenu.vue index db918b4..9b88713 100644 --- a/src/layouts/components/Menu/SubMenu.vue +++ b/src/layouts/components/Menu/SubMenu.vue @@ -1,27 +1,45 @@ diff --git a/src/views/foundation/constant/en_list/public_params.ts b/src/views/foundation/constant/en_list/public_params.ts index 770eb9c..a9d760f 100644 --- a/src/views/foundation/constant/en_list/public_params.ts +++ b/src/views/foundation/constant/en_list/public_params.ts @@ -16,6 +16,11 @@ export const HTTPS_PUBLIC_PARAMS_EN_COLUMNS = [ label: "Is it mandatory", prop: "isItMandatory" }, + { + align: "left", + label: "Sample value", + prop: "exampleValue" + }, { align: "left", label: "Parameter description", diff --git a/src/views/foundation/constant/zh_list/public_params.ts b/src/views/foundation/constant/zh_list/public_params.ts index 5e98c1c..c50ca09 100644 --- a/src/views/foundation/constant/zh_list/public_params.ts +++ b/src/views/foundation/constant/zh_list/public_params.ts @@ -15,6 +15,11 @@ export const HTTPS_PUBLIC_PARAMS_COLUMNS = [ label: "是否必填", prop: "isItMandatory" }, + { + align: "left", + label: "示例值", + prop: "exampleValue" + }, { align: "left", label: "参数描述", diff --git a/src/views/foundation/data/en_data/index.ts b/src/views/foundation/data/en_data/index.ts index ff07f06..22e20c0 100644 --- a/src/views/foundation/data/en_data/index.ts +++ b/src/views/foundation/data/en_data/index.ts @@ -29,24 +29,29 @@ export const EN_DATA = [ parameterName: "client_id", parameterType: "string", isItMandatory: "yes", + exampleValue: "682c22b746aef", parameterDescription: "" }, { parameterName: "client_secret", parameterType: "string", isItMandatory: "yes", + exampleValue: "oibmLhFdEVWhX6lFSF4rWVXnATKI8Oml", + parameterDescription: "" }, { parameterName: "grant_type", parameterType: "string", isItMandatory: "yes", + exampleValue: "client_credentials", parameterDescription: "Client-side credentials: Get tokens; Refresh_token: Refresh token" }, { parameterName: "refresh_token", parameterType: "string", isItMandatory: "no", + exampleValue: "", parameterDescription: "When refreshing the token, it is necessary" } ] diff --git a/src/views/foundation/data/zh_data/index.ts b/src/views/foundation/data/zh_data/index.ts index 873cc00..73cbabd 100644 --- a/src/views/foundation/data/zh_data/index.ts +++ b/src/views/foundation/data/zh_data/index.ts @@ -29,24 +29,28 @@ export const ZH_DATA = [ parameterName: "client_id", parameterType: "string", isItMandatory: "必需", + exampleValue: "682c22b746aef", parameterDescription: "" }, { parameterName: "client_secret", parameterType: "string", isItMandatory: "必需", + exampleValue: "oibmLhFdEVWhX6lFSF4rWVXnATKI8Oml", parameterDescription: "" }, { parameterName: "grant_type", parameterType: "string", isItMandatory: "必需", + exampleValue: "client_credentials", parameterDescription: "client_credentials:获取token;refresh_token:刷新token" }, { parameterName: "refresh_token", parameterType: "string", - isItMandatory: "非必需", + isItMandatory: "可选", + exampleValue: "", parameterDescription: "刷新token时必须" } ] diff --git a/src/views/news/constant/en_list/error_params.ts b/src/views/news/class/constant/en_list/error_params.ts similarity index 69% rename from src/views/news/constant/en_list/error_params.ts rename to src/views/news/class/constant/en_list/error_params.ts index b1f6f17..6320a4e 100644 --- a/src/views/news/constant/en_list/error_params.ts +++ b/src/views/news/class/constant/en_list/error_params.ts @@ -10,11 +10,11 @@ export const HTTPS_ERROR_PARAMS_EN_COLUMNS = [ align: "left", label: "Error message", prop: "errorMessage" - }, - - { - align: "left", - label: "Troubleshooting method", - prop: "TroMethods" } + + // { + // align: "left", + // label: "Troubleshooting method", + // prop: "TroMethods" + // } ]; diff --git a/src/views/news/constant/en_list/https_params.ts b/src/views/news/class/constant/en_list/https_params.ts similarity index 100% rename from src/views/news/constant/en_list/https_params.ts rename to src/views/news/class/constant/en_list/https_params.ts diff --git a/src/views/news/constant/en_list/https_url.ts b/src/views/news/class/constant/en_list/https_url.ts similarity index 100% rename from src/views/news/constant/en_list/https_url.ts rename to src/views/news/class/constant/en_list/https_url.ts diff --git a/src/views/news/constant/en_list/index.ts b/src/views/news/class/constant/en_list/index.ts similarity index 100% rename from src/views/news/constant/en_list/index.ts rename to src/views/news/class/constant/en_list/index.ts diff --git a/src/views/news/constant/en_list/public_params.ts b/src/views/news/class/constant/en_list/public_params.ts similarity index 100% rename from src/views/news/constant/en_list/public_params.ts rename to src/views/news/class/constant/en_list/public_params.ts diff --git a/src/views/news/constant/en_list/return_params.ts b/src/views/news/class/constant/en_list/return_params.ts similarity index 100% rename from src/views/news/constant/en_list/return_params.ts rename to src/views/news/class/constant/en_list/return_params.ts diff --git a/src/views/news/constant/zh_list/error_params.ts b/src/views/news/class/constant/zh_list/error_params.ts similarity index 69% rename from src/views/news/constant/zh_list/error_params.ts rename to src/views/news/class/constant/zh_list/error_params.ts index 0146d59..e02ce26 100644 --- a/src/views/news/constant/zh_list/error_params.ts +++ b/src/views/news/class/constant/zh_list/error_params.ts @@ -9,11 +9,11 @@ export const HTTPS_ERROR_PARAMS_COLUMNS = [ align: "left", label: "错误信息", prop: "errorInfo" - }, - - { - align: "left", - label: "排查方法", - prop: "TroMethods" } + + // { + // align: "left", + // label: "排查方法", + // prop: "TroMethods" + // } ]; diff --git a/src/views/news/constant/zh_list/https_params.ts b/src/views/news/class/constant/zh_list/https_params.ts similarity index 100% rename from src/views/news/constant/zh_list/https_params.ts rename to src/views/news/class/constant/zh_list/https_params.ts diff --git a/src/views/news/constant/zh_list/https_url.ts b/src/views/news/class/constant/zh_list/https_url.ts similarity index 100% rename from src/views/news/constant/zh_list/https_url.ts rename to src/views/news/class/constant/zh_list/https_url.ts diff --git a/src/views/news/constant/zh_list/index.ts b/src/views/news/class/constant/zh_list/index.ts similarity index 100% rename from src/views/news/constant/zh_list/index.ts rename to src/views/news/class/constant/zh_list/index.ts diff --git a/src/views/news/constant/zh_list/public_params.ts b/src/views/news/class/constant/zh_list/public_params.ts similarity index 100% rename from src/views/news/constant/zh_list/public_params.ts rename to src/views/news/class/constant/zh_list/public_params.ts diff --git a/src/views/product/constant/zh_list/return_params.ts b/src/views/news/class/constant/zh_list/return_params.ts similarity index 93% rename from src/views/product/constant/zh_list/return_params.ts rename to src/views/news/class/constant/zh_list/return_params.ts index 8ecf02f..1429299 100644 --- a/src/views/product/constant/zh_list/return_params.ts +++ b/src/views/news/class/constant/zh_list/return_params.ts @@ -3,7 +3,7 @@ export const HTTPS_RETURN_PARAMS_COLUMNS = [ { align: "left", fixed: true, - label: "参数接口", + label: "参数名称", prop: "parameterInterface" }, { diff --git a/src/views/news/class/data/en_data/index.ts b/src/views/news/class/data/en_data/index.ts new file mode 100644 index 0000000..3c08334 --- /dev/null +++ b/src/views/news/class/data/en_data/index.ts @@ -0,0 +1,117 @@ +import { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS + // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + //HTTPS_RETURN_PARAMS_EN_COLUMNS +} from "../../constant/en_list/index"; + +export const EN_DATA = [ + { + title: "Request URL", + columns: HTTPS_URL_EN_COLUMNS, //列表配置项 + data: [ + { + environment: "Test environment", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "Formal environment", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + // { + // title: "Common request parameters", 公共参数 + // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // parameterName: "category_id", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "", + // parameterDescription: "Classification ID" + // }, + // { + // parameterName: "language", + // parameterType: "string", + // isItMandatory: "可选", + // exampleValue: "zh-cn", + // parameterDescription: "语言" + // }, + // { + // parameterName: "page", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "1", + // parameterDescription: "" + // }, + // { + // parameterName: "size", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "50", + // parameterDescription: "" + // } + // ] + // }, + { + title: "Request parameter description", + columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterName: "parent_id", + parameterType: "integer", + isItMandatory: "no", + exampleValue: "1", + parameterDescription: "Superior classification ID" + }, + { + parameterName: "language", + parameterType: "string", + isItMandatory: "no", + exampleValue: "zh-cn", + parameterDescription: "Language: zh cn (Chinese); En us (English)" + }, + { + parameterName: "page", + parameterType: "integer ", + isItMandatory: "no", + exampleValue: "1", + parameterDescription: "page number" + }, + { + parameterName: "size", + parameterType: "integer ", + isItMandatory: "no", + exampleValue: "50", + parameterDescription: "Number of items displayed per page (default 50, maximum 200)" + } + ] + }, + // { + // title: "Return parameter description", + // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // environment: "测试环境", + // https: "http://dev.ow.f2b211.com/admapi" + // }, + // { + // environment: "正式环境", + // https: "http://ow.f2b211.com/admapi" + // } + // ] + // }, + { + title: "Error declaration", + columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorMessage: "Unauthorized interface", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/news/class/data/zh_data/index.ts b/src/views/news/class/data/zh_data/index.ts new file mode 100644 index 0000000..3a24f7a --- /dev/null +++ b/src/views/news/class/data/zh_data/index.ts @@ -0,0 +1,87 @@ +import { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS + // HTTPS_PUBLIC_PARAMS_COLUMNS, + // HTTPS_RETURN_PARAMS_COLUMNS +} from "../../constant/zh_list/index"; + +export const ZH_DATA = [ + { + title: "请求地址", + columns: HTTPS_URL_COLUMNS, //列表配置项 + data: [ + { + environment: "测试环境", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "正式环境", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + { + title: "请求参数说明", + columns: HTTPS_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterName: "parent_id", + parameterType: "integer", + isItMandatory: "可选", + exampleValue: "1", + parameterDescription: "所属上级分类id" + }, + { + parameterName: "language", + parameterType: "string", + isItMandatory: "可选", + exampleValue: "zh-cn", + parameterDescription: "所属语言:zh-cn(中文);en-us(英文)" + }, + { + parameterName: "page", + parameterType: "integer ", + isItMandatory: "可选", + exampleValue: "1", + parameterDescription: "页码" + }, + { + parameterName: "size", + parameterType: "integer ", + isItMandatory: "可选", + exampleValue: "50", + parameterDescription: "每页显示条数(默认50,最大200)" + } + ] + }, + // { + // title: "返回参数说明", + // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + // data: [ + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // }, + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // } + // ] + // }, + { + title: "错误说明", + columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorInfo: "接口未经授权", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/news/class/example/index.ts b/src/views/news/class/example/index.ts new file mode 100644 index 0000000..01d72ec --- /dev/null +++ b/src/views/news/class/example/index.ts @@ -0,0 +1,170 @@ +//想要示例 +export const RETURN_VALUE = { + code: 0, + msg: "success", + data: { + total: 13, + per_page: 50, + current_page: 1, + last_page: 1, + data: [ + { + id: 10, + pid: 5, + name: "初次使用", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/f9337c05ea42bba312c779473750546d.png", + desc: null, + sort: 1, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 2, + pid: 1, + name: "新闻热点", + short_name: null, + icon: null, + desc: null, + sort: 1, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 1, + pid: 0, + name: "品牌动态", + short_name: null, + icon: null, + desc: null, + sort: 1, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 11, + pid: 5, + name: "存储管理", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/c2fbb88e15410dd490100c651e93ff6e.png", + desc: null, + sort: 2, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 3, + pid: 1, + name: "产品评测", + short_name: null, + icon: null, + desc: null, + sort: 2, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 12, + pid: 5, + name: "网络设置", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/3945d6e1e57a95d90918beeb2a8d0f39.png", + desc: null, + sort: 3, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 4, + pid: 1, + name: "博客", + short_name: null, + icon: null, + desc: null, + sort: 3, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 13, + pid: 5, + name: "文件管理", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/bbf9270ab5ed7579312856fd01c8d97a.png", + desc: null, + sort: 4, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 5, + pid: 0, + name: "帮助中心", + short_name: null, + icon: null, + desc: null, + sort: 4, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 14, + pid: 5, + name: "影视管理", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/f180790da3e94f97af840b3acd3f87ff.png", + desc: null, + sort: 5, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 15, + pid: 5, + name: "相册管理", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/c1ac147f0d84e83bf3c739ec88a7e72b.png", + desc: null, + sort: 6, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 16, + pid: 5, + name: "系统管理", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/0d870c4c2da82cac18b0935e9739bac9.png", + desc: null, + sort: 7, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 17, + pid: 5, + name: "更多", + short_name: null, + icon: "https://dev.ow.f2b211.com/storage/images/article/20250430/ea84add2d16c5049a6fa5d182300254c.png", + desc: null, + sort: 8, + level: 1, + is_show: 1, + deleted_at: null + } + ], + has_more: false + } +}; diff --git a/src/views/news/class/index.vue b/src/views/news/class/index.vue new file mode 100644 index 0000000..b4f112f --- /dev/null +++ b/src/views/news/class/index.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/views/news/data/en_data/index.ts b/src/views/news/data/en_data/index.ts deleted file mode 100644 index f6b484e..0000000 --- a/src/views/news/data/en_data/index.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { - HTTPS_ERROR_PARAMS_EN_COLUMNS, - HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS, - HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS -} from "../../constant/en_list/index"; - -export const EN_DATA = [ - { - title: "Request URL", - columns: HTTPS_URL_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "Test environment", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "Formal environment", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Common request parameters", - columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Request parameter description", - columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Return parameter description", - columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Error declaration", - columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - }, - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - } - ] - } -]; diff --git a/src/views/news/data/zh_data/index.ts b/src/views/news/data/zh_data/index.ts deleted file mode 100644 index 6f34aa4..0000000 --- a/src/views/news/data/zh_data/index.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { - HTTPS_ERROR_PARAMS_COLUMNS, - HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS, - // HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS -} from "../../constant/zh_list/index"; - -export const ZH_DATA = [ - { - title: "请求地址", - columns: HTTPS_URL_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - - { - title: "请求参数说明", - columns: HTTPS_PARAMS_COLUMNS, //列表配置项 - data: [ - { - parameterName: "测试环境", - parameterType: "http://dev.ow.f2b211.com/admapi", - isItMandatory: "否", - exampleValue: "多少", - parameterDescription: "demo" - }, - { - parameterName: "测试环境", - parameterType: "http://dev.ow.f2b211.com/admapi", - isItMandatory: "是", - exampleValue: "大萨达", - parameterDescription: "demo1" - } - ] - }, - { - title: "返回参数说明", - columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 - data: [ - { - parameterInterface: "1", - parameterType: "2", - exampleValue: "3", - describe: "4" - }, - { - parameterInterface: "1", - parameterType: "2", - exampleValue: "3", - describe: "4" - } - ] - }, - { - title: "错误说明", - columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 - data: [ - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - }, - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - } - ] - } -]; diff --git a/src/views/product/constant/en_list/error_params.ts b/src/views/news/details/constant/en_list/error_params.ts similarity index 69% rename from src/views/product/constant/en_list/error_params.ts rename to src/views/news/details/constant/en_list/error_params.ts index b1f6f17..6320a4e 100644 --- a/src/views/product/constant/en_list/error_params.ts +++ b/src/views/news/details/constant/en_list/error_params.ts @@ -10,11 +10,11 @@ export const HTTPS_ERROR_PARAMS_EN_COLUMNS = [ align: "left", label: "Error message", prop: "errorMessage" - }, - - { - align: "left", - label: "Troubleshooting method", - prop: "TroMethods" } + + // { + // align: "left", + // label: "Troubleshooting method", + // prop: "TroMethods" + // } ]; diff --git a/src/views/product/constant/en_list/https_params.ts b/src/views/news/details/constant/en_list/https_params.ts similarity index 100% rename from src/views/product/constant/en_list/https_params.ts rename to src/views/news/details/constant/en_list/https_params.ts diff --git a/src/views/product/constant/en_list/https_url.ts b/src/views/news/details/constant/en_list/https_url.ts similarity index 100% rename from src/views/product/constant/en_list/https_url.ts rename to src/views/news/details/constant/en_list/https_url.ts diff --git a/src/views/product/constant/en_list/index.ts b/src/views/news/details/constant/en_list/index.ts similarity index 100% rename from src/views/product/constant/en_list/index.ts rename to src/views/news/details/constant/en_list/index.ts diff --git a/src/views/product/constant/en_list/public_params.ts b/src/views/news/details/constant/en_list/public_params.ts similarity index 100% rename from src/views/product/constant/en_list/public_params.ts rename to src/views/news/details/constant/en_list/public_params.ts diff --git a/src/views/product/constant/en_list/return_params.ts b/src/views/news/details/constant/en_list/return_params.ts similarity index 100% rename from src/views/product/constant/en_list/return_params.ts rename to src/views/news/details/constant/en_list/return_params.ts diff --git a/src/views/product/constant/zh_list/error_params.ts b/src/views/news/details/constant/zh_list/error_params.ts similarity index 69% rename from src/views/product/constant/zh_list/error_params.ts rename to src/views/news/details/constant/zh_list/error_params.ts index 0146d59..e02ce26 100644 --- a/src/views/product/constant/zh_list/error_params.ts +++ b/src/views/news/details/constant/zh_list/error_params.ts @@ -9,11 +9,11 @@ export const HTTPS_ERROR_PARAMS_COLUMNS = [ align: "left", label: "错误信息", prop: "errorInfo" - }, - - { - align: "left", - label: "排查方法", - prop: "TroMethods" } + + // { + // align: "left", + // label: "排查方法", + // prop: "TroMethods" + // } ]; diff --git a/src/views/product/constant/zh_list/https_params.ts b/src/views/news/details/constant/zh_list/https_params.ts similarity index 100% rename from src/views/product/constant/zh_list/https_params.ts rename to src/views/news/details/constant/zh_list/https_params.ts diff --git a/src/views/product/constant/zh_list/https_url.ts b/src/views/news/details/constant/zh_list/https_url.ts similarity index 100% rename from src/views/product/constant/zh_list/https_url.ts rename to src/views/news/details/constant/zh_list/https_url.ts diff --git a/src/views/product/constant/zh_list/index.ts b/src/views/news/details/constant/zh_list/index.ts similarity index 100% rename from src/views/product/constant/zh_list/index.ts rename to src/views/news/details/constant/zh_list/index.ts diff --git a/src/views/product/constant/zh_list/public_params.ts b/src/views/news/details/constant/zh_list/public_params.ts similarity index 100% rename from src/views/product/constant/zh_list/public_params.ts rename to src/views/news/details/constant/zh_list/public_params.ts diff --git a/src/views/news/constant/zh_list/return_params.ts b/src/views/news/details/constant/zh_list/return_params.ts similarity index 93% rename from src/views/news/constant/zh_list/return_params.ts rename to src/views/news/details/constant/zh_list/return_params.ts index 8ecf02f..1429299 100644 --- a/src/views/news/constant/zh_list/return_params.ts +++ b/src/views/news/details/constant/zh_list/return_params.ts @@ -3,7 +3,7 @@ export const HTTPS_RETURN_PARAMS_COLUMNS = [ { align: "left", fixed: true, - label: "参数接口", + label: "参数名称", prop: "parameterInterface" }, { diff --git a/src/views/news/details/data/en_data/index.ts b/src/views/news/details/data/en_data/index.ts new file mode 100644 index 0000000..488dd60 --- /dev/null +++ b/src/views/news/details/data/en_data/index.ts @@ -0,0 +1,96 @@ +import { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS + // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + //HTTPS_RETURN_PARAMS_EN_COLUMNS +} from "../../constant/en_list/index"; + +export const EN_DATA = [ + { + title: "Request URL", + columns: HTTPS_URL_EN_COLUMNS, //列表配置项 + data: [ + { + environment: "Test environment", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "Formal environment", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + // { + // title: "Common request parameters", 公共参数 + // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // parameterName: "category_id", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "", + // parameterDescription: "Classification ID" + // }, + // { + // parameterName: "language", + // parameterType: "string", + // isItMandatory: "可选", + // exampleValue: "zh-cn", + // parameterDescription: "语言" + // }, + // { + // parameterName: "page", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "1", + // parameterDescription: "" + // }, + // { + // parameterName: "size", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "50", + // parameterDescription: "" + // } + // ] + // }, + { + title: "Request parameter description", + columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterName: "id", + parameterType: "string ", + isItMandatory: "yes", + exampleValue: "1", + parameterDescription: "Details ID" + } + ] + }, + // { + // title: "Return parameter description", + // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // environment: "测试环境", + // https: "http://dev.ow.f2b211.com/admapi" + // }, + // { + // environment: "正式环境", + // https: "http://ow.f2b211.com/admapi" + // } + // ] + // }, + { + title: "Error declaration", + columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorMessage: "Unauthorized interface", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/news/details/data/zh_data/index.ts b/src/views/news/details/data/zh_data/index.ts new file mode 100644 index 0000000..af944b6 --- /dev/null +++ b/src/views/news/details/data/zh_data/index.ts @@ -0,0 +1,66 @@ +import { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS + // HTTPS_PUBLIC_PARAMS_COLUMNS, + // HTTPS_RETURN_PARAMS_COLUMNS +} from "../../constant/zh_list/index"; + +export const ZH_DATA = [ + { + title: "请求地址", + columns: HTTPS_URL_COLUMNS, //列表配置项 + data: [ + { + environment: "测试环境", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "正式环境", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + { + title: "请求参数说明", + columns: HTTPS_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterName: "id", + parameterType: "string ", + isItMandatory: "必需", + exampleValue: "1", + parameterDescription: "详情id" + } + ] + }, + // { + // title: "返回参数说明", + // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + // data: [ + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // }, + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // } + // ] + // }, + { + title: "错误说明", + columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorInfo: "接口未经授权", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/news/details/example/index.ts b/src/views/news/details/example/index.ts new file mode 100644 index 0000000..53fe33a --- /dev/null +++ b/src/views/news/details/example/index.ts @@ -0,0 +1,25 @@ +//想要示例 +export const RETURN_VALUE = { + code: 0, + msg: "success", + data: { + id: 1, + title: "ORICO携星际云存储正式入军区块链, IPFS系统加持轰响第一", + author: "writer", + source: "", + image: "https://dev.ow.f2b211.com/storage/images/faq/20250411/f2fe26180c14b959c23081df6b09b7d8.jpg", + desc: "相比3G网络时代国内三种不同的技术标准带来的兼容性问题,4G时代国内的发展速度快多了,移动、联通及电信在几年内就建立了全球最大的4G移动网络,这两年来的提速降费政策也让普通人感受到了流量费用下降的实惠。如今移动、联通、电信三足鼎立的格局已经有10年时间了,今年又传出了新的改革方案,联通、电信将被重组为一家公司,国内现在重组电信行业普遍被认为是在为未来的5G时代做准备。", + recommend: 0, + release_time: "2018-09-11 08:58:35", + sort: 0, + link: "", + content: + "国内的电信行业已经实施过多轮改革了,影响大的重组、拆分至少有六次,我们现在所熟悉的中国移动、中国联通、中国电信就是多次拆分、重组之后的产物了,最近的一次大规模重组发生在2008年前后,当时国内有六家电信运营商——除了电信联通移动之外,还有铁通、卫通及网通。重组之后剩下这三家,他们各自都拥有了移动及固网业务了。", + view_count: 10, + praise_count: 0, + category: { + id: 2, + name: "新闻热点" + } + } +}; diff --git a/src/views/news/index.vue b/src/views/news/details/index.vue similarity index 81% rename from src/views/news/index.vue rename to src/views/news/details/index.vue index 98d1e1d..9324d88 100644 --- a/src/views/news/index.vue +++ b/src/views/news/details/index.vue @@ -1,7 +1,7 @@ - + + diff --git a/src/views/product/class/constant/en_list/error_params.ts b/src/views/product/class/constant/en_list/error_params.ts new file mode 100644 index 0000000..6320a4e --- /dev/null +++ b/src/views/product/class/constant/en_list/error_params.ts @@ -0,0 +1,20 @@ +//错误说明 +export const HTTPS_ERROR_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Error code", + prop: "errorCode" + }, + { + align: "left", + label: "Error message", + prop: "errorMessage" + } + + // { + // align: "left", + // label: "Troubleshooting method", + // prop: "TroMethods" + // } +]; diff --git a/src/views/product/class/constant/en_list/https_params.ts b/src/views/product/class/constant/en_list/https_params.ts new file mode 100644 index 0000000..dc194ff --- /dev/null +++ b/src/views/product/class/constant/en_list/https_params.ts @@ -0,0 +1,29 @@ +//请求参数 +export const HTTPS_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Is it mandatory", + prop: "isItMandatory" + }, + { + align: "left", + label: "Sample value", + prop: "exampleValue" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/en_list/https_url.ts b/src/views/product/class/constant/en_list/https_url.ts new file mode 100644 index 0000000..87eef66 --- /dev/null +++ b/src/views/product/class/constant/en_list/https_url.ts @@ -0,0 +1,14 @@ +//请求地址 +export const HTTPS_URL_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Environment", + prop: "environment" + }, + { + align: "left", + label: "HTTPS Address", + prop: "https" + } +]; diff --git a/src/views/product/class/constant/en_list/index.ts b/src/views/product/class/constant/en_list/index.ts new file mode 100644 index 0000000..f2f4256 --- /dev/null +++ b/src/views/product/class/constant/en_list/index.ts @@ -0,0 +1,13 @@ +import { HTTPS_ERROR_PARAMS_EN_COLUMNS } from "./error_params"; +import { HTTPS_PARAMS_EN_COLUMNS } from "./https_params"; +import { HTTPS_URL_EN_COLUMNS } from "./https_url"; +import { HTTPS_PUBLIC_PARAMS_EN_COLUMNS } from "./public_params"; +import { HTTPS_RETURN_PARAMS_EN_COLUMNS } from "./return_params"; + +export { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS, + HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + HTTPS_RETURN_PARAMS_EN_COLUMNS +}; diff --git a/src/views/product/class/constant/en_list/public_params.ts b/src/views/product/class/constant/en_list/public_params.ts new file mode 100644 index 0000000..770eb9c --- /dev/null +++ b/src/views/product/class/constant/en_list/public_params.ts @@ -0,0 +1,24 @@ +//公共请求 +export const HTTPS_PUBLIC_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Is it mandatory", + prop: "isItMandatory" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/en_list/return_params.ts b/src/views/product/class/constant/en_list/return_params.ts new file mode 100644 index 0000000..6bde662 --- /dev/null +++ b/src/views/product/class/constant/en_list/return_params.ts @@ -0,0 +1,25 @@ +//返回参数 +export const HTTPS_RETURN_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter interface", + prop: "parameterInterface" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + + { + align: "left", + label: "Sample value", + prop: "exampleValue" + }, + { + align: "left", + label: "Describe", + prop: "describe" + } +]; diff --git a/src/views/product/class/constant/zh_list/error_params.ts b/src/views/product/class/constant/zh_list/error_params.ts new file mode 100644 index 0000000..e02ce26 --- /dev/null +++ b/src/views/product/class/constant/zh_list/error_params.ts @@ -0,0 +1,19 @@ +//错误说明 +export const HTTPS_ERROR_PARAMS_COLUMNS = [ + { + align: "left", + label: "错误码", + prop: "errorCode" + }, + { + align: "left", + label: "错误信息", + prop: "errorInfo" + } + + // { + // align: "left", + // label: "排查方法", + // prop: "TroMethods" + // } +]; diff --git a/src/views/product/class/constant/zh_list/https_params.ts b/src/views/product/class/constant/zh_list/https_params.ts new file mode 100644 index 0000000..04cf423 --- /dev/null +++ b/src/views/product/class/constant/zh_list/https_params.ts @@ -0,0 +1,28 @@ +//请求参数 +export const HTTPS_PARAMS_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "是否必填", + prop: "isItMandatory" + }, + { + align: "left", + label: "示例值", + prop: "exampleValue" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/zh_list/https_url.ts b/src/views/product/class/constant/zh_list/https_url.ts new file mode 100644 index 0000000..c3ba85a --- /dev/null +++ b/src/views/product/class/constant/zh_list/https_url.ts @@ -0,0 +1,14 @@ +//请求地址 +export const HTTPS_URL_COLUMNS = [ + { + align: "left", + fixed: true, + label: "环境", + prop: "environment" + }, + { + align: "left", + label: "HTTPS地址", + prop: "https" + } +]; diff --git a/src/views/product/class/constant/zh_list/index.ts b/src/views/product/class/constant/zh_list/index.ts new file mode 100644 index 0000000..41685e9 --- /dev/null +++ b/src/views/product/class/constant/zh_list/index.ts @@ -0,0 +1,13 @@ +import { HTTPS_ERROR_PARAMS_COLUMNS } from "./error_params"; +import { HTTPS_PARAMS_COLUMNS } from "./https_params"; +import { HTTPS_URL_COLUMNS } from "./https_url"; +import { HTTPS_PUBLIC_PARAMS_COLUMNS } from "./public_params"; +import { HTTPS_RETURN_PARAMS_COLUMNS } from "./return_params"; + +export { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS, + HTTPS_PUBLIC_PARAMS_COLUMNS, + HTTPS_RETURN_PARAMS_COLUMNS +}; diff --git a/src/views/product/class/constant/zh_list/public_params.ts b/src/views/product/class/constant/zh_list/public_params.ts new file mode 100644 index 0000000..5e98c1c --- /dev/null +++ b/src/views/product/class/constant/zh_list/public_params.ts @@ -0,0 +1,23 @@ +//公共请求 +export const HTTPS_PUBLIC_PARAMS_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "是否必填", + prop: "isItMandatory" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/zh_list/return_params.ts b/src/views/product/class/constant/zh_list/return_params.ts new file mode 100644 index 0000000..1429299 --- /dev/null +++ b/src/views/product/class/constant/zh_list/return_params.ts @@ -0,0 +1,25 @@ +//返回参数 +export const HTTPS_RETURN_PARAMS_COLUMNS = [ + { + align: "left", + fixed: true, + label: "参数名称", + prop: "parameterInterface" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + + { + align: "left", + label: "示例值", + prop: "exampleValue" + }, + { + align: "left", + label: "说明", + prop: "describe" + } +]; diff --git a/src/views/product/class/data/en_data/index.ts b/src/views/product/class/data/en_data/index.ts new file mode 100644 index 0000000..130181a --- /dev/null +++ b/src/views/product/class/data/en_data/index.ts @@ -0,0 +1,117 @@ +import { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS + // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + //HTTPS_RETURN_PARAMS_EN_COLUMNS +} from "../../constant/en_list/index"; + +export const EN_DATA = [ + { + title: "Request URL", + columns: HTTPS_URL_EN_COLUMNS, //列表配置项 + data: [ + { + environment: "Test environment", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "Formal environment", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + // { + // title: "Common request parameters", 公共参数 + // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // parameterName: "category_id", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "", + // parameterDescription: "Classification ID" + // }, + // { + // parameterName: "language", + // parameterType: "string", + // isItMandatory: "可选", + // exampleValue: "zh-cn", + // parameterDescription: "语言" + // }, + // { + // parameterName: "page", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "1", + // parameterDescription: "" + // }, + // { + // parameterName: "size", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "50", + // parameterDescription: "" + // } + // ] + // }, + { + title: "Request parameter description", + columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterName: "parent_id", + parameterType: "integer", + isItMandatory: "no", + exampleValue: "1", + parameterDescription: "Parent ID (can be omitted)" + }, + { + parameterName: "language", + parameterType: "string", + isItMandatory: "no", + exampleValue: "zh-cn", + parameterDescription: "Language: zh cn (Chinese); En us (English)" + }, + { + parameterName: "page", + parameterType: "integer ", + isItMandatory: "no", + exampleValue: "1", + parameterDescription: "page number" + }, + { + parameterName: "size", + parameterType: "integer ", + isItMandatory: "no", + exampleValue: "50", + parameterDescription: "Number of items displayed per page (default 50, maximum 200)" + } + ] + }, + // { + // title: "Return parameter description", + // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // environment: "测试环境", + // https: "http://dev.ow.f2b211.com/admapi" + // }, + // { + // environment: "正式环境", + // https: "http://ow.f2b211.com/admapi" + // } + // ] + // }, + { + title: "Error declaration", + columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorMessage: "Unauthorized interface", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/product/class/data/zh_data/index.ts b/src/views/product/class/data/zh_data/index.ts new file mode 100644 index 0000000..71810de --- /dev/null +++ b/src/views/product/class/data/zh_data/index.ts @@ -0,0 +1,87 @@ +import { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS + // HTTPS_PUBLIC_PARAMS_COLUMNS, + // HTTPS_RETURN_PARAMS_COLUMNS +} from "../../constant/zh_list/index"; + +export const ZH_DATA = [ + { + title: "请求地址", + columns: HTTPS_URL_COLUMNS, //列表配置项 + data: [ + { + environment: "测试环境", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "正式环境", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + { + title: "请求参数说明", + columns: HTTPS_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterName: "parent_id", + parameterType: "integer", + isItMandatory: "可选", + exampleValue: "1", + parameterDescription: "所属父ID(可不传)" + }, + { + parameterName: "language", + parameterType: "string", + isItMandatory: "可选", + exampleValue: "zh-cn", + parameterDescription: "所属语言:zh-cn(中文);en-us(英文)" + }, + { + parameterName: "page", + parameterType: "integer ", + isItMandatory: "可选", + exampleValue: "1", + parameterDescription: "页码" + }, + { + parameterName: "size", + parameterType: "integer ", + isItMandatory: "可选", + exampleValue: "50", + parameterDescription: "每页显示条数(默认50,最大200)" + } + ] + }, + // { + // title: "返回参数说明", + // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + // data: [ + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // }, + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // } + // ] + // }, + { + title: "错误说明", + columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorInfo: "接口未经授权", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/product/class/example/index.ts b/src/views/product/class/example/index.ts new file mode 100644 index 0000000..3e8fe07 --- /dev/null +++ b/src/views/product/class/example/index.ts @@ -0,0 +1,614 @@ +//想要示例 +export const RETURN_VALUE = { + code: 0, + msg: "success", + data: { + total: 85, + per_page: 50, + current_page: 1, + last_page: 2, + data: [ + { + id: 1, + pid: 0, + path: "", + name: "数据存储", + icon: "", + desc: "", + sort: 1, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 2, + pid: 0, + path: "", + name: "智慧存储", + icon: "", + desc: "", + sort: 2, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 3, + pid: 0, + path: "", + name: "智能家居", + icon: "", + desc: "", + sort: 3, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 4, + pid: 0, + path: "", + name: "3C配件", + icon: "", + desc: "", + sort: 999, + level: 1, + is_show: 1, + deleted_at: null + }, + { + id: 5, + pid: 1, + path: "1", + name: "固态硬盘", + icon: "", + desc: "", + sort: 1, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 6, + pid: 1, + path: "1", + name: "移动硬盘", + icon: "", + desc: "", + sort: 2, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 7, + pid: 1, + path: "1", + name: "U盘/闪存卡", + icon: "", + desc: "", + sort: 5, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 8, + pid: 1, + path: "1", + name: "混合存储", + icon: "", + desc: "", + sort: 6, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 9, + pid: 1, + path: "1", + name: "网络附加存储 NAS", + icon: "", + desc: "", + sort: 4, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 10, + pid: 1, + path: "1", + name: "DAS", + icon: "", + desc: "", + sort: 7, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 11, + pid: 2, + path: "2", + name: "AI NAS", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 12, + pid: 2, + path: "2", + name: "AI PC", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 13, + pid: 2, + path: "2", + name: "家庭多媒体智慧存储", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 14, + pid: 2, + path: "2", + name: "视频剪辑存储电脑", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 15, + pid: 3, + path: "3", + name: "智能桌面", + icon: "", + desc: "", + sort: 16, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 16, + pid: 3, + path: "3", + name: "智能电脑桌", + icon: "", + desc: "", + sort: 17, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 17, + pid: 3, + path: "3", + name: "智能充电", + icon: "", + desc: "", + sort: 18, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 18, + pid: 3, + path: "3", + name: "插排", + icon: "", + desc: "", + sort: 15, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 19, + pid: 4, + path: "4", + name: "硬盘盒", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 20, + pid: 4, + path: "4", + name: "硬盘座", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 21, + pid: 4, + path: "4", + name: "HUB/扩展坞", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 22, + pid: 4, + path: "4", + name: "线材", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 23, + pid: 4, + path: "4", + name: "其他配件", + icon: "", + desc: "", + sort: 0, + level: 2, + is_show: 1, + deleted_at: null + }, + { + id: 24, + pid: 5, + path: "1,5", + name: "2.5寸SATA SSD", + icon: "", + desc: "", + sort: 4, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 25, + pid: 5, + path: "1,5", + name: "M.2 NVMe SSD", + icon: "", + desc: "", + sort: 1, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 26, + pid: 5, + path: "1,5", + name: "M.2 SATA SSD", + icon: "", + desc: "", + sort: 2, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 27, + pid: 5, + path: "1,5", + name: "mSATA SSD", + icon: "", + desc: "", + sort: 3, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 28, + pid: 6, + path: "1,6", + name: "移动硬盘", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 29, + pid: 7, + path: "1,7", + name: "U盘", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 30, + pid: 7, + path: "1,7", + name: "TF卡", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 31, + pid: 8, + path: "1,8", + name: "混合存储", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 32, + pid: 9, + path: "1,9", + name: "个人私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 33, + pid: 9, + path: "1,9", + name: "家庭私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 34, + pid: 9, + path: "1,9", + name: "团队私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 35, + pid: 9, + path: "1,9", + name: "内容创作者私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 36, + pid: 9, + path: "1,9", + name: "企业私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 37, + pid: 10, + path: "1,10", + name: "DAS", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 38, + pid: 11, + path: "2,11", + name: "个人AI私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 39, + pid: 11, + path: "2,11", + name: "企业AI私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 40, + pid: 12, + path: "2,12", + name: "AI PC", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 41, + pid: 13, + path: "2,13", + name: "家庭影音私有云", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 42, + pid: 13, + path: "2,13", + name: "家庭影音PC", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 43, + pid: 14, + path: "2,14", + name: "个人级PC", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 44, + pid: 14, + path: "2,14", + name: "专业级PC", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 45, + pid: 14, + path: "2,14", + name: "企业级PC", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 46, + pid: 15, + path: "3,15", + name: "扩展支架", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 47, + pid: 16, + path: "3,16", + name: "智能电脑桌", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 48, + pid: 17, + path: "3,17", + name: "PD充电器", + icon: "", + desc: "", + sort: 3, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 49, + pid: 17, + path: "3,17", + name: "USB充电器", + icon: "", + desc: "", + sort: 4, + level: 3, + is_show: 1, + deleted_at: null + }, + { + id: 50, + pid: 17, + path: "3,17", + name: "车载充电器", + icon: "", + desc: "", + sort: 0, + level: 3, + is_show: 1, + deleted_at: null + } + ], + has_more: true + } +}; diff --git a/src/views/product/class/index.vue b/src/views/product/class/index.vue new file mode 100644 index 0000000..c27bbad --- /dev/null +++ b/src/views/product/class/index.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/views/product/data/en_data/index.ts b/src/views/product/data/en_data/index.ts deleted file mode 100644 index f1a8939..0000000 --- a/src/views/product/data/en_data/index.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - HTTPS_ERROR_PARAMS_EN_COLUMNS, - HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS, - HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS -} from "../../constant/en_list/index"; - -export const EN_DATA = [ - { - title: "Request URL", - columns: HTTPS_URL_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "Test environment", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "Formal environment", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Common request parameters", - columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Request parameter description", - columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Return parameter description", - columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - { - title: "Error declaration", - columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - } -]; diff --git a/src/views/product/data/zh_data/index.ts b/src/views/product/data/zh_data/index.ts deleted file mode 100644 index 2dcc3c3..0000000 --- a/src/views/product/data/zh_data/index.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { - HTTPS_ERROR_PARAMS_COLUMNS, - HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS, - // HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS -} from "../../constant/zh_list/index"; - -export const ZH_DATA = [ - { - title: "请求地址", - columns: HTTPS_URL_COLUMNS, //列表配置项 - data: [ - { - environment: "测试环境", - https: "http://dev.ow.f2b211.com/admapi" - }, - { - environment: "正式环境", - https: "http://ow.f2b211.com/admapi" - } - ] - }, - // { - // title: "公共请求参数", - // columns: HTTPS_PUBLIC_PARAMS_COLUMNS, //列表配置项 - // data: [ - // { - // parameterName: "111", - // parameterType: "233", - // isItMandatory: "123232", - // parameterDescription: "3232323" - // }, - // { - // parameterName: "111", - // parameterType: "233", - // isItMandatory: "123232", - // parameterDescription: "3232323" - // } - // ] - // }, - { - title: "请求参数说明", - columns: HTTPS_PARAMS_COLUMNS, //列表配置项 - data: [ - { - parameterName: "测试环境", - parameterType: "http://dev.ow.f2b211.com/admapi", - isItMandatory: "否", - exampleValue: "多少", - parameterDescription: "demo" - }, - { - parameterName: "测试环境", - parameterType: "http://dev.ow.f2b211.com/admapi", - isItMandatory: "是", - exampleValue: "大萨达", - parameterDescription: "demo1" - } - ] - }, - { - title: "返回参数说明", - columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 - data: [ - { - parameterInterface: "1", - parameterType: "2", - exampleValue: "3", - describe: "4" - }, - { - parameterInterface: "1", - parameterType: "2", - exampleValue: "3", - describe: "4" - } - ] - }, - { - title: "错误说明", - columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 - data: [ - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - }, - { - errorCode: "111", - errorInfo: "233", - TroMethods: "123232" - } - ] - } -]; diff --git a/src/views/product/details/constant/en_list/error_params.ts b/src/views/product/details/constant/en_list/error_params.ts new file mode 100644 index 0000000..6320a4e --- /dev/null +++ b/src/views/product/details/constant/en_list/error_params.ts @@ -0,0 +1,20 @@ +//错误说明 +export const HTTPS_ERROR_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Error code", + prop: "errorCode" + }, + { + align: "left", + label: "Error message", + prop: "errorMessage" + } + + // { + // align: "left", + // label: "Troubleshooting method", + // prop: "TroMethods" + // } +]; diff --git a/src/views/product/details/constant/en_list/https_params.ts b/src/views/product/details/constant/en_list/https_params.ts new file mode 100644 index 0000000..dc194ff --- /dev/null +++ b/src/views/product/details/constant/en_list/https_params.ts @@ -0,0 +1,29 @@ +//请求参数 +export const HTTPS_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Is it mandatory", + prop: "isItMandatory" + }, + { + align: "left", + label: "Sample value", + prop: "exampleValue" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/en_list/https_url.ts b/src/views/product/details/constant/en_list/https_url.ts new file mode 100644 index 0000000..87eef66 --- /dev/null +++ b/src/views/product/details/constant/en_list/https_url.ts @@ -0,0 +1,14 @@ +//请求地址 +export const HTTPS_URL_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Environment", + prop: "environment" + }, + { + align: "left", + label: "HTTPS Address", + prop: "https" + } +]; diff --git a/src/views/product/details/constant/en_list/index.ts b/src/views/product/details/constant/en_list/index.ts new file mode 100644 index 0000000..f2f4256 --- /dev/null +++ b/src/views/product/details/constant/en_list/index.ts @@ -0,0 +1,13 @@ +import { HTTPS_ERROR_PARAMS_EN_COLUMNS } from "./error_params"; +import { HTTPS_PARAMS_EN_COLUMNS } from "./https_params"; +import { HTTPS_URL_EN_COLUMNS } from "./https_url"; +import { HTTPS_PUBLIC_PARAMS_EN_COLUMNS } from "./public_params"; +import { HTTPS_RETURN_PARAMS_EN_COLUMNS } from "./return_params"; + +export { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS, + HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + HTTPS_RETURN_PARAMS_EN_COLUMNS +}; diff --git a/src/views/product/details/constant/en_list/public_params.ts b/src/views/product/details/constant/en_list/public_params.ts new file mode 100644 index 0000000..770eb9c --- /dev/null +++ b/src/views/product/details/constant/en_list/public_params.ts @@ -0,0 +1,24 @@ +//公共请求 +export const HTTPS_PUBLIC_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Is it mandatory", + prop: "isItMandatory" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/en_list/return_params.ts b/src/views/product/details/constant/en_list/return_params.ts new file mode 100644 index 0000000..6bde662 --- /dev/null +++ b/src/views/product/details/constant/en_list/return_params.ts @@ -0,0 +1,25 @@ +//返回参数 +export const HTTPS_RETURN_PARAMS_EN_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter interface", + prop: "parameterInterface" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + + { + align: "left", + label: "Sample value", + prop: "exampleValue" + }, + { + align: "left", + label: "Describe", + prop: "describe" + } +]; diff --git a/src/views/product/details/constant/zh_list/error_params.ts b/src/views/product/details/constant/zh_list/error_params.ts new file mode 100644 index 0000000..e02ce26 --- /dev/null +++ b/src/views/product/details/constant/zh_list/error_params.ts @@ -0,0 +1,19 @@ +//错误说明 +export const HTTPS_ERROR_PARAMS_COLUMNS = [ + { + align: "left", + label: "错误码", + prop: "errorCode" + }, + { + align: "left", + label: "错误信息", + prop: "errorInfo" + } + + // { + // align: "left", + // label: "排查方法", + // prop: "TroMethods" + // } +]; diff --git a/src/views/product/details/constant/zh_list/https_params.ts b/src/views/product/details/constant/zh_list/https_params.ts new file mode 100644 index 0000000..04cf423 --- /dev/null +++ b/src/views/product/details/constant/zh_list/https_params.ts @@ -0,0 +1,28 @@ +//请求参数 +export const HTTPS_PARAMS_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "是否必填", + prop: "isItMandatory" + }, + { + align: "left", + label: "示例值", + prop: "exampleValue" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/zh_list/https_url.ts b/src/views/product/details/constant/zh_list/https_url.ts new file mode 100644 index 0000000..c3ba85a --- /dev/null +++ b/src/views/product/details/constant/zh_list/https_url.ts @@ -0,0 +1,14 @@ +//请求地址 +export const HTTPS_URL_COLUMNS = [ + { + align: "left", + fixed: true, + label: "环境", + prop: "environment" + }, + { + align: "left", + label: "HTTPS地址", + prop: "https" + } +]; diff --git a/src/views/product/details/constant/zh_list/index.ts b/src/views/product/details/constant/zh_list/index.ts new file mode 100644 index 0000000..41685e9 --- /dev/null +++ b/src/views/product/details/constant/zh_list/index.ts @@ -0,0 +1,13 @@ +import { HTTPS_ERROR_PARAMS_COLUMNS } from "./error_params"; +import { HTTPS_PARAMS_COLUMNS } from "./https_params"; +import { HTTPS_URL_COLUMNS } from "./https_url"; +import { HTTPS_PUBLIC_PARAMS_COLUMNS } from "./public_params"; +import { HTTPS_RETURN_PARAMS_COLUMNS } from "./return_params"; + +export { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS, + HTTPS_PUBLIC_PARAMS_COLUMNS, + HTTPS_RETURN_PARAMS_COLUMNS +}; diff --git a/src/views/product/details/constant/zh_list/public_params.ts b/src/views/product/details/constant/zh_list/public_params.ts new file mode 100644 index 0000000..5e98c1c --- /dev/null +++ b/src/views/product/details/constant/zh_list/public_params.ts @@ -0,0 +1,23 @@ +//公共请求 +export const HTTPS_PUBLIC_PARAMS_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "是否必填", + prop: "isItMandatory" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/zh_list/return_params.ts b/src/views/product/details/constant/zh_list/return_params.ts new file mode 100644 index 0000000..1429299 --- /dev/null +++ b/src/views/product/details/constant/zh_list/return_params.ts @@ -0,0 +1,25 @@ +//返回参数 +export const HTTPS_RETURN_PARAMS_COLUMNS = [ + { + align: "left", + fixed: true, + label: "参数名称", + prop: "parameterInterface" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + + { + align: "left", + label: "示例值", + prop: "exampleValue" + }, + { + align: "left", + label: "说明", + prop: "describe" + } +]; diff --git a/src/views/product/details/data/en_data/index.ts b/src/views/product/details/data/en_data/index.ts new file mode 100644 index 0000000..488dd60 --- /dev/null +++ b/src/views/product/details/data/en_data/index.ts @@ -0,0 +1,96 @@ +import { + HTTPS_ERROR_PARAMS_EN_COLUMNS, + HTTPS_PARAMS_EN_COLUMNS, + HTTPS_URL_EN_COLUMNS + // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + //HTTPS_RETURN_PARAMS_EN_COLUMNS +} from "../../constant/en_list/index"; + +export const EN_DATA = [ + { + title: "Request URL", + columns: HTTPS_URL_EN_COLUMNS, //列表配置项 + data: [ + { + environment: "Test environment", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "Formal environment", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + // { + // title: "Common request parameters", 公共参数 + // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // parameterName: "category_id", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "", + // parameterDescription: "Classification ID" + // }, + // { + // parameterName: "language", + // parameterType: "string", + // isItMandatory: "可选", + // exampleValue: "zh-cn", + // parameterDescription: "语言" + // }, + // { + // parameterName: "page", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "1", + // parameterDescription: "" + // }, + // { + // parameterName: "size", + // parameterType: "integer", + // isItMandatory: "可选", + // exampleValue: "50", + // parameterDescription: "" + // } + // ] + // }, + { + title: "Request parameter description", + columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterName: "id", + parameterType: "string ", + isItMandatory: "yes", + exampleValue: "1", + parameterDescription: "Details ID" + } + ] + }, + // { + // title: "Return parameter description", + // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + // data: [ + // { + // environment: "测试环境", + // https: "http://dev.ow.f2b211.com/admapi" + // }, + // { + // environment: "正式环境", + // https: "http://ow.f2b211.com/admapi" + // } + // ] + // }, + { + title: "Error declaration", + columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorMessage: "Unauthorized interface", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/product/details/data/zh_data/index.ts b/src/views/product/details/data/zh_data/index.ts new file mode 100644 index 0000000..af944b6 --- /dev/null +++ b/src/views/product/details/data/zh_data/index.ts @@ -0,0 +1,66 @@ +import { + HTTPS_ERROR_PARAMS_COLUMNS, + HTTPS_PARAMS_COLUMNS, + HTTPS_URL_COLUMNS + // HTTPS_PUBLIC_PARAMS_COLUMNS, + // HTTPS_RETURN_PARAMS_COLUMNS +} from "../../constant/zh_list/index"; + +export const ZH_DATA = [ + { + title: "请求地址", + columns: HTTPS_URL_COLUMNS, //列表配置项 + data: [ + { + environment: "测试环境", + https: "http://dev.ow.f2b211.com/admapi" + }, + { + environment: "正式环境", + https: "http://ow.f2b211.com/admapi" + } + ] + }, + { + title: "请求参数说明", + columns: HTTPS_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterName: "id", + parameterType: "string ", + isItMandatory: "必需", + exampleValue: "1", + parameterDescription: "详情id" + } + ] + }, + // { + // title: "返回参数说明", + // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + // data: [ + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // }, + // { + // parameterInterface: "1", + // parameterType: "2", + // exampleValue: "3", + // describe: "4" + // } + // ] + // }, + { + title: "错误说明", + columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项 + data: [ + { + errorCode: "401", + errorInfo: "接口未经授权", + TroMethods: "" + } + ] + } +]; diff --git a/src/views/product/details/example/index.ts b/src/views/product/details/example/index.ts new file mode 100644 index 0000000..f53f3fe --- /dev/null +++ b/src/views/product/details/example/index.ts @@ -0,0 +1,119 @@ +//想要示例 +export const RETURN_VALUE = { + code: 0, + msg: "success", + data: { + id: 1, + spu: "ORICO-20UTS", + name: "2.5英寸硬盘易驱线, 免工具免驱动,即插即用", + short_name: "支持热插拔,免驱动,支持OTG", + cover_image: "https://dev.ow.f2b211.com/storage/images/product/20250509/c5bb77c9495d1bd476f8d2e4d66aea4f.jpg", + desc: "USB-A To Type-C\r\n支持2TB\r\n免工具拆装", + video_img: "", + video_url: "", + is_sale: 1, + is_new: 0, + is_hot: 0, + is_show: 1, + sort: 0, + detail: '
\r\n\t

\r\n\t\tOrico USB3.0 2.5英寸硬盘易驱线\r\n\t

\r\n\t

\r\n\t\t高速传输,就是要快\r\n\t

\r\n
\r\n\t

\r\n\t\t简约风格,灵越之作\r\n\t

\r\n\t

\r\n\t\t简约外观设计,表面纹面工艺处理,大气\r\n\t

\r\n
\r\n\t

\r\n\t\tOTG功能,手机/平板也可以连硬盘\r\n\t

\r\n
\r\n\t

\r\n\t\t6Gbps急速,支持UASP协议\r\n\t

\r\n\t

\r\n\t\t配合高速SSD固态硬盘传输速度可达500M/S,传输一部1GB的高清电影仅需2秒。\r\n\t

\r\n
\r\n\t

\r\n\t\t露天式结构,解决散热问题\r\n\t

\r\n\t

\r\n\t\t360度散热设计,使硬盘散热更畅快\r\n\t

\r\n
\r\n\t

\r\n\t\t免工具免驱动,即插即用\r\n\t

\r\n\t

\r\n\t\t免工具拆装硬盘,2秒更换硬盘,支持热插拔\r\n\t

\r\n
\r\n\t

\r\n\t\t成为您的移动资料库,让旧硬盘焕发新生\r\n\t

\r\n\t

\r\n\t\t只要您是2.5英寸SATA串口硬盘,配合ORICO易驱线使用,便能成为您的移动资料库。\r\n\t

\r\n
\r\n\t

\r\n\t\t让您存储无忧\r\n\t

\r\n\t

\r\n\t\t急速传输,智能存储,数据保护\r\n\t

\r\n
\r\n\t

\r\n\t\t迷你便携设计,仅火柴盒大小\r\n\t

\r\n\t

\r\n\t\t迷你尺寸,不占地方,小巧方便携带,使用简单。\r\n\t

\r\n
\r\n\t

\r\n\t\t品质与工艺的双重结合\r\n\t

\r\n\t

\r\n\t\t采用ABS工程材料精心打造,拥有很好的抗氧化性、耐腐蚀性,使用长久。\r\n\t

\r\n
\r\n\t

\r\n\t\t真海量存储\r\n\t

\r\n\t

\r\n\t\t支持2TB硬盘海量存储,游戏/数据无忧存,无虑取。\r\n\t

\r\n
\r\n\t

\r\n\t\t广泛兼容,适用诸多设备\r\n\t

\r\n
\r\n\t

\r\n\t\t多重安全模块\r\n\t

\r\n
\r\n\t

\r\n\t\t2.5英寸硬盘易驱线细节展示\r\n\t

\r\n
\r\n标签:便携式易驱线 \r\n
', + status: 1, + category: { + id: 56, + name: "易驱线" + }, + params: [ + { + name: "产品材料", + value: "ABS" + }, + { + name: "产品供电", + value: "USB接口供电" + }, + { + name: "产品接口", + value: "USB-A To Type-C" + }, + { + name: "安装方式", + value: "免工具" + }, + { + name: "支持容量", + value: "2TB" + }, + { + name: "支持系统", + value: "Windows/MAC/Linux" + }, + { + name: "产品尺寸", + value: "52*30*12mm(分离式数据线长度:50cm)" + }, + { + name: "产品颜色", + value: "黑" + }, + { + name: "传输速率", + value: "USB3.0 5Gbps" + }, + { + name: "主控方案", + value: "VL716" + } + ], + skus: [ + { + sku: "", + main_image: "https://dev.ow.f2b211.com/storage/images/product/20250509/cfc63f7e9735230a57cb0e2e4cc63d79.jpg", + photo_album: [ + "https://dev.ow.f2b211.com/storage/images/product/20250509/c6331b33b11fbb6b3c32835cc7e1e536.jpg", + "https://dev.ow.f2b211.com/storage/images/product/20250509/fc9a8d8b8fe4191d098a49c2a161d451.jpg", + "https://dev.ow.f2b211.com/storage/images/product/20250509/aa2fbc174250b08d9e85366a41ee4ec8.jpg", + "https://dev.ow.f2b211.com/storage/images/product/20250509/6f12aa1db3658d23fc01c0e64e5bd697.jpg", + "https://dev.ow.f2b211.com/storage/images/product/20250509/50d915d8e1d3cd27e766c5c2808b5fcd.jpg" + ], + sort: 0, + sku_attr: [ + { + attr_value: + "https://dev.ow.f2b211.com/storage/images/product/20250509/d67f26a264e009c7a80758f5012b0d64.jpg", + attr_name: "颜色" + } + ] + } + ], + links: [ + { + link: "https://detail.tmall.com/item.htm?abbucket=14&id=757428266785&rn=61905612024094e4b01cbe4a1b91ccd7&spm=a1z10.5-b-s.w4011-15573035611.53.3d737746rz6hlI", + platform: "天猫购买" + }, + { + link: "https://item.jd.com/10094204384530.html", + platform: "京东购买" + } + ], + related: [ + { + id: 59, + name: "充电巴士支架式5口40W总功率智能充电器", + spu: "ORICO-DUK-5P", + cover_image: "https://dev.ow.f2b211.com/storage/images/product/20250509/12409d7a1084841b9c683563325ea967.jpg" + }, + { + id: 58, + name: "120W总功率 10口桌面智能充电器", + spu: "ORICO-DUB-10P-V1", + cover_image: "https://dev.ow.f2b211.com/storage/images/product/20250509/4571bc111d575939df5bf694fd2be0a4.jpg" + }, + { + id: 103, + name: "6口桌面式50W总功率智能充电器", + spu: "ORICO-CSE-6U", + cover_image: "https://dev.ow.f2b211.com/storage/images/product/20250509/970404301dd1fd436d17dd1ed9a726db.jpg" + } + ] + } +}; diff --git a/src/views/product/index.vue b/src/views/product/details/index.vue similarity index 81% rename from src/views/product/index.vue rename to src/views/product/details/index.vue index 98d1e1d..0fa1a12 100644 --- a/src/views/product/index.vue +++ b/src/views/product/details/index.vue @@ -1,7 +1,7 @@ - + +