From fb44b267bd9c9d6a41d49224b21fa7cdccd6cce6 Mon Sep 17 00:00:00 2001 From: xiaoronghao <1300399510@qq.com> Date: Wed, 12 Apr 2023 14:56:37 +0800 Subject: [PATCH] no message --- src/assets/img/detail/icon_quote_e.gif | Bin 0 -> 287 bytes src/assets/img/detail/icon_quote_s.gif | Bin 0 -> 298 bytes src/assets/img/detail/quotation-left.png | Bin 0 -> 434 bytes src/assets/img/detail/quotation-right.png | Bin 0 -> 437 bytes src/components/DetailReply.vue | 12 +- src/components/PlateNavigation.vue | 2 + src/main.js | 11 +- src/utils/request.js | 3 +- src/views/detail/detailIndex.vue | 121 +++++++++++++------- src/views/index/allSections/AllSections.vue | 7 +- 10 files changed, 97 insertions(+), 59 deletions(-) create mode 100644 src/assets/img/detail/icon_quote_e.gif create mode 100644 src/assets/img/detail/icon_quote_s.gif create mode 100644 src/assets/img/detail/quotation-left.png create mode 100644 src/assets/img/detail/quotation-right.png diff --git a/src/assets/img/detail/icon_quote_e.gif b/src/assets/img/detail/icon_quote_e.gif new file mode 100644 index 0000000000000000000000000000000000000000..572c35cfa547887da5ad879ae2895c475ff022be GIT binary patch literal 287 zcmZ?wbhEHblwpu&IKlt||NsC0^!3O0A3twA|8(c&=cn(!K7ar9-RJKgzI?y+;?w=t zpC7*Y^7!qSS0BH<`Sk7U_a8v@V0}apia%Kx85jf^bU>;>b~3QeNl@ua$($#+a9xhm zCWDV1g}<-8n)9f|`je5=dG#YN8;;D~7~##-fB1IL%_-LwSg7+y|IPK~lwfgv+nD&I z@y3?~(GyHtULMGrAiL&h=E0%~(mL$vI?NhbW~yvDY~_{B+R5qy1{|satc`6o+GQ$C zGqkJJnPzKoO^nlCu3_lu!^M3VgH2{(S BbeaGF literal 0 HcmV?d00001 diff --git a/src/assets/img/detail/icon_quote_s.gif b/src/assets/img/detail/icon_quote_s.gif new file mode 100644 index 0000000000000000000000000000000000000000..59087d09463f0e552c0e70301c1d6e19aaa25763 GIT binary patch literal 298 zcmZ?wbhEHblwpu&IKlt||NsC0^!3O0A3twA|8(c&=cn(!K7ar9-RJKgzI?y+;?w=t zpC7*Y^7!qSS0BH<`Sk7U_a8v@V0}apia%Kx85jf^bU>;>b~3OoPf+Pg$()zLBI#+x zcYLxH%f(&(y0e*sZ?8L+@7^R*ci?hDqe|Db6H7X8>TpivxT5$<t>vb%Dn=a@;$gUIXt-3!%g#|Jb2VYOtX4C*wiaoQdMfE zss{!p3eHYZT9lx&EL3o%{gO4#Y3ogwWUMz5*c!BM>#jXZ_8i!HXusA$mBS~Fo;tq! Ntnz8SE9#02)&R`5d^!LC literal 0 HcmV?d00001 diff --git a/src/assets/img/detail/quotation-left.png b/src/assets/img/detail/quotation-left.png new file mode 100644 index 0000000000000000000000000000000000000000..b027c9702c1ed50b0978f41ede7c9d91dd6161cd GIT binary patch literal 434 zcmV;j0ZsmiP)K~yM_t&q zfX&nl;KowPc|OdS7#lLX-fbDaE(}K^wjG*f(w4A)zUczM1zQZ(;L0<%Ki)Q&DgH<- zb=r&agW=4dztP`o#oPgY29@o^+drEDOu3#yo%gj}%3Yv3xTE?e?#^1}=U@D+mp|zK zl@4BYsxbwtxX#%4?MWP<$f@#elEqTLPZTQuCi=D$n7`G1C(8SOVUFgqv>M_tFh}KqBlF c>(NZh?_ex}i$-Mt`~Uy|07*qoM6N<$f<#ToqW}N^ literal 0 HcmV?d00001 diff --git a/src/assets/img/detail/quotation-right.png b/src/assets/img/detail/quotation-right.png new file mode 100644 index 0000000000000000000000000000000000000000..43373525e404920857a7ac9878d73b85bc523d63 GIT binary patch literal 437 zcmeAS@N?(olHy`uVBq!ia0vp^0w6XAGmxB~Dklb{RtNZmxB_X0|Nld;UiG}aE#dzD z(8tF@U+wq2eZu?UVIbS@-X5RF#{%x}4}N&q@9}>B#|HzS9QJ>DIPmeofX9ado*V>= z91M7L$p6vdz(iY%-hegFFBqpU57S}a*&s)55 z{q}=LjvhaA`TE@lZ{L6T^7Y5BKmQu-RxJY>!I$X37jGG({t_W~BRxV`-*~)$3iaLXEF2j?)cMI(zYVJ6!vb4(J$o?ABIO~-S>*?>A gVJu$Xk8k6S|J5ZYvF&RUAJ72|p00i_>zopr06QJnqW}N^ literal 0 HcmV?d00001 diff --git a/src/components/DetailReply.vue b/src/components/DetailReply.vue index a49b199..daef92b 100755 --- a/src/components/DetailReply.vue +++ b/src/components/DetailReply.vue @@ -13,7 +13,7 @@
+ @input="inputCommentContent($event)" v-focus />
@@ -33,16 +33,15 @@
{{ twoCommentData.content }}
- +
{{ 500 - commentContent.length }}
-
- 发布 -
+
发布
@@ -64,7 +63,6 @@ export default { }, methods: { - // 提交回复 postComment() { this.$parent.postComment() diff --git a/src/components/PlateNavigation.vue b/src/components/PlateNavigation.vue index 5587f0e..874bacb 100755 --- a/src/components/PlateNavigation.vue +++ b/src/components/PlateNavigation.vue @@ -97,4 +97,6 @@ export default { } } + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 9ece1ac..015065a 100755 --- a/src/main.js +++ b/src/main.js @@ -50,8 +50,17 @@ Vue.use(Pagination); Vue.use(VueSanitize); +Vue.directive('focus', { + // 当绑定元素插入到 DOM 中。 + inserted: function (el) { + // 聚焦元素 + el.focus() + } +}) + new Vue({ router, store, - render: h => h(App) + render: h => h(App), + }).$mount('#app') diff --git a/src/utils/request.js b/src/utils/request.js index d82daf2..f016b0b 100755 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -11,7 +11,8 @@ axios.defaults.withCredentials = true axios.defaults.emulateJSON = true baseURL = { - forum: "https://forum.gter.net", + // forum: "https://forum.gter.net", + forum: "https://app.gter.net/forum", offer: "https://offer.gter.net", tenement: "https://app.gter.net", diff --git a/src/views/detail/detailIndex.vue b/src/views/detail/detailIndex.vue index c906c5e..4aa28c3 100755 --- a/src/views/detail/detailIndex.vue +++ b/src/views/detail/detailIndex.vue @@ -18,7 +18,6 @@ {{ info.subject }} -
@@ -146,7 +145,7 @@ index + 2}楼` }}
{{ `${(postList.page - 1) * postList.limit + index + 1}楼` }}
-
+
@@ -169,8 +168,7 @@
- - 之前申请永久居民,参考了不少寄托的帖子和经验,现在回馈给大家,积攒RP。 + 之前申请永久居民,参考了不少寄托的帖子和经验,现在回馈给大家,积攒RP。
@@ -337,6 +335,7 @@ export default { // avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", // content: "评论回复", // }, + editCommentPid: null, popState: "", // discussionSingle discussionMulti coinConfig: { strategy: { @@ -493,18 +492,13 @@ export default { return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, ''); }) - info["messageList"] = [] - info['message'] = info['message'].replaceAll("[hide]作者设置了回复可见[/hide]", `
作者设置了回复可见
`) // if (info.message.indexOf("[hide]作者设置了回复可见[/hide]")) { // `
作者设置了回复可见
` // } - // console.log(info['message']); - // info['message'] = this.$sanitize(info['message']) - // console.log(info['message']); data.type == 0 ? this.$refs['vHtmlMessage'] ? this.$refs.vHtmlMessage.innerHTML = info['message'] : "" : "" @@ -531,7 +525,8 @@ export default { else if (this.type == 3) this.getTenementDetails() else if (this.type == 2) this.getInterviewDetails() - info['ispost'] != 0 ? this.getPostList() : '' + // info['ispost'] != 0 ? this.getPostList() : '' + this.getPostList() }).finally(() => { this.$closeUnderLoading(this) @@ -629,6 +624,7 @@ export default { // tid: 2322145, // uniqid: "--G1tS2SCTOQyoOMiedlLKxTnFvHWjBwQezsJjvVJFwgqOtOFeYr4_LAAG5RV37ETvMl2Zd4tSCc-_dqeKpERxXsx-tPfXrUs0kUysTGLzgxYzU~", // token: "5e3c42209eebfbab66e6f0d6c70a53c7", + tid: this.tid, token: this.token }, "tenement").then(res => { // console.log(res); @@ -654,25 +650,52 @@ export default { this.postList.count = data.count }) + }, + // 打开编辑评论 + openEditPop(item) { + console.log(item); + let message = item.message + message = message.replace(/]*>[\s\S]*?<\/div>/gi, ''); + message = message.trim() + this.commentContent = message + this.editCommentPid = item.pid + + this.popState = "discussionMulti" }, // 处理回复点击弹出弹窗 handleReplyPop(item) { + this.twoCommentData = { + avatar: item.avatar, + content: item.message, + pid: item.pid + } this.popState = "discussionSingle" }, // 集中处理回复帖子 postComment(message) { - this.$http.post("/api/operation/reply", { + let url = "" + + if (this.editCommentPid) url = "/api/operation/redactPost" // 回复评论或者评论 + else url = "/api/operation/reply" // 编辑评论 + + this.$http.post(url, { token: this.token, - message: this.commentContent + message: this.commentContent, + pid: this.editCommentPid || (this.twoCommentData && this.twoCommentData.pid) }).then(res => { if (res.code != 200) return - // let data = res.data - // console.log(data); this.popState = "" + this.twoCommentData = null + if (this.editCommentPid) this.$router.go(0) + + this.editCommentPid = null + + + let { count, limit } = this.postList let page = Math.ceil((count + 1) / limit) @@ -714,7 +737,6 @@ export default { else if (key == "uncollect") url = "/api/operation/threadunFav" this.$http.post(url, { tid: this.tid }).then(res => { - console.log(res); if (res.code != 200) return if (key == "like") this.info.islike = 1 if (key == "collect") this.info.isfav = 1 @@ -903,7 +925,6 @@ export default { .edit-icom { width: .4rem; - // height: .4rem; } } } @@ -921,44 +942,54 @@ export default { width: 100% !important; height: auto !important; } - } - .quotation { - width: 100%; - color: #333; - font-size: .32rem; - border-radius: .16rem; - background: rgb(246, 246, 246); - padding: .36rem .24rem; - box-sizing: border-box; - margin-bottom: .48rem; + .quote { + width: 100%; + color: #333; + font-size: .32rem; + border-radius: .16rem; + background: rgb(246, 246, 246) url(@/assets/img/detail/quotation-left.png) no-repeat .4rem .2666rem; - .quotation-wenzi { - line-height: .52rem; - } + padding: .1333rem .1333rem .1333rem 1rem; - .quotation-icon { - width: .32rem; - height: .26rem; - } + // padding: .36rem .24rem; + box-sizing: border-box; + margin-bottom: .48rem; - .quotation-right { - flex-direction: column; - margin-left: .28rem; + blockquote { + margin: 0; + padding: 0 .8667rem .0667rem 0; + background: url(@/assets/img/detail/quotation-right.png) no-repeat 100% 100%; + line-height: 1.6; + zoom: 1; + display: inline; + } - .quotation-bottom { - color: #7F7F7F; - font-size: .28rem; - margin-top: .258rem; + .quotation-wenzi { + line-height: .52rem; + } - .quotation-icon { - margin-left: .2rem; + .quotation-icon { + width: .32rem; + height: .26rem; + } + + .quotation-right { + flex-direction: column; + margin-left: .28rem; + + .quotation-bottom { + color: #7F7F7F; + font-size: .28rem; + margin-top: .258rem; + + .quotation-icon { + margin-left: .2rem; + } } } } - } - /deep/ { .content-unlock { &.content-unlock-no { height: 3.2rem; @@ -1000,6 +1031,8 @@ export default { } } + + } diff --git a/src/views/index/allSections/AllSections.vue b/src/views/index/allSections/AllSections.vue index 58bea61..83f2cb5 100755 --- a/src/views/index/allSections/AllSections.vue +++ b/src/views/index/allSections/AllSections.vue @@ -100,7 +100,6 @@ export default { methods: { // 处理 query 的参数 handQuery() { - console.log(this.list); if (this.list.length >= 2) { let list = this.list list.forEach((el, index) => { @@ -119,10 +118,6 @@ export default { }) - console.log(this.allActive, "allActive"); - - - } else { setTimeout(() => { this.handQuery() @@ -196,8 +191,8 @@ export default { this.$router.push({ path: `/allSections`, query: { fid: this.fid, invitationPage: this.invitationPage } }) }, + // 点击回归板块列表 flybackAll() { - console.log("jkldfgjklfggfdjklgfjkl"); this.isPlateListState = true },