排除法。把可能出错的方法和类单行注释,然后筛选排除错误
经常在很长的代码中查找好半天还是找不到错误的时候,建议可以先把没有涉及到该功能的代码先注释起来,很不错
//保存操作
//vm.save = function () {
// //如果单程,回程日期为空
// if (vm.data.tripType == 1)
// vm.data.backFlightDateRange = null;
// vm.saving = true;
// ctripPolicyService.createOrUpdatePolicy(
// vm.data
// ).success(function (result) {
// if (result.code) {
// abp.notify.success(result.message);
// $uibModalInstance.close();
// } else {
// abp.notify.error(result.message);
// }
// })
// .finally(function () {
// vm.saving = false;
// });
//};