Refactor API requests and update component imports

This commit is contained in:
wangqiao
2025-08-18 14:28:10 +08:00
parent 07b4d3de99
commit 9ae3abeded
91 changed files with 669 additions and 884 deletions

View File

@ -3,11 +3,11 @@
<div class="flex items-center">
<div class="flex items-center">
<div class="box-border h-100% h-55px w-221px flex items-center rounded-lg bg-[#1A65FF] pl-24px text-white">
<img src="@/assets/images/1.png" alt="" srcset="" />
<img src="~/assets/images/1.png" alt="" srcset="" />
<span class="ml-12px text-16px">全部资源分类</span>
</div>
<div class="item-center ml-45px w-660px flex justify-between">
<router-link
<nuxt-link
v-for="(item, index) in menuItems"
:key="index"
target="_blank"
@ -15,13 +15,13 @@
class="parent-links relative rounded-lg px3 py2 text-[#1A65FF]"
>
{{ item.name }}
<img v-if="item.path === '/communication/channel'" src="@/assets/images/hot.png" alt="火" class="absolute right--15px top--2px" />
</router-link>
<img v-if="item.path === '/communication/channel'" src="~/assets/images/hot.png" alt="火" class="absolute right--15px top--2px" />
</nuxt-link>
</div>
</div>
<div v-if="isLogin" class="flex flex-1 items-center justify-end">
<div class="h-36px w-36px cursor-pointer border-rd-[50%] bg-[#F5F5F5] text-center line-height-44px" @click="handleUserCenter">
<img src="@/assets/images/user.png" alt="" srcset="" class="h-19px w-17px" />
<img src="~/assets/images/user.png" alt="" srcset="" class="h-19px w-17px" />
</div>
<div class="ml-8px h-36px w-36px cursor-pointer border-rd-[50%] text-center line-height-44px" @click="handleMessageCenter">
<el-icon size="20px" color="#999999"><BellFilled /></el-icon>
@ -31,12 +31,10 @@
</div>
</template>
<script setup lang="ts">
import useUserStore from '@/store/user'
import useUserStore from '~/store/user'
const userStore = useUserStore()
import { BellFilled } from '@element-plus/icons-vue'
import { ref, computed } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const menuItems = ref([
{ name: '首页', path: '/index' },
{ name: '图纸', path: '/drawe' },
@ -55,12 +53,12 @@
// 用户中心
const handleUserCenter = () => {
router.push('/personal/center/info')
navigateTo('/personal/center/info')
}
// 消息中心
const handleMessageCenter = () => {
router.push('/personal/center/message')
navigateTo('/personal/center/message')
}
</script>
<style scoped>