Refactor API requests and update component imports
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
<div class="mx-a ml--250px h-full flex items-center justify-center">
|
||||
<!-- Logo区域 -->
|
||||
<div class="h-100% flex cursor-pointer items-center" @click="router.push('/index')">
|
||||
<img src="@/assets/images/logo5.png" alt="图夕夕" class="h-51px w-182px" />
|
||||
<img src="~/assets/images/logo5.png" alt="图夕夕" class="h-51px w-182px" />
|
||||
</div>
|
||||
<!-- 搜索区域 -->
|
||||
<div class="relative ml-49px w-647px px4 p-r-0px!">
|
||||
@ -61,13 +61,12 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import useUserStore from '@/store/user'
|
||||
import router from '@/router'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
import { top } from '@/api/home/index'
|
||||
import type { ProjectDrawStatisticAppRespVO } from '@/api/home/type'
|
||||
import { page } from '@/api/upnew/index'
|
||||
import { top } from '~/api/home/index'
|
||||
import type { ProjectDrawStatisticAppRespVO } from '~/api/home/type'
|
||||
import { page } from '~/api/upnew/index'
|
||||
|
||||
const searchQuery = ref('')
|
||||
const showHotList = ref(false)
|
||||
@ -77,7 +76,7 @@
|
||||
// 是否登录
|
||||
if (!userStore.token) return ElMessage.error('请先登录')
|
||||
// 新开窗口 用router跳转 新窗口打开
|
||||
window.open('/upnew/drawe', '_blank')
|
||||
navigateTo('/upnew/drawe')
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
@ -121,11 +120,11 @@
|
||||
const level = item.pairs?.filter(Boolean).map((item) => ({ id: item?.id, name: item?.name, isChildren: false })) || []
|
||||
level.unshift(normal)
|
||||
if (item.type === 1) {
|
||||
window.open(`/drawe?level=${JSON.stringify(level)}&keywords=${item.title || ''}`, '_blank')
|
||||
navigateTo(`/drawe?level=${JSON.stringify(level)}&keywords=${item.title || ''}`,)
|
||||
} else if (item.type === 2) {
|
||||
window.open(`/text?level=${JSON.stringify(level)}&keywords=${item.title || ''}`, '_blank')
|
||||
navigateTo(`/text?level=${JSON.stringify(level)}&keywords=${item.title || ''}`,)
|
||||
} else if (item.type === 3) {
|
||||
window.open(`/model?level=${JSON.stringify(level)}&keywords=${item.title || ''}`, '_blank')
|
||||
navigateTo(`/model?level=${JSON.stringify(level)}&keywords=${item.title || ''}`,)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user