From 04002c16007e4a0e66b652c695c57422958fd391 Mon Sep 17 00:00:00 2001 From: Yu-huan Kuo Date: Sat, 5 Oct 2024 22:50:47 +0800 Subject: [PATCH] feat: move the email cauculating process to the client side --- pages/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 2c6907f..4a390a3 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -82,7 +82,16 @@ let arr = [ 0x64, 0x47, 0x39, 0x31, 0x59, 0x32, 0x68, 0x41, 0x63, 0x6d, 0x35, 0x74, 0x5a, 0x57, 0x39, 0x33, 0x4c, 0x6d, 0x4e, 0x76, 0x62, 0x51, 0x3d, 0x3d ] -const emailAddr = atob(String.fromCharCode.apply(null, arr)) +if (process.client) { + localStorage.setItem('email', atob(String.fromCharCode.apply(null, arr))) +} + +const emailAddr = ref('') + +onMounted(() => { + // @ts-ignore + emailAddr.value = localStorage.getItem('email') +}) const age = ( (new Date().getTime() - Date.parse(atob('MjAwOC0xMC0xOQ=='))) /