提交 ec9f58b4 编写于 作者: M m0_60155232

Wed Sep 13 13:10:00 CST 2023 inscode

上级 49307d37
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
"qrcodejs2-fix": "^0.0.1", "qrcodejs2-fix": "^0.0.1",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"vue": "^3.2.37", "vue": "^3.2.37",
"vue-router": "^4.2.4" "vue-router": "^4.2.4",
"xmorse": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.1",
......
<template> <template>
<div id="container"> <div id="container">
<!-- 描述 --> <!-- 描述 -->
<Desc ref="Desc_text"></Desc> <Desc ref="Desc_text"></Desc>
<!-- 原始框 --> <!-- 原始框 -->
<textarea name="" id="" cols="160" rows="10" placeholder="域名" v-model="before_str"></textarea> <textarea name="" id="" cols="160" rows="10" placeholder="域名(例如:baidu.com)" v-model="before_str"></textarea>
<!-- 转换按钮 --> <!-- 转换按钮 -->
<div id="my_btn"> <div id="my_btn">
<button @click="parseHanle">解析</button> <button @click="parseHanle">解析</button>
</div> </div>
<!-- 转换结果 --> <!-- 转换结果 -->
<textarea name="" id="" cols="160" rows="10" placeholder="解析的结果" v-model="after_str"></textarea> <textarea name="" id="" cols="160" rows="10" placeholder="解析的结果" v-model="after_str"></textarea>
</div> </div>
</template> </template>
...@@ -34,10 +34,22 @@ let after_str = ref("") ...@@ -34,10 +34,22 @@ let after_str = ref("")
async function parseHanle() { async function parseHanle() {
// 判断空 // 判断空
if (before_str.value == "") { if (before_str.value == "") {
ElMessage("请输入域名后解析") ElMessage("请输入域名后解析")
return 0; return 0;
} }
const res = await axios.get(`https://139.159.151.0/parse?domain=${before_str.value}`); const res = await axios.get(`https://139.159.151.0/parse?domain=${before_str.value}`);
if (isNaN(parseInt(res.data[0]))) {
ElMessage({
message: "域名解析异常",
type: "warning"
})
after_str.value = res.data;
return;
}
ElMessage({
message: "解析成功",
type: "success"
})
after_str.value = res.data; after_str.value = res.data;
} }
......
...@@ -17,7 +17,8 @@ import Desc from "../components/Desc.vue" ...@@ -17,7 +17,8 @@ import Desc from "../components/Desc.vue"
let Desc_text = ref(null); let Desc_text = ref(null);
onMounted(()=>{ onMounted(()=>{
Desc_text.value.setDescText(`获取当前计算机的公网IP,可用于云产品开放白名单的IP填写等作用。`) Desc_text.value.setDescText(`获取当前计算机的公网IP,可用于云产品开放白名单的IP填写等作用
(使用前请先关闭代理)。`)
}) })
// IP地址 // IP地址
......
<template> <template>
<div id="container">
<button @click="generate">生成</button>
</div>
</template>
Morse密码 <script setup>
import xmorse from 'xmorse';
</template> // 生成处理器
\ No newline at end of file function generate(){
console.log(xmorse.encode("aa"));
}
</script>
<style scoped>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册