阅读背景:

Javascript承诺/然后没有按正确的顺序执行

来源:互联网 

Here's the code:

这是代码:

vm.saveData = function(data) {

             demoService.saveData(data, function(response) {
                if (response.status === 200) {
                    principal.identity(true).then(function() {
                        $state.reload();
                        return toastr.success('Success');
                    });

                }
                return toastr.error('Failure');
            });
}
vm.saveData = funct



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: