diff --git a/app.vue b/app.vue index 8997749..e4bc3cb 100644 --- a/app.vue +++ b/app.vue @@ -9,7 +9,7 @@ - diff --git a/assets/img/homepage-icon.png b/assets/img/homepage-icon.png new file mode 100644 index 0000000..200e29e Binary files /dev/null and b/assets/img/homepage-icon.png differ diff --git a/assets/img/send-messages-icon.png b/assets/img/send-messages-icon.png new file mode 100644 index 0000000..1adce4f Binary files /dev/null and b/assets/img/send-messages-icon.png differ diff --git a/components/Header.vue b/components/Header.vue index 24cedae..76a8de2 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -29,14 +29,16 @@ diff --git a/composables/api.js b/composables/api.js index 914695c..e5dbeff 100644 --- a/composables/api.js +++ b/composables/api.js @@ -37,14 +37,34 @@ export const detailsSubmitommentListHttp = query => { return Http.post("/api/comment/submit", query) } +// 评论相关 - 评论点赞 +export const detailsLikeCommentHttp = query => { + return Http.post("/api/comment/like", query) +} + // 发布相关 - 发布问题初始化,编辑 export const publishInitHttp = query => { return Http.post("/api/publish", query) } -// 发布相关 - 发布问题初始化,编辑 +// 发布相关 - 发布问题搜索学校 export const publishSchoolSearchHttp = query => { - return Http.post("https://offer.gter.net/miniprogram/InterviewExperience/schoolSearch", query) + return Http.post("/api/publish/schoolSearch", query) +} + +// 发布相关 - 发布问题搜索专业 +export const publishProfessionSearchHttp = query => { + return Http.post("/api/publish/professionSearch", query) +} + +// 发布相关 - 提交 +export const publishSubmitHttp = query => { + return Http.post("/api/publish/submit", query) +} + +// 发布相关 - 更改匿名状态 +export const changeAnonymousHttp = query => { + return Http.post("/api/publish/changeAnonymous", query) } // 我的 - 用户信息 @@ -57,7 +77,18 @@ export const MyUserPublishHttp = query => { return Http.post("/api/user/publish", query) } +// 我的 - 删除收藏 +export const MyUserDeleteCollectHttp = query => { + return Http.post("/api/user/deleteCollect", query) +} + // 数据操作 - 收藏 export const MyUserCollectHttp = query => { return Http.post("/api/user/collect", query) -} \ No newline at end of file +} + +// 评论相关 - 举报 Comment related +export const commentReportHttp = query => { + return Http.post("/api/operate/report", query) +} + diff --git a/composables/utils.js b/composables/utils.js index cf7ff06..fd8d777 100644 --- a/composables/utils.js +++ b/composables/utils.js @@ -19,9 +19,9 @@ export const handleDate = (dateTimeStamp = new Date()) => { let Y = date.getFullYear() + "-" let M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-" let D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " " - let h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":" - let m = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes() - result = "" + Y + M + D + h + m + // let h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":" + // let m = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes() + result = "" + Y + M + D } else if (dayC >= 1) result = "" + Math.round(dayC) + "天前" else if (hourC >= 1) result = "" + Math.round(hourC) + "小时前" else if (minC >= 1) result = "" + Math.round(minC) + "分钟前" diff --git a/nuxt.config.ts b/nuxt.config.ts index aa19386..d7342ae 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,5 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: {enabled: true}, - modules: ["@element-plus/nuxt"] + modules: ["@element-plus/nuxt"], }) diff --git a/package.json b/package.json index c701479..3ce81c5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "build": "nuxt build", - "dev": "nuxt dev --port 3002", + "dev": "nuxt dev --host", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare" @@ -22,5 +22,11 @@ "axios": "^1.6.2", "masonry-layout": "^4.2.2", "qs": "^6.11.2" + }, + "config": { + "nuxt": { + "host": "0.0.0.0", + "port": "3000" + } } -} +} \ No newline at end of file diff --git a/pages/details/[id].vue b/pages/details/[id].vue index d5a3a09..a5c8a08 100644 --- a/pages/details/[id].vue +++ b/pages/details/[id].vue @@ -24,7 +24,7 @@