This commit is contained in:
2025-07-02 18:32:06 +08:00
parent c11cced1aa
commit d49337ba4f
14 changed files with 3015 additions and 2909 deletions

View File

@ -11,7 +11,7 @@
/> />
<meta <meta
name="description" name="description"
content="翻译之家提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。" content="聚合翻译提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。"
/> />
<meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" /> <meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" />
<link rel="stylesheet" href="static/css/public.css" /> <link rel="stylesheet" href="static/css/public.css" />
@ -23,7 +23,7 @@
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script src="static/js/layui.all.js"></script> <script src="static/js/layui.all.js"></script>
<script src="static/js/common.js"></script> <script src="static/js/common.js"></script>
<title>翻译之家</title> <title>聚合翻译</title>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function () { (function () {
@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div v-if="userInfo!=undefined&&userInfo.userId>0" class="right"> <div v-if="userInfo!=undefined&&userInfo.userId>0" class="right">
<a href="userInfo.html" class="console">控制台</a> <a href="userinfo.html" class="console">控制台</a>
<div class="user-info"> <div class="user-info">
<div class="phone">{{userInfo.name}}</div> <div class="phone">{{userInfo.name}}</div>
<i></i> <i></i>
@ -177,13 +177,13 @@
</li> </li>
</ul> </ul>
</div> </div>
<!--<div class="p1 content">--><!-- <h3>翻译之家API</h3>--><!-- <p>翻译之家为你提供主流翻译引擎机器翻译技术</p>--><!-- <div class="line"></div>--><!-- <div class="w1">为什么选择翻译之家</div>--><!-- <div class="w2">我们是主流翻译引擎综合代理服务商,汇集众多企业客户,从而可以享受较低的渠道价格。</div>--><!--</div>--> <!--<div class="p1 content">--><!-- <h3>聚合翻译API</h3>--><!-- <p>聚合翻译为你提供主流翻译引擎机器翻译技术</p>--><!-- <div class="line"></div>--><!-- <div class="w1">为什么选择聚合翻译?</div>--><!-- <div class="w2">我们是主流翻译引擎综合代理服务商,汇集众多企业客户,从而可以享受较低的渠道价格。</div>--><!--</div>-->
<div class="p2 content"> <div class="p2 content">
<div class="w1">介绍</div> <div class="w1">介绍</div>
<!--<h3 data="介绍">翻译之家API</h3>--> <!--<h3 data="介绍">聚合翻译API</h3>-->
<p>翻译之家为你提供主流翻译引擎机器翻译技术</p> <p>聚合翻译为你提供主流翻译引擎机器翻译技术</p>
<div class="line"></div> <div class="line"></div>
<div class="w1">为什么选择翻译之家</div> <div class="w1">为什么选择聚合翻译?</div>
<div class="w2"> <div class="w2">
我们是主流翻译引擎综合代理服务商,汇集众多企业客户,从而可以享受较低的渠道价格。 我们是主流翻译引擎综合代理服务商,汇集众多企业客户,从而可以享受较低的渠道价格。
</div> </div>

View File

@ -11,7 +11,7 @@
/> />
<meta <meta
name="description" name="description"
content="翻译之家提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。" content="聚合翻译提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。"
/> />
<meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" /> <meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" />
<link rel="stylesheet" href="static/css/public.css" /> <link rel="stylesheet" href="static/css/public.css" />
@ -23,7 +23,7 @@
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script src="static/js/layui.all.js"></script> <script src="static/js/layui.all.js"></script>
<script src="static/js/common.js"></script> <script src="static/js/common.js"></script>
<title>翻译之家</title> <title>聚合翻译</title>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function () { (function () {
@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div v-if="userInfo!=undefined&&userInfo.userId>0" class="right"> <div v-if="userInfo!=undefined&&userInfo.userId>0" class="right">
<a href="userInfo.html" class="console">控制台</a> <a href="userinfo.html" class="console">控制台</a>
<div class="user-info"> <div class="user-info">
<div class="phone">{{userInfo.name}}</div> <div class="phone">{{userInfo.name}}</div>
<i></i> <i></i>
@ -131,7 +131,7 @@
<div class="title">服务</div> <div class="title">服务</div>
<ul> <ul>
<li> <li>
<div class="q">翻译之家是如何服务客户的?</div> <div class="q">聚合翻译是如何服务客户的?</div>
<div class="a"> <div class="a">
我们是一个聚合翻译服务商,聚合主流的翻译公司接口,提供更便宜、多样化的翻译服务。 我们是一个聚合翻译服务商,聚合主流的翻译公司接口,提供更便宜、多样化的翻译服务。
</div> </div>
@ -200,17 +200,17 @@
font-size: 12px; font-size: 12px;
" "
> >
<p style="color: #fff; font-size: 12px"><span>关于我们:</span></p> <p style="color: #fff; font-size: 12px"><span>官方频道:@apiapl_news</span></p>
<p style="color: #fff; font-size: 12px"> <p style="color: #fff; font-size: 12px"><span>咨询客服:@apiapl</span></p>
<span></span> <span></span>
</p> </p>
</div> </div>
<div class="right" style="white-space: nowrap"> <div class="right" style="white-space: nowrap">
<p></p> <p></p>
<p><span>联系我们:</span></p>
<p><span>地址:</span></p> <p><span>技术服务:@apiapl_sdk</span></p>
<p><span></span></p> <p><span>联系邮箱info@apiapl.com</span></p>
<p class=""><span>电话: </span></p> <p class=""><span>联系电话:+18435173355 </span></p>
</div> </div>
</div> </div>
<div class="copyright"> <div class="copyright">

View File

@ -11,7 +11,7 @@
/> />
<meta <meta
name="description" name="description"
content="翻译之家提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。" content="聚合翻译提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。"
/> />
<meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" /> <meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" />
<link rel="stylesheet" href="static/css/public.css" /> <link rel="stylesheet" href="static/css/public.css" />
@ -23,7 +23,7 @@
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script src="static/js/layui.all.js"></script> <script src="static/js/layui.all.js"></script>
<script src="static/js/common.js"></script> <script src="static/js/common.js"></script>
<title>翻译之家</title> <title>聚合翻译</title>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function () { (function () {
@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div v-if="userInfo!=undefined&&userInfo.userId>0" class="right"> <div v-if="userInfo!=undefined&&userInfo.userId>0" class="right">
<a href="userInfo.html" class="console">控制台</a> <a href="userinfo.html" class="console">控制台</a>
<div class="user-info"> <div class="user-info">
<div class="phone">{{userInfo.name}}</div> <div class="phone">{{userInfo.name}}</div>
<i></i> <i></i>
@ -214,7 +214,7 @@
<li class="row-info"> <li class="row-info">
<div class="item">谷歌翻译-V2/V3</div> <div class="item">谷歌翻译-V2/V3</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">60微信咨询,领取折扣)</div> <div class="item">60电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
5.5折20美元<img src="static/picture/p7.png" alt="" /> 5.5折20美元<img src="static/picture/p7.png" alt="" />
@ -223,7 +223,7 @@
<li class="row-info"> <li class="row-info">
<div class="item">百度翻译-企业版本</div> <div class="item">百度翻译-企业版本</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">25微信咨询,领取折扣)</div> <div class="item">25电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
5折50元<img src="static/picture/p7.png" alt="" /> 5折50元<img src="static/picture/p7.png" alt="" />
@ -232,16 +232,16 @@
<li class="row-info"> <li class="row-info">
<div class="item">有道翻译</div> <div class="item">有道翻译</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">25微信咨询,领取折扣)</div> <div class="item">25电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
5折50元<img src="static/picture/p7.png" alt="" /> 5折<img src="static/picture/p7.png" alt="" />
</div> </div>
</li> </li>
<li class="row-info"> <li class="row-info">
<div class="item">微软翻译</div> <div class="item">微软翻译</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">60微信咨询,领取折扣)</div> <div class="item">60电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
8.2折10美元<img src="static/picture/p7.png" alt="" /> 8.2折10美元<img src="static/picture/p7.png" alt="" />
@ -250,16 +250,16 @@
<li class="row-info"> <li class="row-info">
<div class="item">火山翻译</div> <div class="item">火山翻译</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">25微信咨询,领取折扣)</div> <div class="item">25电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
5折50元<img src="static/picture/p7.png" alt="" /> 5折<img src="static/picture/p7.png" alt="" />
</div> </div>
</li> </li>
<li class="row-info"> <li class="row-info">
<div class="item">chatgpt翻译</div> <div class="item">chatgpt翻译</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">50微信咨询,领取折扣)</div> <div class="item">50电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
5折100元<img src="static/picture/p7.png" alt="" /> 5折100元<img src="static/picture/p7.png" alt="" />
@ -268,7 +268,7 @@
<li class="row-info"> <li class="row-info">
<div class="item">yandex翻译</div> <div class="item">yandex翻译</div>
<div class="item">按调用字符计费</div> <div class="item">按调用字符计费</div>
<div class="item">25微信咨询,领取折扣)</div> <div class="item">25电报咨询,领取折扣)</div>
<div class="item">51000支持扩展</div> <div class="item">51000支持扩展</div>
<div class="item"> <div class="item">
8.3折30元<img src="static/picture/p7.png" alt="" /> 8.3折30元<img src="static/picture/p7.png" alt="" />
@ -481,11 +481,11 @@
<div class="ctr"> <div class="ctr">
<div class="item"> <div class="item">
<img src="static/picture/p25.png" alt="" /> <img src="static/picture/p25.png" alt="" />
<div>微信咨询</div> <div>电报咨询</div>
<div class="detail wechat"> <div class="detail wechat">
<h5>微信咨询</h5> <h5>电报咨询</h5>
<img src="static/picture/p23.jpg" alt="" /> <img src="static/picture/p23.jpg" alt="" />
<p>手机扫码加我微信</p> <p>手机扫码加我电报</p>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
@ -494,13 +494,13 @@
<div>电话咨询</div> <div>电话咨询</div>
<div class="detail"> <div class="detail">
<h5>电话咨询</h5> <h5>电话咨询</h5>
<div class="phone">13327906119</div> <div class="phone">+18435173355</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="service-modal"><div class="content"><div class="close"></div><div class="contact">联系我们</div><img class="qrcode-img" src="https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p23.jpg" alt=""><p>请添加专属营销顾问</p></div></div> --> <!-- <div class="service-modal"><div class="content"><div class="close"></div><div class="contact">联系我们</div><img class="qrcode-img" src="/static/picture/p23.jpg" alt=""><p>请添加专属营销顾问</p></div></div> -->
<script type="text/javascript"> <script type="text/javascript">
var vm = new Vue({ var vm = new Vue({
el: "#app", el: "#app",
@ -688,17 +688,17 @@
font-size: 12px; font-size: 12px;
" "
> >
<p style="color: #fff; font-size: 12px"><span>关于我们:</span></p> <p style="color: #fff; font-size: 12px"><span>官方频道:@apiapl_news</span></p>
<p style="color: #fff; font-size: 12px"> <p style="color: #fff; font-size: 12px"><span>咨询客服:@apiapl</span></p>
<span></span> <span></span>
</p> </p>
</div> </div>
<div class="right" style="white-space: nowrap"> <div class="right" style="white-space: nowrap">
<p></p> <p></p>
<p><span>联系我们:</span></p>
<p><span>地址:</span></p> <p><span>技术服务:@apiapl_sdk</span></p>
<p><span>邮箱:</span></p> <p><span>联系邮箱:info@apiapl.com</span></p>
<p class=""><span>电话: </span></p> <p class=""><span>联系电话:+18435173355 </span></p>
</div> </div>
</div> </div>
<div class="copyright"> <div class="copyright">

View File

@ -1,382 +1,382 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="baidu-site-verification" content="codeva-bhaFvYlfgd" /> <meta name="baidu-site-verification" content="codeva-bhaFvYlfgd" />
<meta <meta
name="keywords" name="keywords"
content="deepl、deepl翻译、百度翻译、谷歌翻译、腾讯翻译君" content="deepl、deepl翻译、百度翻译、谷歌翻译、腾讯翻译君"
/> />
<meta <meta
name="description" name="description"
content="翻译之家提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。" content="聚合翻译提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。"
/> />
<meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" /> <meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" />
<link rel="stylesheet" href="static/css/public.css" /> <link rel="stylesheet" href="static/css/public.css" />
<link rel="stylesheet" href="static/css/layui.css" /> <link rel="stylesheet" href="static/css/layui.css" />
<script src="static/js/jquery-1.11.0.min.js"></script> <script src="static/js/jquery-1.11.0.min.js"></script>
<script src="static/js/axios.min.js"></script> <script src="static/js/axios.min.js"></script>
<script src="static/js/countUp.min.js"></script> <script src="static/js/countUp.min.js"></script>
<script src="static/js/vue.js"></script> <script src="static/js/vue.js"></script>
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script src="static/js/layui.all.js"></script> <script src="static/js/layui.all.js"></script>
<script src="static/js/common.js"></script> <script src="static/js/common.js"></script>
<title>翻译之家</title> <title>聚合翻译</title>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function () { (function () {
var hm = document.createElement("script"); var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?c4e0dd6add63dd71fa52870120ca22cf"; hm.src = "https://hm.baidu.com/hm.js?c4e0dd6add63dd71fa52870120ca22cf";
var s = document.getElementsByTagName("script")[0]; var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();
</script> </script>
</head> </head>
<body > <body >
<div class="public-header normal" id="main"> <div class="public-header normal" id="main">
<div class="container clearfix"> <div class="container clearfix">
<div class="left"> <div class="left">
<img class="logo default" src="static/picture/logo.png" alt="" /><img <img class="logo default" src="static/picture/logo.png" alt="" /><img
class="logo1 default" class="logo1 default"
src="static/picture/logo1.png" src="static/picture/logo1.png"
alt="" alt=""
/><img class="logo light" src="static/picture/logow.png" alt="" /><img /><img class="logo light" src="static/picture/logow.png" alt="" /><img
class="logo1 light" class="logo1 light"
src="static/picture/logo1w.png" src="static/picture/logo1w.png"
alt="" alt=""
/> />
<div class="nav"> <div class="nav">
<a class="" href="index.html"><span>首页</span></a <a class="" href="index.html"><span>首页</span></a
><a class="" href="onlineTranslation.html"><span>文本翻译</span></a ><a class="" href="onlineTranslation.html"><span>文本翻译</span></a
><a class="" href="voice.html"><span>语音翻译</span></a ><a class="" href="voice.html"><span>语音翻译</span></a
><a class="" href="api.html"><span>API文档</span></a ><a class="" href="api.html"><span>API文档</span></a
><a class="" href="commonProblems.html"><span>常见问题</span></a> ><a class="" href="commonProblems.html"><span>常见问题</span></a>
</div> </div>
</div> </div>
<div v-if="userInfo&&userInfo.id" class="right"> <div v-if="userInfo&&userInfo.id" class="right">
<a href="userInfo.html" class="console">控制台</a> <a href="userinfo.html" class="console">控制台</a>
<div class="user-info"> <div class="user-info">
<div class="phone">13809073722</div> <div class="phone">13809073722</div>
<i></i> <i></i>
<div class="log-out">退出</div> <div class="log-out">退出</div>
</div> </div>
</div> </div>
<div v-else class="right"><a class="unlogin" href="login.html">登录</a></div> <div v-else class="right"><a class="unlogin" href="login.html">登录</a></div>
</div> </div>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var vm = new Vue({ var vm = new Vue({
el: "#main", el: "#main",
data() { data() {
return {}; return {};
}, },
mounted() {}, mounted() {},
methods: { methods: {
logOut() { logOut() {
axios.get("/api/translate/logOut").then((response) => { axios.get("/api/translate/logOut").then((response) => {
location.reload(); location.reload();
}); });
}, },
}, },
}); });
</script> </script>
<div id="app"> <div id="app">
<div class="page-login" v-if="type == 0"> <div class="page-login" v-if="type == 0">
<div class="w1200"> <div class="w1200">
<div class="left"></div> <div class="left"></div>
<div class="right"> <div class="right">
<img src="static/picture/logo3x.png" alt="" /> <img src="static/picture/logo3x.png" alt="" />
<h3>登录</h3> <h3>登录</h3>
<div class="form-group"> <div class="form-group">
<div class="form-item"> <div class="form-item">
<div class="label">账号</div> <div class="label">账号</div>
<!-- <span class="pre">+86</span> --> <!-- <span class="pre">+86</span> -->
<input class="form-input" placeholder="请输入" v-model="tel"/> <input class="form-input" placeholder="请输入" v-model="tel"/>
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">密码</div> <div class="label">密码</div>
<input <input
class="form-input" class="form-input"
type="password" type="password"
placeholder="请输入" placeholder="请输入"
v-model="password" v-model="password"
/> />
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">验证码</div> <div class="label">验证码</div>
<input <input
class="form-input captcha-input" v-model="code" placeholder="请输入验证码"></input> class="form-input captcha-input" v-model="code" placeholder="请输入验证码"></input>
<div class="code-col captcha-container" @click="getCode" style="height: 100%;"> <div class="code-col captcha-container" @click="getCode" style="height: 100%;">
<img :src="captcha" class="captcha-img" /> <img :src="captcha" class="captcha-img" />
</div> </div>
</div> </div>
<div class="login" @click="login()">登录</div> <div class="login" @click="login()">登录</div>
<!-- <div class="more"> <!-- <div class="more">
<a href="javascript:;" @click="type=1">注册</a> <a href="javascript:;" @click="type=1">注册</a>
<a href="javascript:;" @click="type=2 ">找回密码</a> <a href="javascript:;" @click="type=2 ">找回密码</a>
</div> --> </div> -->
<div <div
class="rule" class="rule"
style=" style="
font-size: 15px; font-size: 15px;
text-align: center; text-align: center;
padding-top: 13px; padding-top: 13px;
color: #666; color: #666;
" "
> >
登录即代表您同意并遵守<a 登录即代表您同意并遵守<a
target="_blank" target="_blank"
href="static/file/rule.pdf" href="static/file/rule.pdf"
>《隐私协议》</a >《隐私协议》</a
> >
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="page-login find-password" v-if="type == 1"> <div class="page-login find-password" v-if="type == 1">
<div class="w1200"> <div class="w1200">
<div class="left"></div> <div class="left"></div>
<div class="right"> <div class="right">
<img src="static/picture/p20.png" alt="" /> <img src="static/picture/p20.png" alt="" />
<h3>注册</h3> <h3>注册</h3>
<div class="form-group"> <div class="form-group">
<div class="form-item"> <div class="form-item">
<div class="label">手机号</div> <div class="label">手机号</div>
<span class="pre">+86</span <span class="pre">+86</span
><input class="form-input" type="number" v-model="tel" /> ><input class="form-input" type="number" v-model="tel" />
</div> </div>
<div class="form-item form-code"> <div class="form-item form-code">
<div class="label">验证码</div> <div class="label">验证码</div>
<input <input
class="form-input" class="form-input"
type="number" type="number"
placeholder="4位数验证码" placeholder="4位数验证码"
v-model="code" v-model="code"
/> />
<div class="code-col" @click="getCode">{{ codeText }}</div> <div class="code-col" @click="getCode">{{ codeText }}</div>
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">密码</div> <div class="label">密码</div>
<input <input
class="form-input" class="form-input"
type="password" type="password"
placeholder="至少8位字母或数字的组合" placeholder="至少8位字母或数字的组合"
v-model="password" v-model="password"
/> />
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">确认密码</div> <div class="label">确认密码</div>
<input <input
class="form-input" class="form-input"
type="password" type="password"
placeholder="至少8位字母或数字的组合" placeholder="至少8位字母或数字的组合"
v-model="surepassword" v-model="surepassword"
/> />
</div> </div>
<div class="login" @click="register()">确定</div> <div class="login" @click="register()">确定</div>
<div class="login-now"> <div class="login-now">
<a href="javascript:;" @click="type=0">登录</a> <a href="javascript:;" @click="type=0">登录</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="page-login find-password" v-if="type == 2"> <div class="page-login find-password" v-if="type == 2">
<div class="w1200"> <div class="w1200">
<div class="left"></div> <div class="left"></div>
<div class="right"> <div class="right">
<img src="static/picture/p20.png" alt="" /> <img src="static/picture/p20.png" alt="" />
<h3>登录</h3> <h3>登录</h3>
<div class="form-group"> <div class="form-group">
<div class="form-item"> <div class="form-item">
<div class="label">手机号</div> <div class="label">手机号</div>
<span class="pre">+86</span <span class="pre">+86</span
><input class="form-input" type="number" v-model="tel" /> ><input class="form-input" type="number" v-model="tel" />
</div> </div>
<div class="form-item form-code"> <div class="form-item form-code">
<div class="label">验证码</div> <div class="label">验证码</div>
<input <input
class="form-input" class="form-input"
type="number" type="number"
placeholder="4位数验证码" placeholder="4位数验证码"
v-model="code" v-model="code"
/> />
<div class="code-col" @click="getCode">{{ codeText}}</div> <div class="code-col" @click="getCode">{{ codeText}}</div>
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">密码</div> <div class="label">密码</div>
<input <input
class="form-input" class="form-input"
type="password" type="password"
placeholder="至少8位字母或数字的组合" placeholder="至少8位字母或数字的组合"
v-model="password" v-model="password"
/> />
</div> </div>
<div class="form-item"> <div class="form-item">
<div class="label">确认密码</div> <div class="label">确认密码</div>
<input <input
class="form-input" class="form-input"
type="password" type="password"
placeholder="至少8位字母或数字的组合" placeholder="至少8位字母或数字的组合"
v-model="surepassword" v-model="surepassword"
/> />
</div> </div>
<div class="login" @click="register()">确定</div> <div class="login" @click="register()">确定</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var vm = new Vue({ var vm = new Vue({
el: "#app", el: "#app",
data() { data() {
return { return {
tel: "", tel: "",
password: "", password: "",
code:"", code:"",
uuid:"", uuid:"",
type: 0, type: 0,
isCanClick: true, isCanClick: true,
count: 60, count: 60,
timer: undefined, timer: undefined,
codeText: "发送验证码", codeText: "发送验证码",
code: "", code: "",
surepassword: "", surepassword: "",
captcha:"", captcha:"",
}; };
}, },
beforeCreate(){ beforeCreate(){
let token = localStorage.getItem("token"); let token = localStorage.getItem("token");
if(token){ if(token){
location.href="userinfo.html" location.href="userinfo.html"
} }
}, },
mounted() { mounted() {
this.getCode(); this.getCode();
}, },
methods: { methods: {
login() { login() {
var pattern = /^1[0-9]{10}$/; var pattern = /^1[0-9]{10}$/;
if (this.password) { if (this.password) {
axios axios
.post("/login", { .post("/login", {
username: this.tel, username: this.tel,
password: this.password, password: this.password,
code:this.code, code:this.code,
uuid:this.uuid, uuid:this.uuid,
rememberMe: false, rememberMe: false,
}) })
.then((response) => { .then((response) => {
if (response.data.code == 200) { if (response.data.code == 200) {
localStorage.setItem("token", response.data.token); localStorage.setItem("token", response.data.token);
location.href="userinfo.html" location.href="userinfo.html"
} else { } else {
layer.msg(response.data.msg); layer.msg(response.data.msg);
} }
}); });
} else { } else {
layer.msg("密码不能为空"); layer.msg("密码不能为空");
} }
}, },
getCode() { getCode() {
const that = this; const that = this;
axios axios
.get("/captcha") .get("/captcha")
.then((response) => { .then((response) => {
if (response.data.code == 200) { if (response.data.code == 200) {
that.isCanClick = false; that.isCanClick = false;
that.captcha=response.data.data; that.captcha=response.data.data;
this.uuid=response.data.id; this.uuid=response.data.id;
} else { } else {
that.isCanClick = 1; that.isCanClick = 1;
layer.msg(response.data.msg); layer.msg(response.data.msg);
} }
}); });
}, },
register() { register() {
var pattern = /^1[0-9]{10}$/; var pattern = /^1[0-9]{10}$/;
if (!pattern.test(this.tel)) { if (!pattern.test(this.tel)) {
layer.msg("手机号码有误!"); layer.msg("手机号码有误!");
return; return;
} }
if (!$.trim(this.password)) { if (!$.trim(this.password)) {
layer.msg("密码不能为空"); layer.msg("密码不能为空");
return; return;
} }
if (this.password != this.surepassword) { if (this.password != this.surepassword) {
layer.msg("两次密码不一致,请重新输入"); layer.msg("两次密码不一致,请重新输入");
return; return;
} }
if (!this.code) { if (!this.code) {
layer.msg("验证码不能为空"); layer.msg("验证码不能为空");
return; return;
} }
axios axios
.post("/api/translate/register", { .post("/api/translate/register", {
tel: this.tel, tel: this.tel,
password: this.password, password: this.password,
code: this.code, code: this.code,
type: this.type, type: this.type,
}) })
.then((response) => { .then((response) => {
if (response.data.code == 200) { if (response.data.code == 200) {
} else { } else {
layer.msg(response.data.msg); layer.msg(response.data.msg);
} }
}); });
}, },
}, },
}); });
</script> </script>
<div class="public-footer"> <div class="public-footer">
<div class="w1200"> <div class="w1200">
<div class="left"><img src="static/picture/logo.png" alt="" /></div> <div class="left"><img src="static/picture/logo.png" alt="" /></div>
<div <div
style=" style="
flex-direction: column; flex-direction: column;
line-height: 23px; line-height: 23px;
padding-left: 100px; padding-left: 100px;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
" "
> >
<p style="color: #fff; font-size: 12px"><span>关于我们:</span></p> <p style="color: #fff; font-size: 12px"><span>官方频道:@apiapl_news</span></p>
<p style="color: #fff; font-size: 12px"> <p style="color: #fff; font-size: 12px"><span>咨询客服:@apiapl</span></p>
<span></span> <span></span>
</p> </p>
</div> </div>
<div class="right" style="white-space: nowrap"> <div class="right" style="white-space: nowrap">
<p></p> <p></p>
<p><span>联系我们:</span></p>
<p><span>地址:</span></p> <p><span>技术服务:@apiapl_sdk</span></p>
<p><span>邮箱:</span></p> <p><span>联系邮箱:info@apiapl.com</span></p>
<p class=""><span>电话: </span></p> <p class=""><span>联系电话:+18435173355 </span></p>
</div> </div>
</div> </div>
<div class="copyright"> <div class="copyright">
<a href="https://beian.miit.gov.cn/" target="blank"></a> <a href="https://beian.miit.gov.cn/" target="blank"></a>
</div> </div>
</div> </div>
<style> <style>
.captcha-input{ .captcha-input{
width: 260px !important; width: 260px !important;
} }
.captcha-container{ .captcha-container{
cursor: pointer; cursor: pointer;
} }
.captcha-img{ .captcha-img{
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
} }
</style> </style>
</body> </body>
</html> </html>

View File

@ -1,451 +1,451 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="baidu-site-verification" content="codeva-bhaFvYlfgd" /> <meta name="baidu-site-verification" content="codeva-bhaFvYlfgd" />
<meta <meta
name="keywords" name="keywords"
content="deepl、deepl翻译、百度翻译、谷歌翻译、腾讯翻译君" content="deepl、deepl翻译、百度翻译、谷歌翻译、腾讯翻译君"
/> />
<meta <meta
name="description" name="description"
content="翻译之家提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。" content="聚合翻译提供即时免费的中文、英语、日语、韩语、法语、德语、俄语、西班牙语、葡萄牙语、越南语、印尼语、意大利语、荷兰语、泰语全文翻译等服务。"
/> />
<meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" /> <meta name="baidu-site-verification" content="codeva-mXz3BqI9VN" />
<link rel="stylesheet" href="static/css/public.css" /> <link rel="stylesheet" href="static/css/public.css" />
<link rel="stylesheet" href="static/css/layui.css" /> <link rel="stylesheet" href="static/css/layui.css" />
<script src="static/js/jquery-1.11.0.min.js"></script> <script src="static/js/jquery-1.11.0.min.js"></script>
<script src="static/js/axios.min.js"></script> <script src="static/js/axios.min.js"></script>
<script src="static/js/countUp.min.js"></script> <script src="static/js/countUp.min.js"></script>
<script src="static/js/vue.js"></script> <script src="static/js/vue.js"></script>
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script src="static/js/layui.all.js"></script> <script src="static/js/layui.all.js"></script>
<script src="static/js/common.js"></script> <script src="static/js/common.js"></script>
<title>翻译之家</title> <title>聚合翻译</title>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function () { (function () {
var hm = document.createElement("script"); var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?c4e0dd6add63dd71fa52870120ca22cf"; hm.src = "https://hm.baidu.com/hm.js?c4e0dd6add63dd71fa52870120ca22cf";
var s = document.getElementsByTagName("script")[0]; var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();
</script> </script>
</head> </head>
<body> <body>
<div class="public-header normal" id="main"> <div class="public-header normal" id="main">
<div class="container clearfix"> <div class="container clearfix">
<div class="left"> <div class="left">
<img class="logo default" src="static/picture/logo.png" alt="" /><img <img class="logo default" src="static/picture/logo.png" alt="" /><img
class="logo1 default" class="logo1 default"
src="static/picture/logo1.png" src="static/picture/logo1.png"
alt="" alt=""
/><img class="logo light" src="static/picture/logow.png" alt="" /><img /><img class="logo light" src="static/picture/logow.png" alt="" /><img
class="logo1 light" class="logo1 light"
src="static/picture/logo1w.png" src="static/picture/logo1w.png"
alt="" alt=""
/> />
<div class="nav"> <div class="nav">
<a class="" href="index.html"><span>首页</span></a <a class="" href="index.html"><span>首页</span></a
><a class="active" href=""><span>文本翻译</span></a ><a class="active" href=""><span>文本翻译</span></a
><a class="" href="voice.html"><span>语音翻译</span></a ><a class="" href="voice.html"><span>语音翻译</span></a
><a class="" href="api.html"><span>API文档</span></a ><a class="" href="api.html"><span>API文档</span></a
><a class="" href="commonProblems.html"><span>常见问题</span></a> ><a class="" href="commonProblems.html"><span>常见问题</span></a>
</div> </div>
</div> </div>
<div v-if="userInfo!=undefined&&userInfo.userId>0" class="right"> <div v-if="userInfo!=undefined&&userInfo.userId>0" class="right">
<a href="userInfo.html" class="console">控制台</a> <a href="userinfo.html" class="console">控制台</a>
<div class="user-info"> <div class="user-info">
<div class="phone">{{userInfo.name}}</div> <div class="phone">{{userInfo.name}}</div>
<i></i> <i></i>
<div class="log-out" @click="logOut">退出</div> <div class="log-out" @click="logOut">退出</div>
</div> </div>
</div> </div>
<div v-else class="right"> <div v-else class="right">
<a class="unlogin" href="login.html">登录</a> <a class="unlogin" href="login.html">登录</a>
</div> </div>
</div> </div>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var vm = new Vue({ var vm = new Vue({
el: "#main", el: "#main",
data() { data() {
return { return {
userInfo: {}, userInfo: {},
token: "", token: "",
}; };
}, },
created() {}, created() {},
mounted() { mounted() {
let token = localStorage.getItem("token"); let token = localStorage.getItem("token");
if (token) { if (token) {
this.token = token; this.token = token;
this.getUserInfo(token); this.getUserInfo(token);
} else { } else {
// location.href = "login.html"; // location.href = "login.html";
} }
}, },
methods: { methods: {
logOut() { logOut() {
axios axios
.post("/logout", { .post("/logout", {
headers: { headers: {
Authorization: `Bearer ${this.token}`, Authorization: `Bearer ${this.token}`,
}, },
}) })
.then((response) => { .then((response) => {
localStorage.removeItem("token"); localStorage.removeItem("token");
location.reload(); location.reload();
}); });
}, },
getUserInfo(token) { getUserInfo(token) {
let that = this; let that = this;
axios axios
.get("/getinfo", { .get("/getinfo", {
headers: { headers: {
Authorization: `Bearer ${this.token}`, Authorization: `Bearer ${this.token}`,
}, },
}) })
.then((response) => { .then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
this.userInfo = response.data.data; this.userInfo = response.data.data;
console.log("userinfo", this.userInfo); console.log("userinfo", this.userInfo);
} else { } else {
localStorage.removeItem("token"); localStorage.removeItem("token");
location.href = "login.html"; location.href = "login.html";
} }
}); });
}, },
}, },
}); });
</script> </script>
<div class="page-translation" id="app"> <div class="page-translation" id="app">
<div class="w1200"> <div class="w1200">
<div class="translation-engine"> <div class="translation-engine">
<div <div
v-for="item in engineType" v-for="item in engineType"
:key="item.key" :key="item.key"
class="item" class="item"
:class="{ on: engine.key == item.key }" :class="{ on: engine.key == item.key }"
@click="onSelectEngine(item)" @click="onSelectEngine(item)"
> >
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
</div> </div>
<div class="translation-row"> <div class="translation-row">
<div class="translation-language" @mouseleave="languageShow = false"> <div class="translation-language" @mouseleave="languageShow = false">
<div <div
class="source" class="source"
@mouseenter="() => onShowLanguage('100px', true, 'sourceLanguage')" @mouseenter="() => onShowLanguage('100px', true, 'sourceLanguage')"
> >
{{ sourceLanguage.name }} {{ sourceLanguage.name }}
<div class="icon select-icon"></div> <div class="icon select-icon"></div>
</div> </div>
<div <div
class="target" class="target"
@mouseenter="() => onShowLanguage('620px', true, 'targetLanguage')" @mouseenter="() => onShowLanguage('620px', true, 'targetLanguage')"
> >
<div class="icon switch-icon" @click="onSwitch"></div> <div class="icon switch-icon" @click="onSwitch"></div>
{{ targetLanguage.name }} {{ targetLanguage.name }}
<div class="icon select-icon"></div> <div class="icon select-icon"></div>
</div> </div>
<div <div
class="language-row" class="language-row"
:class="{ show: languageShow }" :class="{ show: languageShow }"
:style="{ left: languageRowLeft }" :style="{ left: languageRowLeft }"
> >
<div class="search"> <div class="search">
<i class="icon"></i <i class="icon"></i
><input ><input
type="text" type="text"
class="search-input" class="search-input"
v-model="serachKeywords" v-model="serachKeywords"
placeholder="搜索你想要的" placeholder="搜索你想要的"
/> />
</div> </div>
<div class="row"> <div class="row">
<div <div
v-for="(k, v) in languageCurrent" v-for="(k, v) in languageCurrent"
:key="v" :key="v"
:value="v" :value="v"
class="col" class="col"
@click="onSelectLanguage(v)" @click="onSelectLanguage(v)"
:class="{ on: sourceLanguage.key == v || targetLanguage.key == v }" :class="{ on: sourceLanguage.key == v || targetLanguage.key == v }"
> >
<span>{{ k }}</span> <span>{{ k }}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="translation-text"> <div class="translation-text">
<div class="source"> <div class="source">
<textarea <textarea
cols="30" cols="30"
rows="10" rows="10"
v-model="sourceText" v-model="sourceText"
placeholder="输入文字,即可翻译" placeholder="输入文字,即可翻译"
></textarea> ></textarea>
</div> </div>
<div class="target"> <div class="target">
<textarea <textarea
disabled disabled
cols="30" cols="30"
rows="10" rows="10"
v-model="targetText" v-model="targetText"
></textarea> ></textarea>
<div class="loading" v-if="isLoading"> <div class="loading" v-if="isLoading">
<img class="icon" src="static/picture/p17.png" alt="" /> <img class="icon" src="static/picture/p17.png" alt="" />
<div>Loading...</div> <div>Loading...</div>
</div> </div>
<div v-if="targetText" class="copy" @click="copy">复制</div> <div v-if="targetText" class="copy" @click="copy">复制</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script src="static/js/lodash.min.js"></script> <script src="static/js/lodash.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
let source = CancelToken.source(); let source = CancelToken.source();
new Vue({ new Vue({
el: "#app", el: "#app",
data() { data() {
return { return {
engine: {}, engine: {},
engineType: [ engineType: [
{ {
key: "deepl", key: "deepl",
value: 0, value: 0,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p2.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p2.png",
}, },
{ {
key: "google", key: "google",
value: 1, value: 1,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p3.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p3.png",
}, },
{ {
key: "baidu", key: "baidu",
value: 2, value: 2,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p4.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/p4.png",
}, },
{ {
key: "youdao", key: "youdao",
value: 3, value: 3,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/youdao.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/youdao.png",
}, },
{ {
key: "bing", key: "bing",
value: 4, value: 4,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/bing.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/bing.png",
}, },
{ {
key: "huoshan", key: "huoshan",
value: 5, value: 5,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/huoshan.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/huoshan.png",
}, },
{ {
key: "chatgpt", key: "chatgpt",
value: 6, value: 6,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/openai.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/openai.png",
}, },
{ {
key: "yandex", key: "yandex",
value: 7, value: 7,
icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/yandex.png", icon: "https://codeai.oss-cn-hangzhou.aliyuncs.com/img/yandex.png",
}, },
], ],
sourceLanguage: { sourceLanguage: {
key: "auto", key: "auto",
name: "自动检测", name: "自动检测",
}, },
targetLanguage: { targetLanguage: {
key: "ZH", key: "ZH",
name: "中文(简体)", name: "中文(简体)",
}, },
sourceText: "", sourceText: "",
targetText: "", targetText: "",
serachKeywords: "", serachKeywords: "",
languageShow: false, languageShow: false,
languageRowLeft: "100px", languageRowLeft: "100px",
languageTotalData: {}, languageTotalData: {},
isLoading: false, isLoading: false,
}; };
}, },
created() { created() {
this.engine = this.engineType[0]; this.engine = this.engineType[0];
this.getLanguage(); this.getLanguage();
}, },
mounted() { mounted() {
let token = localStorage.getItem("token"); let token = localStorage.getItem("token");
if (token) { if (token) {
this.token = token; this.token = token;
this.getUserInfo(token); this.getUserInfo(token);
} else { } else {
// location.href = "login.html"; // location.href = "login.html";
} }
}, },
watch: { watch: {
sourceText(v) { sourceText(v) {
if (v) { if (v) {
// _.debounce(this.translate, 500) // _.debounce(this.translate, 500)
this.translate(); this.translate();
} else { } else {
source.cancel("取消请求"); source.cancel("取消请求");
this.targetText = ""; this.targetText = "";
} }
}, },
}, },
computed: { computed: {
languageCurrent() { languageCurrent() {
const current = this.languageTotalData[this.engine.key]; const current = this.languageTotalData[this.engine.key];
const copyCurrent = {}; const copyCurrent = {};
if (this.serachKeywords) { if (this.serachKeywords) {
Object.keys(current).forEach((key) => { Object.keys(current).forEach((key) => {
// console.log('current[key]', current[key]) // console.log('current[key]', current[key])
if (current[key].indexOf(this.serachKeywords) > -1) { if (current[key].indexOf(this.serachKeywords) > -1) {
copyCurrent[key] = current[key]; copyCurrent[key] = current[key];
} }
}); });
return copyCurrent; return copyCurrent;
} }
return this.languageTotalData[this.engine.key]; return this.languageTotalData[this.engine.key];
}, },
}, },
methods: { methods: {
copy() { copy() {
// 模拟 输入框 // 模拟 输入框
var cInput = document.createElement("input"); var cInput = document.createElement("input");
cInput.value = this.targetText; cInput.value = this.targetText;
document.body.appendChild(cInput); document.body.appendChild(cInput);
cInput.select(); // 选取文本框内容 cInput.select(); // 选取文本框内容
// 执行浏览器复制命令 // 执行浏览器复制命令
// 复制命令会将当前选中的内容复制到剪切板中这里就是创建的input标签 // 复制命令会将当前选中的内容复制到剪切板中这里就是创建的input标签
// Input要在正常的编辑状态下原生复制方法才会生效 // Input要在正常的编辑状态下原生复制方法才会生效
document.execCommand("copy"); document.execCommand("copy");
layer.msg("复制成功"); layer.msg("复制成功");
// 复制成功后再将构造的标签 移除 // 复制成功后再将构造的标签 移除
document.body.removeChild(cInput); document.body.removeChild(cInput);
}, },
onShowLanguage(left, boolean, key) { onShowLanguage(left, boolean, key) {
this.languageRowLeft = left ? left : "100px"; this.languageRowLeft = left ? left : "100px";
this.languageShow = boolean; this.languageShow = boolean;
this.currentKey = key; this.currentKey = key;
}, },
onSelectEngine(e) { onSelectEngine(e) {
this.engine = e; this.engine = e;
const firstEntry = Object.entries(this.languageCurrent)[0]; const firstEntry = Object.entries(this.languageCurrent)[0];
this.targetLanguage = { this.targetLanguage = {
key: firstEntry[0], key: firstEntry[0],
name: this.languageCurrent[firstEntry[0]], name: this.languageCurrent[firstEntry[0]],
}; };
this.translate(); this.translate();
}, },
getLanguage() { getLanguage() {
axios.get("/api/translate/getLanguages").then((res) => { axios.get("/api/translate/getLanguages").then((res) => {
if (res.data.code == 1) { if (res.data.code == 1) {
this.languageTotalData = res.data.data; this.languageTotalData = res.data.data;
} }
}); });
}, },
translate: _.debounce(function () { translate: _.debounce(function () {
source.cancel("取消请求"); source.cancel("取消请求");
source = axios.CancelToken.source(); source = axios.CancelToken.source();
const that = this; const that = this;
if (!this.sourceText) { if (!this.sourceText) {
that.targetText = ""; that.targetText = "";
return; return;
} }
this.isLoading = true; this.isLoading = true;
axios axios
.post( .post(
"/api/translate/index", "/api/translate/index",
{ {
keywords: this.sourceText, keywords: this.sourceText,
targetLanguage: this.targetLanguage.key, targetLanguage: this.targetLanguage.key,
type: this.engine.value, // 0 :deepl, 1:谷歌 2:百度 type: this.engine.value, // 0 :deepl, 1:谷歌 2:百度
}, },
{ cancelToken: source.token } { cancelToken: source.token }
) )
.then(function (res) { .then(function (res) {
console.log(res.data.data.text); console.log(res.data.data.text);
if (res.data.code == 1) { if (res.data.code == 1) {
that.targetText = res.data.data.text; that.targetText = res.data.data.text;
if (!this.sourceText) { if (!this.sourceText) {
this.targetText = ""; this.targetText = "";
} }
} else { } else {
that.targetText = ""; that.targetText = "";
layer.msg(res.data.info); layer.msg(res.data.info);
} }
}) })
.catch(function (err) { .catch(function (err) {
console.log(err); console.log(err);
}) })
.finally(() => { .finally(() => {
this.isLoading = false; this.isLoading = false;
}); });
}, 800), }, 800),
onSelectLanguage(e) { onSelectLanguage(e) {
this[this.currentKey] = { this[this.currentKey] = {
key: e, key: e,
name: this.languageCurrent[e], name: this.languageCurrent[e],
}; };
this.languageShow = false; this.languageShow = false;
this.translate(); this.translate();
}, },
onSwitch() { onSwitch() {
const copySource = JSON.parse(JSON.stringify(this.sourceLanguage)); const copySource = JSON.parse(JSON.stringify(this.sourceLanguage));
const copyTarget = JSON.parse(JSON.stringify(this.targetLanguage)); const copyTarget = JSON.parse(JSON.stringify(this.targetLanguage));
this.targetLanguage = copySource; this.targetLanguage = copySource;
this.sourceLanguage = copyTarget; this.sourceLanguage = copyTarget;
}, },
onInput(e) { onInput(e) {
if (this.sourceText) { if (this.sourceText) {
// _.debounce(this.translate, 500) // _.debounce(this.translate, 500)
this.translate(); this.translate();
} else { } else {
this.targetText = ""; this.targetText = "";
} }
}, },
}, },
}); });
</script> </script>
<div class="public-footer"> <div class="public-footer">
<div class="w1200"> <div class="w1200">
<div class="left"><img src="static/picture/logo.png" alt="" /></div> <div class="left"><img src="static/picture/logo.png" alt="" /></div>
<div <div
style=" style="
flex-direction: column; flex-direction: column;
line-height: 23px; line-height: 23px;
padding-left: 100px; padding-left: 100px;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
" "
> >
<p style="color: #fff; font-size: 12px"><span>关于我们:</span></p> <p style="color: #fff; font-size: 12px"><span>官方频道:@apiapl_news</span></p>
<p style="color: #fff; font-size: 12px"> <p style="color: #fff; font-size: 12px"><span>咨询客服:@apiapl</span></p>
<span></span> <span></span>
</p> </p>
</div> </div>
<div class="right" style="white-space: nowrap"> <div class="right" style="white-space: nowrap">
<p></p> <p></p>
<p><span>联系我们:</span></p>
<p><span>地址:</span></p> <p><span>技术服务:@apiapl_sdk</span></p>
<p><span></span></p> <p><span>联系邮箱info@apiapl.com</span></p>
<p class=""><span>电话: </span></p> <p class=""><span>联系电话:+18435173355 </span></p>
</div> </div>
</div> </div>
<div class="copyright"> <div class="copyright">
<a href="https://beian.miit.gov.cn/" target="blank" <a href="https://beian.miit.gov.cn/" target="blank"
></a ></a
> >
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1700,6 +1700,39 @@
padding: 20px; padding: 20px;
z-index: 10000; z-index: 10000;
} }
.service-modal .content-normal{
background-color: white;
border-radius: 10px;
height: 442px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 444px;
background-size: 100% 100%;
box-sizing: border-box;
padding: 45px 15px 15px;
overflow-y: auto;
}
.service-modal .content-normal .content-item {
padding: 10px;
border-radius: 3px;
/* border: solid .5px #6c75e1; */
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
cursor: pointer;
}
.service-modal .content-normal .content-item:hover{
transform: translateY(-5px); /* 向上浮动一点 */
box-shadow: 0 4px 12px rgb(65 63 63 / 10%);
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.service-modal .content-normal .content-item:not(:first-child){
margin-top: 10px;
}
.service-modal .content { .service-modal .content {
position: absolute; position: absolute;
@ -1732,7 +1765,7 @@
line-height: 25px; line-height: 25px;
} }
.service-modal .content .close { .service-modal .content .close,.service-modal .content-normal .close {
position: absolute; position: absolute;
top: 16px; top: 16px;
right: 16px; right: 16px;
@ -3003,7 +3036,7 @@
white-space: nowrap; white-space: nowrap;
} }
.modal-overlay { .modal-overlay,.modal-overlay-record {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;

BIN
static/image/clock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,2 +1,2 @@
axios.defaults.baseURL = 'http://localhost:8085/api/v1'; axios.defaults.baseURL = 'http://localhost:8085/api/v1';

10
static/js/countdown.js Normal file
View File

@ -0,0 +1,10 @@
/*!
* vue-countdown v1.1.5
* https://fengyuanchen.github.io/vue-countdown
*
* Copyright 2018-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2020-02-25T01:19:32.769Z
*/
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t=t||self).VueCountdown=i()}(this,function(){"use strict";var t=1e3,i=6e4,s=36e5,e="visibilitychange";return{name:"countdown",data:function(){return{counting:!1,endTime:0,totalMilliseconds:0}},props:{autoStart:{type:Boolean,default:!0},emitEvents:{type:Boolean,default:!0},interval:{type:Number,default:1e3,validator:function(t){return 0<=t}},now:{type:Function,default:function(){return Date.now()}},tag:{type:String,default:"span"},time:{type:Number,default:0,validator:function(t){return 0<=t}},transform:{type:Function,default:function(t){return t}}},computed:{days:function(){return Math.floor(this.totalMilliseconds/864e5)},hours:function(){return Math.floor(this.totalMilliseconds%864e5/s)},minutes:function(){return Math.floor(this.totalMilliseconds%s/i)},seconds:function(){return Math.floor(this.totalMilliseconds%i/t)},milliseconds:function(){return Math.floor(this.totalMilliseconds%t)},totalDays:function(){return this.days},totalHours:function(){return Math.floor(this.totalMilliseconds/s)},totalMinutes:function(){return Math.floor(this.totalMilliseconds/i)},totalSeconds:function(){return Math.floor(this.totalMilliseconds/t)}},render:function(t){return t(this.tag,this.$scopedSlots.default?[this.$scopedSlots.default(this.transform({days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}))]:this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.autoStart&&this.start()}}},methods:{start:function(){this.counting||(this.counting=!0,this.emitEvents&&this.$emit("start"),"visible"===document.visibilityState&&this.continue())},continue:function(){var e=this;if(this.counting){var n=Math.min(this.totalMilliseconds,this.interval);if(0<n)if(window.requestAnimationFrame){var o,a;this.requestId=requestAnimationFrame(function t(i){a=a||i;var s=i-(o=o||i);n<=s||n<=s+(i-a)/2?e.progress():e.requestId=requestAnimationFrame(t),a=i})}else this.timeoutId=setTimeout(function(){e.progress()},n);else this.end()}},pause:function(){window.requestAnimationFrame?cancelAnimationFrame(this.requestId):clearTimeout(this.timeoutId)},progress:function(){this.counting&&(this.totalMilliseconds-=this.interval,this.emitEvents&&0<this.totalMilliseconds&&this.$emit("progress",{days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}),this.continue())},abort:function(){this.counting&&(this.pause(),this.counting=!1,this.emitEvents&&this.$emit("abort"))},end:function(){this.counting&&(this.pause(),this.totalMilliseconds=0,this.counting=!1,this.emitEvents&&this.$emit("end"))},update:function(){this.counting&&(this.totalMilliseconds=Math.max(0,this.endTime-this.now()))},handleVisibilityChange:function(){switch(document.visibilityState){case"visible":this.update(),this.continue();break;case"hidden":this.pause()}}},mounted:function(){document.addEventListener(e,this.handleVisibilityChange)},beforeDestroy:function(){document.removeEventListener(e,this.handleVisibilityChange),this.pause()}}});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

2340
voice.html

File diff suppressed because it is too large Load Diff