vue-resourse在android4.4.2的兼容问题

如题在在newwork看可以请求成功。
但是成功回调函数里面的代码没法运行。

beforeMount:function () {
      this.$http.get(mainData.path + "/h5/recharge/apps").then((res)=>{
          Vue.set(this,"load_show",false);
          Vue.set(this,"appData",res.data.data);
          // 服务器错误弹窗提示
          if(res.data.error_code == 401){
            location.href = "dongqiudi:///native/login";
          }else if (res.data.error_code == 400) {
            Vue.set(this,"propmt",true);
            Vue.set(this,"err_msg",res.data.message);
          }else if (res.data.error_code == 4002) {
            location.href = res.data.message;
          }
      },(err)=>{
        // 服务器错误弹窗提示
        Vue.set(this,"propmt",true);
        Vue.set(this,"err_msg","服务器君出小差了,请稍后尝试");
      })
    },

报这个警告Error in beforeMount hook
nexttick is undefined

阅读 3.1k
1 个回答

始终没找到解决方案,最后用JQ封装的ajax方法。。。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题