rabin 2 lat temu
rodzic
commit
94b39f6274
2 zmienionych plików z 31 dodań i 1 usunięć
  1. 28 1
      app/card/database/info.php
  2. 3 0
      app/card/lib/Goods_set.php

+ 28 - 1
app/card/database/info.php

@@ -27,6 +27,11 @@ $create_type = array
     3 => '面值自定义卡',
 );
 
+$shop_set = array
+(
+    1 => '体验店无使用限制',
+);
+
 return array
 (
     # 表名
@@ -80,7 +85,7 @@ return array
             'name'      => '可用商品分类-不选择则所有商品可用',
             'default'   => '',
             'desc'      => '可用商品分类',
-            'match'     => 'is_string',
+            'match'     => 'option',
             //'search'    => 'linkage',
             'update'    => 'checkbox',
             'option'    => $cate,
@@ -111,6 +116,17 @@ return array
             //'list'      => true,
         ),
 
+        'min'        => array
+        (
+            'type'      => 'varchar-80',
+            'name'      => '最低消费-填写大于0的数值后,满足条件的商品总额需大于等于该数值,才能使用该礼品卡',
+            'default'   => '0',
+            'desc'      => '最低消费',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
+            //'list'      => true,
+        ),
+
         'create_type'        => array
         (
             'type'      => 'int-11',
@@ -123,6 +139,17 @@ return array
             'list'      => true,
         ),
 
+        'shop_set'        => array
+        (
+            'type'      => 'varchar-80',
+            'name'      => '特殊设置',
+            'default'   => '',
+            'desc'      => '特殊设置',
+            'match'     => 'option',
+            'update'    => 'checkbox',
+            'option'    => $shop_set,
+        ),
+
         'card_type'        => array
         (
             'type'      => 'int-11',

+ 3 - 0
app/card/lib/Goods_set.php

@@ -22,6 +22,9 @@ class Goods_set
             return Dever::outDiy($result);
         }
         $where['project_id'] = 1;
+        if ($card['category']) {
+            $where['ids'] = $card['category'];
+        }
         $data = Dever::db('category/info')->getTop($where);
         if ($data) {
             $i = 0;