feat:首页接入主题
This commit is contained in:
@@ -30,9 +30,16 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<Skeleton :isBorder="true" />
|
<Skeleton :isBorder="true" />
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="allDiscussList.length > 0">
|
||||||
|
<el-col :span="24" v-for="i in allDiscussList">
|
||||||
|
<DisscussCard :discuss="i" />
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<Skeleton :isBorder="true" />
|
||||||
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-row class="right-div">
|
<el-row class="right-div">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@@ -143,7 +150,6 @@ import DisscussCard from "@/components/DisscussCard.vue";
|
|||||||
import InfoCard from "@/components/InfoCard.vue";
|
import InfoCard from "@/components/InfoCard.vue";
|
||||||
import PlateCard from "@/components/PlateCard.vue";
|
import PlateCard from "@/components/PlateCard.vue";
|
||||||
import ScrollbarInfo from "@/components/ScrollbarInfo.vue";
|
import ScrollbarInfo from "@/components/ScrollbarInfo.vue";
|
||||||
import AvatarInfo from "@/components/AvatarInfo.vue";
|
|
||||||
import BottomInfo from "@/components/BottomInfo.vue";
|
import BottomInfo from "@/components/BottomInfo.vue";
|
||||||
import VisitsLineChart from "./components/VisitsLineChart/index.vue";
|
import VisitsLineChart from "./components/VisitsLineChart/index.vue";
|
||||||
import { access } from "@/apis/accessApi.js";
|
import { access } from "@/apis/accessApi.js";
|
||||||
@@ -156,6 +162,7 @@ import {
|
|||||||
getRecommendedFriend,
|
getRecommendedFriend,
|
||||||
getRankingPoints,
|
getRankingPoints,
|
||||||
} from "@/apis/analyseApi.js";
|
} from "@/apis/analyseApi.js";
|
||||||
|
import { getList as getAllDiscussList } from "@/apis/discussApi.js";
|
||||||
import PointsRanking from "./components/PointsRanking/index.vue";
|
import PointsRanking from "./components/PointsRanking/index.vue";
|
||||||
import RecommendFriend from "./components/RecommendFriend/index.vue";
|
import RecommendFriend from "./components/RecommendFriend/index.vue";
|
||||||
import ThemeData from "./components/RecommendTheme/index.vue";
|
import ThemeData from "./components/RecommendTheme/index.vue";
|
||||||
@@ -168,6 +175,7 @@ const weekList = ref([]);
|
|||||||
const pointList = ref([]);
|
const pointList = ref([]);
|
||||||
const friendList = ref([]);
|
const friendList = ref([]);
|
||||||
const themeList = ref([]);
|
const themeList = ref([]);
|
||||||
|
const allDiscussList = ref([]);
|
||||||
|
|
||||||
const items = [{ user: "用户1" }, { user: "用户2" }, { user: "用户3" }];
|
const items = [{ user: "用户1" }, { user: "用户2" }, { user: "用户3" }];
|
||||||
//主题查询参数
|
//主题查询参数
|
||||||
@@ -194,6 +202,12 @@ onMounted(async () => {
|
|||||||
friendList.value = friendData;
|
friendList.value = friendData;
|
||||||
const { data: themeData } = await getRecommendedTopic();
|
const { data: themeData } = await getRecommendedTopic();
|
||||||
themeList.value = themeData;
|
themeList.value = themeData;
|
||||||
|
const { data: allDiscussData } = await getAllDiscussList({
|
||||||
|
Type: 0,
|
||||||
|
skipCount: 1,
|
||||||
|
maxResultCount: 5,
|
||||||
|
});
|
||||||
|
allDiscussList.value = allDiscussData.items;
|
||||||
});
|
});
|
||||||
|
|
||||||
const weekXAxis = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
const weekXAxis = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
||||||
|
|||||||
Reference in New Issue
Block a user