浏览代码

请求超时60秒

zhangh 2 年之前
父节点
当前提交
bd513ecc5c
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/router/axios.js
  2. 2 2
      vue.config.js

+ 1 - 1
src/router/axios.js

@@ -17,7 +17,7 @@ import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 
 //默认超时时间
-axios.defaults.timeout = 10000;
+axios.defaults.timeout = 60000;
 //返回其他状态码
 axios.defaults.validateStatus = function(status) {
     return status >= 200 && status <= 500;

+ 2 - 2
vue.config.js

@@ -27,8 +27,8 @@ module.exports = {
             '/api': {
                 //本地服务接口地址
                 // target: 'http://localhost',
-                target: 'http://192.168.3.76',
-                // target: 'http://192.168.3.13',
+                // target: 'http://192.168.3.76',
+                target: 'http://192.168.4.44',
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',
                 ws: true,