fix(DetailsArea): 修复举报功能并更新相关样式
修复举报功能,区分评论和主题举报类型。更新讨论图标和投币文本样式。移除不必要的背景色和注释代码。 refactor(api): 重构举报相关API接口 将评论举报和主题举报分离为独立接口,提高代码可维护性。 style: 清理多余空格和注释 统一代码格式,删除无用注释和空白行。
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<Head>
|
||||
<Title>{{ `${seo["title"] || "投票"} - 寄托天下出国留学网` }}</Title>
|
||||
<Meta name="keyword" :content="seo['keyword']" />
|
||||
@@ -14,7 +13,7 @@
|
||||
<a class="item blue" v-for="item in sectionn" :key="item" :href="`https://f.gter.net/section/${item.uniqid}`" target="_blank">{{ item.name }}</a>
|
||||
<a class="item" v-for="item in tags" :key="item" :href="`https://f.gter.net/tag/${item}?type=vote`" target="_blank">{{ item }}</a>
|
||||
</div>
|
||||
<div class="flexacenter" style="position: relative;">
|
||||
<div class="flexacenter" style="position: relative">
|
||||
<div class="flex1">{{ info.title }}</div>
|
||||
<div class="view flexacenter">
|
||||
<img class="icon" src="@/assets/img/eye-icon.svg" />
|
||||
@@ -123,7 +122,8 @@
|
||||
回应
|
||||
<div class="respond-amount">{{ ripostecount.total || 0 }}</div>
|
||||
<div v-if="ripostecount.user > 0" class="respond-list-btn" @click="openPopList">
|
||||
共 <span class="respond-list-btn-amount">{{ ripostecount.user }}</span>人回应
|
||||
共 <span class="respond-list-btn-amount">{{ ripostecount.user }}</span
|
||||
>人回应
|
||||
<img class="respond-list-btn-icon" src="@/assets/img/arrowsRight.svg" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -192,8 +192,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Report v-if="reportAlertShow" :reportToken="reportToken"></Report>
|
||||
<Report v-if="reportAlertShow" :reportToken="reportToken" :reportType="reportType"></Report>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -458,12 +457,13 @@ const getDetails = async () => {
|
||||
|
||||
getRiposte();
|
||||
|
||||
const topic = data.topic
|
||||
console.log("topic", topic);
|
||||
const topic = data.topic;
|
||||
getTopicDetail(topic.uniqid);
|
||||
});
|
||||
};
|
||||
|
||||
provide("getDetails", getDetails);
|
||||
|
||||
let topicToken = ref("");
|
||||
let topicInfo = ref({});
|
||||
let sectionn = ref([]);
|
||||
@@ -486,7 +486,6 @@ const getTopicDetail = (uniqid) => {
|
||||
const targetInfo = data.info;
|
||||
if (!targetInfo.hidden) targetInfo.hidden = 0;
|
||||
|
||||
|
||||
const sectionNameSet = new Set(targetInfo.sectionn.map((item) => item.name));
|
||||
if (targetInfo.tags) {
|
||||
const newTag = targetInfo?.tags.filter((tagName) => !sectionNameSet.has(tagName));
|
||||
@@ -495,17 +494,13 @@ const getTopicDetail = (uniqid) => {
|
||||
|
||||
sectionn.value = targetInfo.sectionn;
|
||||
|
||||
|
||||
topicInfo.value = targetInfo;
|
||||
|
||||
ismyself.value = data.ismyself;
|
||||
|
||||
|
||||
if (data.islogin) getTopicOperation();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const getTopicOperation = () => {
|
||||
topicgetOperationHttp({
|
||||
@@ -527,19 +522,15 @@ const getTopicOperation = () => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
provide("getDetails", getDetails);
|
||||
|
||||
// 点击发送信息
|
||||
const sendMessage = (uin) => {
|
||||
if (uin && typeof messagePrivateItem == "function") {
|
||||
messagePrivateItem({ uin: uin });
|
||||
} else redirectToExternalWebsite(`https://bbs.gter.net/home.php?mod=space&showmsg=1&uid=${uin}`);
|
||||
const sendMessage = (uin, uid) => {
|
||||
if (typeof messagePrivateItem == "function") messagePrivateItem({ uin, uid });
|
||||
else redirectToExternalWebsite(`https://bbs.gter.net/home.php?mod=space&showmsg=1&uid=${uin}&uid=${uid}`);
|
||||
};
|
||||
|
||||
// 点击ta的主页
|
||||
const TAHomePage = (uin) => {
|
||||
redirectToExternalWebsite(`https://bbs.gter.net/home.php?mod=space&uid=${uin}`);
|
||||
const TAHomePage = (uin, uid) => {
|
||||
redirectToExternalWebsite(`https://bbs.gter.net/home.php?mod=space&uid=${uin}&uid=${uid}`);
|
||||
};
|
||||
|
||||
// 跳转 url
|
||||
@@ -792,6 +783,8 @@ const cutShow = () => {
|
||||
|
||||
let reportAlertShow = ref(false);
|
||||
let reportToken = ref("");
|
||||
let reportType = ref("");
|
||||
|
||||
provide("reportAlertShow", reportAlertShow);
|
||||
|
||||
// 点击打开举报
|
||||
@@ -801,12 +794,12 @@ const report = (token) => {
|
||||
return;
|
||||
}
|
||||
|
||||
cutShow()
|
||||
cutShow();
|
||||
reportToken.value = topicToken.value;
|
||||
reportType.value = "topic";
|
||||
reportAlertShow.value = true;
|
||||
};
|
||||
|
||||
|
||||
// 隐藏
|
||||
const hide = () => {
|
||||
const target = topicInfo.value;
|
||||
@@ -837,15 +830,13 @@ const essence = () => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 删除
|
||||
const deleteItem = () => {
|
||||
managerDelete(token)
|
||||
.then(() => redirectToExternalWebsite("/", "_self"))
|
||||
.finally(() => cutShow());
|
||||
};
|
||||
|
||||
|
||||
|
||||
const { $cache } = useNuxtApp();
|
||||
|
||||
try {
|
||||
@@ -874,7 +865,7 @@ try {
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) { }
|
||||
} catch (error) {}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
Reference in New Issue
Block a user