Skip to content

Commit

Permalink
perf: update knowledge
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed May 29, 2024
1 parent 564390e commit 6b765c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
7 changes: 1 addition & 6 deletions src/service/knowledge.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ function getMenuGroups(params) {
});
}

// 删除词条
function removeKnowledge(id) {
return $cms().delete(`/api/cms/helper/knowledge/${id}`)
}

// 获取通识子类
function getKnowledgeMenus() {
return $cms().get(`/api/cms/helper/knowledge/types`);
Expand All @@ -29,4 +24,4 @@ function getKnowledgeCount(params) {
return $cms().get(`/api/cms/helper/knowledge/count`, { params });
}

export { getKnowledgeList, getMenuGroups, removeKnowledge, getKnowledgeMenus, getKnowledgeCount };
export { getKnowledgeList, getMenuGroups, getKnowledgeMenus, getKnowledgeCount };
25 changes: 0 additions & 25 deletions src/views/knowledge/knowledge-single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
</template>

<script>
// import { removeKnowledge } from "@/service/knowledge.js";
import { postStat } from "@jx3box/jx3box-common/js/stat";
import { publishLink } from "@jx3box/jx3box-common/js/utils";
import WikiPanel from "@/components/wiki-panel.vue";
Expand Down Expand Up @@ -166,30 +165,6 @@ export default {
}
},
publishLink,
// 删除
// del() {
// this.$confirm("此操作将永久删除该百科通识, 是否继续?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// removeKnowledge(this.id)
// .then((res) => {
// this.$message({
// type: "success",
// message: "删除成功!",
// });
// this.goBack();
// })
// .catch((err) => {
// this.$message({
// type: "error",
// message: "删除失败!",
// });
// });
// })
// }
},
watch: {
"$route.params.post_id": {
Expand Down

0 comments on commit 6b765c9

Please sign in to comment.