1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| <script>
| import { getToken, setToken, removeToken } from '@/utils/auth'
| export default {
| created() {
| let url=this.$route.query.url
| let token=this.$route.query.token
| url=atob(url)
| //console.log("url",url);
| if(this.$route.query.token!=null){ //从传参写入token
| setToken(this.$route.query.token)
| this.$store.commit('SET_TOKEN', this.$route.query.token)
| }
| this.$router.replace({ path: url })
| },
| render: function(h) {
| return h() // avoid warning message
| }
| }
| </script>
|
|