| | |
| | | > |
| | | 新建对话 |
| | | </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"> |
| | |
| | | <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> |
| | |
| | | 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'; |
| | |
| | | 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('/ai_html/views/extension/index.html'); |
| | | window.open(`${SERVE_URL}ai_html/views/extension/index.html`); |
| | | }; |
| | | onMounted(async () => { |
| | | selectFirstRoom(); |