This commit is contained in:
Zyronon
2025-11-18 14:16:58 +08:00
committed by GitHub
parent 58a07821fd
commit 4945269f57
5 changed files with 9 additions and 18 deletions

View File

@@ -78,7 +78,6 @@ async function init() {
onMounted(init)
//迁移数据
let showTransfer = $ref(false)
onMounted(() => {
@@ -122,5 +121,8 @@ onMounted(() => {
<!-- </transition>-->
<!-- </router-view>-->
<router-view></router-view>
<MigrateDialog v-model="showTransfer"/>
<MigrateDialog
v-model="showTransfer"
@ok="init"
/>
</template>

View File

@@ -10,6 +10,8 @@ const Dialog = defineAsyncComponent(() => import('@/components/dialog/Dialog.vue
const model = defineModel()
const emit = defineEmits<{ ok: [] }>()
async function migrateFromOldSite() {
return new Promise(async (resolve, reject) => {
// 旧域名地址
@@ -79,6 +81,8 @@ async function transfer() {
console.log('迁移完成');
Toast.success('迁移完成')
model.value = false
emit('ok')
} catch (e) {
Toast.error('迁移失败:' + e)
console.error('迁移失败', e);
@@ -93,7 +97,7 @@ async function transfer() {
本网站已启用新域名 <span class="color-blue">{{ Origin }}</span>
</h2>
<h3>
由于浏览器安全限制新老网站数据无法互通需要您手动点击转移数据
老域名即将停用由于浏览器安全限制新老网站数据无法互通需要您手动点击转移数据
</h3>
<h3>
<BaseButton