feat: 🚀 基础API

This commit is contained in:
2025-05-22 13:44:13 +08:00
parent 44ef53d0ab
commit 10e1443e78
7 changed files with 137 additions and 165 deletions

View File

@@ -1,5 +1,5 @@
import { import {
// HTTPS_ERROR_PARAMS_EN_COLUMNS, HTTPS_ERROR_PARAMS_EN_COLUMNS,
// HTTPS_PARAMS_EN_COLUMNS, // HTTPS_PARAMS_EN_COLUMNS,
HTTPS_URL_EN_COLUMNS, HTTPS_URL_EN_COLUMNS,
HTTPS_PUBLIC_PARAMS_EN_COLUMNS HTTPS_PUBLIC_PARAMS_EN_COLUMNS
@@ -13,11 +13,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "Test environment", environment: "Test environment",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "Formal environment", environment: "Formal environment",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -26,55 +26,45 @@ export const EN_DATA = [
columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项 columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项
data: [ data: [
{ {
environment: "测试环境", parameterName: "client_id",
https: "https://demo.orico.com.cn" parameterType: "string",
isItMandatory: "yes",
parameterDescription: ""
}, },
{ {
environment: "正式环境", parameterName: "client_secret",
https: "https://.orico.com.cn" parameterType: "string",
isItMandatory: "yes",
parameterDescription: ""
},
{
parameterName: "grant_type",
parameterType: "string",
isItMandatory: "yes",
parameterDescription: "Client-side credentials: Get tokens; Refresh_token: Refresh token"
},
{
parameterName: "refresh_token",
parameterType: "string",
isItMandatory: "no",
parameterDescription: "When refreshing the token, it is necessary"
} }
] ]
},
{
title: "Error declaration",
columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项
data: [
{
errorCode: "",
errorMessage: " ",
TroMethods: ""
} }
// { // {
// title: "Request parameter description", // errorCode: "200",
// columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项 // errorMessage: "请求成功 ",
// data: [ // TroMethods: "{"code": 0, "msg": "success", "data": ......}"
// {
// environment: "测试环境",
// https: "https://demo.orico.com.cn"
// },
// {
// environment: "正式环境",
// https: "https://.orico.com.cn"
// }
// ]
// },
// {
// title: "Return parameter description",
// columns: HTTPS_RETURN_PARAMS_EN_COLUMNS, //列表配置项
// data: [
// {
// environment: "测试环境",
// https: "https://demo.orico.com.cn"
// },
// {
// environment: "正式环境",
// https: "https://.orico.com.cn"
// }
// ]
// },
// {
// title: "Error declaration",
// columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项
// data: [
// {
// environment: "测试环境",
// https: "https://demo.orico.com.cn"
// },
// {
// environment: "正式环境",
// https: "https://.orico.com.cn"
// }
// ]
// } // }
]
}
]; ];

View File

@@ -1,5 +1,5 @@
import { import {
// HTTPS_ERROR_PARAMS_COLUMNS, HTTPS_ERROR_PARAMS_COLUMNS,
// HTTPS_PARAMS_COLUMNS, // HTTPS_PARAMS_COLUMNS,
HTTPS_URL_COLUMNS, HTTPS_URL_COLUMNS,
HTTPS_PUBLIC_PARAMS_COLUMNS HTTPS_PUBLIC_PARAMS_COLUMNS
@@ -13,11 +13,11 @@ export const ZH_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -26,71 +26,40 @@ export const ZH_DATA = [
columns: HTTPS_PUBLIC_PARAMS_COLUMNS, //列表配置项 columns: HTTPS_PUBLIC_PARAMS_COLUMNS, //列表配置项
data: [ data: [
{ {
parameterName: "111", parameterName: "client_id",
parameterType: "233", parameterType: "string",
isItMandatory: "123232", isItMandatory: "必需",
parameterDescription: "3232323" parameterDescription: ""
}, },
{ {
parameterName: "111", parameterName: "client_secret",
parameterType: "233", parameterType: "string",
isItMandatory: "123232", isItMandatory: "必需",
parameterDescription: "3232323" parameterDescription: ""
},
{
parameterName: "grant_type",
parameterType: "string",
isItMandatory: "必需",
parameterDescription: "client_credentials:获取tokenrefresh_token:刷新token"
},
{
parameterName: "refresh_token",
parameterType: "string",
isItMandatory: "非必需",
parameterDescription: "刷新token时必须"
}
]
},
{
title: "错误说明",
columns: HTTPS_ERROR_PARAMS_COLUMNS, //列表配置项
data: [
{
errorCode: "",
errorInfo: "",
TroMethods: ""
} }
] ]
} }
// {
// title: "请求参数说明",
// columns: HTTPS_PARAMS_COLUMNS, //列表配置项
// data: [
// {
// parameterName: "测试环境",
// parameterType: "https://demo.orico.com.cn",
// isItMandatory: "否",
// exampleValue: "多少",
// parameterDescription: "demo"
// },
// {
// parameterName: "测试环境",
// parameterType: "https://demo.orico.com.cn",
// 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"
// }
// ]
// }
]; ];

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="card table-box"> <div class="card table-box">
<div> <div>
<h3>/open/product</h3> <h3>/authorize</h3>
</div> </div>
<div> <div>
<h4>{{ paramsValue }}</h4> <h4>{{ paramsValue }}</h4>
@@ -43,8 +43,36 @@ const PARAMS_VALUE = {
2: "Common parameters" 2: "Common parameters"
}; };
let tableData = ref(ZH_DATA); let tableData = ref(ZH_DATA);
let queryTextareaValue = ref(null); let queryTextareaValue = ref(
let returnTextareaTitleValue = ref(null); JSON.stringify(
{
client_id: "682c22b746aef",
client_secret: "oibmLhFdEVWhX6lFSF4rWVXnATKI8Oml",
grant_type: "client_credentials",
refresh_token: ""
},
null,
2
)
);
let returnTextareaTitleValue = ref(
JSON.stringify(
{
code: 0,
msg: "success",
data: {
access_token: "ZjY3ZjVjMTU2MmJjYjVlY2Q1M2IwOTNmNDUwMjJiMjhhMTRlZDc3MTIzYzlhOWUzMDE2ZWUwOGVhODViYWQxMQ",
expires_in: 3600,
token_type: "bearer",
scope: null,
refresh_token: "OWY3NDgyMzE3NzY0Y2UwNjkwNTNlZGE1YzI0ZDFkZDIzNmI1NWQyNjk2NjFlNjU3MmY0ZThmYTEwNjgwOTA1YQ"
}
},
null,
2
)
);
let queryTextareaTitle = ref("请求示例"); let queryTextareaTitle = ref("请求示例");
let returnTextareaTitle = ref("响应示例"); let returnTextareaTitle = ref("响应示例");
let paramsValue = ref("公共参数"); let paramsValue = ref("公共参数");

