Browse Source

修改搜索键盘上下选中值的问题

shenjj 7 years ago
parent
commit
e0bdb076a3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/webapp/resources/js/common/controllers/commonCtrls.js

+ 3 - 1
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -257,7 +257,7 @@ define([ 'app/app' ], function(app) {
 	}]);
 
 	// 搜索框Ctrl
-	app.controller('SearchCtrl', ['$scope', '$http', '$rootScope', 'SessionService', function($scope, $http, $rootScope, SessionService) {
+	app.controller('SearchCtrl', ['$scope', '$http', '$rootScope', 'SessionService', 'toaster', function($scope, $http, $rootScope, SessionService, toaster) {
         // 默认搜索类型
         $scope.searchType = 'component';
         $scope.placeholderSearch = '请输入型号';
@@ -283,6 +283,8 @@ define([ 'app/app' ], function(app) {
                 SessionService.set('brand', true);
                 SessionService.unset('component');
                 window.location.href = 'search?w=' + encodeURI($scope.keyword) + '&type=' + $scope.searchType;
+            } else {
+              toaster.pop("info", "请输入关键字");
             }
         };