Browse Source

feat:http数据集注释优化

liu.shiyi 1 year ago
parent
commit
7aac34253c
1 changed files with 4 additions and 3 deletions
  1. 4 3
      data-room-ui/packages/DataSetManagement/src/HttpEditForm.vue

+ 4 - 3
data-room-ui/packages/DataSetManagement/src/HttpEditForm.vue

@@ -435,9 +435,10 @@
                     <strong>响应脚本设置规则: 接口返回数据已经内置到参数responseString(已转为字符串)中,,如果需要处理成JSON格式推荐使用JsonSlurper类。
                       <br> 例如: <br>
                       <span style="color: red;">
-                        import com.gccloud.common.utils.JSON <br>
-                        def respone = JSON.parseObject(responseString) <br>
-                        return respone.data
+                        import groovy.json.JsonSlurper<br>
+                        def jsonSlurper = new JsonSlurper()<br>
+                        def responseMap= jsonSlurper.parseText(responseString)<br>
+                        return responseMap.data.list<br>
                       </span>
                     </strong>
                   </div>