diff --git a/src/api/all/chat.ts b/src/api/all/chat.ts index be7fea7..0e502a0 100644 --- a/src/api/all/chat.ts +++ b/src/api/all/chat.ts @@ -30,6 +30,11 @@ export const getConversationList = (params: {}) => { return Http.get(`/v1/conversation/message/list`, params); }; +// 首页任务选择 +export const getHotTask = () => { + return Http.get(`/v1/multi-agent/hot-task`); +}; + export const getHeaders = () => { const store = useEnterpriseStore(); return { diff --git a/src/views/home/components/created/index.vue b/src/views/home/components/created/index.vue index e980350..81eb5e0 100644 --- a/src/views/home/components/created/index.vue +++ b/src/views/home/components/created/index.vue @@ -3,6 +3,7 @@ import { message } from 'ant-design-vue'; import ExpandableTags from '@/components/expandable-tags/index.vue'; import SenderInput from '../sender-input/index.vue'; +import { getHotTask } from '@/api/all/chat'; import { useChatStore } from '@/stores/modules/chat'; export default { @@ -10,6 +11,7 @@ export default { const senderRef = ref(null); const searchValue = ref(''); const chatStore = useChatStore(); + const tagList = ref([]); const handleSubmit = () => { handleSearch(); @@ -20,21 +22,19 @@ export default { chatStore.onCreateSession(); }; - const tagList = [ - '汇总账号昨天的运营情况', - '查账号本月点赞量 Top3 的笔记详情', - '统计投流账户上周的消耗金额 + 点击率', - '把漏采数据的账号重新抓取下数据', - '规划账号未来 2 周的内容发布排期和选题', - '根据账号的已有选题生成具体内容稿件', - '根据热点生成账号的选题及内容', - ]; - const handleTagClick = (tag: string) => { searchValue.value = tag; senderRef.value?.focus(); }; + onMounted(() => { + getHotTask().then((res) => { + const { data, code } = res; + if (code === 200) { + tagList.value = data?.list?.map((v) => v.title) ?? []; + } + }); + }); return () => (
AI 辅助账号托管账号 | 自动生成爆款内容 | 定时任务发布
可以试试这样下发任务:
-