dever 3 年之前
父节点
当前提交
c4debf84cc
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1 0
      app/card/lib/Code.php
  2. 3 1
      app/shop/lib/Info.php

+ 1 - 0
app/card/lib/Code.php

@@ -88,6 +88,7 @@ class Code
 
     private function upCode($info, $card)
     {
+        $card = trim($card);
         if (!$card) {
             return;
         }

+ 3 - 1
app/shop/lib/Info.php

@@ -245,7 +245,9 @@ class Info
 
         $where = 'status = 1 and state = 1';
 
-        if ($type) {
+        if ($type == 1) {
+            $where .= ' and type in (1,2)';
+        } elseif ($type) {
             $where .= ' and type = ' . $type;
         }