|
@@ -57,7 +57,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- if (!this.$route.query.token) {
|
|
|
+ if (this.$route.query.token) {
|
|
|
this.searchToken();
|
|
|
this.search();
|
|
|
}
|
|
@@ -102,15 +102,15 @@ export default {
|
|
|
},
|
|
|
searchToken() {
|
|
|
let token = this.$route.query.token;
|
|
|
- // let user = jwt.decode(token);
|
|
|
- let user = {
|
|
|
- mobile: '1',
|
|
|
- name: '班主任6',
|
|
|
- status: '0',
|
|
|
- type: '1',
|
|
|
- uid: '5f2b632f4f8ae07098a7ab63',
|
|
|
- userid: '5f2b632f4f8ae07098a7ab63',
|
|
|
- };
|
|
|
+ let user = jwt.decode(token);
|
|
|
+ // let user = {
|
|
|
+ // mobile: '1',
|
|
|
+ // name: '班主任6',
|
|
|
+ // status: '0',
|
|
|
+ // type: '1',
|
|
|
+ // uid: '5f2b632f4f8ae07098a7ab63',
|
|
|
+ // userid: '5f2b632f4f8ae07098a7ab63',
|
|
|
+ // };
|
|
|
this.$set(this, 'userinfo', user);
|
|
|
sessionStorage.setItem('user', JSON.stringify(user));
|
|
|
},
|