vue -resource 文件提交提示process,或者拦截处理

this.$http.post('url',fd||data,{emulateJSON:true}).then(fn(res){},fn(res){})   
process成功案例
_self.$http.post('url',fd,{progress:function(){
                    _self.showPrompt('Please wait',true)
                }}).then(function(res){....
vue拦截器全局main里面
Vue.http.interceptors.push((request, next) => {
      request.method = 'POST';//在请求之前可以进行一些预处理和配置
      request.url = '..'
      window.alert('wait')
      // continue to next interceptor
      next((response) => {//            
        return response;
      });
    });

  

原文地址:https://www.cnblogs.com/xhliang/p/8795472.html