|
|
@ -2,12 +2,14 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-04 17:11:07
|
|
|
|
* @Date: 2022-05-04 17:11:07
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-05-10 14:30:24
|
|
|
|
* @LastEditTime: 2022-05-25 17:48:35
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
let axiosTk = null;
|
|
|
|
let axiosTk = null;
|
|
|
|
export default function ({$axios, store, route}, inject) {
|
|
|
|
export default function ({$axios, store, route}, inject) {
|
|
|
|
const $axiosTk = $axios.create();
|
|
|
|
const $axiosTk = $axios.create();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$axiosTk.defaults.timeout = 3000;
|
|
|
|
$axiosTk.onRequest( config =>{
|
|
|
|
$axiosTk.onRequest( config =>{
|
|
|
|
if(!store.state.token){
|
|
|
|
if(!store.state.token){
|
|
|
|
location.href = '/';
|
|
|
|
location.href = '/';
|
|
|
|