mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
♻️ 直接新窗口打开
This commit is contained in:
@@ -7,10 +7,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toRaw } from "vue";
|
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 {
|
export interface TpMention {
|
||||||
insert: {
|
insert: {
|
||||||
mention: {
|
mention: {
|
||||||
@@ -29,26 +25,9 @@ const props = defineProps<TpMentionProps>();
|
|||||||
console.log("tpMention", props.data.insert.mention.uid, toRaw(props.data).insert.mention);
|
console.log("tpMention", props.data.insert.mention.uid, toRaw(props.data).insert.mention);
|
||||||
|
|
||||||
async function toLink(): Promise<void> {
|
async function toLink(): Promise<void> {
|
||||||
let prefix = "";
|
|
||||||
const uid = props.data.insert.mention.uid;
|
const uid = props.data.insert.mention.uid;
|
||||||
const confirm = await showConfirm({
|
const link = `https://www.miyoushe.com/ys/accountCenter/postList?id=${uid}`;
|
||||||
title: "跳转提示",
|
window.open(link);
|
||||||
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}`);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user