This commit is contained in:
Zyronon
2025-11-18 00:49:56 +08:00
parent 76e5e7ba68
commit b4cf3b3c62
3 changed files with 120 additions and 62 deletions

View File

@@ -229,6 +229,29 @@ onMounted(() => {
};
}
// if (!OLD_ORIGIN){
// var OLD_ORIGIN = "https://2study.top";
// }
// // 创建隐藏 iframe
// const iframe = document.createElement("iframe");
// iframe.style.display = "none";
// iframe.src = `${OLD_ORIGIN}/migrate.html`;
// document.body.appendChild(iframe);
// // 接收旧域名的数据
// window.addEventListener("message", async (event) => {
// if (event.data.type !== "MIGRATE_RESULT") return;
// const payload = event.data.payload;
// console.log('payload', payload)
// });
//
// iframe.onload = function () {
// setTimeout(()=>{
// iframe.contentWindow.postMessage({type: "REQUEST_MIGRATION_DATA"}, OLD_ORIGIN);
// },3000)
// };
// 使用示例(在老域名 2study.top 的控制台执行):
// readAllStorageForMigration().then(result => {
// console.log('读取到的数据:', result);
@@ -237,6 +260,7 @@ onMounted(() => {
// });
})
// let transitionName = $ref('go')
// const route = useRoute()
// watch(() => route.path, (to, from) => {