提交 1738d996 编写于 作者: B baiy 提交者: ninecents

ip 切换查询

更换chrome图标
上级 d73bbb5c
......@@ -8,19 +8,19 @@
"manifest_version": 2,
"content_security_policy": "script-src 'self' 'unsafe-eval' https://www.baiy.org; object-src 'self'",
"browser_action": {
"default_icon": "img/icon128.png",
"default_icon": "img/icon_chrome.png",
"default_title": "常用开发工具",
"default_popup": "index.html"
},
"icons": {
"16": "img/icon128.png",
"48": "img/icon128.png",
"128": "img/icon128.png"
"16": "img/icon_chrome.png",
"48": "img/icon_chrome.png",
"128": "img/icon_chrome.png"
},
"permissions": [
"clipboardWrite",
"clipboardRead",
"http://ip.taobao.com/*"
"*://ifconfig.co/*"
],
"update_url": "http://clients2.google.com/service/update2/crx"
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
</ButtonGroup>
</FormItem>
<FormItem>
<Alert>ip信息来源 <a href="https://ip.taobao.com/" target="_blank">https://ip.taobao.com/</a></Alert>
<Alert>ip信息来源 <a href="https://ifconfig.co/json" target="_blank">https://ifconfig.co/json</a></Alert>
</FormItem>
</option-block>
<div style="border: 1px solid #dcdee2;border-radius: 4px;">
......@@ -49,11 +49,8 @@
handle() {
if (this.current.input) {
request({
url:"https://ip.taobao.com/outGetIpInfo",
data:{
"ip":this.current.input === "localhost" ? 'myip' : this.current.input,
"accessKey": "alibaba-inc"
},
url:"https://ifconfig.co/json",
data:this.current.input !== "localhost" ? {ip:this.current.input} : null,
},(err, res, result)=>{
if (err) return this.$Message.error("ip地址信息查询错误:"+err);
this.current.output = JSON.stringify(JSON.parse(result),null, 4);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册