xieruidong 2 years ago
parent
commit
7771d851d5
1 changed files with 8 additions and 1 deletions
  1. 8 1
      application/common/model/Refund.php

+ 8 - 1
application/common/model/Refund.php

@@ -137,7 +137,7 @@ class Refund Extends Model
         $this->save();
     }
     #根据订单状态选择售后
-    public static function makeRefundConfig(OrderInfo $orderInfo,$inject=true){
+    public static function makeRefundConfig(OrderInfo $orderInfo,$inject=true,$delKeys=false){
         $order=$orderInfo->orders;
         $refundConfig=[];
 
@@ -240,6 +240,13 @@ class Refund Extends Model
             $refundConfig=null;
         }
 
+        if($delKeys && !empty($refundConfig['refund_type'])){
+            $newArr=[];
+            foreach ($refundConfig['refund_type'] as $key=>$value){
+                $newArr[]=compact('key','value');
+            }
+        }
+
         if($inject){
             $orderInfo['refund_config']=$refundConfig;
         }