开发平台api
This commit is contained in:
20
src/views/foundation/constant/en_list/error_params.ts
Normal file
20
src/views/foundation/constant/en_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
29
src/views/foundation/constant/en_list/https_params.ts
Normal file
29
src/views/foundation/constant/en_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/foundation/constant/en_list/https_url.ts
Normal file
14
src/views/foundation/constant/en_list/https_url.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
13
src/views/foundation/constant/en_list/index.ts
Normal file
13
src/views/foundation/constant/en_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
24
src/views/foundation/constant/en_list/public_params.ts
Normal file
24
src/views/foundation/constant/en_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/foundation/constant/en_list/return_params.ts
Normal file
25
src/views/foundation/constant/en_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
19
src/views/foundation/constant/zh_list/error_params.ts
Normal file
19
src/views/foundation/constant/zh_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
28
src/views/foundation/constant/zh_list/https_params.ts
Normal file
28
src/views/foundation/constant/zh_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/foundation/constant/zh_list/https_url.ts
Normal file
14
src/views/foundation/constant/zh_list/https_url.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//请求地址
|
||||
export const HTTPS_URL_COLUMNS = [
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "环境",
|
||||
prop: "environment"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "HTTPS地址",
|
||||
prop: "https"
|
||||
}
|
||||
];
|
||||
13
src/views/foundation/constant/zh_list/index.ts
Normal file
13
src/views/foundation/constant/zh_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
23
src/views/foundation/constant/zh_list/public_params.ts
Normal file
23
src/views/foundation/constant/zh_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/foundation/constant/zh_list/return_params.ts
Normal file
25
src/views/foundation/constant/zh_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
80
src/views/foundation/data/en_data/index.ts
Normal file
80
src/views/foundation/data/en_data/index.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "Formal environment",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Common request parameters",
|
||||
columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项
|
||||
data: [
|
||||
{
|
||||
environment: "测试环境",
|
||||
https: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: "Request parameter description",
|
||||
// columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项
|
||||
// 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"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
];
|
||||
96
src/views/foundation/data/zh_data/index.ts
Normal file
96
src/views/foundation/data/zh_data/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
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: "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"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
];
|
||||
66
src/views/foundation/index.vue
Normal file
66
src/views/foundation/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="card table-box">
|
||||
<div>
|
||||
<h3>/open/product</h3>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ paramsValue }}</h4>
|
||||
</div>
|
||||
<template v-for="(item, index) in tableData" :key="index">
|
||||
<MyTable :title="item.title" :columns="item.columns" :tableData="item.data" />
|
||||
</template>
|
||||
<div>
|
||||
<h5>{{ queryTextareaTitle }}</h5>
|
||||
<el-input v-model="queryTextareaValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{ returnTextareaTitle }}</h5>
|
||||
<el-input v-model="returnTextareaTitleValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="product">
|
||||
import { ZH_DATA } from "./data/zh_data";
|
||||
import { EN_DATA } from "./data/en_data";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import MyTable from "@/components/MyTable/index.vue";
|
||||
const userStore = useUserStore();
|
||||
const PARAMS_DATA = {
|
||||
1: ZH_DATA,
|
||||
2: EN_DATA
|
||||
};
|
||||
const TEXTAREA_TITLES = {
|
||||
1: "请求示例",
|
||||
2: "Request Example"
|
||||
};
|
||||
const TEXTAREA_TITLES1 = {
|
||||
1: "响应示例",
|
||||
2: "Response Example"
|
||||
};
|
||||
const PARAMS_VALUE = {
|
||||
1: "公共参数",
|
||||
2: "Common parameters"
|
||||
};
|
||||
let tableData = ref(ZH_DATA);
|
||||
let queryTextareaValue = ref(null);
|
||||
let returnTextareaTitleValue = ref(null);
|
||||
let queryTextareaTitle = ref("请求示例");
|
||||
let returnTextareaTitle = ref("响应示例");
|
||||
let paramsValue = ref("公共参数");
|
||||
watch(
|
||||
() => userStore.languageValue,
|
||||
newVal => {
|
||||
tableData.value = PARAMS_DATA[newVal];
|
||||
queryTextareaTitle.value = TEXTAREA_TITLES[newVal];
|
||||
returnTextareaTitle.value = TEXTAREA_TITLES1[newVal];
|
||||
paramsValue.value = PARAMS_VALUE[newVal];
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
12
src/views/home/index.scss
Normal file
12
src/views/home/index.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.box-bg {
|
||||
width: 70%;
|
||||
max-width: 1200px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
11
src/views/home/index.vue
Normal file
11
src/views/home/index.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div class="box card">
|
||||
<img class="box-bg" src="@/assets/images/welcome.png" alt="welcome" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="home"></script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
20
src/views/news/constant/en_list/error_params.ts
Normal file
20
src/views/news/constant/en_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
29
src/views/news/constant/en_list/https_params.ts
Normal file
29
src/views/news/constant/en_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/news/constant/en_list/https_url.ts
Normal file
14
src/views/news/constant/en_list/https_url.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
13
src/views/news/constant/en_list/index.ts
Normal file
13
src/views/news/constant/en_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
24
src/views/news/constant/en_list/public_params.ts
Normal file
24
src/views/news/constant/en_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/news/constant/en_list/return_params.ts
Normal file
25
src/views/news/constant/en_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
19
src/views/news/constant/zh_list/error_params.ts
Normal file
19
src/views/news/constant/zh_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
28
src/views/news/constant/zh_list/https_params.ts
Normal file
28
src/views/news/constant/zh_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/news/constant/zh_list/https_url.ts
Normal file
14
src/views/news/constant/zh_list/https_url.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//请求地址
|
||||
export const HTTPS_URL_COLUMNS = [
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "环境",
|
||||
prop: "environment"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "HTTPS地址",
|
||||
prop: "https"
|
||||
}
|
||||
];
|
||||
13
src/views/news/constant/zh_list/index.ts
Normal file
13
src/views/news/constant/zh_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
23
src/views/news/constant/zh_list/public_params.ts
Normal file
23
src/views/news/constant/zh_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/news/constant/zh_list/return_params.ts
Normal file
25
src/views/news/constant/zh_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
80
src/views/news/data/en_data/index.ts
Normal file
80
src/views/news/data/en_data/index.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "Formal environment",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Common request parameters",
|
||||
columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项
|
||||
data: [
|
||||
{
|
||||
environment: "测试环境",
|
||||
https: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Request parameter description",
|
||||
columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
96
src/views/news/data/zh_data/index.ts
Normal file
96
src/views/news/data/zh_data/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// 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: "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"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
66
src/views/news/index.vue
Normal file
66
src/views/news/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="card table-box">
|
||||
<div>
|
||||
<h3>/open/product</h3>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ paramsValue }}</h4>
|
||||
</div>
|
||||
<template v-for="(item, index) in tableData" :key="index">
|
||||
<MyTable :title="item.title" :columns="item.columns" :tableData="item.data" />
|
||||
</template>
|
||||
<div>
|
||||
<h5>{{ queryTextareaTitle }}</h5>
|
||||
<el-input v-model="queryTextareaValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{ returnTextareaTitle }}</h5>
|
||||
<el-input v-model="returnTextareaTitleValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="product">
|
||||
import { ZH_DATA } from "./data/zh_data";
|
||||
import { EN_DATA } from "./data/en_data";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import MyTable from "@/components/MyTable/index.vue";
|
||||
const userStore = useUserStore();
|
||||
const PARAMS_DATA = {
|
||||
1: ZH_DATA,
|
||||
2: EN_DATA
|
||||
};
|
||||
const TEXTAREA_TITLES = {
|
||||
1: "请求示例",
|
||||
2: "Request Example"
|
||||
};
|
||||
const TEXTAREA_TITLES1 = {
|
||||
1: "响应示例",
|
||||
2: "Response Example"
|
||||
};
|
||||
const PARAMS_VALUE = {
|
||||
1: "公共参数",
|
||||
2: "Common parameters"
|
||||
};
|
||||
let tableData = ref(ZH_DATA);
|
||||
let queryTextareaValue = ref(null);
|
||||
let returnTextareaTitleValue = ref(null);
|
||||
let queryTextareaTitle = ref("请求示例");
|
||||
let returnTextareaTitle = ref("响应示例");
|
||||
let paramsValue = ref("公共参数");
|
||||
watch(
|
||||
() => userStore.languageValue,
|
||||
newVal => {
|
||||
tableData.value = PARAMS_DATA[newVal];
|
||||
queryTextareaTitle.value = TEXTAREA_TITLES[newVal];
|
||||
returnTextareaTitle.value = TEXTAREA_TITLES1[newVal];
|
||||
paramsValue.value = PARAMS_VALUE[newVal];
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
20
src/views/product/constant/en_list/error_params.ts
Normal file
20
src/views/product/constant/en_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
29
src/views/product/constant/en_list/https_params.ts
Normal file
29
src/views/product/constant/en_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/product/constant/en_list/https_url.ts
Normal file
14
src/views/product/constant/en_list/https_url.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
13
src/views/product/constant/en_list/index.ts
Normal file
13
src/views/product/constant/en_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
24
src/views/product/constant/en_list/public_params.ts
Normal file
24
src/views/product/constant/en_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/product/constant/en_list/return_params.ts
Normal file
25
src/views/product/constant/en_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
19
src/views/product/constant/zh_list/error_params.ts
Normal file
19
src/views/product/constant/zh_list/error_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
28
src/views/product/constant/zh_list/https_params.ts
Normal file
28
src/views/product/constant/zh_list/https_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
14
src/views/product/constant/zh_list/https_url.ts
Normal file
14
src/views/product/constant/zh_list/https_url.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//请求地址
|
||||
export const HTTPS_URL_COLUMNS = [
|
||||
{
|
||||
align: "left",
|
||||
fixed: true,
|
||||
label: "环境",
|
||||
prop: "environment"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "HTTPS地址",
|
||||
prop: "https"
|
||||
}
|
||||
];
|
||||
13
src/views/product/constant/zh_list/index.ts
Normal file
13
src/views/product/constant/zh_list/index.ts
Normal file
@@ -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
|
||||
};
|
||||
23
src/views/product/constant/zh_list/public_params.ts
Normal file
23
src/views/product/constant/zh_list/public_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
25
src/views/product/constant/zh_list/return_params.ts
Normal file
25
src/views/product/constant/zh_list/return_params.ts
Normal file
@@ -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"
|
||||
}
|
||||
];
|
||||
80
src/views/product/data/en_data/index.ts
Normal file
80
src/views/product/data/en_data/index.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "Formal environment",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Common request parameters",
|
||||
columns: HTTPS_PUBLIC_PARAMS_EN_COLUMNS, //列表配置项
|
||||
data: [
|
||||
{
|
||||
environment: "测试环境",
|
||||
https: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Request parameter description",
|
||||
columns: HTTPS_PARAMS_EN_COLUMNS, //列表配置项
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
96
src/views/product/data/zh_data/index.ts
Normal file
96
src/views/product/data/zh_data/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
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: "https://demo.orico.com.cn"
|
||||
},
|
||||
{
|
||||
environment: "正式环境",
|
||||
https: "https://.orico.com.cn"
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// 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: "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"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
66
src/views/product/index.vue
Normal file
66
src/views/product/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="card table-box">
|
||||
<div>
|
||||
<h3>/open/product</h3>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ paramsValue }}</h4>
|
||||
</div>
|
||||
<template v-for="(item, index) in tableData" :key="index">
|
||||
<MyTable :title="item.title" :columns="item.columns" :tableData="item.data" />
|
||||
</template>
|
||||
<div>
|
||||
<h5>{{ queryTextareaTitle }}</h5>
|
||||
<el-input v-model="queryTextareaValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{ returnTextareaTitle }}</h5>
|
||||
<el-input v-model="returnTextareaTitleValue" style="width: 840px" :rows="10" type="textarea" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="product">
|
||||
import { ZH_DATA } from "./data/zh_data";
|
||||
import { EN_DATA } from "./data/en_data";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import MyTable from "@/components/MyTable/index.vue";
|
||||
const userStore = useUserStore();
|
||||
const PARAMS_DATA = {
|
||||
1: ZH_DATA,
|
||||
2: EN_DATA
|
||||
};
|
||||
const TEXTAREA_TITLES = {
|
||||
1: "请求示例",
|
||||
2: "Request Example"
|
||||
};
|
||||
const TEXTAREA_TITLES1 = {
|
||||
1: "响应示例",
|
||||
2: "Response Example"
|
||||
};
|
||||
const PARAMS_VALUE = {
|
||||
1: "公共参数",
|
||||
2: "Common parameters"
|
||||
};
|
||||
let tableData = ref(ZH_DATA);
|
||||
let queryTextareaValue = ref(null);
|
||||
let returnTextareaTitleValue = ref(null);
|
||||
let queryTextareaTitle = ref("请求示例");
|
||||
let returnTextareaTitle = ref("响应示例");
|
||||
let paramsValue = ref("公共参数");
|
||||
watch(
|
||||
() => userStore.languageValue,
|
||||
newVal => {
|
||||
tableData.value = PARAMS_DATA[newVal];
|
||||
queryTextareaTitle.value = TEXTAREA_TITLES[newVal];
|
||||
returnTextareaTitle.value = TEXTAREA_TITLES1[newVal];
|
||||
paramsValue.value = PARAMS_VALUE[newVal];
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user