View File

@@ -13,11 +13,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "Test environment", environment: "Test environment",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "Formal environment", environment: "Formal environment",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -27,11 +27,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -41,11 +41,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -55,11 +55,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -68,12 +68,14 @@ export const EN_DATA = [
columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项 columns: HTTPS_ERROR_PARAMS_EN_COLUMNS, //列表配置项
data: [ data: [
{ {
environment: "测试环境", errorCode: "111",
https: "https://demo.orico.com.cn" errorInfo: "233",
TroMethods: "123232"
}, },
{ {
environment: "正式环境", errorCode: "111",
https: "https://.orico.com.cn" errorInfo: "233",
TroMethods: "123232"
} }
] ]
} }

View File

@@ -13,46 +13,29 @@ export const ZH_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" 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: "请求参数说明", title: "请求参数说明",
columns: HTTPS_PARAMS_COLUMNS, //列表配置项 columns: HTTPS_PARAMS_COLUMNS, //列表配置项
data: [ data: [
{ {
parameterName: "测试环境", parameterName: "测试环境",
parameterType: "https://demo.orico.com.cn", parameterType: "http://dev.ow.f2b211.com/admapi",
isItMandatory: "否", isItMandatory: "否",
exampleValue: "多少", exampleValue: "多少",
parameterDescription: "demo" parameterDescription: "demo"
}, },
{ {
parameterName: "测试环境", parameterName: "测试环境",
parameterType: "https://demo.orico.com.cn", parameterType: "http://dev.ow.f2b211.com/admapi",
isItMandatory: "是", isItMandatory: "是",
exampleValue: "大萨达", exampleValue: "大萨达",
parameterDescription: "demo1" parameterDescription: "demo1"

View File

@@ -13,11 +13,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "Test environment", environment: "Test environment",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "Formal environment", environment: "Formal environment",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -27,11 +27,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -41,11 +41,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -55,11 +55,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -69,11 +69,11 @@ export const EN_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
} }

View File

@@ -13,11 +13,11 @@ export const ZH_DATA = [
data: [ data: [
{ {
environment: "测试环境", environment: "测试环境",
https: "https://demo.orico.com.cn" https: "http://dev.ow.f2b211.com/admapi"
}, },
{ {
environment: "正式环境", environment: "正式环境",
https: "https://.orico.com.cn" https: "http://ow.f2b211.com/admapi"
} }
] ]
}, },
@@ -45,14 +45,14 @@ export const ZH_DATA = [
data: [ data: [
{ {
parameterName: "测试环境", parameterName: "测试环境",
parameterType: "https://demo.orico.com.cn", parameterType: "http://dev.ow.f2b211.com/admapi",
isItMandatory: "否", isItMandatory: "否",
exampleValue: "多少", exampleValue: "多少",
parameterDescription: "demo" parameterDescription: "demo"
}, },
{ {
parameterName: "测试环境", parameterName: "测试环境",
parameterType: "https://demo.orico.com.cn", parameterType: "http://dev.ow.f2b211.com/admapi",
isItMandatory: "是", isItMandatory: "是",
exampleValue: "大萨达", exampleValue: "大萨达",
parameterDescription: "demo1" parameterDescription: "demo1"