wujingjing
2025-01-06 4526dc437b634f8fe62151f3454d1be36c5c0f3f
扫码下载
已修改2个文件
已添加1个文件
152 ■■■■■ 文件已修改
src/layout/component/sidebar/SidebarOther.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/components/ChatRecord.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/components/OtherPlatform.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/SidebarOther.vue
@@ -64,28 +64,7 @@
                </div>
                <div class="agent_line mt-4"></div>
                <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>
                            </div>
                        </div>
                    </template>
                    <template #default>
                        <div class="relative">
                            <div class="p-0 box-shadow-none rounded-[10px]">
                                <p class="text-center text-[#5e6772] m-0 p-0 leading-5 text-[12px]">请使用手机浏览器扫描二维码</p>
                                <p class="text-center text-[red] m-0 p-0 leading-5 text-[12px]">(不支持微信扫描)</p>
                                <div ref="setPhoneQRCode" class="mt-[8px] mb-[8px]"></div>
                                <p class="text-center text-[#5e6772] m-0 p-0 leading-5">
                                    æ‰«ç ä¸‹è½½ <br />
                                    WI æ°´åŠ¡æ™ºèƒ½åŠ©æ‰‹
                                </p>
                            </div>
                        </div>
                    </template>
                </el-popover>
                <OtherPlatform />
            </div>
        </div>
        <div class="nav_history_list bg-[var(--color-bg-side)]" v-show="isShowHistoryChatRoom" ref="historyChatRoomRef">
@@ -177,7 +156,7 @@
    newChatRoomClick,
    selectFirstRoom,
} from '/@/stores/chatRoom';
import OtherPlatform from './components/OtherPlatform.vue';
import emitter from '/@/utils/mitt';
import { accessSessionKey, userNameKey } from '/@/utils/request';
import { gotoRoute } from '/@/utils/route';
src/layout/component/sidebar/components/ChatRecord.vue
@@ -9,49 +9,7 @@
                >
                    æ–°å»ºå¯¹è¯
                </el-button>
                <el-dropdown trigger="hover" placement="right-start">
                    <div class="nav__chat">
                        <div class="nav__chat-icon">
                            <span class="chat_img ywifont ywicon-shoujidiannao !text-[20px] text-[#fff]"></span>
                        </div>
                    </div>
                    <template #dropdown>
                        <el-dropdown-menu >
                            <el-dropdown-item>
                                <el-popover placement="right-start" :width="136" trigger="hover" @show="initQrcode" :offset="35">
                                    <template #reference>
                                        <div class="flex items-center justify-between w-full">
                                            <div class="flex items-center">
                                                <span class="ywifont ywicon-shouji mr-2"></span>
                                                <span>下载手机应用</span>
                                            </div>
                                            <!-- <span class="ywifont ywicon-youjiantou"></span> -->
                                        </div>
                                    </template>
                                    <template #default>
                                        <div class="relative">
                                            <div class="p-0 box-shadow-none rounded-[10px]">
                                                <p class="text-center text-[#5e6772] m-0 p-0 leading-5 text-[12px]">请使用手机浏览器扫描二维码</p>
                                                <p class="text-center text-[red] m-0 p-0 leading-5 text-[12px]">(不支持微信扫描)</p>
                                                <div ref="setPhoneQRCode" class="mt-[8px] mb-[8px]"></div>
                                                <p class="text-center text-[#5e6772] m-0 p-0 leading-5">
                                                    æ‰«ç ä¸‹è½½ <br />
                                                    WI æ°´åŠ¡æ™ºèƒ½åŠ©æ‰‹
                                                </p>
                                            </div>
                                        </div>
                                    </template>
                                </el-popover>
                            </el-dropdown-item>
                            <el-dropdown-item @click="addPluginClick">
                                <div class="flex items-center">
                                    <span class="ywifont ywicon-chajian mr-2"></span>
                                    <span>添加浏览器插件</span>
                                </div>
                            </el-dropdown-item>
                        </el-dropdown-menu>
                    </template>
                </el-dropdown>
                <OtherPlatform />
                <!-- <el-popover placement="right-start" :width="136" trigger="hover">
                    <template #reference>
                        <div class="nav__chat">
@@ -141,6 +99,7 @@
import { DateFilter, dateFilterMap } from '/@/model/types/date';
import { activeRoomId, chatRoomList, gotoAnswerPage, newChatRoomClick, selectFirstRoom } from '/@/stores/chatRoom';
import { debounce, getRecentDateRange } from '/@/utils/util';
import OtherPlatform from './OtherPlatform.vue';
const chatRoomRef = ref<HTMLDivElement>(null);
const queryParams = ref({
    title: '',
src/layout/component/sidebar/components/OtherPlatform.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,82 @@
<template>
    <el-dropdown trigger="hover" placement="right-start">
        <div class="nav__chat">
            <div class="nav__chat-icon">
                <span class="chat_img ywifont ywicon-shoujidiannao !text-[20px] text-[#fff]"></span>
            </div>
        </div>
        <template #dropdown>
            <el-dropdown-menu>
                <el-dropdown-item>
                    <el-popover placement="right-start" :width="136" trigger="hover" @show="initQrcode" :offset="35">
                        <template #reference>
                            <div class="flex items-center justify-between w-full">
                                <div class="flex items-center">
                                    <span class="ywifont ywicon-shouji mr-2"></span>
                                    <span>下载手机应用</span>
                                </div>
                            </div>
                        </template>
                        <template #default>
                            <div class="relative">
                                <div class="p-0 box-shadow-none rounded-[10px]">
                                    <!-- <p class="text-center text-[#5e6772] m-0 p-0 leading-5 text-[12px]">请使用手机浏览器扫描二维码</p>
                                    <p class="text-center text-[red] m-0 p-0 leading-5 text-[12px]">(不支持微信扫描)</p> -->
                                    <div ref="setPhoneQRCode" class="mt-[8px] mb-[8px]"></div>
                                    <p class="text-center text-info m-0 p-0 leading-5 text-sm">
                                        æµè§ˆå™¨æ‰«ç ä¸‹è½½ <br />
                                        WI æ°´åŠ¡æ™ºèƒ½åŠ©æ‰‹
                                    </p>
                                </div>
                            </div>
                        </template>
                    </el-popover>
                </el-dropdown-item>
                <el-dropdown-item @click="addPluginClick">
                    <div class="flex items-center">
                        <span class="ywifont ywicon-chajian mr-2"></span>
                        <span>添加浏览器插件</span>
                    </div>
                </el-dropdown-item>
            </el-dropdown-menu>
        </template>
    </el-dropdown>
</template>
<script setup lang="ts" name="OtherPlatform">
import { ref, nextTick, onMounted } from 'vue';
import { SERVE_URL } from '/@/constants';
import { selectFirstRoom } from '/@/stores/chatRoom';
import QRCode from 'qrcodejs2-fixes';
//#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',
        });
    });
};
//#endregion
const addPluginClick = () => {
    window.open('/ai_html/views/extension/index.html');
};
onMounted(async () => {
    selectFirstRoom();
    initQrcode();
});
</script>
<style scoped lang="scss"></style>