diff --git a/src/components/blogs/header/NavigateMenu.vue b/src/components/blogs/header/NavigateMenu.vue index bd9b73a..58b644e 100644 --- a/src/components/blogs/header/NavigateMenu.vue +++ b/src/components/blogs/header/NavigateMenu.vue @@ -16,7 +16,7 @@ import { HomeOutlined, HighlightOutlined, ProfileOutlined, CameraOutlined, Userg import type { MenuProps } from 'ant-design-vue'; import { get } from '@/tools/request'; const props = defineProps(["items", "updateCarouselVisibility"]) -const { idShow,fetchHomePageList,setEmpty } = homePageStore() +const { idShow,fetchHomePageList } = homePageStore() const { show_menu } = toRefs(idShow) const store = useContentStore(); const searchValue = ref("") diff --git a/src/components/blogs/rightsite/TagCloud.vue b/src/components/blogs/rightsite/TagCloud.vue index ba794b6..249c6df 100644 --- a/src/components/blogs/rightsite/TagCloud.vue +++ b/src/components/blogs/rightsite/TagCloud.vue @@ -16,7 +16,7 @@ const labellist = ref([]) const labelList = async () => { try { - await get("/labels/list").then(response => { + await get("/bloglabels/list").then(response => { if (response) { labellist.value = response.data.data; } diff --git a/src/stores/index.ts b/src/stores/index.ts index ba14d6a..b957b41 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -1,6 +1,7 @@ import { reactive, ref } from 'vue' import { defineStore } from 'pinia' import type { homePageInterface } from '@/api' +import dayjs from 'dayjs'; import { get } from '@/tools/request' export const mainWrapperStore = defineStore("mainWrapper", () => { }) @@ -17,7 +18,11 @@ export const homePageStore = defineStore("homePage", () => { // const response = await get(`/statistics/searchtitle?title=${query}`); // homepagelist.value = response.data.data; get(`/statistics/searchtitle?title=${query}`).then(res => { - homepagelist.value = res.data.data; + homepagelist.value = res.data.data.map((items:any)=>({ + ...items, + create_at:dayjs(items.create_at).format('YYYY-MM-DD HH:mm:ss'), + update_at: dayjs(items.update_at).format('YYYY-MM-DD HH:mm:ss'), + })); if (res.data.data.length === 0) { isEmpty.value=true }else{ @@ -65,7 +70,7 @@ export const useContentStore = defineStore('content', () => { export const diaryStore = defineStore("diary", () => { const delControl = reactive({ open: false, - ids: "", + ids: null, title:"" }) diff --git a/src/views/admin/blogmanage/BlogManageView.vue b/src/views/admin/blogmanage/BlogManageView.vue index 65ca7e0..9ccdaad 100644 --- a/src/views/admin/blogmanage/BlogManageView.vue +++ b/src/views/admin/blogmanage/BlogManageView.vue @@ -244,7 +244,6 @@ const editModal = (id: any) => { formState.value = response.data.data }) - console.log(formControl.ids) } const onSubmit = () => { formRef.value diff --git a/src/views/admin/blogmanage/BlogTypeView.vue b/src/views/admin/blogmanage/BlogTypeView.vue index 1c2192a..32b53cf 100644 --- a/src/views/admin/blogmanage/BlogTypeView.vue +++ b/src/views/admin/blogmanage/BlogTypeView.vue @@ -168,7 +168,7 @@ const editModal = (id: any) => { editControl.title = "编辑" editControl.open = true get( - `/blogtypes/list/search/${id}` + `/blogtypes/search/${id}` ).then(response => { editList.value = response.data.data }) diff --git a/src/views/admin/diarymanage/DiaryManageView.vue b/src/views/admin/diarymanage/DiaryManageView.vue index 4d55d51..b18cc53 100644 --- a/src/views/admin/diarymanage/DiaryManageView.vue +++ b/src/views/admin/diarymanage/DiaryManageView.vue @@ -199,7 +199,7 @@ const editModal = (id: any) => { formControl.value.ids = id formControl.value.open = true get( - `/diarys/list/search/${id}` + `/diarys/search/${id}` ).then(response => { formState.value = response.data.data @@ -257,7 +257,6 @@ const diaryList = async () => { diarycontent: items.diarycontent, typename: items.typename, })) - console.log(`output->diarylist`, diarylist) } else { console.log("diarylist is not exits") } diff --git a/src/views/admin/diarymanage/DiaryTypeView.vue b/src/views/admin/diarymanage/DiaryTypeView.vue index e172323..0d02eb5 100644 --- a/src/views/admin/diarymanage/DiaryTypeView.vue +++ b/src/views/admin/diarymanage/DiaryTypeView.vue @@ -7,17 +7,32 @@ 查询 新增 - + - + + + + + + + + + + + + +

确认删除吗?

+
@@ -25,28 +40,9 @@ @@ -58,6 +54,7 @@