From b8d2b04a4e53da3f6462708be7b39a19baa09d91 Mon Sep 17 00:00:00 2001 From: A1300399510 Date: Wed, 10 Jul 2024 18:52:39 +0800 Subject: [PATCH] =?UTF-8?q?PC=E6=8A=95=E7=A5=A8=E5=8A=A0=E5=85=A5=E4=BA=92?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/img/plus-sign.svg | 6 + components/DetailsArea.vue | 119 ++++++++++++++- components/DetailsComments.vue | 2 + components/RespondAdd.vue | 109 ++++++++++++++ pages/details/[id].vue | 263 +++++++++++++++------------------ 5 files changed, 350 insertions(+), 149 deletions(-) create mode 100644 assets/img/plus-sign.svg create mode 100644 components/RespondAdd.vue diff --git a/assets/img/plus-sign.svg b/assets/img/plus-sign.svg new file mode 100644 index 0000000..ab1d869 --- /dev/null +++ b/assets/img/plus-sign.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/components/DetailsArea.vue b/components/DetailsArea.vue index 781f2a2..8b9b073 100644 --- a/components/DetailsArea.vue +++ b/components/DetailsArea.vue @@ -58,12 +58,21 @@ -
- - - -
- + +
+
+
给个回应:
+
+
+
+ +
+
+ + +
+ +
@@ -73,6 +82,8 @@ + + diff --git a/pages/details/[id].vue b/pages/details/[id].vue index 191ed6b..6ad2c32 100644 --- a/pages/details/[id].vue +++ b/pages/details/[id].vue @@ -8,12 +8,6 @@
{{ info.title }} -
@@ -74,7 +68,34 @@
-
+
+
+
+ 回应 +
21
+
+
+
+
+
+ +
+
+
+
+ 14 +
+ +
+
+
+
+ +
+
+
+ +
@@ -101,9 +122,6 @@ let isNeedLogin = inject("isNeedLogin") const goLogin = inject("goLogin") let id = route.params.id -// const uniqidEnd = id.charAt(id.length - 1) -// const uniqidIndex = base62ToDecimal(uniqidEnd) % 6 -// console.log("route", route) let uniqidIndex = ref(0) if (route.query.colorI) uniqidIndex.value = route.query.colorI @@ -137,48 +155,6 @@ provide("isLoaded", isLoaded) provide("haveVotedValue", haveVotedValue) const getDetails = async () => { - // const { data1, pending1, error1, refresh1 } = await useAsyncData("mountains", () => - // $fetch("https://vote.gter.net/api/details", { - // params: { - // uniqid: id, - // }, - // }) - // ) - // const { data, pending, error, refresh } = await useFetch(`https://vote.gter.net/api/details`, { - // key: "details", - // body: { - // uniqid: id, - // }, - // method: "post", - // }) - - // const { data, pending, error, refresh } = await useFetch(`https://vote.gter.net/api/details`, { - // method: "post", - // body: { - // uniqid: id, - // }, - // }) - - // let datadata = data.value.data - - // info.value = datadata["info"] - // isvote.value = datadata["isvote"] - // iscollection.value = datadata["iscollection"] - // islike.value = datadata["islike"] - // ismyself.value = datadata["ismyself"] - // option.value = datadata["option"] - // qrcode.value = datadata.share?.qrcode - // token.value = datadata["token"] - // seo.value = datadata.seo - - // isLoaded.value = true - - // datadata["option"].forEach(element => { - // if (element.selected) haveVotedValue.value = element.value - // }) - - // return - detailsHttp({ uniqid: id }).then(res => { if (res.code != 200) { ElMessage.error(res.message) @@ -188,9 +164,6 @@ const getDetails = async () => { let data = res.data - // uniqidIndex.value = data.info?.id % 6 - // console.log(uniqidIndex.value) - info.value = data["info"] isvote.value = data["isvote"] iscollection.value = data["iscollection"] @@ -209,29 +182,10 @@ const getDetails = async () => { }) } -// watch( -// () => route.path, -// (newValue, oldValue) => { -// // 在这里处理route.path的变化 -// if (typeof window !== "undefined" && route.path) { -// if (window._hmt) window._hmt.push(["_trackPageview", route.fullPath]) -// if (window._czc) { -// let location = window.location -// let contentUrl = location.pathname + location.hash -// let refererUrl = "/" -// window._czc.push(["_trackPageview", contentUrl, refererUrl]) -// window._czc.push(["_setAutoPageview", false]) -// } -// } -// } -// ) - provide("getDetails", getDetails) // 点击发送信息 const sendMessage = uin => { - // redirectToExternalWebsite(`https://bbs.gter.net/home.php?mod=space&showmsg=1&uid=${uin}`) - if (uin && typeof messagePrivateItem == "function") { messagePrivateItem({ uin: uin }) return @@ -334,7 +288,6 @@ const unvoteVote = () => { } let data = res.data let optionList = data["optionList"] || [] - // optionList[unvoteVoteIndex]["selected"] = 0 optionList.forEach(element => { element["selected"] = 0 }) @@ -419,29 +372,7 @@ const closeDiscussInputFields = () => { try { if (process.server) { - // // const { data, pending, error, refresh } = await useFetch("https://vote.gter.net/api/details", { - // // query: { uniqid: id }, - // // method: "post", - // // server: true, - // // }) - // // const { data, pending, error, refresh } = await useFetch(`https://vote.gter.net/api/details`, { - // // method: "post", - // // body: { - // // uniqid: id + "111", - // // }, - // // }) - // const { data, pending, error, refresh } = await useFetch(`https://vote.gter.net/api/details`, { - // key: "details", - // body: { - // uniqid: id, - // }, - // method: "post", - // }) - - // console.log("-------------分割线-------------------") - await detailsHttp({ uniqid: id }).then(res => { - // console.log("res", res) if (res.code != 200) { ElMessage.error(res.message) router.push("/index.html") @@ -453,21 +384,22 @@ try { option.value = data["option"] isvote.value = data["isvote"] seo.value = data.seo - // uniqidIndex.value = data.info?.id % 6 }) } } catch (error) {} @@ -742,40 +757,4 @@ try { padding: 0; } } - -// .options-popup { -// border-radius: 10px !important; -// padding: 44px 74px !important; - -// .options-popup-text { -// font-size: 14px; -// color: #333333; -// text-align: center; -// margin-bottom: 71px; -// } - -// .options-popup-btn { -// justify-content: space-between; -// .options-popup-item { -// font-size: 13px; -// width: 160px; -// height: 40px; -// border-radius: 150px; -// border: 1px solid; -// cursor: pointer; - -// &.options-yes { -// background-color: rgba(249, 93, 93, 1); -// border-color: rgba(249, 93, 93, 1); -// color: #fff; -// margin-left: 20px; -// } -// &.options-no { -// background-color: #fff; -// border-color: rgba(170, 170, 170, 1); -// color: #333; -// } -// } -// } -// }