This commit is contained in:
xulu
2022-02-23 16:34:07 +08:00
parent ec5e69418b
commit 4f5e6e1f78
62 changed files with 28419 additions and 8571 deletions

View File

@@ -8,8 +8,11 @@ import qs from 'qs'
axios.defaults.timeout = 10000 // 超时时间
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // 配置请求头
axios.defaults.baseURL = 'http://www.tougao.com/'
// axios.defaults.baseURL = '/'
// axios.defaults.baseURL = 'http://testtougao.tmrjournals.com/public/index.php/'
axios.defaults.baseURL = 'http://www.tougao.com/'
// 添加响应拦截器,统一处理服务器响应和异常
axios.interceptors.response.use(
@@ -89,7 +92,7 @@ export default {
*/
get (url, params) {
return new Promise((resolve, reject) => {
axios.get(url, {params: param})
axios.get(url, qs.stringify(params))
.then(res => {
resolve(res.data)
})