- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
147 lines
5.2 KiB
HTML
Executable File
147 lines
5.2 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
<title>Title</title>
|
|
<style>
|
|
.el-col {
|
|
border-radius: 4px;
|
|
}
|
|
.bg-purple-dark {
|
|
background: #99a9bf;
|
|
}
|
|
.bg-purple {
|
|
background: #d3dce6;
|
|
}
|
|
.bg-purple-light {
|
|
background: #e5e9f2;
|
|
}
|
|
.grid-content {
|
|
border-radius: 4px;
|
|
min-height: 36px;
|
|
}
|
|
.row-bg {
|
|
padding: 10px 0;
|
|
background-color: #f9fafc;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="index_area">
|
|
<el-container>
|
|
<el-header style="text-align: center">尝试切换目标语言翻译一下吧<br>doGoogleTranslate($text, 'en')</el-header>
|
|
<el-main>
|
|
<el-container>
|
|
<el-main style="width:45%">
|
|
<el-input
|
|
type="textarea"
|
|
placeholder="请输入原始文本"
|
|
v-model="source"
|
|
maxlength="5000"
|
|
show-word-limit
|
|
rows="10"
|
|
>
|
|
</el-input>
|
|
|
|
</el-main>
|
|
|
|
<el-main style="width:10%">
|
|
|
|
<el-select v-model="orglanguage" placeholder="原始语种" style=" margin-top: 25%;" filterable :loading="loading">
|
|
<el-option
|
|
v-for="(language,code) in options"
|
|
:key="code"
|
|
:loading="loading"
|
|
loading-text="翻译中.."
|
|
:label="language"
|
|
:value="code">
|
|
</el-option>
|
|
</el-select>
|
|
|
|
<el-select v-model="language" @change="translate" placeholder="目标语种" style=" margin-top: 25%;" filterable :loading="loading" >
|
|
<el-option
|
|
v-for="(language,code) in options"
|
|
:key="code"
|
|
loading-text="翻译中.."
|
|
:label="language"
|
|
:value="code">
|
|
</el-option>
|
|
</el-select>
|
|
<el-button type="primary" :loading="loading" @click="translate" style="margin-top: 5px;margin-left: 20px">翻译</el-button>
|
|
|
|
</el-main>
|
|
|
|
<el-main style="width:45%">
|
|
<el-input
|
|
type="textarea"
|
|
placeholder="请点击翻译"
|
|
v-model="target"
|
|
maxlength="6000"
|
|
rows="10"
|
|
show-word-limit
|
|
>
|
|
</el-input>
|
|
</el-main>
|
|
</el-container>
|
|
</el-main>
|
|
</el-container>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
|
<script>
|
|
let vue_translate = new Vue({
|
|
el: '#index_area',
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
source: '谷歌翻译插件是一个可以自动调用谷歌翻译,帮您将语言翻译为任意语种。\n' +
|
|
'\n' +
|
|
'原始语种如果没有选择,会自动识别语言\n' +
|
|
'\n' +
|
|
'用途多多,免予您手动复制粘贴到谷歌翻译的烦恼\n' +
|
|
'\n' +
|
|
'支持协程,快速高效的并发翻译\n' +
|
|
'\n' +
|
|
'单次翻译请限制在5000个字符内哦',
|
|
target: '',
|
|
orglanguage: '',
|
|
language: 'en',
|
|
options: {$languageList},
|
|
postUrl: "{$postUrl}",
|
|
}
|
|
},
|
|
methods : {
|
|
translate () {
|
|
let that = this;
|
|
if (!this.source) {
|
|
that.$message.error('请输入原始文本');
|
|
return false;
|
|
}
|
|
if (!this.language) {
|
|
that.$message.error('请输入目标语言');
|
|
return false;
|
|
}
|
|
this.loading = true;
|
|
axios.post(this.postUrl,{
|
|
source: that.source,
|
|
source_lang: that.orglanguage,
|
|
target_lang: that.language,
|
|
}, {emulateJSON: true}).then(function(res){
|
|
console.log(res);
|
|
if (res.data.status == true) {
|
|
that.target = res.data.data;
|
|
} else {
|
|
that.$message.error(res.data.msg);
|
|
}
|
|
that.loading = false;
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</html> |