提交 1c47f20b 编写于 作者: M m0_60155232

Auto Commit

上级 ec9f58b4
......@@ -19,7 +19,7 @@ const activeIndex = ref('/');
<el-menu-item index="/qr_code">二维码生成</el-menu-item>
<el-menu-item index="/ip">IP查询</el-menu-item>
<el-menu-item index="/dns">DNS解析</el-menu-item>
<el-menu-item index="/morse">摩斯密码生成</el-menu-item>
<!-- <el-menu-item index="/morse">摩斯密码生成</el-menu-item> -->
</el-menu>
</div>
<!-- 路由出口-功能区 -->
......
......@@ -23,7 +23,8 @@ import axios from 'axios';
let Desc_text = ref(null);
onMounted(() => {
Desc_text.value.setDescText(`DNS域名解析服务,可用于测试域名是否解析成功。`)
Desc_text.value.setDescText(`DNS域名解析服务,可用于测试域名是否解析成功。
ps:如功能不可用,请手动访问'https://139.159.151.0/parse?domain=baidu.com'接受安全提示后工具恢复正常使用。'`)
})
// 原始串
let before_str = ref("")
......
<template>
<div id="container">
<button @click="generate">生成</button>
<button @click="parse">解密</button>
<div>
原始:{{ before_str }}
</div>
<div>
处理后:{{ after_str }}
</div>
</div>
</template>
<script setup>
import xmorse from 'xmorse';
import axios from "axios";
import { ref } from "vue";
// 原串
let before_str = ref("a");
// 处理串
let after_str = ref("");
// 生成处理器
function generate(){
console.log(xmorse.encode("aa"));
async function generate(){
const res = await axios.get(`https://localhost/morse/encode?str=${before_str.value}`);
after_str.value = res.data;
}
// 解析处理器
async function parse(){
const res = await axios.get(`https://localhost/morse/decode?str=${before_str.value}`);
after_str.value = res.data;
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册