Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Dec 22, 2024
1 parent e30c19d commit a38088a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ProjectStar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-btn @click="ToggleStarProject()" :color="star ? 'yellow' : ''">Star</v-btn
<v-btn @click="ToggleStarProject()" :color="star ? 'yellow' : ''" prepend-icon="mdi-star" variant="tonal">Star</v-btn
>{{ projectLists }}
</template>
<script>
Expand Down
13 changes: 12 additions & 1 deletion src/pages/projects/[id]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
<v-chip pill prepend-icon="mdi-eye"
>{{ project.view_count }}浏览</v-chip
>
<v-chip pill prepend-icon="mdi-star"
>{{ communityinfo.stars }} Star</v-chip
>
<v-chip pill prepend-icon="mdi-clock">
<TimeAgo :date="project.time" />
</v-chip>
Expand All @@ -49,7 +52,8 @@
<v-chip>{{ tag.name }}</v-chip>
</div>
</div>
<div class="px-4 d-flex ga-2 mb-2"><ProjectStar/>
<div class="px-4 d-flex ga-2 mb-2">
<ProjectStar />
<v-btn @click="openEditor(project.id, project.type)" variant="text"
>打开创造页</v-btn
>
Expand Down Expand Up @@ -135,6 +139,7 @@ export default {
images: "加载中",
},
},
communityinfo: { stars: '' },
openEditor: openEditor,
localuser: localuser,
};
Expand All @@ -154,6 +159,12 @@ export default {
url: "/project/" + this.$route.params.id,
method: "get",
});
this.communityinfo = await request({
url: "/project/community/" + this.$route.params.id,
method: "get",
})
this.communityinfo=this.communityinfo.data;
console.log(this.communityinfo);
useHead({
title: "" + this.project.title,
});
Expand Down

0 comments on commit a38088a

Please sign in to comment.