提交 525a27e7 编写于 作者: B baiy 提交者: ninecents

ip 切换查询

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