mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🎨 移除测试点击
This commit is contained in:
@@ -513,7 +513,7 @@ function submitResize(): void {
|
||||
|
||||
// 开启无痕浏览
|
||||
async function switchIncognito(): Promise<void> {
|
||||
await event.emit("switchIncognito");
|
||||
await event.emitTo("Sub_window", "switchIncognito");
|
||||
if (appStore.incognito) {
|
||||
showSnackbar.success("已关闭无痕浏览!");
|
||||
return;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<v-icon>mdi-thumb-up</v-icon>
|
||||
<span>{{ postData?.stat?.like_num }}</span>
|
||||
</div>
|
||||
<div class="mpm-item" :title="`转发数:${postData?.stat?.forward_num}`" @click="tryShare()">
|
||||
<div class="mpm-item" :title="`转发数:${postData?.stat?.forward_num}`">
|
||||
<v-icon>mdi-share-variant</v-icon>
|
||||
<span>{{ postData?.stat?.forward_num }}</span>
|
||||
</div>
|
||||
@@ -138,13 +138,6 @@ onBeforeMount(async () => {
|
||||
incognitoListener = await listen<void>("switchIncognito", () => window.location.reload());
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
if (incognitoListener !== null) {
|
||||
incognitoListener();
|
||||
incognitoListener = null;
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await showLoading.start(`正在加载帖子数据`);
|
||||
appVersion.value = await app.getVersion();
|
||||
@@ -295,24 +288,6 @@ async function tryLike(): Promise<void> {
|
||||
showSnackbar.success(isLike.value ? "点赞成功" : "取消点赞成功");
|
||||
}
|
||||
|
||||
async function tryShare(): Promise<void> {
|
||||
if (!cookie.value) {
|
||||
showSnackbar.error("请先登录");
|
||||
return;
|
||||
}
|
||||
if (!postData.value) {
|
||||
showSnackbar.error("数据未加载");
|
||||
return;
|
||||
}
|
||||
const ck = { stoken: cookie.value.stoken, stuid: cookie.value.stuid, mid: cookie.value.mid };
|
||||
const resp = await apiHubReq.post.share(postData.value.post.post_id, ck);
|
||||
if (resp.retcode !== 0) {
|
||||
showSnackbar.error(`[${resp.retcode}] ${resp.message}`);
|
||||
return;
|
||||
}
|
||||
console.log("share success", resp);
|
||||
}
|
||||
|
||||
async function toPost(): Promise<void> {
|
||||
const channel = TGBbs.channels.find((item) => item.gid === postData.value?.post.game_id);
|
||||
const link = channel
|
||||
@@ -335,6 +310,10 @@ onUnmounted(() => {
|
||||
clearInterval(shareTimer);
|
||||
shareTimer = null;
|
||||
}
|
||||
if (incognitoListener !== null) {
|
||||
incognitoListener();
|
||||
incognitoListener = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
Reference in New Issue
Block a user