ionic做的cnode app
3 回复
有人帮忙看下扫码登录哪里错了吗? 抄别人好的,不知道哪里错了。
var dologin = function() { $scope.processing = true; $timeout(function() { $scope.processing = false; }, 500); cordova.plugins.barcodeScanner.scan( function (result) { $scope.processing = false; //alert(result.text); if (!result.cancelled) { $log.log(‘get Access Token’, result.text);
$ionicLoading.show();
User.login(result.text).$promise.then(function(response) {
// loginPopup.close();
loginCallback(response);
}, $rootScope.requestErrorHandler());
//User.login(result.text).$promise.then(loginCallback, $rootScope.requestErrorHandler());
}
},
function (error) {
$scope.processing = false;
$ionicLoading.show({
noBackdrop: true,
template: 'Scanning failed: ' + error,
duration: 1000
});
}
);
尽然还在用ionic1写app From NeoReader
@nihgwu 好,多谢