|
|
@@ -2,12 +2,7 @@ import axios from 'axios'
|
|
|
import qs from 'qs'
|
|
|
import { useToast } from 'vuestic-ui'
|
|
|
import router from '../router'
|
|
|
-console.log(router)
|
|
|
-// const router = require('')
|
|
|
-// import Vue from 'vue'
|
|
|
-// console.log(Vue)
|
|
|
const instance = axios.create({
|
|
|
- // baseURL: 'api',
|
|
|
baseURL: '/api/',
|
|
|
timeout: 30000,
|
|
|
})
|
|
|
@@ -48,9 +43,9 @@ instance.interceptors.response.use(
|
|
|
function fetch(ourl, params = {}, methods = 'post') {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
let url = ourl
|
|
|
- if (methods == 'get' && qs.stringify(params)) {
|
|
|
- url = ourl + '?' + qs.stringify(params)
|
|
|
- }
|
|
|
+ // if (methods == 'get' && qs.stringify(params)) {
|
|
|
+ // url = ourl + '?' + qs.stringify(params)
|
|
|
+ // }
|
|
|
instance[methods](url, params)
|
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|