| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 获取地址栏code |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | this.getUserDate(code); |
| | | } |
| | | // else { |
| | | // this.$router.push("/login"); |
| | | // } |
| | | |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | }); |
| | | }, |
| | | handleClickOutside() { |
| | | this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) |
| | | } |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.fetchData(); |
| | | // 获取地址栏code |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | this.getUserDate(code); |
| | | } |
| | | // else { |
| | | // this.$router.push("/login"); |
| | | // } |
| | | if (localStorage.getItem("user")) { |
| | | this.fetchData(); |
| | | } |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | this.fetchData(); |
| | | }); |
| | | }, |
| | | handleExport() { |
| | | this.download('exportPlayer', { |
| | | }, `导出_${new Date().getTime()}.xlsx`) |