Skip to content

Commit

Permalink
feat: 允许在url提供token
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Jul 30, 2024
1 parent 654106f commit e7f90b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ export default {
},
created() {
// 检查query是否包含access-token,如果有则存储到cookie
if (this.$route.query['token']) {
Cookies.set("access-token", this.$route.query['access-token']);
}
this.$store.commit('tokenCheck', this.$bus)
this.$store.commit('initMetadata', 'banner')
Expand Down

0 comments on commit e7f90b6

Please sign in to comment.