From 07f5e49d4031f74c296fe01bb79e913c864979e5 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期一, 07 四月 2025 17:29:52 +0800 Subject: [PATCH] 数字人 --- src/layout/component/sidebar/components/ChatRecord.vue | 37 ++++++++++++++++++++++++------------- 1 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/layout/component/sidebar/components/ChatRecord.vue b/src/layout/component/sidebar/components/ChatRecord.vue index e2e45ec..ceb26c5 100644 --- a/src/layout/component/sidebar/components/ChatRecord.vue +++ b/src/layout/component/sidebar/components/ChatRecord.vue @@ -9,11 +9,12 @@ > 鏂板缓瀵硅瘽 </el-button> - <el-popover placement="right-start" :width="136" trigger="hover"> + <OtherPlatform /> + <!-- <el-popover placement="right-start" :width="136" trigger="hover"> <template #reference> <div class="nav__chat"> <div class="nav__chat-icon"> - <span class="chat_img ywifont ywicon-shouji !text-[20px] text-[#fff]"></span> + <span class="chat_img ywifont ywicon-shoujidiannao !text-[20px] text-[#fff]"></span> </div> </div> </template> @@ -25,12 +26,12 @@ <div ref="setPhoneQRCode" class="mt-[8px] mb-[8px]"></div> <p class="text-center text-[#5e6772] m-0 p-0 leading-5"> 鎵爜涓嬭浇 <br /> - WI 姘村姟鏅鸿兘鍔╂墜 + WI姘村姟鏅鸿兘骞冲彴 </p> </div> </div> </template> - </el-popover> + </el-popover> --> </div> </div> <div @@ -91,6 +92,7 @@ import moment from 'moment'; import QRCode from 'qrcodejs2-fixes'; import { computed, nextTick, onMounted, ref, watch } from 'vue'; +import OtherPlatform from './OtherPlatform.vue'; import type { ChatRoomItem } from './types'; import { DeleteHistoryGroups, setHistoryGroupTitle } from '/@/api/ai/chat'; import { SERVE_URL } from '/@/constants'; @@ -195,22 +197,31 @@ //#endregion //#region ====================== 鎵爜鎵嬫満绔笅杞� ====================== const setPhoneQRCode = ref<HTMLElement | null>(null); +let isInitQrcode = false; // 鍒濆鍖栫敓鎴愪簩缁寸爜 const initQrcode = () => { + if (isInitQrcode) return; + isInitQrcode = true; let currentTime = new Date().getTime(); const url = `${SERVE_URL}ai_html/views/mobileDownload/index.html?v=${currentTime}`; nextTick(() => { - (<HTMLElement>setPhoneQRCode.value).innerHTML = ''; - new QRCode(setPhoneQRCode.value, { - text: url, - width: 126, - height: 126, - colorDark: '#000000', - colorLight: '#ffffff', - }); + if (setPhoneQRCode.value) { + (<HTMLElement>setPhoneQRCode.value).innerHTML = ''; + new QRCode(setPhoneQRCode.value, { + text: url, + width: 126, + height: 126, + colorDark: '#000000', + colorLight: '#ffffff', + }); + } }); }; //#endregion + +const addPluginClick = () => { + window.open(`${SERVE_URL}ai_html/views/extension/index.html`); +}; onMounted(async () => { selectFirstRoom(); initQrcode(); @@ -255,7 +266,7 @@ margin-bottom: 10px; cursor: pointer; &:hover { - background-color: #41424a; + background-color: var(--color-bg-base); } .nav__chat-icon { background-position: 8px 8px; -- Gitblit v1.9.3