Browse Source

清空输出

mxd 5 years ago
parent
commit
1a7e2fb0f3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/resources/magicapi-support/js/index.js

+ 3 - 1
src/main/resources/magicapi-support/js/index.js

@@ -8,7 +8,7 @@ var MagicEditor = {
         this.apiId = null;
         this.apiList = [];
         this.debugSessionId = null;
-        this.defaultRequestValue = '{\r\n\t"request" : {\r\n\t\t"message" : "Hello MagicAPI!"\r\n\t},\r\n\t"path" : {\r\n\t\t"id" : "123456"\r\n\t},\r\n\t"header" : {\r\n\t\t"token" : "tokenValue"\r\n\t},\r\n\t"cookie" : {\r\n\t\t"cookieName" : "cookieValue"\r\n\t},\r\n\t"session" : {\r\n\t\t"userId" : "123"\r\n\t}\r\n}';
+        this.defaultRequestValue = '{\r\n\t"request" : {\r\n\t\t"message" : "Hello MagicAPI!"\r\n\t},\r\n\t"path" : {\r\n\t\t"id" : "123456"\r\n\t},\r\n\t"body" : {\r\n\t\t"id" : "123456"\r\n\t},\r\n\t"header" : {\r\n\t\t"token" : "tokenValue"\r\n\t},\r\n\t"cookie" : {\r\n\t\t"cookieName" : "cookieValue"\r\n\t},\r\n\t"session" : {\r\n\t\t"userId" : "123"\r\n\t}\r\n}';
         this.initMTA();
         this.loadAPI();
         this.initShortKey();
@@ -1278,6 +1278,8 @@ var MagicEditor = {
             try{
                 _this.resultEditor.setValue(_this.formatJson(JSON.parse(_this.resultEditor.getValue()),'{\r\n}'));
             }catch(e){}
+        }).on('click','.bottom-content-item:eq(4) .button-clear',function(){
+            $('.bottom-container .bottom-item-body.output').html('')
         })
     },
     setSkin : function(skin){