2025-08-14 14:46:51 +08:00
|
|
|
|
<script lang="jsx">
|
2025-08-19 18:01:30 +08:00
|
|
|
|
import HistoryConversationDrawer from './components/history-conversation-drawer';
|
|
|
|
|
|
import { Sender } from 'ant-design-x-vue';
|
|
|
|
|
|
import { message } from 'ant-design-vue';
|
|
|
|
|
|
|
|
|
|
|
|
import { useSharedDataStore } from '@/stores/modules/share-data';
|
|
|
|
|
|
|
2025-08-14 14:46:51 +08:00
|
|
|
|
export default {
|
2025-08-16 17:01:06 +08:00
|
|
|
|
setup(props, { emit, expose }) {
|
2025-08-19 18:01:30 +08:00
|
|
|
|
const historyConversationDrawerRef = ref(null);
|
|
|
|
|
|
const searchValue = ref('');
|
|
|
|
|
|
const sharedDataStore = useSharedDataStore();
|
|
|
|
|
|
|
|
|
|
|
|
const handleSubmit = () => {
|
|
|
|
|
|
handleSearch();
|
|
|
|
|
|
searchValue.value = '';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleSearch = () => {
|
|
|
|
|
|
message.info('handleSearch');
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
const params = sharedDataStore.routeParams;
|
|
|
|
|
|
if (params) {
|
|
|
|
|
|
searchValue.value = params.keyWord;
|
|
|
|
|
|
sharedDataStore.clearRouteParams();
|
|
|
|
|
|
|
|
|
|
|
|
handleSubmit();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return () => (
|
|
|
|
|
|
<div class="home-wrap rounded-12px w-full h-full">
|
|
|
|
|
|
<div class="w-full h-full flex justify-center ">
|
|
|
|
|
|
<div class="main-chat-wrap w-600px pt-120px">
|
|
|
|
|
|
<p class="title mb-16px">
|
|
|
|
|
|
<span>营小智,7x24小时</span>
|
|
|
|
|
|
<span class="s1">AI营销</span>
|
|
|
|
|
|
<span>团队</span>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p class="cts text-center mb-104px">AI 辅助账号托管账号 | 自动生成爆款内容 | 定时任务发布</p>
|
|
|
|
|
|
<Sender
|
|
|
|
|
|
v-model:value={searchValue.value}
|
|
|
|
|
|
onSubmit={handleSubmit}
|
|
|
|
|
|
class="h-120px w-full mb-24px"
|
|
|
|
|
|
placeholder="随时告诉我你想做什么,比如查数据、发任务、写内容,我会立刻帮你完成。"
|
|
|
|
|
|
actions={() => (
|
|
|
|
|
|
<div
|
|
|
|
|
|
onClick={handleSubmit}
|
|
|
|
|
|
class={`submit-btn w-32px h-32px p-6px flex justify-center items-center rounded-50% cursor-pointer ${
|
|
|
|
|
|
!searchValue.value ? 'opacity-50' : ''
|
|
|
|
|
|
}`}
|
|
|
|
|
|
>
|
|
|
|
|
|
<icon-arrow-right size={20} class="color-#FFFFFF" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
/>
|
|
|
|
|
|
<p class="cts">可以试试这样下发任务:</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{/**历史对话入口 */}
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="history-conversation-btn cursor-pointer bg-#fff flex flex-col justify-center w-28px px-10px py-8px"
|
|
|
|
|
|
onClick={() => historyConversationDrawerRef.value.showDrawer()}
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="s1">历史对话</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<HistoryConversationDrawer ref={historyConversationDrawerRef} />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
2025-08-16 17:01:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
};
|
2025-08-14 14:46:51 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
@import './style.scss';
|
2025-08-16 17:01:06 +08:00
|
|
|
|
</style>
|