feat: 完善多租户md

This commit is contained in:
橙子
2024-07-28 23:40:29 +08:00
parent 8b890a9271
commit 2eaa5f5bb6
12 changed files with 106 additions and 7 deletions

View File

@@ -16,6 +16,7 @@ import '@/assets/atom-one-dark.css';
import '@/assets/github-markdown.css';
import hljs from "highlight.js";
const isShowTipNumber=ref(10);
const router = useRouter();
//聊天存储
const chatStore = useChatStore();
@@ -34,6 +35,18 @@ const inputListDataStore = ref([{ key: "all", value: "" }, { key: "ai", value: "
//AI聊天临时存储
const sendAiChatContext = ref([]);
let timerTip=null;
//倒计时显示tip
const startCountTip = () => {
timerTip = setInterval(() => {
if (isShowTipNumber.value > 0) {
isShowTipNumber.value--;
} else {
clearInterval(timerTip); // 倒计时结束
}
}, 1000);
};
//当前聊天框显示的消息
const currentMsgContext = computed(() => {
if (selectIsAll()) {
@@ -93,7 +106,7 @@ let codeCopyDic=[];
//code部分处理、高亮
const codeHandler = (code, language) => {
const codeIndex = parseInt(Date.now() + "") + Math.floor(Math.random() * 10000000);
console.log(codeIndex,"codeIndex");
//console.log(codeIndex,"codeIndex");
// 格式化第一行是右侧language和 “复制” 按钮;
if (code) {
const navCode = navHandler(code)
@@ -179,12 +192,16 @@ onMounted(async () => {
}
chatStore.setMsgList((await getChatAccountMessageList()).data);
chatStore.setUserList((await getChatUserList()).data);
startCountTip();
})
onUnmounted(() => {
if (timer != null) {
clearInterval(timer)
}
if (timerTip != null) {
clearInterval(timerTip)
}
})
//代码copy事件
@@ -370,8 +387,9 @@ const getLastMessage = ((receiveId, itemType) => {
</script>
<template>
<div style="position: absolute; top: 0;left: 0;">
<p>当前版本1.4.0</p>
<div style="position: absolute; top: 0;left: 0;" v-show="isShowTipNumber>0">
<p>当前版本1.5.0</p>
<p>tip:官方学习交流群每次发送消息消耗 1 钱钱</p>
<p>tip:点击聊天窗口右上角X可退出</p>
<p>tip:多人同时在聊天室时左侧可显示其他成员</p>
@@ -380,6 +398,7 @@ const getLastMessage = ((receiveId, itemType) => {
<p>tip:当前Ai为OpenAi ChatGpt4由于接口收费原因还请各位手下留情</p>
<p>tip:ai对话为持续对话已优化输出速度</p>
<p>tip:ai对话只有本地存储了记录可点击清除或刷新</p>
<p>即将自动隐藏tip{{ isShowTipNumber }}</p>
</div>
<div class="body">
<div class="left">
@@ -885,6 +904,7 @@ const getLastMessage = ((receiveId, itemType) => {
font-size: 18px;
border-radius: 5px;
max-width: 600px;
text-align: justify;
}
@@ -926,7 +946,7 @@ const getLastMessage = ((receiveId, itemType) => {
.content-others-msg {
background-color: #FFFFFF;
padding: 10px 15px;
text-align: justify;
}
.content-others-msg:hover {