|
|
@ -196,6 +196,12 @@ function handle_request_url() { |
|
|
|
|
|
|
|
|
|
|
|
// 发送api请求 |
|
|
|
// 发送api请求 |
|
|
|
function send_request() { |
|
|
|
function send_request() { |
|
|
|
|
|
|
|
if (UserApiData.value.api[activeTab.value].format === 'json'){ |
|
|
|
|
|
|
|
UserApiData.value.api[activeTab.value].response = '{"root": "root"}' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (UserApiData.value.api[activeTab.value].format === 'html' || UserApiData.value.api[activeTab.value].format === 'xml'){ |
|
|
|
|
|
|
|
UserApiData.value.api[activeTab.value].response = '<root></root>' |
|
|
|
|
|
|
|
} |
|
|
|
const data = handle_request_data() |
|
|
|
const data = handle_request_data() |
|
|
|
ec_api_send_request(data).then(res => { |
|
|
|
ec_api_send_request(data).then(res => { |
|
|
|
if (res.format === 'json') { |
|
|
|
if (res.format === 'json') { |
|
|
@ -351,7 +357,7 @@ const ace_options = { |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<v-ace-editor v-model:value="UserApiData.api[api['id']].response" :lang="UserApiData.api[api['id']]['format']" |
|
|
|
<v-ace-editor v-model:value="UserApiData.api[api['id']].response" :lang="UserApiData.api[api['id']]['format']" |
|
|
|
theme="chrome" :options="ace_options" class="vue-ace-editor" style="width: 1200px"/> |
|
|
|
theme="chrome" :options="ace_options" class="vue-ace-editor" :wrap="true" style="width: 1200px"/> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-tabs> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|