| | |
| | | res_deletes, |
| | | res_updates, |
| | | res_update, |
| | | token_insertNewToken |
| | | } from "../../api/api"; |
| | | import $ from 'jquery' |
| | | import { getToken } from '../../utils/auth'; |
| | |
| | | }, { |
| | | label: '启用代理地址', value: 2 |
| | | } |
| | | ] |
| | | ], resToken: null, |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | methods: { |
| | | async getResToken() { |
| | | if (this.$store.state.resToken) { |
| | | this.resToken = this.$store.state.resToken |
| | | } else { |
| | | const data = await token_insertNewToken({ |
| | | type: 1, |
| | | min: 43200 |
| | | }); |
| | | if (data.code == 200) { |
| | | this.$store.state.resToken = data.result.token; |
| | | this.resToken = data.result.token; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | //是否为全屏函数 |
| | | onFullscreen(fullscreen) { |
| | | this.isFullscreen = fullscreen; |
| | |
| | | }, 1000); |
| | | }, |
| | | formatProxy(row, column) { |
| | | var token = getToken() |
| | | var token = this.resToken |
| | | if (row.proxy && row.proxy.indexOf('{token}') > -1) { |
| | | var val = row.proxy.replaceAll('{token}', token) |
| | | return BASE_URL + val |
| | |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.getResToken(); |
| | | this.calHeight(); |
| | | this.getPerms(); |
| | | this.setListDataStart(); |
| | | this.optionsStart(); |
| | | |
| | | |
| | | }, |
| | | }; |
| | | </script> |