This commit is contained in:
2026-02-28 17:57:40 +08:00
parent 3bf74c11e0
commit 3bc96be89b
10 changed files with 734 additions and 118 deletions

View File

@@ -41,17 +41,17 @@ onMounted(async () => {
}
getWeixinAuthUrl();
// 延迟配置微信分享
// 延迟配置微信分享(带上当前路由信息)
setTimeout(async () => {
if (isWeChat.value && window.jWeixin) {
await setDynamicShare();
await setDynamicShare(route);
}
}, 1000);
// 监听路由变化更新分享配置
router.afterEach(async () => {
router.afterEach(async (to) => {
if (isWeChat.value && window.jWeixin && !authStore.isWeixinAuthing) {
await setDynamicShare();
await setDynamicShare(to);
}
});
});