diff --git a/src/assets/json/authMenuList.json b/src/assets/json/authMenuList.json index 9f4154f..ba66715 100644 --- a/src/assets/json/authMenuList.json +++ b/src/assets/json/authMenuList.json @@ -3,9 +3,9 @@ "data": [ { "id": 1, - "path": "/index", + "path": "", "name": "foundation", - "component": "/foundation/index", + "component": "/foundation", "hidden": false, "children":[ { diff --git a/src/components/MyTable/index.vue b/src/components/MyTable/index.vue index 6bb045b..fca9f90 100644 --- a/src/components/MyTable/index.vue +++ b/src/components/MyTable/index.vue @@ -2,7 +2,7 @@
{{ title }}
- + @@ -17,7 +17,6 @@ export interface ProTableProps { tableData?: any[]; // 静态 table data 数据,若存在则不会使用 requestApi 返回的 data ==> 非必传 title?: string; } - // 接受父组件参数,配置默认值 withDefaults(defineProps(), { columns: () => [], diff --git a/src/views/foundation/constant/en_list/https_header.ts b/src/views/foundation/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/foundation/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/foundation/constant/en_list/index.ts b/src/views/foundation/constant/en_list/index.ts index f2f4256..268f8b1 100644 --- a/src/views/foundation/constant/en_list/index.ts +++ b/src/views/foundation/constant/en_list/index.ts @@ -3,11 +3,13 @@ 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"; +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/foundation/constant/zh_list/https_header.ts b/src/views/foundation/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/foundation/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/foundation/constant/zh_list/index.ts b/src/views/foundation/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/foundation/constant/zh_list/index.ts +++ b/src/views/foundation/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/foundation/data/en_data/index.ts b/src/views/foundation/data/en_data/index.ts index 22e20c0..d88e1d2 100644 --- a/src/views/foundation/data/en_data/index.ts +++ b/src/views/foundation/data/en_data/index.ts @@ -2,7 +2,8 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, // HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, - HTTPS_PUBLIC_PARAMS_EN_COLUMNS + HTTPS_PUBLIC_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS // HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; @@ -21,6 +22,24 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "POST", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "multipart/form-data", + parameterType: "string", + parameterDescription: "data format" + } + ] + }, { title: "Common request parameters", columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/foundation/data/zh_data/index.ts b/src/views/foundation/data/zh_data/index.ts index 73cbabd..24e0e55 100644 --- a/src/views/foundation/data/zh_data/index.ts +++ b/src/views/foundation/data/zh_data/index.ts @@ -2,7 +2,8 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, // HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, - HTTPS_PUBLIC_PARAMS_COLUMNS + HTTPS_PUBLIC_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS //HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; @@ -21,6 +22,24 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "POST", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "multipart/form-data", + parameterType: "string", + parameterDescription: "数据格式" + } + ] + }, { title: "公共请求参数", columns: HTTPS_PUBLIC_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/news/class/constant/en_list/https_header.ts b/src/views/news/class/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/news/class/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/class/constant/en_list/index.ts b/src/views/news/class/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/news/class/constant/en_list/index.ts +++ b/src/views/news/class/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/class/constant/zh_list/https_header.ts b/src/views/news/class/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/news/class/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/class/constant/zh_list/index.ts b/src/views/news/class/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/news/class/constant/zh_list/index.ts +++ b/src/views/news/class/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/class/data/en_data/index.ts b/src/views/news/class/data/en_data/index.ts index 3c08334..8ba7110 100644 --- a/src/views/news/class/data/en_data/index.ts +++ b/src/views/news/class/data/en_data/index.ts @@ -1,9 +1,11 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, + // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +23,30 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -89,6 +115,135 @@ export const EN_DATA = [ } ] }, + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "Total number of articles", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "Number of output per page", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "Current page number", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "1000", + describe: "Page", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "object", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "pid", + parameterType: "integer", + exampleValue: "", + describe: "Father ID", + id: 37 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "name", + id: 38 + }, + { + parameterInterface: "short_name", + parameterType: "string", + exampleValue: "", + describe: "abbreviation", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "describe", + id: 411 + }, + { + parameterInterface: "sort", + parameterType: "string", + exampleValue: "", + describe: "Sort Values", + id: 412 + }, + { + parameterInterface: "level", + parameterType: "integer", + exampleValue: "", + describe: "Belonging level", + id: 413 + }, + { + parameterInterface: "is_show", + parameterType: "integer", + exampleValue: "1 Yes, 0 No", + describe: "Is it displayed", + id: 414 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "Delete time (value when category has been deleted)", + id: 42 + } + ] + } + ] + } + ] + }, // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/news/class/data/zh_data/index.ts b/src/views/news/class/data/zh_data/index.ts index 3a24f7a..ecb3fea 100644 --- a/src/views/news/class/data/zh_data/index.ts +++ b/src/views/news/class/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,30 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -55,6 +80,135 @@ export const ZH_DATA = [ } ] }, + { + title: "返回参数说明", + columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "总条数", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "每页输出条数", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "当前页码", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "10", + describe: "总页数", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "object", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "pid", + parameterType: "integer", + exampleValue: "", + describe: "父id", + id: 37 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "名称", + id: 38 + }, + { + parameterInterface: "short_name", + parameterType: "string", + exampleValue: "", + describe: "简称", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "描述", + id: 411 + }, + { + parameterInterface: "sort", + parameterType: "string", + exampleValue: "", + describe: "排序值", + id: 412 + }, + { + parameterInterface: "level", + parameterType: "integer", + exampleValue: "", + describe: "所属层级", + id: 413 + }, + { + parameterInterface: "is_show", + parameterType: "integer", + exampleValue: "1是,0否", + describe: "是否显示", + id: 414 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "删除时间(分类已删除时有值)", + id: 42 + } + ] + } + ] + } + ] + }, // { // title: "返回参数说明", // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/news/details/constant/en_list/https_header.ts b/src/views/news/details/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/news/details/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/details/constant/en_list/index.ts b/src/views/news/details/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/news/details/constant/en_list/index.ts +++ b/src/views/news/details/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/details/constant/zh_list/https_header.ts b/src/views/news/details/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/news/details/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/details/constant/zh_list/index.ts b/src/views/news/details/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/news/details/constant/zh_list/index.ts +++ b/src/views/news/details/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/details/data/en_data/index.ts b/src/views/news/details/data/en_data/index.ts index 488dd60..bebbb45 100644 --- a/src/views/news/details/data/en_data/index.ts +++ b/src/views/news/details/data/en_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +22,30 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -68,6 +93,150 @@ export const EN_DATA = [ } ] }, + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + + { + parameterInterface: "data", + parameterType: "object", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "title", + parameterType: "string", + exampleValue: "", + describe: "Article Title", + id: 37 + }, + { + parameterInterface: "author", + parameterType: "string", + exampleValue: "", + describe: "author", + id: 38 + }, + { + parameterInterface: "source", + parameterType: "string", + exampleValue: "", + describe: "source", + id: 40 + }, + { + parameterInterface: "image", + parameterType: "string", + exampleValue: "", + describe: "Cover image address", + id: 41 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "describe", + id: 411 + }, + { + parameterInterface: "recommend", + parameterType: "string", + exampleValue: "1 Yes, 0 No", + describe: "Do you recommend it", + id: 412 + }, + { + parameterInterface: "release_time", + parameterType: "string", + exampleValue: "", + describe: "Release time", + id: 413 + }, + { + parameterInterface: "sort", + parameterType: "integer", + exampleValue: "", + describe: "Sort Values", + id: 414 + }, + { + parameterInterface: "link", + parameterType: "string", + exampleValue: "", + describe: "External link address", + id: 415 + }, + { + parameterInterface: "content", + parameterType: "string", + exampleValue: "", + describe: "Article Content", + id: 416 + }, + { + parameterInterface: "view_count", + parameterType: "integer", + exampleValue: "", + describe: "Page View", + id: 417 + }, + { + parameterInterface: "praise_count", + parameterType: "integer", + exampleValue: "", + describe: "Like count", + id: 418 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "Category ID", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Category name", + id: 45 + } + ] + } + ] + } + ] + }, // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/news/details/data/zh_data/index.ts b/src/views/news/details/data/zh_data/index.ts index af944b6..1740343 100644 --- a/src/views/news/details/data/zh_data/index.ts +++ b/src/views/news/details/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,30 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -34,6 +59,150 @@ export const ZH_DATA = [ } ] }, + { + title: "返回参数说明", + columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + + { + parameterInterface: "data", + parameterType: "object", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "title", + parameterType: "string", + exampleValue: "", + describe: "文章标题", + id: 37 + }, + { + parameterInterface: "author", + parameterType: "string", + exampleValue: "", + describe: "作者", + id: 38 + }, + { + parameterInterface: "source", + parameterType: "string", + exampleValue: "", + describe: "来源", + id: 40 + }, + { + parameterInterface: "image", + parameterType: "string", + exampleValue: "", + describe: "封面图地址", + id: 41 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "描述", + id: 411 + }, + { + parameterInterface: "recommend", + parameterType: "string", + exampleValue: "1是,0否", + describe: "是否推荐", + id: 412 + }, + { + parameterInterface: "release_time", + parameterType: "string", + exampleValue: "", + describe: "发布时间", + id: 413 + }, + { + parameterInterface: "sort", + parameterType: "integer", + exampleValue: "", + describe: "排序值", + id: 414 + }, + { + parameterInterface: "link", + parameterType: "string", + exampleValue: "", + describe: "外链地址", + id: 415 + }, + { + parameterInterface: "content", + parameterType: "string", + exampleValue: "", + describe: "文章内容", + id: 416 + }, + { + parameterInterface: "view_count", + parameterType: "integer", + exampleValue: "", + describe: "浏览量", + id: 417 + }, + { + parameterInterface: "praise_count", + parameterType: "integer", + exampleValue: "", + describe: "点赞量", + id: 418 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "所属分类id", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "所属分类名称", + id: 45 + } + ] + } + ] + } + ] + }, // { // title: "返回参数说明", // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/news/list/constant/en_list/https_header.ts b/src/views/news/list/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/news/list/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/list/constant/en_list/index.ts b/src/views/news/list/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/news/list/constant/en_list/index.ts +++ b/src/views/news/list/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/list/constant/zh_list/https_header.ts b/src/views/news/list/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/news/list/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/news/list/constant/zh_list/index.ts b/src/views/news/list/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/news/list/constant/zh_list/index.ts +++ b/src/views/news/list/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/news/list/data/en_data/index.ts b/src/views/news/list/data/en_data/index.ts index 794e793..cfb07c7 100644 --- a/src/views/news/list/data/en_data/index.ts +++ b/src/views/news/list/data/en_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +22,30 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -89,6 +114,131 @@ export const EN_DATA = [ } ] }, + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "Total number of articles", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "Number of output per page", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "Current page number", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "1000", + describe: "Page", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array[object] ", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "title", + parameterType: "string", + exampleValue: "", + describe: "Article Title", + id: 37 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "describe", + id: 38 + }, + { + parameterInterface: "image", + parameterType: "string", + exampleValue: "", + describe: "Cover image address", + id: 40 + }, + + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "Delete time (value when category has been deleted)", + id: 42 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "Category ID", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Category name", + id: 45 + } + ] + } + ] + } + ] + } + ] + }, // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/news/list/data/zh_data/index.ts b/src/views/news/list/data/zh_data/index.ts index f54ed89..7bbbd18 100644 --- a/src/views/news/list/data/zh_data/index.ts +++ b/src/views/news/list/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,30 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -55,6 +80,131 @@ export const ZH_DATA = [ } ] }, + { + title: "返回参数说明", + columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "总条数", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "每页输出条数", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "当前页码", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "10", + describe: "总页数", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array[object] ", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "title", + parameterType: "string", + exampleValue: "", + describe: "文章标题", + id: 37 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "描述", + id: 38 + }, + { + parameterInterface: "image", + parameterType: "string", + exampleValue: "", + describe: "封面图地址", + id: 40 + }, + + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "删除时间(分类已删除时有值)", + id: 42 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "所属分类id", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "所属分类名称", + id: 45 + } + ] + } + ] + } + ] + } + ] + }, // { // title: "返回参数说明", // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/product/class/constant/en_list/https_header.ts b/src/views/product/class/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/product/class/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/en_list/index.ts b/src/views/product/class/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/product/class/constant/en_list/index.ts +++ b/src/views/product/class/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/product/class/constant/zh_list/https_header.ts b/src/views/product/class/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/product/class/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/class/constant/zh_list/index.ts b/src/views/product/class/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/product/class/constant/zh_list/index.ts +++ b/src/views/product/class/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/product/class/data/en_data/index.ts b/src/views/product/class/data/en_data/index.ts index 130181a..3a400f0 100644 --- a/src/views/product/class/data/en_data/index.ts +++ b/src/views/product/class/data/en_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +22,31 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, + // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -55,6 +81,7 @@ export const EN_DATA = [ // } // ] // }, + { title: "Request parameter description", columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 @@ -89,6 +116,142 @@ export const EN_DATA = [ } ] }, + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "Total number of articles", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "Number of output per page", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "Current page number", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "1000", + describe: "Page", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array[object] ", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "pid", + parameterType: "integer", + exampleValue: "", + describe: "Father ID", + id: 37 + }, + { + parameterInterface: "path", + parameterType: "string", + exampleValue: "", + describe: "Hierarchical path to which it belongs", + id: 38 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Classification name", + id: 39 + }, + { + parameterInterface: "icon", + parameterType: "string", + exampleValue: "", + describe: "Small icon address", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "describe", + id: 41 + }, + { + parameterInterface: "sort", + parameterType: "integer", + exampleValue: "", + describe: "Sort Values", + id: 42 + }, + { + parameterInterface: "level", + parameterType: "integer", + exampleValue: "", + describe: "Belonging level", + id: 43 + }, + { + parameterInterface: "is_show", + parameterType: "integer", + exampleValue: "1 Yes, 0 No", + describe: "Is it displayed", + id: 44 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "Delete time (value when category has been deleted)", + id: 45 + } + ] + } + ] + } + ] + }, // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/product/class/data/zh_data/index.ts b/src/views/product/class/data/zh_data/index.ts index 71810de..c95392d 100644 --- a/src/views/product/class/data/zh_data/index.ts +++ b/src/views/product/class/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,31 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, + { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -55,6 +81,142 @@ export const ZH_DATA = [ } ] }, + { + title: "返回参数说明", + columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "总条数", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "每页输出条数", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "当前页码", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "10", + describe: "总页数", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array[object] ", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "pid", + parameterType: "integer", + exampleValue: "", + describe: "父id", + id: 37 + }, + { + parameterInterface: "path", + parameterType: "string", + exampleValue: "", + describe: "所属层级路径", + id: 38 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "分类名称", + id: 39 + }, + { + parameterInterface: "icon", + parameterType: "string", + exampleValue: "", + describe: "小图标地址", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "描述", + id: 41 + }, + { + parameterInterface: "sort", + parameterType: "integer", + exampleValue: "", + describe: "排序值", + id: 42 + }, + { + parameterInterface: "level", + parameterType: "integer", + exampleValue: "", + describe: "所属层级", + id: 43 + }, + { + parameterInterface: "is_show", + parameterType: "integer", + exampleValue: "1是,0否", + describe: "是否显示", + id: 44 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "删除时间(分类已删除时有值)", + id: 45 + } + ] + } + ] + } + ] + }, // { // title: "返回参数说明", // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/product/details/constant/en_list/https_header.ts b/src/views/product/details/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/product/details/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/en_list/index.ts b/src/views/product/details/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/product/details/constant/en_list/index.ts +++ b/src/views/product/details/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/product/details/constant/zh_list/https_header.ts b/src/views/product/details/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/product/details/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/details/constant/zh_list/index.ts b/src/views/product/details/constant/zh_list/index.ts index 41685e9..2407345 100644 --- a/src/views/product/details/constant/zh_list/index.ts +++ b/src/views/product/details/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, - HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/product/details/data/en_data/index.ts b/src/views/product/details/data/en_data/index.ts index 488dd60..5f2a566 100644 --- a/src/views/product/details/data/en_data/index.ts +++ b/src/views/product/details/data/en_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +22,30 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -68,6 +93,307 @@ export const EN_DATA = [ } ] }, + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "10", + describe: "ID", + id: 34 + }, + { + parameterInterface: "spu", + parameterType: "string ", + exampleValue: "", + describe: "spu", + id: 35 + }, + { + parameterInterface: "name", + parameterType: "string ", + exampleValue: "", + describe: "Product name", + id: 36 + }, + { + parameterInterface: "short_name", + parameterType: "string ", + exampleValue: "", + describe: "Product abbreviation", + id: 37 + }, + { + parameterInterface: "cover_image", + parameterType: "string ", + exampleValue: "", + describe: "Cover image address", + id: 38 + }, + { + parameterInterface: "desc", + parameterType: "string ", + exampleValue: "", + describe: "describe", + id: 39 + }, + { + parameterInterface: "video_img", + parameterType: "string ", + exampleValue: "", + describe: "Video Cover Image Address", + id: 40 + }, + { + parameterInterface: "video_url", + parameterType: "string ", + exampleValue: "", + describe: "Video address", + id: 41 + }, + { + parameterInterface: "is_sale", + parameterType: "string ", + exampleValue: "1 Yes, 0 No", + describe: "Is it for sale", + id: 42 + }, + { + parameterInterface: "is_new", + parameterType: "string ", + exampleValue: "1 new product, 0 non new product", + describe: "Is it a new product", + id: 43 + }, + { + parameterInterface: "is_hot", + parameterType: "string ", + exampleValue: "1 hot selling, 0 non hot selling", + describe: "Is it hot selling", + id: 44 + }, + { + parameterInterface: "is_show", + parameterType: "string ", + exampleValue: "1 listed, 0 removed", + describe: "Is it listed", + id: 45 + }, + { + parameterInterface: "sort", + parameterType: "integer ", + exampleValue: "1", + describe: "Sort Values", + id: 46 + }, + { + parameterInterface: "detail", + parameterType: "string", + exampleValue: "", + describe: "Details Content", + id: 47 + }, + { + parameterInterface: "status", + parameterType: "integer", + exampleValue: "1 enabled, -1 disabled", + describe: "status", + id: 48 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 49, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "Category ID", + id: 50 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Category name", + id: 51 + } + ] + }, + { + parameterInterface: "params", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521, + children: [ + { + parameterInterface: "name", + parameterType: "string ", + exampleValue: "", + describe: "Parameter", + id: 501 + }, + { + parameterInterface: "value", + parameterType: "string", + exampleValue: "", + describe: "Parameter values", + id: 511 + } + ] + }, + { + parameterInterface: "skus", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 5211, + children: [ + { + parameterInterface: "sku", + parameterType: "string", + exampleValue: "", + describe: "sku", + id: 5012 + }, + { + parameterInterface: "main_image", + parameterType: "string", + exampleValue: "", + describe: "SKU main image", + id: 5132 + }, + { + parameterInterface: "photo_album", + parameterType: "array[string]", + exampleValue: "", + describe: "atlas", + id: 51321 + }, + { + parameterInterface: "sort", + parameterType: "integer ", + exampleValue: "", + describe: "Sort Values", + id: 5132111 + }, + { + parameterInterface: "sku_attr", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 513211111, + children: [ + { + parameterInterface: "attr_value", + parameterType: "string", + exampleValue: "", + describe: "SKU attribute value", + id: 51321111323232 + }, + { + parameterInterface: "attr_name", + parameterType: "string", + exampleValue: "", + describe: "SKU attribute name", + id: 51321111111111 + } + ] + } + ] + }, + { + parameterInterface: "links", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521199, + children: [ + { + parameterInterface: "link", + parameterType: "string", + exampleValue: "", + describe: "Purchase link", + id: 5211341987 + }, + { + parameterInterface: "platform", + parameterType: "string", + exampleValue: "", + describe: "Purchase platform", + id: 5211341987245 + } + ] + }, + { + parameterInterface: "related", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521199541, + children: [ + { + parameterInterface: "id", + parameterType: "integer", + exampleValue: "", + describe: "product id", + id: 5211341987188 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Product name", + id: 999 + }, + { + parameterInterface: "spu", + parameterType: "string", + exampleValue: "", + describe: "spu", + id: 9991 + }, + { + parameterInterface: "cover_image", + parameterType: "string", + exampleValue: "", + describe: "cover photo", + id: 999122 + } + ] + } + ] + } + ] + }, + // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/product/details/data/zh_data/index.ts b/src/views/product/details/data/zh_data/index.ts index af944b6..ed61094 100644 --- a/src/views/product/details/data/zh_data/index.ts +++ b/src/views/product/details/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,31 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, + { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -34,6 +60,306 @@ export const ZH_DATA = [ } ] }, + { + title: "返回参数说明", + columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "10", + describe: "id", + id: 34 + }, + { + parameterInterface: "spu", + parameterType: "string ", + exampleValue: "", + describe: "spu", + id: 35 + }, + { + parameterInterface: "name", + parameterType: "string ", + exampleValue: "", + describe: "产品名称", + id: 36 + }, + { + parameterInterface: "short_name", + parameterType: "string ", + exampleValue: "", + describe: "产品简称", + id: 37 + }, + { + parameterInterface: "cover_image", + parameterType: "string ", + exampleValue: "", + describe: "封面图地址", + id: 38 + }, + { + parameterInterface: "desc", + parameterType: "string ", + exampleValue: "", + describe: "描述", + id: 39 + }, + { + parameterInterface: "video_img", + parameterType: "string ", + exampleValue: "", + describe: "视频封面图片地址", + id: 40 + }, + { + parameterInterface: "video_url", + parameterType: "string ", + exampleValue: "", + describe: "视频地址", + id: 41 + }, + { + parameterInterface: "is_sale", + parameterType: "string ", + exampleValue: "1是,0否", + describe: "是否在售", + id: 42 + }, + { + parameterInterface: "is_new", + parameterType: "string ", + exampleValue: "1新品,0非新品", + describe: "是否新品", + id: 43 + }, + { + parameterInterface: "is_hot", + parameterType: "string ", + exampleValue: "1热销,0非热销", + describe: "是否热销", + id: 44 + }, + { + parameterInterface: "is_show", + parameterType: "string ", + exampleValue: "1上架,0下架", + describe: "是否上架", + id: 45 + }, + { + parameterInterface: "sort", + parameterType: "integer ", + exampleValue: "1", + describe: "排序值", + id: 46 + }, + { + parameterInterface: "detail", + parameterType: "string", + exampleValue: "", + describe: "详情内容", + id: 47 + }, + { + parameterInterface: "status", + parameterType: "integer", + exampleValue: "1启用,-1禁用", + describe: "状态", + id: 48 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 49, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "所属分类id", + id: 50 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "所属分类名称", + id: 51 + } + ] + }, + { + parameterInterface: "params", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521, + children: [ + { + parameterInterface: "name", + parameterType: "string ", + exampleValue: "", + describe: "参数名称 ", + id: 501 + }, + { + parameterInterface: "value", + parameterType: "string", + exampleValue: "", + describe: "参数值", + id: 511 + } + ] + }, + { + parameterInterface: "skus", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 5211, + children: [ + { + parameterInterface: "sku", + parameterType: "string", + exampleValue: "", + describe: "sku", + id: 5012 + }, + { + parameterInterface: "main_image", + parameterType: "string", + exampleValue: "", + describe: "sku主图", + id: 5132 + }, + { + parameterInterface: "photo_album", + parameterType: "array[string]", + exampleValue: "", + describe: "图册", + id: 51321 + }, + { + parameterInterface: "sort", + parameterType: "integer ", + exampleValue: "", + describe: "排序值", + id: 5132111 + }, + { + parameterInterface: "sku_attr", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 513211111, + children: [ + { + parameterInterface: "attr_value", + parameterType: "string", + exampleValue: "", + describe: "sku属性值", + id: 51321111323232 + }, + { + parameterInterface: "attr_name", + parameterType: "string", + exampleValue: "", + describe: "sku属性名", + id: 51321111111111 + } + ] + } + ] + }, + { + parameterInterface: "links", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521199, + children: [ + { + parameterInterface: "link", + parameterType: "string", + exampleValue: "", + describe: "购买链接", + id: 5211341987 + }, + { + parameterInterface: "platform", + parameterType: "string", + exampleValue: "", + describe: "购买平台", + id: 5211341987245 + } + ] + }, + { + parameterInterface: "related", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 521199541, + children: [ + { + parameterInterface: "id", + parameterType: "integer", + exampleValue: "", + describe: "产品id", + id: 5211341987188 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "产品名称", + id: 999 + }, + { + parameterInterface: "spu", + parameterType: "string", + exampleValue: "", + describe: "spu", + id: 9991 + }, + { + parameterInterface: "cover_image", + parameterType: "string", + exampleValue: "", + describe: "封面图片", + id: 999122 + } + ] + } + ] + } + ] + }, // { // title: "返回参数说明", // columns: HTTPS_RETURN_PARAMS_COLUMNS, //列表配置项 diff --git a/src/views/product/list/constant/en_list/https_header.ts b/src/views/product/list/constant/en_list/https_header.ts new file mode 100644 index 0000000..8f58b09 --- /dev/null +++ b/src/views/product/list/constant/en_list/https_header.ts @@ -0,0 +1,23 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + fixed: true, + label: "Parameter name", + prop: "parameterName" + }, + { + align: "left", + label: "parameter Values", + prop: "parameterValues" + }, + { + align: "left", + label: "Type", + prop: "parameterType" + }, + { + align: "left", + label: "Parameter description", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/list/constant/en_list/index.ts b/src/views/product/list/constant/en_list/index.ts index f2f4256..81868a9 100644 --- a/src/views/product/list/constant/en_list/index.ts +++ b/src/views/product/list/constant/en_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, HTTPS_URL_EN_COLUMNS, HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS, + HTTPS_HEADER_COLUMNS }; diff --git a/src/views/product/list/constant/zh_list/https_header.ts b/src/views/product/list/constant/zh_list/https_header.ts new file mode 100644 index 0000000..585beec --- /dev/null +++ b/src/views/product/list/constant/zh_list/https_header.ts @@ -0,0 +1,22 @@ +export const HTTPS_HEADER_COLUMNS = [ + { + align: "left", + label: "参数名称", + prop: "parameterName" + }, + { + align: "left", + label: "参数值", + prop: "parameterValues" + }, + { + align: "left", + label: "参数类型", + prop: "parameterType" + }, + { + align: "left", + label: "参数描述", + prop: "parameterDescription" + } +]; diff --git a/src/views/product/list/constant/zh_list/index.ts b/src/views/product/list/constant/zh_list/index.ts index 41685e9..2c18b62 100644 --- a/src/views/product/list/constant/zh_list/index.ts +++ b/src/views/product/list/constant/zh_list/index.ts @@ -3,11 +3,12 @@ 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"; - +import { HTTPS_HEADER_COLUMNS } from "./https_header"; export { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, HTTPS_PUBLIC_PARAMS_COLUMNS, HTTPS_RETURN_PARAMS_COLUMNS }; diff --git a/src/views/product/list/data/en_data/index.ts b/src/views/product/list/data/en_data/index.ts index 3fa816b..f1c07dc 100644 --- a/src/views/product/list/data/en_data/index.ts +++ b/src/views/product/list/data/en_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_PARAMS_EN_COLUMNS, - HTTPS_URL_EN_COLUMNS + HTTPS_URL_EN_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_EN_COLUMNS, - //HTTPS_RETURN_PARAMS_EN_COLUMNS + HTTPS_RETURN_PARAMS_EN_COLUMNS } from "../../constant/en_list/index"; export const EN_DATA = [ @@ -21,6 +22,30 @@ export const EN_DATA = [ } ] }, + { + title: "Request header", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "Request method" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "data format" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "Token (obtained through basic API)" + } + ] + }, // { // title: "Common request parameters", 公共参数 // columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 @@ -89,6 +114,146 @@ export const EN_DATA = [ } ] }, + + { + title: "Return parameter description", + columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "Equal to 0 is considered successful", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "Reminder information", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "Total number of articles", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "Number of output per page", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "Current page number", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "1000", + describe: "Page", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array [object]", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "spu", + parameterType: "string", + exampleValue: "", + describe: "spu", + id: 37 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Product name", + id: 38 + }, + { + parameterInterface: "short_name", + parameterType: "string", + exampleValue: "", + describe: "abbreviation", + id: 39 + }, + { + parameterInterface: "cover_image", + parameterType: "string", + exampleValue: "", + describe: "Cover image address", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "describe", + id: 41 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "Delete time (value when deleted)", + id: 42 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "Category ID", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "Category name", + id: 45 + } + ] + } + ] + } + ] + } + ] + }, + // { // title: "Return parameter description", // columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项 diff --git a/src/views/product/list/data/zh_data/index.ts b/src/views/product/list/data/zh_data/index.ts index 30ddad4..56c145a 100644 --- a/src/views/product/list/data/zh_data/index.ts +++ b/src/views/product/list/data/zh_data/index.ts @@ -1,9 +1,10 @@ import { HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_PARAMS_COLUMNS, - HTTPS_URL_COLUMNS + HTTPS_URL_COLUMNS, + HTTPS_HEADER_COLUMNS, // HTTPS_PUBLIC_PARAMS_COLUMNS, - // HTTPS_RETURN_PARAMS_COLUMNS + HTTPS_RETURN_PARAMS_COLUMNS } from "../../constant/zh_list/index"; export const ZH_DATA = [ @@ -21,6 +22,30 @@ export const ZH_DATA = [ } ] }, + { + title: "请求头", + columns: HTTPS_HEADER_COLUMNS, //列表配置项 + data: [ + { + parameterName: "Request Method", + parameterValues: "GET", + parameterType: "string", + parameterDescription: "请求方式" + }, + { + parameterName: "Content-Type", + parameterValues: "application/json", + parameterType: "string", + parameterDescription: "数据格式" + }, + { + parameterName: "Authorization", + parameterValues: "Bearer MzgxYWRkZTU3MzhmZGNjZTViZTIxNjI0NTk0MDI5NTU3NmY4ZjliMDQwZmQyZjI1ZGU1YzRlMWU4NGFmYjk0OA", + parameterType: "string", + parameterDescription: "令牌(通过基础API获得)" + } + ] + }, { title: "请求参数说明", columns: HTTPS_PARAMS_COLUMNS, //列表配置项 @@ -55,24 +80,144 @@ export const ZH_DATA = [ } ] }, - // { - // 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_RETURN_PARAMS_COLUMNS, //列表配置项 + data: [ + { + parameterInterface: "code", + parameterType: "integer", + exampleValue: "0 ", + describe: "等于0为成功", + id: 1 + }, + { + parameterInterface: "msg", + parameterType: "string ", + exampleValue: "", + describe: "提示信息", + id: 2 + }, + { + parameterInterface: "data", + parameterType: "object ", + exampleValue: "", + describe: "", + id: 3, + children: [ + { + parameterInterface: "total", + parameterType: "integer ", + exampleValue: "1000", + describe: "总条数", + id: 31 + }, + { + parameterInterface: "per_page", + parameterType: "integer ", + exampleValue: "50", + describe: "每页输出条数", + id: 32 + }, + { + parameterInterface: "current_page", + parameterType: "integer ", + exampleValue: "1", + describe: "当前页码", + id: 33 + }, + { + parameterInterface: "last_page", + parameterType: "integer ", + exampleValue: "10", + describe: "总页数", + id: 34 + }, + { + parameterInterface: "data", + parameterType: "array[object] ", + exampleValue: "", + describe: "", + id: 35, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "ID", + id: 36 + }, + { + parameterInterface: "spu", + parameterType: "string", + exampleValue: "", + describe: "spu", + id: 37 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "产品名称", + id: 38 + }, + { + parameterInterface: "short_name", + parameterType: "string", + exampleValue: "", + describe: "简称", + id: 39 + }, + { + parameterInterface: "cover_image", + parameterType: "string", + exampleValue: "", + describe: "封面图地址", + id: 40 + }, + { + parameterInterface: "desc", + parameterType: "string", + exampleValue: "", + describe: "描述", + id: 41 + }, + { + parameterInterface: "deleted_at", + parameterType: "string | null", + exampleValue: "", + describe: "删除时间(已删除时有值)", + id: 42 + }, + { + parameterInterface: "category", + parameterType: "object", + exampleValue: "", + describe: "", + id: 43, + children: [ + { + parameterInterface: "id", + parameterType: "integer ", + exampleValue: "1", + describe: "所属分类id", + id: 44 + }, + { + parameterInterface: "name", + parameterType: "string", + exampleValue: "", + describe: "所属分类名称", + id: 45 + } + ] + } + ] + } + ] + } + ] + }, { title: "错误说明", columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项