diff --git a/src/components/abstract.vue b/src/components/abstract.vue new file mode 100644 index 0000000..020f4ed --- /dev/null +++ b/src/components/abstract.vue @@ -0,0 +1,250 @@ + + + \ No newline at end of file diff --git a/src/components/chat-new.vue b/src/components/chat-new.vue index 968d1f4..2f0b473 100644 --- a/src/components/chat-new.vue +++ b/src/components/chat-new.vue @@ -3,6 +3,8 @@ import { ref, computed, inject, watch, nextTick, onMounted } from 'vue' import { showToast } from 'vant'; import footerBarInput from '@/components/footer-bar-input.vue' import hotQuestionNew from '@/components/hot-question-new.vue' +import welcomes from '@/components/welcomes.vue' +import abstract from '@/components/abstract.vue' import { messageSend } from '@/utils/api' defineOptions({ name: 'chat-new', @@ -12,54 +14,6 @@ const store = inject('appStore', null) const chatArr = inject('chatArr', ref([])) const isChatLoading = inject('isChatLoading', ref(false)) const mainContainerRef = ref(null) -const welcomeWord = ref('下午好,张先生') -const welcomeSubWord = ref('我是您的服务管家皮卡丘') - -const businessHandleInfo = ref({}) -const abstractList = computed(() => [ - { - title: '保障状态', - num: 3, - text: '保单保障中', - unit: '张', - btnText: '查保单', - btnBg: 'linear-gradient(90deg, #025cea 0%, #0595f6 100%)', - }, - { - title: '待办任务', - num: businessHandleInfo.value?.contents?.length || 0, - text: '待办需处理', - unit: '个', - btnText: '去处理', - btnBg: 'linear-gradient(111deg, #ff752a 44%, #feb52d 136%)', - }, - { - title: '权益领取', - num: 0, - text: '生存金权益', - unit: '项', - btnText: '去领取', - btnBg: 'linear-gradient(261deg, #2ed0c6 3%, #08b7ac 65%)', - }, -].filter(item => item.num > 0)) -const businessHandle = () => { - if ( - store.source == "95270000" || - store.source == "95320000" || - store.source == "95350000" || - store.source == "95810000" - ) { - Post("notify/info", { userInfoId: store.userId }) - .then((res) => { - if (res.data?.contents.length > 0) { - businessHandleInfo.value = res.data; - } - }) - .catch((error) => { - console.log(error); - }); - } -} function getItemText(item) { return item?.message?.[0]?.options?.label || '' @@ -85,41 +39,14 @@ function handleAskClick(item) { sendText(item) } onMounted(async () => { - businessHandle() }) + \ No newline at end of file