离子3 http.post或get方法被触发两次 我的代码如下
this.httpService.post(this.APIs.getPGs, { userId: id }, result => {
console.log("test");
this.httpService.hideLoading();
if (result.statusCode) {
callback(result.data);
} else {
this.httpService.showAlert(result.message);
callback(false);
}
});
当我提供我的结果时,我发现它被解雇了两次图像:
离子框架:3.6.0
Ionic App Scripts:2.1.3
Angular Core:4.1.3
Angular Compiler CLI:4.1.3
节点:6.11.3
OS平台:OS X El Capitan
Navigator Platform:MacIntel
用户代理:Mozilla / 5.0(Macintosh; Intel Mac OS X 10_11_6)
AppleWebKit / 537.36(KHTML,与Gecko一样)Chrome / 62.0.3202.94 Safari / 537.36
任何解决方案?