Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mao.O
Web开发实用小工具集
提交
6ca8239c
W
Web开发实用小工具集
项目概览
Mao.O
/
Web开发实用小工具集
与 Fork 源项目一致
Fork自
inscode / VueJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
Web开发实用小工具集
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6ca8239c
编写于
9月 12, 2023
作者:
M
m0_60155232
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tue Sep 12 17:25:00 CST 2023 inscode
上级
b664fc34
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
79 addition
and
6 deletion
+79
-6
src/views/DNS.vue
src/views/DNS.vue
+24
-2
src/views/IP.vue
src/views/IP.vue
+55
-4
未找到文件。
src/views/DNS.vue
浏览文件 @
6ca8239c
<
template
>
<
template
>
DNS解析
<button
@
click=
"parseHanle"
>
解析
</button>
</
template
>
</
template
>
\ No newline at end of file
<
script
setup
>
import
axios
from
"
axios
"
;
// 域名解析处理器
async
function
parseHanle
(){
let
paramObj
=
{
queryStr
:
"
maoheinn.top
"
,
querytype
:
"
A
"
,
dnsserver
:
"
8.8.8.8
"
}
const
res
=
await
axios
.
post
(
"
https://coding.tools/cn/nslookup
"
,);
console
.
log
(
res
);
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/IP.vue
浏览文件 @
6ca8239c
<
template
>
<
template
>
<!-- 描述 -->
<Desc
ref=
"Desc_text"
></Desc>
<button
@
click=
"getIP"
>
获取IP
</button>
<button
@
click=
"getIP"
>
获取IP
</button>
<!-- IP地址 -->
<!-- IP地址 -->
<div>
<div
id=
"ipContent"
>
{{
ipAddr
}}
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
{
ref
,
onMounted
}
from
"
vue
"
;
import
{
ElMessage
}
from
'
element-plus
'
import
Desc
from
"
../components/Desc.vue
"
let
Desc_text
=
ref
(
null
);
async
function
getIP
(){
onMounted
(()
=>
{
Desc_text
.
value
.
setDescText
(
`获取当前计算机的公网IP,可用于云产品开放白名单的IP填写等作用。`
)
})
// IP地址
let
ipAddr
=
ref
(
"
点击【按钮】查看IP
"
);
async
function
getIP
()
{
if
(
ipAddr
.
value
!=
"
点击【按钮】查看IP
"
)
{
ElMessage
({
message
:
"
请勿重复获取!
"
,
type
:
"
warning
"
})
return
;
}
ElMessage
(
"
获取中...
"
)
const
res
=
await
axios
.
get
(
"
https://ipv4.icanhazip.com/
"
);
const
res
=
await
axios
.
get
(
"
https://ipv4.icanhazip.com/
"
);
console
.
log
(
res
.
data
);
ipAddr
.
value
=
res
.
data
;
ElMessage
({
message
:
"
获取成功!
"
,
type
:
"
success
"
})
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
button
{
width
:
68px
;
height
:
31px
;
background-color
:
#47abbd
;
border
:
none
;
border-radius
:
5px
;
color
:
white
;
font-weight
:
600
;
font-size
:
15px
;
position
:
relative
;
top
:
2px
;
cursor
:
pointer
;
}
button
:hover
{
background-color
:
#3a8b99
;
}
#ipContent
{
margin-top
:
10px
;
border
:
solid
rgb
(
66
,
62
,
62
)
1px
;
height
:
60px
;
width
:
500px
;
border-radius
:
5px
;
font-size
:
13px
;
padding
:
7px
;
}
</
style
>
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录