|
|
@@ -31,7 +31,7 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
$scope.weight = function(brand){
|
|
|
ComponentActive.setSimpleInfoWeight({weight: brand.inputWeight}, brand, function(data){
|
|
|
- toaster.pop('success', '处理成功', '【' + data[0].nameCn + '】' + '禁用成功');
|
|
|
+ toaster.pop('success', '处理成功', '【' + data[0].code + '】' + '禁用成功');
|
|
|
loadData();
|
|
|
}, function(res){
|
|
|
toaster.pop('error', '错误', res.data);
|
|
|
@@ -40,7 +40,7 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.disweight = function(brand){
|
|
|
ComponentActive.setSimpleInfoWeight({weight: 0}, brand, function(data){
|
|
|
if (data.searchWeight == 0){
|
|
|
- toaster.pop('success', '处理成功', '【' + data.nameCn + '】' + '已取消推广');
|
|
|
+ toaster.pop('success', '处理成功', '【' + data.code + '】' + '已取消推广');
|
|
|
$scope.load('weight');
|
|
|
} else{
|
|
|
toaster.pop('error', '错误', '取消推广失败');
|
|
|
@@ -51,12 +51,20 @@ define([ 'app/app' ], function(app) {
|
|
|
};
|
|
|
$scope.updateweight = function(brand){
|
|
|
ComponentActive.setSimpleInfoWeight({weight: brand.inputWeight}, brand, function(data){
|
|
|
- toaster.pop('success', '处理成功', '【' + data.nameCn + '】' + '已修改推广');
|
|
|
+ toaster.pop('success', '处理成功', '【' + data.code + '】' + '已修改推广');
|
|
|
$scope.load('weight');
|
|
|
}, function(res){
|
|
|
toaster.pop('error', '错误', res.data);
|
|
|
})
|
|
|
};
|
|
|
|
|
|
+ $scope.searchComponent = function(keyword){
|
|
|
+ ComponentActive.getByCode({ code: keyword}, {}, function(data){
|
|
|
+ $scope.searchTableParams = new NgTableParams({}, { dataset: data});
|
|
|
+ }, function(res){
|
|
|
+ toaster.pop('error', '错误', res.data);
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
}]);
|
|
|
});
|