mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-05-01 23:44:26 +08:00
移除首页文字动画效果
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,12 +1,14 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
## v4.2.3
|
## v4.2.3
|
||||||
|
|
||||||
- 功能优化:增加模型分组与模型描述,采用卡片展示模式改进模型选择功能体验
|
- 功能优化:增加模型分组与模型描述,采用卡片展示模式改进模型选择功能体验
|
||||||
- 功能优化:化思维导图下载图片的清晰度以及解决拖动、缩放操作后下载图片内容不全问题
|
- 功能优化:化思维导图下载图片的清晰度以及解决拖动、缩放操作后下载图片内容不全问题
|
||||||
- Bug 修复:修复MJ画图页面已画出的图,点复制指令无效问题
|
- Bug 修复:修复 MJ 画图页面已画出的图,点复制指令无效问题
|
||||||
- 功能优化:MJ画图的分辨率支持自定义,优先使用prompt中--ar参数
|
- 功能优化:MJ 画图的分辨率支持自定义,优先使用 prompt 中--ar 参数
|
||||||
- Bug修复:修复MJ绘画U1-V1,拼写错误
|
- Bug 修复:修复 MJ 绘画 U1-V1,拼写错误
|
||||||
|
- 功能优化:支持自动迁移数据表结构,无需在手动执行 SQL 了
|
||||||
|
- 功能优化:移除首页的文字动画效果
|
||||||
|
|
||||||
## v4.2.2
|
## v4.2.2
|
||||||
|
|
||||||
|
|||||||
@@ -14,20 +14,12 @@
|
|||||||
<i class="iconfont icon-book"></i>
|
<i class="iconfont icon-book"></i>
|
||||||
</a>
|
</a>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip
|
<el-tooltip class="box-item" content="Github 源码" placement="bottom">
|
||||||
class="box-item"
|
|
||||||
content="Github 源码"
|
|
||||||
placement="bottom"
|
|
||||||
>
|
|
||||||
<a :href="githubURL" class="link-button mr-3" target="_blank">
|
<a :href="githubURL" class="link-button mr-3" target="_blank">
|
||||||
<i class="iconfont icon-github"></i>
|
<i class="iconfont icon-github"></i>
|
||||||
</a>
|
</a>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip
|
<el-tooltip class="box-item" content="Gitee 源码" placement="bottom">
|
||||||
class="box-item"
|
|
||||||
content="Gitee 源码"
|
|
||||||
placement="bottom"
|
|
||||||
>
|
|
||||||
<a :href="giteeURL" class="link-button" target="_blank">
|
<a :href="giteeURL" class="link-button" target="_blank">
|
||||||
<i class="iconfont icon-gitee"></i>
|
<i class="iconfont icon-gitee"></i>
|
||||||
</a>
|
</a>
|
||||||
@@ -50,7 +42,7 @@
|
|||||||
<h1 class="animate__animated animate__backInDown">
|
<h1 class="animate__animated animate__backInDown">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="msg-text cursor-ani">
|
<!-- <div class="msg-text cursor-ani">
|
||||||
<span
|
<span
|
||||||
v-for="(char, index) in displayedChars"
|
v-for="(char, index) in displayedChars"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -58,7 +50,7 @@
|
|||||||
>
|
>
|
||||||
{{ char }}
|
{{ char }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="navs animate__animated animate__backInDown">
|
<div class="navs animate__animated animate__backInDown">
|
||||||
<el-space wrap :size="14">
|
<el-space wrap :size="14">
|
||||||
@@ -80,129 +72,129 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, onUnmounted } from "vue";
|
import FooterBar from '@/components/FooterBar.vue'
|
||||||
import { useRouter } from "vue-router";
|
import ThemeChange from '@/components/ThemeChange.vue'
|
||||||
import FooterBar from "@/components/FooterBar.vue";
|
import { checkSession, getLicenseInfo, getSystemInfo } from '@/store/cache'
|
||||||
import ThemeChange from "@/components/ThemeChange.vue";
|
import { httpGet } from '@/utils/http'
|
||||||
import { httpGet } from "@/utils/http";
|
import { isMobile } from '@/utils/libs'
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from 'element-plus'
|
||||||
import { checkSession, getLicenseInfo, getSystemInfo } from "@/store/cache";
|
import { onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { isMobile } from "@/utils/libs";
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
|
|
||||||
if (isMobile()) {
|
if (isMobile()) {
|
||||||
router.push("/mobile/index");
|
router.push('/mobile/index')
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = ref("");
|
const title = ref('')
|
||||||
const logo = ref("");
|
const logo = ref('')
|
||||||
const slogan = ref("");
|
const slogan = ref('')
|
||||||
const license = ref({ de_copy: true });
|
const license = ref({ de_copy: true })
|
||||||
|
|
||||||
const isLogin = ref(false);
|
const isLogin = ref(false)
|
||||||
const docsURL = ref(process.env.VUE_APP_DOCS_URL);
|
const docsURL = ref(process.env.VUE_APP_DOCS_URL)
|
||||||
const githubURL = ref(process.env.VUE_APP_GITHUB_URL);
|
const githubURL = ref(process.env.VUE_APP_GITHUB_URL)
|
||||||
const giteeURL = ref(process.env.VUE_APP_GITEE_URL);
|
const giteeURL = ref(process.env.VUE_APP_GITEE_URL)
|
||||||
const navs = ref([]);
|
const navs = ref([])
|
||||||
|
|
||||||
const iconMap = ref({
|
const iconMap = ref({
|
||||||
"/chat": "icon-chat",
|
'/chat': 'icon-chat',
|
||||||
"/mj": "icon-mj",
|
'/mj': 'icon-mj',
|
||||||
"/sd": "icon-sd",
|
'/sd': 'icon-sd',
|
||||||
"/dalle": "icon-dalle",
|
'/dalle': 'icon-dalle',
|
||||||
"/images-wall": "icon-image",
|
'/images-wall': 'icon-image',
|
||||||
"/suno": "icon-suno",
|
'/suno': 'icon-suno',
|
||||||
"/xmind": "icon-xmind",
|
'/xmind': 'icon-xmind',
|
||||||
"/apps": "icon-app",
|
'/apps': 'icon-app',
|
||||||
"/member": "icon-vip-user",
|
'/member': 'icon-vip-user',
|
||||||
"/invite": "icon-share",
|
'/invite': 'icon-share',
|
||||||
"/luma": "icon-luma"
|
'/luma': 'icon-luma',
|
||||||
});
|
})
|
||||||
|
|
||||||
const displayedChars = ref([]);
|
const displayedChars = ref([])
|
||||||
const initAnimation = ref("");
|
const initAnimation = ref('')
|
||||||
let timer = null; // 定时器句柄
|
let timer = null // 定时器句柄
|
||||||
|
|
||||||
// 初始化间隔时间和随机时间数组
|
// 初始化间隔时间和随机时间数组
|
||||||
const interTime = ref(50);
|
const interTime = ref(50)
|
||||||
const interArr = [90, 100, 70, 88, 80, 110, 85, 400, 90, 99];
|
const interArr = [90, 100, 70, 88, 80, 110, 85, 400, 90, 99]
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSystemInfo()
|
getSystemInfo()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
title.value = res.data.title;
|
title.value = res.data.title
|
||||||
logo.value = res.data.logo;
|
logo.value = res.data.logo
|
||||||
slogan.value = res.data.slogan;
|
slogan.value = res.data.slogan
|
||||||
|
|
||||||
// 确保获取数据后再启动定时器
|
// 确保获取数据后再启动定时器
|
||||||
if (timer) clearInterval(timer); // 清除已有定时器
|
if (timer) clearInterval(timer) // 清除已有定时器
|
||||||
timer = setInterval(setContent, interTime.value);
|
timer = setInterval(setContent, interTime.value)
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
ElMessage.error("获取系统配置失败:" + e.message);
|
ElMessage.error('获取系统配置失败:' + e.message)
|
||||||
});
|
})
|
||||||
|
|
||||||
getLicenseInfo()
|
getLicenseInfo()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
license.value = res.data;
|
license.value = res.data
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
license.value = { de_copy: false };
|
license.value = { de_copy: false }
|
||||||
ElMessage.error("获取 License 配置失败:" + e.message);
|
ElMessage.error('获取 License 配置失败:' + e.message)
|
||||||
});
|
})
|
||||||
|
|
||||||
httpGet("/api/menu/list?index=1")
|
httpGet('/api/menu/list?index=1')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
navs.value = res.data;
|
navs.value = res.data
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
ElMessage.error("获取导航菜单失败:" + e.message);
|
ElMessage.error('获取导航菜单失败:' + e.message)
|
||||||
});
|
})
|
||||||
|
|
||||||
checkSession()
|
checkSession()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
isLogin.value = true;
|
isLogin.value = true
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
});
|
})
|
||||||
|
|
||||||
// 组件销毁时清除定时器
|
// 组件销毁时清除定时器
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearInterval(timer);
|
clearInterval(timer)
|
||||||
timer = null;
|
timer = null
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
// 打字机内容逐字符显示
|
// 打字机内容逐字符显示
|
||||||
const setContent = () => {
|
const setContent = () => {
|
||||||
if (!slogan.value) {
|
if (!slogan.value) {
|
||||||
if (timer) clearInterval(timer);
|
if (timer) clearInterval(timer)
|
||||||
timer = setTimeout(setContent, 100);
|
timer = setTimeout(setContent, 100)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (initAnimation.value.length >= slogan.value.length) {
|
if (initAnimation.value.length >= slogan.value.length) {
|
||||||
// 文本已全部输出
|
// 文本已全部输出
|
||||||
initAnimation.value = "";
|
initAnimation.value = ''
|
||||||
displayedChars.value = [];
|
displayedChars.value = []
|
||||||
if (timer) clearInterval(timer);
|
if (timer) clearInterval(timer)
|
||||||
timer = setInterval(setContent, interTime.value);
|
timer = setInterval(setContent, interTime.value)
|
||||||
} else {
|
} else {
|
||||||
const nextChar = slogan.value.charAt(initAnimation.value.length);
|
const nextChar = slogan.value.charAt(initAnimation.value.length)
|
||||||
initAnimation.value += nextChar; // 逐字符追加
|
initAnimation.value += nextChar // 逐字符追加
|
||||||
displayedChars.value.push(nextChar);
|
displayedChars.value.push(nextChar)
|
||||||
interTime.value = interArr[Math.floor(Math.random() * interArr.length)]; // 设置随机间隔
|
interTime.value = interArr[Math.floor(Math.random() * interArr.length)] // 设置随机间隔
|
||||||
if (timer) clearInterval(timer);
|
if (timer) clearInterval(timer)
|
||||||
timer = setInterval(setContent, interTime.value);
|
timer = setInterval(setContent, interTime.value)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
// 计算彩虹色
|
// 计算彩虹色
|
||||||
const rainbowColor = (index) => {
|
const rainbowColor = (index) => {
|
||||||
const hue = (index * 40) % 360; // 每个字符间隔40度,形成彩虹色
|
const hue = (index * 40) % 360 // 每个字符间隔40度,形成彩虹色
|
||||||
return `hsl(${hue}, 90%, 50%)`; // 色调(hue),饱和度(70%),亮度(50%)
|
return `hsl(${hue}, 90%, 50%)` // 色调(hue),饱和度(70%),亮度(50%)
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user