diff --git a/src/components/AppConversationDefault/index.vue b/src/components/AppConversationDefault/index.vue index b445f03..0e25d3c 100644 --- a/src/components/AppConversationDefault/index.vue +++ b/src/components/AppConversationDefault/index.vue @@ -12,6 +12,7 @@ import { AppTopPicks } from '@/components/AppTopPicks' import type { TopPickItem } from '@/components/AppTopPicks/index.d' import { AppPicture } from '@/components/AppPicture' import type { PictureType } from '@/components/AppPicture/index.d' +import { getAppList, getRole } from '@/api/base/role' withDefaults(defineProps(), { height: '100%', @@ -29,52 +30,45 @@ const leadData = { const topPickList = ref([ { id: '1', - label: '啦啦啦啦啦啦', + label: '写一首赞美祖国的诗', }, { id: '2', - label: '啦啦啦啦啦啦', + label: '帮我指定一个路旅游计划', }, { id: '3', - label: '啦啦啦啦啦啦啦啦啦啦啦啦', + label: 'AI会代替人类工作吗?', }, { id: '4', - label: '啦啦啦啦啦啦', + label: '历史上的今天发生了什么?', }, { id: '5', - label: '啦啦啦啦啦啦', + label: '红烧牛肉的做法', }, ]) -const roleList = ref([ - { - id: '1', - image: TestImg, - name: '法律顾问', - type: '2', - }, - { - id: '1', - image: TestImg, - name: '法律顾问', - type: '2', - }, - { - id: '1', - image: TestImg, - name: '法律顾问', - type: '2', - }, - { - id: '1', - image: TestImg, - name: '法律顾问', - type: '2', - }, -]) +const roleList = ref([]) +const applyList = ref([]) + +// 角色 +function getRoleData() { + getRole(1).then((res) => { + roleList.value = res + }) +} + +// 应用 +function getAppData() { + getAppList().then((res) => { + applyList.value = res[0].roleInfoAppModelList + }) +} + +getRoleData() +getAppData()