hrjy 3 years ago
parent
commit
d2ac9dfa13

+ 1 - 0
app/admin/controller/store/StoreProduct.php

@@ -643,6 +643,7 @@ class StoreProduct extends AuthController
     {
 
         if (!$id) return $this->failed('数据不存在');
+        if ($id == 1 or $id == 2) return $this->failed('礼包不能进行删除,回收');
         if (!ProductModel::be(['id' => $id])) return $this->failed('产品数据不存在');
         if (ProductModel::be(['id' => $id, 'is_del' => 1])) {
             $data['is_del'] = 0;

+ 4 - 0
app/admin/view/store/store_category/index.php

@@ -78,9 +78,13 @@
                         <button class="layui-btn layui-btn-xs" onclick="$eb.createModalFrame('编辑','{:Url('edit')}?id={{d.id}}')">
                             <i class="fa fa-edit"></i> 编辑
                         </button>
+                        {{# if(d.id === 1 || d.id === 2){ }}
+
+                        {{# }else{ }}
                         <button class="layui-btn btn-danger layui-btn-xs" lay-event='delstor'>
                             <i class="fa fa-times"></i> 删除
                         </button>
+                        {{# } }}
                     </script>
                 </div>
             </div>