From d7915dd3216b1e81545fe835713e2b7385c7fedc Mon Sep 17 00:00:00 2001 From: A1300399510 Date: Fri, 29 Dec 2023 18:37:38 +0800 Subject: [PATCH] no message --- app.vue | 53 ++++- assets/img/homepage-icon.png | Bin 0 -> 1308 bytes assets/img/send-messages-icon.png | Bin 0 -> 1184 bytes components/Header.vue | 7 +- components/Item.vue | 6 +- components/MyPopup.vue | 89 ++++++-- components/Report.vue | 245 ++++++++++++++++++++++ composables/api.js | 37 +++- composables/utils.js | 6 +- nuxt.config.ts | 2 +- package.json | 10 +- pages/details/[id].vue | 333 +++++++++++++++++++++++------- pages/index.html/index.vue | 45 +++- pages/publish/index.vue | 189 ++++++++++++----- utils/http.js | 10 +- 15 files changed, 852 insertions(+), 180 deletions(-) create mode 100644 assets/img/homepage-icon.png create mode 100644 assets/img/send-messages-icon.png create mode 100644 components/Report.vue 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 0000000000000000000000000000000000000000..200e29e6cbefcd2f6e88389618f22b8559ce4500 GIT binary patch literal 1308 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEV0rB6;uumf=k3kjz}p@Y?H~V# z2`q2w;8M~$5#%_B%Ws{+GA19^8C(XUN5UC{ST#gl);;iHt?tjed64PJ)RZ&F4;p`# zK7Sz2{yr$|#2) z=h-#wWc`or7g)GUPb~1BdGB01zwd?smF5WLKaRE1QHg5xr>@3r`f^QXzChGthOfEV zY#WzZIKMDoqon_bsds|+udWM*&ob7YW+?K!FJR@;c|D>lyM-$v_oTu!=ZsdD^}D?; ziMQ}X-L86`%eRmzZ2fN4eaa~pZe6p^uYSj<^2uB8V(ipE)!|*{$MmnvP42qJlVl0h z{&u;Dy2RqOF_$!pa`pFaJtDPM@<rkv*!Z;|9${5|EJibe@^%L0+lB2 zKXm7fQ1F_M5yrMMHw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-1f2T8zkFho<#$*2FM5lKS zM}#$OfJL0u5692yqv(G*TBUat5%+$Fu6w_k2tX&Uy94LpNvDNe6IQTMtQQsro#yli zt4cCJgiV_WjIDeDX!{3O!7^}nu*pn_2?gY|mF2Ad#0djDP-9SxOK3B;-;AwBC?Ka? z0q8)}L6^`9Ifvx52nFQz$O{QGkdwKvFpv|Gvqxy7Pf;K70&<$4RAxmgQ2JZ zPd6_;LMzMw>rE^Jix}7*VFvm+r5~-vAg4plXF?lS6qON_oF+L9LIG_>&EmmOQ~(2Q z`%0+~*f=+=&G0pA)8Og{vGcCzk148-7r6SNt*BW%7$_>i30woC6HO-_!VPSQ>)n5b zK4RP_Y?Lbo7vinZmu(hYv2p6ivT@SBN&5z&fIdXc;=#b+5}d##fZ^$9vpQ`;I_%@y zw2jmYFu*!atCWbG7Csj<6X>HxSiw4ZIlO+8whcnT)CHJVyZ~MRFMt=o3*ZIt0yGE( zUH~t^8w3FBIenf%fDQtTpB)MbFu-kKqYOCU>~p}0iRT{94CbibC9Ghh+#rDXn@xbW zvftPYunxs9 z);u)#fOmIyzZi>FQ-ZPVvzJ9`gp2?NMCj0QVbx!Pj$=gFFDimgi|;0mtFyPj7=BZH zjZk0}Kr;YtVI!5jw3vi8)9)KT7fs*OE*_j0Cjn+frvqs-kk33$i(C4GoS;NZY&$vq*z7J(=Gl6GaGiBX&>`v}yrEP93=@b@dhv$R z1u(opgqaj?n27*}SBNmP;tewsz<>xLn_Uar 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 @@
-
{{ item["username"] }}
+
{{ item["username"] || "匿名用户" }}
{{ handleDate(item["releasetime"]) }}发布
@@ -45,22 +45,40 @@ -
+
+
{{ info["subject"] }}
- -
{{ info["nickname"] }}
-
{{ info["releasetime"] }}发布
+ + + + + + +
{{ info["nickname"] || "匿名用户" }}
+
{{ handleDate(info["releasetime"]) }}发布
-
+
{{ info["views"] }}
-
+
申请信息
@@ -92,11 +110,12 @@
- {{ info["message"] }} -
+ +
+
作者设置了浏览限制
-
“回复”
+
“回复/点赞”
后即可查看完整内容
@@ -110,7 +129,7 @@
讨论 -
{{ commentCount || "" }}
+
{{ commentComments || "" }}
@@ -124,8 +143,23 @@