You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
922 B
31 lines
922 B
<template>
|
|
<history-main
|
|
:tokenExist="tokenExist"
|
|
:isWX="isWX"
|
|
:lostChatInfoNum="lostChatInfoNum"
|
|
/>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed, onMounted } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
import HistoryMain from '@/components/history-main.vue'
|
|
import { useAppStore } from '@/store/app.js'
|
|
import Utils from '@/utils/utils.js'
|
|
|
|
const route = useRoute()
|
|
const store = useAppStore()
|
|
|
|
const tokenExist = computed(() => Boolean(store.token || route.query.tokenExist === 'true'))
|
|
const isWX = computed(() =>
|
|
route.query.isWX === undefined ? Utils.isWeiXin() : route.query.isWX !== 'false',
|
|
)
|
|
const lostChatInfoNum = computed(() => route.query.lostChatInfoNum || 0)
|
|
|
|
onMounted(() => {
|
|
if (tokenExist.value && !store.headerAvatar?.robotUrl) {
|
|
const request = store.getHeaderUrl?.()
|
|
request?.catch((error) => console.warn('获取历史记录头像失败:', error))
|
|
}
|
|
})
|
|
</script>
|
|
|