diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue index d5b64f4..47b27e6 100644 --- a/src/components/ec_api/TabArea.vue +++ b/src/components/ec_api/TabArea.vue @@ -98,6 +98,8 @@ function initApiData() { if (param_item['param'] === 'pid') { param_item['value'] = UserApiData.value['base_info']['channel'] } + // 写入默认值 + param_item['default'] = param_item['value'] } ) }) @@ -120,6 +122,16 @@ function addNewParams() { }) } +// 读取参数默认值 +function loadDefault(param) { + console.log(param) + UserApiData.value.api[activeTab.value]['params'].forEach( p => { + if (p['param'] === param) { + p['value'] = p['default'] + } + }) +} + // 准备获取url和发送请求需要的参数 function handle_request_data() { let data = {} @@ -254,7 +266,7 @@ onMounted(() => {