如题在在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
始终没找到解决方案,最后用JQ封装的ajax方法。。。