| | |
| | | import axios from 'axios' |
| | | import store from '@/store' |
| | | |
| | | import { |
| | | Message |
| | |
| | | |
| | | |
| | | const service = axios.create({ |
| | | // baseURL: `http://vwpmxwbhv59i.guyubao.com`, |
| | | baseURL: `http://192.168.110.34:8081`, |
| | | // baseURL:'http://vwpmxwbhv59i.guyubao.com', |
| | | withCredentials: false, // 当跨域请求时发送cookie |
| | | timeout: 30000, // request timeout |
| | | }) |
| | |
| | | type: 'warning', |
| | | duration: 2000 |
| | | }) |
| | | setTimeout(() => { |
| | | if (store.state.subjectUI == 'BlueIndex' || store.state.subjectUI == 'Green' || store.state.subjectUI == 'Purple') { |
| | | localStorage.clear(); |
| | | window.location.replace('/'); |
| | | } |
| | | if (store.state.subjectUI == 'darkBlue') { |
| | | let obj = JSON.parse(localStorage.getItem('acountObj')) |
| | | localStorage.clear(); |
| | | localStorage.setItem('acountObj', JSON.stringify(obj)) |
| | | window.location.replace('/'); |
| | | } |
| | | }, 2000) |
| | | window.location.replace('/Login'); |
| | | return Promise.reject(res.data) |
| | | } |
| | | Message({ |