rabin 3 年之前
父節點
當前提交
c6e7cd4c58
共有 2 個文件被更改,包括 7 次插入8 次删除
  1. 6 7
      app/card/src/Api.php
  2. 1 1
      app/shop/lib/Sell.php

+ 6 - 7
app/card/src/Api.php

@@ -241,7 +241,12 @@ class Api extends Core
                             $this->data['card'][$k]['minfo'] = '仅限' . $city['name'] . '可用';
                         }
                     }
-                } elseif ($info['type'] == 1) {
+                } elseif ($info['type'] == 2 && $v['shop_id']) {
+                    $shop = Dever::db('shop/info')->find($v['shop_id']);
+                    if ($shop) {
+                        $this->data['card'][$k]['minfo'] = '限' . $shop['name'] . '可用';
+                    }
+                } else {
                     $config_type = Dever::db('shop/info')->config['config_type'];
 
                     /*
@@ -261,12 +266,6 @@ class Api extends Core
                     } elseif ($info['shop_type'] && isset($config_type[$info['shop_type']])) {
                         $this->data['card'][$k]['minfo'] = $config_type[$info['shop_type']] . '可用';
                     }
-                    
-                } elseif ($info['type'] == 2 && $v['shop_id']) {
-                    $shop = Dever::db('shop/info')->find($v['shop_id']);
-                    if ($shop) {
-                        $this->data['card'][$k]['minfo'] = '限' . $shop['name'] . '可用';
-                    }
                 }
 
                 $this->data['card'][$k]['cinfo'] = '';

+ 1 - 1
app/shop/lib/Sell.php

@@ -2038,7 +2038,7 @@ class Sell
                 Dever::db('shop/sell_order')->update(array('where_id' => $info['id'], 'audit' => $audit, 'audit_desc' => $audit_text));
                 # 退款
                 $shop = Dever::db('shop/info')->find($info['shop_id']);
-                Dever::load('shop/lib/refund')->set('sell')->apply(1, $shop['id'], $id, false, 3, 0, '未通过审核');
+                Dever::load('shop/lib/refund')->set('sell')->apply(2, $shop['id'], $id, false, 3, 0, '未通过审核');
             }
         }