Skip to content

Commit

Permalink
♻️ 直接新窗口打开
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Aug 17, 2024
1 parent 67da7d6 commit 512f3f4
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions src/components/post/tp-mention.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
<script lang="ts" setup>
import { toRaw } from "vue";
import TGClient from "../../utils/TGClient.js";
import showConfirm from "../func/confirm.js";
import showSnackbar from "../func/snackbar.js";
export interface TpMention {
insert: {
mention: {
Expand All @@ -29,26 +25,9 @@ const props = defineProps<TpMentionProps>();
console.log("tpMention", props.data.insert.mention.uid, toRaw(props.data).insert.mention);
async function toLink(): Promise<void> {
let prefix = "";
const uid = props.data.insert.mention.uid;
const confirm = await showConfirm({
title: "跳转提示",
text: "是否采用内置 JSBridge 跳转?",
});
if (confirm === undefined) {
showSnackbar({
text: "已取消跳转",
color: "info",
});
return;
}
if (confirm === true) {
prefix = "https://m.miyoushe.com/ys/#/accountCenter/0?id=";
await TGClient.open("mention", `${prefix}${uid}`);
return;
}
prefix = "https://www.miyoushe.com/ys/accountCenter/postList?id=";
window.open(`${prefix}${uid}`);
const link = `https://www.miyoushe.com/ys/accountCenter/postList?id=${uid}`;
window.open(link);
}
</script>
<style lang="css" scoped>
Expand Down

0 comments on commit 512f3f4

Please sign in to comment.