diff --git a/resources/beike/admin/views/pages/products/index.blade.php b/resources/beike/admin/views/pages/products/index.blade.php
index be52f30c..5d8e814a 100644
--- a/resources/beike/admin/views/pages/products/index.blade.php
+++ b/resources/beike/admin/views/pages/products/index.blade.php
@@ -61,10 +61,10 @@
-
-
-
-
+
+
+
+ {{-- --}}
@@ -206,6 +206,26 @@
})
},
+ batchDelete() {
+ this.$confirm('确认要批量删除选中的商品吗?', '删除商品', {
+ type: 'warning'
+ }).then(() => {
+ $http.delete('products/delete', {ids: this.selected}).then((res) => {
+ location.reload();
+ })
+ });
+ },
+
+ batchActive (type) {
+ this.$confirm('确认要批量修改选中的商品的状态吗?', '修改状态', {
+ type: 'warning'
+ }).then(() => {
+ $http.post('products/status', {ids: this.selected, status: type}).then((res) => {
+ location.reload();
+ })
+ });
+ },
+
search: function() {
this.page = 1;
this.loadData();
@@ -219,7 +239,7 @@
deleteProduct: function(index) {
const product = this.product.data[index];
- this.$confirm('确认要删除选中的商品吗?', '删除商品', {
+ this.$confirm('确认要删除商品吗?', '删除商品', {
type: 'warning'
}).then(() => {
$http.delete('products/' + product.id).then((res) => {