提交 a1958607 编写于 作者: B baiy 提交者: ninecents

修复ip查询

恢复宽度
上级 c8a5dfb3
......@@ -16,7 +16,7 @@
</style>
</head>
<body>
<div id="page" style="width: 900px;height: 550px;margin: 0 auto;">
<div id="page" style="width: 800px;height: 550px;margin: 0 auto;">
<div style="text-align: center;padding-top: 200px;font-size: 16px;color: #666">加载中...</div>
</div>
<script src=/index.js></script>
......
......@@ -7,7 +7,7 @@
<title>Ctool 程序开发常用工具</title>
</head>
<body>
<div id="page" style="width: 900px;height: 550px;margin: 0 auto;padding: 0 6px;overflow-y:auto;">
<div id="page" style="width: 800px;height: 550px;margin: 0 auto;padding: 0 6px;overflow-y:auto;">
<div id="app"></div>
</div>
<div id="clipboard"></div>
......
......@@ -21,7 +21,9 @@
"permissions": [
"clipboardWrite",
"clipboardRead",
"storage"
"webRequest",
"storage",
"http://ip.taobao.com/*"
],
"update_url": "http://clients2.google.com/service/update2/crx"
}
\ No newline at end of file
......@@ -26,6 +26,7 @@ import codeEditor from "./components/codeEditor";
import jsonFormatter from "./library/formatter/json";
import heightResize from "./components/heightResize";
<<<<<<< HEAD
export default {
components: {
codeEditor,
......@@ -54,6 +55,31 @@ export default {
this.$t('ip_error', [error.message]).toString()
)
});
=======
export default {
created() {
this.current = Object.assign(this.current,this.$getToolData("input"))
},
methods: {
handle() {
if (this.current.input) {
request({
url:"http://ip.taobao.com/outGetIpInfo",
data:{
"ip":this.current.input === "localhost" ? 'myip' : this.current.input,
"accessKey": "alibaba-inc"
},
},(err, res, result)=>{
if (err) return this.$Message.error("ip地址信息查询错误:"+err);
this.current.output = JSON.stringify(JSON.parse(result),null, 4);
this.$saveToolData(this.current);
});
}
},
local(){
this.current.input = 'localhost';
this.handle()
>>>>>>> 3e57baf... 修复ip查询
}
},
local() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册