|
|
@@ -1,6 +1,6 @@
|
|
|
define(['app/app'], function (app) {
|
|
|
'use strict';
|
|
|
- app.register.controller('SearchSeeBrandCtrl', ['$scope', '$http', '$rootScope', 'SessionService', function($scope, $http, $rootScope, SessionService) {
|
|
|
+ app.register.controller('SearchSeeBrandCtrl', ['$scope', '$http', '$rootScope', 'ngTableParams', 'SessionService', 'BaseService', function($scope, $http, $rootScope, ngTableParams, SessionService, BaseService) {
|
|
|
$scope.searchType = 'original';// 搜索类型
|
|
|
$scope.searchType = {
|
|
|
original: false,
|
|
|
@@ -87,6 +87,20 @@ define(['app/app'], function (app) {
|
|
|
},function (error) {
|
|
|
});
|
|
|
|
|
|
+ $http({
|
|
|
+ method:'GET',
|
|
|
+ url:'search/componentGoods/collect',
|
|
|
+ params:{
|
|
|
+ 'keyword' : $scope.keyword,
|
|
|
+ 'collectList' : 'goods_brand',
|
|
|
+ 'paramJSON':{}
|
|
|
+ }}).then(function (data) {
|
|
|
+ $scope.result = data.data;
|
|
|
+ $scope.brandtime = (new Date()).valueOf() - timestart;
|
|
|
+ console.log(data);
|
|
|
+ },function (error) {
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
|
|
|
// window.location.href = 'search?w=' + encodeURI(encodeURIComponent($scope.keyword)) + '&type=all';
|
|
|
@@ -102,6 +116,41 @@ define(['app/app'], function (app) {
|
|
|
if(!$scope.keyword) $scope.keyword = '';
|
|
|
};
|
|
|
|
|
|
+ //table设置
|
|
|
+ $scope.searchLogTableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 20
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ getData : function ($defer, params) {
|
|
|
+ $scope.paginationParams = params;
|
|
|
+ const param = BaseService.parseParams(params.url());
|
|
|
+ //param.status = $scope.status;
|
|
|
+ if($scope.search !=null){
|
|
|
+ if($scope.search == 1){
|
|
|
+ param.userUu = $scope.searchContent;
|
|
|
+ }
|
|
|
+ if($scope.search == 2){
|
|
|
+ param.userName = $scope.searchContent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $http({
|
|
|
+ method:'GET',
|
|
|
+ url:'search/searchHistory/page',
|
|
|
+ params:param
|
|
|
+ }).then(function (data) {
|
|
|
+ params.total(data.totalElements);
|
|
|
+ $defer.resolve(data.data.content);
|
|
|
+ $scope.logs = data.data.content;
|
|
|
+ params.total(data.data.totalElements);
|
|
|
+ console.log(data.data.content);
|
|
|
+ },function (error) {
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
// 搜索框失去焦点,关闭联想框
|
|
|
$scope.onBlur = function() {
|
|
|
$scope.associate = false;
|