Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
moraxs committed Aug 17, 2024
2 parents 1f2ba0f + 994c8fe commit e7be8e2
Show file tree
Hide file tree
Showing 10 changed files with 51,331 additions and 90,818 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
+ 中国商人1:Q群377591124 Q号2914592234
+ 中国商人李贞璟 Q号57366054 yile一乐圈服,四处倒卖圈钱


# Android测试版
[Android测试版本](https://github.com/xiaozhao147/DanhengWebTools/releases/download/0.0/DanhengWebTools.apk)
# web版
## 多语言
页面会根据当前浏览器语言自动调整语言,目前仅支持中文,英文,且部分(bushi)翻译工作尚未完成,若您想为项目的国际化做出贡献,请提交pr。
Expand Down
1 change: 1 addition & 0 deletions src/includes/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const options: I18nOptions = {
presetshortcuts:"预设快捷指令",
lightcones:"光锥",
item:"物品",
getrole:"获得角色",
character:"角色形迹设置",
rankuser:"角色星魂设置",
leveluser:"角色等级设置",
Expand Down
178 changes: 178 additions & 0 deletions src/pages/start/components/getrole.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<template>
<div>
<!-- 滚动公告 -->
<div class="scrolling-notice" v-if="showNotice">
<marquee behavior="scroll" direction="left">{{ noticeContent }}</marquee>
</div>

<!-- 原有的组件内容 -->
<div class="commuse">
<div class="commuse-item">
<div class="text-slate-900 dark:text-slate-100"> 角色: </div>
<a-cascader allow-search v-model="value2" :options="options" placeholder="" filterable />
</div>
<div class="generate">
<a-input v-model="value" placeholder="" />
<a-button type="primary" shape="round" size="large" @click="copyvalue">复制</a-button>
<a-button type="primary" shape="round" size="large" @click="execute">执行</a-button>
</div>
</div>

</div>
</template>

<script setup lang="ts">
import { reactive, ref, computed, onMounted, inject } from 'vue'
import { useClipboard } from '@vueuse/core'
import { Message } from '@arco-design/web-vue'
import { useAppStore } from '@/store/modules/app'
import axios from 'axios'
import getrole from './json/getrole.json'
import JSEncrypt from 'jsencrypt';
import {useI18n} from "vue-i18n";
const { t, locale } = useI18n();
const { text, isSupported, copy } = useClipboard()
const appStore = useAppStore()
const value2 = ref(1001)
const value = computed(() => {
return `avatar get ${value2.value}`
})
const options = reactive(getrole)
const message = Message
function copyvalue() {
copy(value.value)
if (isSupported) {
message.success(`已复制${value.value}`)
}
}
const API_BASE_URL = import.meta.env.VITE_DHWT_API_SERVER;
const execute = async () => {
//读取localStorage中存储的uid
const uid = localStorage.getItem('uid');
if (!uid) {
message.info('用户未登录,请先前往“远程”页面执行一次命令,然后重试');
return;
}
const command = value.value;
try {
// 发送请求到后端
const res = await axios.post(`${API_BASE_URL}/api/submit`, {
keyType: 'PEM',
uid: uid,
command: command
});
if (res.data.code !== 0) {
throw new Error('命令提交失败: ' + res.data.message);
}
const responseMessage = res.data.data.message;
message.success(`命令提交成功:${res.data.data.message}`);
} catch (err: unknown) {
const errorMessage = err instanceof Error ? err.message : '请求失败';
message.error(errorMessage);
console.error(err);
}
};
const send = inject("send")
const showNotice = ref(true)
const noticeContent = 'LunarCore及其他任何衍生工具都是免费软件,如果你是付费购买的,那你就被骗了,请及时退款并举报。'
// 在页面加载时设置一个延时,用于显示滚动公告,你可以根据需求调整延时时长
onMounted(() => {
setTimeout(() => {
showNotice.value = true
}, 1000)
})
</script>

<style lang="less" scoped>
/* 添加样式以美化滚动公告 */
.scrolling-notice {
color: #BEBEBE;
padding: 8px;
font-size: 14px;
text-align: center;
white-space: nowrap;
overflow: hidden;
border-radius: 10px; /* 添加圆角样式 */
}
.commuse {
width: 500px;
margin: auto;
}
.commuse-item {
display: flex;
align-items: center;
margin: 18px 0;
> div {
&:nth-child(1) {
width: 150px;
text-align: right;
padding-right: 10px;
color: #6b6a6a !important; /* 使用 !important 提高优先级 */
}
}
}
.generate {
display: flex;
align-items: center;
margin-left: 100px;
}
@media screen and (max-width: 768px) {
.commuse {
width: 100%;
padding: 10px;
}
.commuse-item {
margin: 18px 0 10px;
}
.commuse-item > div:nth-child(1) {
width: auto;
text-align: left;
padding: 0;
margin-bottom: 5px;
}
.generate {
display: block;
margin-left: 0;
width: 100%;
margin-bottom: 80px;
margin-top: 10px;
text-align: center;
}
.generate > .arco-input {
margin-bottom: 10px;
}
.generate button {
display: block;
width: 100%;
margin-top: 10px;
}
}
</style>
4 changes: 2 additions & 2 deletions src/pages/start/components/holyrelic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="commuse-item">
<div class="text-slate-900 dark:text-slate-100">{{ t('relic.enhancementlevel') }}</div>

<a-input-number placeholder="" v-model="grade" :min="0" :max="20" />
<a-input-number placeholder="" v-model="grade" :min="0" :max="9999" />
</div>

<div class="generate">
Expand Down Expand Up @@ -94,7 +94,7 @@ const value = computed(() => {
// 如果 xct 为空,则使用默认值 1
xct = xct || ' 1';
return `relic ${holyrelicnamevalue.value} l${grade.value} ${modifiedValue}${xct} `
return `relic ${holyrelicnamevalue.value} ${modifiedValue}${xct} l${grade.value} x1`
})
const execute = async () => {
//读取localStorage中存储的uid
Expand Down
Loading

0 comments on commit e7be8e2

Please sign in to comment.