fix: fixed bug #70, XunFei 1.5 url version map error

This commit is contained in:
RockYang
2023-12-25 08:54:17 +08:00
committed by UncleSimonlau
parent 3991f4daec
commit 6bc57b6132
32 changed files with 3081 additions and 321 deletions

View File

@@ -1,8 +1,9 @@
<template>
<van-config-provider :theme="getMobileTheme()">
<div class="app-background">
<van-config-provider theme="dark">
<div class="mobile-chat" v-loading="loading" element-loading-text="正在连接会话...">
<van-sticky ref="navBarRef" :offset-top="0" position="top">
<van-nav-bar left-arrow left-text="返回" @click-left="router.back()">
<van-sticky ref="navBarRef" :offset-top="0" position="top">
<van-nav-bar left-arrow left-text="返回" @click-left="router.back()">
<template #title>
<van-dropdown-menu>
<van-dropdown-item :title="title">
@@ -15,6 +16,7 @@
<template #right>
<van-icon name="share-o" @click="showShare = true"/>
</template>
</van-nav-bar>
</van-sticky>
@@ -25,7 +27,8 @@
@select="shareChat"
/>
<div id="message-list-box" :style="{height: winHeight+'px'}" class="message-list-box">
<div class="chat-list-wrapper">
<div id="message-list-box" :style="{height: winHeight + 'px'}" class="message-list-box">
<van-list
v-model:error="error"
:finished="finished"
@@ -57,32 +60,34 @@
</van-cell>
</van-list>
</div>
</div>
<div class="chat-box-wrapper">
<van-sticky ref="bottomBarRef" :offset-bottom="0" position="bottom">
<div class="chat-box">
<van-cell-group>
<van-field
v-model="prompt"
center
clearable
placeholder="输入你的问题"
>
<template #button>
<van-button size="small" type="primary" @click="sendMessage">发送</van-button>
</template>
<template #extra>
<div class="icon-box">
<van-icon v-if="showStopGenerate" name="stop-circle-o" @click="stopGenerate"/>
<van-icon v-if="showReGenerate" name="play-circle-o" @click="reGenerate"/>
</div>
</template>
</van-field>
</van-cell-group>
</div>
<van-cell-group inset>
<van-field
v-model="prompt"
center
clearable
placeholder="输入你的问题"
>
<template #button>
<van-button size="small" type="primary" @click="sendMessage">发送</van-button>
</template>
<template #extra>
<div class="icon-box">
<van-icon v-if="showStopGenerate" name="stop-circle-o" @click="stopGenerate"/>
<van-icon v-if="showReGenerate" name="play-circle-o" @click="reGenerate"/>
</div>
</template>
</van-field>
</van-cell-group>
</van-sticky>
</div>
</div>
</van-config-provider>
</div>
</template>
<script setup>
@@ -101,6 +106,11 @@ import {checkSession} from "@/action/session";
import {getMobileTheme} from "@/store/system";
import ChatMidJourney from "@/components/mobile/ChatMidJourney.vue";
import QRCode from "qrcode";
import {ElMessage} from "element-plus";
import Clipboard from "clipboard";
import InviteList from "@/components/InviteList.vue";
const winHeight = ref(0)
const navBarRef = ref(null)
const bottomBarRef = ref(null)
@@ -114,6 +124,16 @@ const title = chatConfig.title
const chatId = chatConfig.chatId
const loginUser = ref(null)
const listBoxHeight = window.innerHeight
const inviteURL = ref("")
const qrImg = ref("")
const inviteChatCalls = ref(0)
const inviteImgCalls = ref(0)
const hits = ref(0)
const regNum = ref(0)
const rate = ref(0)
const isLogin = ref(false)
onMounted(() => {
winHeight.value = document.body.offsetHeight - navBarRef.value.$el.offsetHeight - bottomBarRef.value.$el.offsetHeight
})
@@ -385,59 +405,10 @@ const shareOptions = [
]
const shareChat = () => {
showShare.value = false
showToast('功能待开发')
router.push('/mobile/Invitation');
}
</script>
<style lang="stylus" scoped>
.mobile-chat {
.message-list-box {
padding-top 50px
padding-bottom 10px
overflow-x auto
background #F5F5F5;
.van-cell {
background none
font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}
}
.chat-box {
.icon-box {
.van-icon {
font-size 24px
margin-left 10px;
}
}
}
}
.van-theme-dark {
.mobile-chat {
.message-list-box {
background #232425;
}
}
}
</style>
<style lang="stylus">
.mobile-chat {
.van-nav-bar__title {
.van-dropdown-menu__title {
margin-right 10px
}
.van-cell__title {
text-align left
}
}
.van-nav-bar__right {
.van-icon {
font-size 20px
}
}
}
@import "@/assets/css/mobile-chat-session.css"
</style>