Refactor API requests and update imports

This commit is contained in:
wangqiao
2025-08-18 22:15:55 +08:00
parent ba5f777ed0
commit aac4dec3fd
17 changed files with 113 additions and 193 deletions

View File

@ -17,7 +17,7 @@
<span v-else class="LiHei (Noncommercial) font-MF text-16px text-[#999999] font-normal">{{ index }}</span>
</div>
<div class="ml-20px w-120px flex items-center text-16px text-[#333333] font-normal">
<img :src="item.avatar" alt="" srcset="" class="h-36px w-36px rd-50%" />
<img :src="item?.avatar" alt="" srcset="" class="h-36px w-36px rd-50%" />
<span class="ellipsis1 ml-10px">{{ item.nickname }}</span>
</div>
<div class="ml-20px flex text-14px text-[#666666] font-normal">
@ -48,7 +48,7 @@
<span v-else class="font-MF LiHei (Noncommercial) text-16px text-[#999999] font-normal">{{ index }}</span>
</div>
<div class="ml-20px w-120px flex items-center text-16px text-[#333333] font-normal">
<img :src="item.avatar" alt="" srcset="" class="h-36px w-36px rd-50%" />
<img :src="item?.avatar" alt="" srcset="" class="h-36px w-36px rd-50%" />
<span class="ellipsis1 ml-10px">{{ item.nickname }}</span>
</div>
<div class="ml-20px flex text-14px text-[#666666] font-normal">
@ -110,7 +110,7 @@
type: 1,
limit: 11,
})
newDrawList.value = res.data
// newDrawList.value = res.data
}
handlenewDraw()
@ -118,8 +118,11 @@
const userTopList = ref<ProjectTrendingScoreUserInfoVO[]>([]) // 最新动态
const handleuserTop = () => {
Promise.all([userTop({ type: 1 }), userTop({})]).then((res) => {
topList.value = res[0].data
userTopList.value = res[1].data
// topList.value = res[0].data
// userTopList.value = res[1].data
// console.log('res----',JSON.stringify(res));
})
}
handleuserTop()

View File

@ -76,7 +76,7 @@
</template>
<script setup lang="ts">
import { refreshToken as REFRESHTOKEN } from '~/utils/axios'
import REFRESHTOKEN from '~/utils/RefreshToken'
import { getCurrentInstance, computed, watchEffect, ref } from 'vue'
import { handleLoginQQ, handleLoginWechat } from '~/utils/login'
import type { UserStatisticsCountRespVO } from '~/api/personal-center/types'

View File

@ -20,6 +20,7 @@
<script setup lang="ts">
import { reactive, ref } from 'vue'
import LoginForm from './LoginForm.vue'
import { Vue3Marquee } from 'vue3-marquee'
import { getSettingPage } from '~/api/home/index'
import type { PageResultIndexSettingRespVO } from '~/api/home/type'

View File

@ -3,20 +3,20 @@
<!-- 搜索 -->
<KlSearch></KlSearch>
<!-- 菜单 -->
<KlMenuV2 />
<!-- <KlMenuV2 /> -->
<!-- banner -->
<div class="banner-container">
<SideMenu class="side-menu" />
<MainContent class="main-content" />
<!-- <SideMenu class="side-menu" /> -->
<!-- <MainContent class="main-content" /> -->
</div>
<!-- 学习方法推荐 -->
<LearningRecommendations></LearningRecommendations>
<!-- <LearningRecommendations></LearningRecommendations> -->
<!-- 推荐栏目 -->
<RecommendedColumns></RecommendedColumns>
<!-- <RecommendedColumns></RecommendedColumns> -->
<!-- 热门图纸 -->
<PopularDrawings></PopularDrawings>
<!-- <PopularDrawings></PopularDrawings> -->
<!-- 排行榜 -->
<Leaderboard></Leaderboard>
<!-- <Leaderboard></Leaderboard> -->
</div>
</template>