添加网站TDK设置获取功能
This commit is contained in:
@ -7,6 +7,7 @@ import type {
|
|||||||
ProjectDrawStatisticAppRespVO,
|
ProjectDrawStatisticAppRespVO,
|
||||||
ProjectTrendingScoreUserInfoVO,
|
ProjectTrendingScoreUserInfoVO,
|
||||||
PageResultIndexSettingRespVO,
|
PageResultIndexSettingRespVO,
|
||||||
|
TdkSettingsRespVO,
|
||||||
} from './type'
|
} from './type'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,3 +89,10 @@ export const tab2 = () => {
|
|||||||
export const getDictTree = (params: { type: number, id: number}) => {
|
export const getDictTree = (params: { type: number, id: number}) => {
|
||||||
return useDollarFetchRequest.get<IResponse<ProjectDictNodeVO[]>>('/prod-api/app-api/business/app/dict/path-by-id', { query: params })
|
return useDollarFetchRequest.get<IResponse<ProjectDictNodeVO[]>>('/prod-api/app-api/business/app/dict/path-by-id', { query: params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得网站 TDK设置
|
||||||
|
*/
|
||||||
|
export const getTDK = () => {
|
||||||
|
return useFetchRequest.get<IResponse<TdkSettingsRespVO>>('/prod-api/app-api/business/tdk-settings/get-index', {})
|
||||||
|
}
|
||||||
@ -105,3 +105,10 @@ export interface PageResultIndexSettingRespVO {
|
|||||||
status: number
|
status: number
|
||||||
createTime: string
|
createTime: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface TdkSettingsRespVO {
|
||||||
|
title: string
|
||||||
|
describe: string
|
||||||
|
keywork: string
|
||||||
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `${props.title} - 图夕夕`,
|
title: `${props.title}`,
|
||||||
meta: [
|
meta: [
|
||||||
{ name: 'description', content: `${props.description}`},
|
{ name: 'description', content: `${props.description}`},
|
||||||
{ name: 'keywords', content: props.keywords },
|
{ name: 'keywords', content: props.keywords },
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ma-auto w-1440px">
|
<div class="ma-auto w-1440px">
|
||||||
|
<SeoHead :title="tdkData?.title" :description="tdkData?.describe" :keywords="tdkData?.keywork" />
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<KlSearch></KlSearch>
|
<KlSearch></KlSearch>
|
||||||
<!-- 菜单 -->
|
<!-- 菜单 -->
|
||||||
@ -29,6 +30,12 @@
|
|||||||
import PopularDrawings from '~/pages/home/components/PopularDrawings.vue'
|
import PopularDrawings from '~/pages/home/components/PopularDrawings.vue'
|
||||||
import Leaderboard from '~/pages/home/components/Leaderboard.vue'
|
import Leaderboard from '~/pages/home/components/Leaderboard.vue'
|
||||||
import LearningRecommendations from '~/pages/home/components/LearningRecommendations.vue'
|
import LearningRecommendations from '~/pages/home/components/LearningRecommendations.vue'
|
||||||
|
import { getTDK } from '~/api/home/index'
|
||||||
|
|
||||||
|
const { data: tdkData } = useAsyncData('get-tdk-home', async () => {
|
||||||
|
const res = await getTDK()
|
||||||
|
return res.data
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user