diff --git a/src/pages/workbench/fwgl/serviceDetail.vue b/src/pages/workbench/fwgl/serviceDetail.vue
index 306fa83a60d1e0933c6d5ca6bd5c957c20f4b0bd..cc2114f0adc09e5cc70cc18ac783d893a9b73d36 100644
--- a/src/pages/workbench/fwgl/serviceDetail.vue
+++ b/src/pages/workbench/fwgl/serviceDetail.vue
@@ -34,12 +34,19 @@
v-if="now_service == 0 || now_service == 1"
>
服务运行概况
@@ -218,10 +225,76 @@ export default { memory: "", }, service_use_arr: [], - res_data: [], //响应参数 + req_header_arr: [ + { + prop: "name", + label: "字段编码", + minWidth: "20%", + align: "left", + }, + { + prop: "label", + label: "字段名称", + minWidth: "20%", + align: "center", + }, + { + prop: "show_type", + label: "字段类型", + width: "100px", + align: "center", + }, + { + prop: "descript", + label: "字段说明", + minWidth: "30%", + align: "left", + }, + { + prop: "is_must", + label: "是否必须", + width: "120px", + align: "center", + }, + ], // 请求参数-header + req_data: [], // 请求参数 + req_code_arr: "", // 请求示例 + res_header_arr: [ + { + prop: "name", + label: "字段编码", + minWidth: "20%", + align: "left", + }, + { + prop: "label", + label: "字段名称", + minWidth: "20%", + align: "center", + }, + { + prop: "show_type", + label: "字段类型", + width: "100px", + align: "center", + }, + { + prop: "descript", + label: "字段说明", + minWidth: "30%", + align: "left", + }, + { + prop: "example", + label: "字段示例数值", + width: "120px", + align: "center", + }, + ], // 响应参数-header + res_data: [], // 响应参数 + res_code_arr: "", // 响应示例 buy_type: "", sizeset_flag: false, //规格设置是否显示 - code_arr: "", service_arr: [ ["服务基本信息", "接口详细信息", "服务运行状态"], ["服务基本信息", "接口详细信息", "服务运行状态", "服务计费规则"], @@ -262,38 +335,6 @@ export default { }, now_service: 0, datas: {}, - header_arr: [ - { - prop: "name", - label: "字段编码", - minWidth: "20%", - align: "left", - }, - { - prop: "label", - label: "字段名称", - minWidth: "20%", - align: "center", - }, - { - prop: "show_type", - label: "字段类型", - width: "100px", - align: "center", - }, - { - prop: "descript", - label: "字段说明", - minWidth: "30%", - align: "left", - }, - { - prop: "example", - label: "字段示例数值", - width: "120px", - align: "left", - }, - ], header_use_arr: [ { prop: "dydw", @@ -409,10 +450,14 @@ export default { { title: "请求参数:", info: "", + type: "solt", + solt_name: "req_table", }, { title: "请求示例:", info: "", + type: "solt", + solt_name: "req_code", }, { title: "编码格式:", @@ -422,13 +467,13 @@ export default { title: "响应参数:", info: "", type: "solt", - solt_name: "zd_table", + solt_name: "res_table", }, { title: "响应示例:", info: "", type: "solt", - solt_name: "zd_code", + solt_name: "res_code", }, ], service_type_arr: [ @@ -629,20 +674,37 @@ export default { "info", data.create_time.replace("T", " ").split("+")[0] ); + + // 接口详情信息 this.$set( this.servicead_arr[0], "info", this.request_arr[data.req_type - 1] - ); - this.$set( - this.servicead_arr[1], - "info", - data.req_query ? data.req_query : "无" - ); - this.$set(this.servicead_arr[2], "info", data.req_fields); - this.$set(this.servicead_arr[3], "info", data.encode_method); - this.code_arr = data.res_fields_example; - this.res_data = JSON.parse(data.res_fields); + ); // 请求方式 + this.req_data = JSON.parse(data.req_fields || data.req_query || "[]"); // 请求参数 + if (this.req_data.length === 0) { + this.$set(this.servicead_arr[1], "type", ""); + this.$set(this.servicead_arr[1], "info", "无请求参数"); + } + this.req_code_arr = data.req_fields_example || data.req_query_example || ""; // 请求示例 + if (!this.req_code_arr) { + this.$set(this.servicead_arr[2], "type", ""); + this.$set(this.servicead_arr[2], "info", "无请求示例"); + + } + this.$set(this.servicead_arr[3], "info", data.encode_method); // 编码格式 + this.res_data = JSON.parse(data.res_fields || "[]"); // 响应参数 + if (this.res_data.length === 0) { + this.$set(this.servicead_arr[4], "type", ""); + this.$set(this.servicead_arr[4], "info", "无响应参数"); + } + this.res_code_arr = data.res_fields_example || ""; // 响应示例 + if (!this.res_code_arr) { + this.$set(this.servicead_arr[5], "type", ""); + this.$set(this.servicead_arr[5], "info", "无响应示例"); + } + // 接口详情信息 end + this.service_size_data = data.request_spcs_info; this.size_arr_down = data.request_spcs_info; this.buy_type = data.request_spcs_info[0].type;