| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!DOCTYPE HTML>
- <html lang="zh-CN">
- <head>
- <title>Json格式化查看工具</title>
- <meta charset="UTF-8">
- <link rel="stylesheet" href="index.css" />
- <script type="text/javascript" src="../static/vendor/vue/vue.js"></script>
- <script src="../static/vendor/require/require.js"></script>
- </head>
- <body>
- <div class="wrapper wp-json" id="pageContainer">
- <div class="panel panel-default" style="margin-bottom: 0px;">
- <div class="panel-heading">
- <h3 class="panel-title">
- <a href="http://www.baidufe.com/fehelper/feedback.html" target="_blank" class="x-a-high">
- <img src="../static/img/fe-16.png" alt="fehelper"/> FeHelper</a>:JSON格式化查看
- <span class="x-xdemo" ref="demoLink1" @click="jsonSource=$refs.demoBox.value">示例1:JSON片段</span>
- <a class="x-xdemo" href="https://www.sojson.com/open/api/weather/json.shtml?city=%E5%8C%97%E4%BA%AC" target="_blank">示例2:在线JSON-1</a>
- <a class="x-xdemo" href="https://suggest.taobao.com/sug?code=utf-8&q=iphonex&callback=thisIsACallbackFunction" target="_blank">示例3:在线JSON-2</a></h3>
- </div>
- </div>
- <div class="panel-body mod-json">
- <div class="row panel-txt">
- <textarea class="form-control mod-textarea" id="jsonSource" placeholder="在这里粘贴您需要进行格式化的JSON代码" ref="jsonBox" v-model="jsonSource" @input="format"></textarea>
- <div><button id="btnFormat" class="btn btn-primary ui-mt-10" @click="format">格式化</button><span id="errorMsg" v-html="errorMsg"></span></div>
- </div>
- <div class="row rst-item" id="modJsonResult">
- <div id="formattingMsg">
- <svg id="spinner" width="16" height="16" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg" version="1.1">
- <path d="M 150,0 a 150,150 0 0,1 106.066,256.066 l -35.355,-35.355 a -100,-100 0 0,0 -70.711,-170.711 z" fill="#3d7fe6"></path>
- </svg>
- 加载中...
- </div>
- <div id="jfCallbackName_start" class="callback-name">{{jfCallbackName_start}}</div>
- <div id="jfContent" v-html="resultContent"></div>
- <pre id="jfContent_pre"></pre>
- <div id="jfCallbackName_end" class="callback-name">{{jfCallbackName_end}}</div>
- </div>
- </div>
- <textarea name="demo" id="demo" cols="30" rows="10" class="hide" ref="demoBox">{date:"20180322",message:"Success !",status:200,city:"北京",count:632,data:{shidu:"34%",pm25:73,pm10:91,quality:"良",wendu:"5",ganmao:"极少数敏感人群应减少户外活动",yesterday:{date:"21日星期三",sunrise:"06:19",high:"高温 11.0℃",low:"低温 1.0℃",sunset:"18:26",aqi:85,fx:"南风",fl:"<3级",type:"多云",notice:"阴晴之间,谨防紫外线侵扰"},forecast:[{date:"22日星期四",sunrise:"06:17",high:"高温 17.0℃",low:"低温 1.0℃",sunset:"18:27",aqi:98,fx:"西南风",fl:"<3级",type:"晴",notice:"愿你拥有比阳光明媚的心情"},{date:"23日星期五",sunrise:"06:16",high:"高温 18.0℃",low:"低温 5.0℃",sunset:"18:28",aqi:118,fx:"无持续风向",fl:"<3级",type:"多云",notice:"阴晴之间,谨防紫外线侵扰"},{date:"24日星期六",sunrise:"06:14",high:"高温 21.0℃",low:"低温 7.0℃",sunset:"18:29",aqi:52,fx:"西南风",fl:"<3级",type:"晴",notice:"愿你拥有比阳光明媚的心情"},{date:"25日星期日",sunrise:"06:13",high:"高温 22.0℃",low:"低温 7.0℃",sunset:"18:30",aqi:71,fx:"西南风",fl:"<3级",type:"晴",notice:"愿你拥有比阳光明媚的心情"},{date:"26日星期一",sunrise:"06:11",high:"高温 21.0℃",low:"低温 8.0℃",sunset:"18:31",aqi:97,fx:"西南风",fl:"<3级",type:"多云",notice:"阴晴之间,谨防紫外线侵扰"}]}};</textarea>
- </div>
- <script src="index.js"></script>
- </body>
- </html>
|