feat: 一些调整

This commit is contained in:
zoujing
2025-07-31 11:50:37 +08:00
parent e15dea35c8
commit e42f2274ce
3 changed files with 15 additions and 7 deletions

View File

@@ -11,3 +11,6 @@ export const MessageType = {
}
export const CompName = {
quickBookingCard: 'quickBookingCard'
}

View File

@@ -12,7 +12,7 @@
<script setup>
import QuickBookingContentList from './QuickBookingContentList.vue'
import { defineProps, ref } from 'vue'
import { ref, nextTick } from 'vue'
import { onMounted } from 'vue'
import { quickBookingComponent } from '../../request/api/QuickBookingComponent'
import { SCROLL_TO_BOTTOM } from '../../constant/constant'
@@ -23,7 +23,10 @@
const res = await quickBookingComponent('2025-07-29')
if(res.code === 0 && res.data) {
commodityGroupDTOList.value.push(...res.data.commodityGroupDTOList)
uni.$emit(SCROLL_TO_BOTTOM, true)
nextTick(() => {
uni.$emit(SCROLL_TO_BOTTOM, true)
});
}
}

View File

@@ -28,7 +28,7 @@
<template v-if="item.msgType === MessageRole.AI">
<ChatCardAI class="message-item-ai" :text="item.msg">
<template v-if="item.toolCall">
<QuickBookingComponent v-if="item.toolCall.componentName === 'quickBookingCard'" />
<QuickBookingComponent v-if="item.toolCall.componentName === CompName.quickBookingCard"/>
</template>
</ChatCardAI>
</template>
@@ -41,8 +41,10 @@
<ChatCardOther class="message-item-other" :text="item.msg">
<OneFeelMK001 v-if="mainPageDataModel.activityList.length > 0" :activityList="mainPageDataModel.activityList"/>
<template v-if="mainPageDataModel.recommendTheme.length > 0" v-for="(item, index) in mainPageDataModel.recommendTheme" :key="item.themeName">
<OneFeelMK002 :recommendTheme="item"/>
<template v-if="mainPageDataModel.recommendTheme.length > 0">
<template v-for="(item) in mainPageDataModel.recommendTheme" :key="item.themeName">
<OneFeelMK002 :recommendTheme="item"/>
</template>
</template>
</ChatCardOther>
@@ -56,7 +58,7 @@
<ChatMoreTips @replySent="handleReply" :itemList="mainPageDataModel.guideWords"></ChatMoreTips>
<ChatQuickAccess @replySent="handleReplyInstruct"></ChatQuickAccess>
<ChatInputArea
v-model:inputMessage="inputMessage"
v-model="inputMessage"
:holdKeyboard="holdKeyboard"
@send="sendMessageAction"
@noHideKeyboard="handleNoHideKeyboard"
@@ -83,7 +85,7 @@
import CommandWrapper from '@/components/CommandWrapper/index.vue'
import QuickBookingComponent from '../booking/QuickBookingComponent.vue'
import { MessageRole, MessageType } from '../../model/ChatModel';
import { MessageRole, MessageType, CompName } from '../../model/ChatModel';
import OneFeelMK001 from '../module/OneFeelMK001.vue';
import OneFeelMK002 from '../module/OneFeelMK002.vue';