Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyanbin committed Jan 5, 2024
1 parent d493878 commit ffbe6a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/record/token.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
<script lang="ts" setup>
import { ref } from "vue";
import { getQueryString } from "./common";
import { useRoute } from "vue-router";
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
const token = ref(
getQueryString("token") || (route.query.token as string) || ""
);
if (token.value) {
sessionStorage.setItem("token", token.value);
location.replace(location.origin + "/#/user");
router.replace("/user");
}
</script>

Expand Down

0 comments on commit ffbe6a2

Please sign in to comment.