Quellcode durchsuchen

feat: 优化日志展示

double.huang vor 5 Jahren
Ursprung
Commit
2bde2ebe96
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      src/views/tracker/index.vue

+ 3 - 3
src/views/tracker/index.vue

@@ -160,9 +160,9 @@ export default {
       this.temp = Object.assign({}, row)
       this.$api.sysTracker.get({ id: row.id }).then(res => {
         const { data: { header, res_body, req_body }} = res
-        this.temp.header = header && atob(header)
-        this.temp.res_body = res_body && atob(res_body)
-        this.temp.req_body = req_body && atob(req_body)
+        this.temp.header = header && decodeURIComponent(atob(header))
+        this.temp.res_body = res_body && JSON.stringify(JSON.parse(decodeURIComponent(atob(res_body))), null, '\t')
+        this.temp.req_body = req_body && JSON.stringify(JSON.parse(decodeURIComponent(atob(req_body))), null, '\t')
         this.dialogVisible = true
       })
     }