rabin 2 年之前
父節點
當前提交
3eee21446d
共有 1 個文件被更改,包括 10 次插入10 次删除
  1. 10 10
      app/mshop/src/Buy.php

+ 10 - 10
app/mshop/src/Buy.php

@@ -97,26 +97,26 @@ class Buy extends Core
             $this->data['price'] += $this->data['list'][$k]['price'] * $n;
             $this->data['name'][] = $this->data['list'][$k]['name'];
         }
-        $this->data['method'] =array();
+        $this->data['wallet'] =array();
         if($method == 1){
-            $this->data['method']['method'] = $method;
+            $this->data['wallet']['method'] = $method;
             if($this->shop && $this->shop['price']){
                 if($this->shop['price']  >= $this->data['price']){
-                    $this->data['method']['type'] = 1;
+                    $this->data['wallet']['type'] = 1;
                     #花的钱
-                    $this->data['method']['price'] = $this->data['price'];
+                    $this->data['wallet']['price'] = $this->data['price'];
                     $this->data['price'] = 0;
                     #余额
-                    $this->data['method']['yue'] = $this->shop['price'] - $this->data['price'];
+                    $this->data['wallet']['yue'] = $this->shop['price'] - $this->data['price'];
                 } else {
-                    $this->data['method']['type'] = 2;
-                    $this->data['method']['price'] = $this->shop['price'];
+                    $this->data['wallet']['type'] = 2;
+                    $this->data['wallet']['price'] = $this->shop['price'];
                     $this->data['price'] = $this->data['price'] - $this->shop['price'];
-                    $this->data['method']['yue'] = 0;
+                    $this->data['wallet']['yue'] = 0;
                 }
             }
         }else{
-            $this->data['method'] = false;
+            $this->data['wallet'] = false;
         }
 
         $this->data['name'] = implode(',', $this->data['name']);
@@ -131,7 +131,7 @@ class Buy extends Core
 
         $this->goods();
 
-        $pay = Dever::load('mshop/lib/buy')->set(1,1)->action($this->passport_uid, 1, $this->shop_id, $this->data['name'], $this->data['num'], $this->data['list'], $this->data['price'], $info, $refer, $this->shop['area'],$this->data['method']);
+        $pay = Dever::load('mshop/lib/buy')->set(1,1)->action($this->passport_uid, 1, $this->shop_id, $this->data['name'], $this->data['num'], $this->data['list'], $this->data['price'], $info, $refer, $this->shop['area'],$this->data['wallet']);
         return $pay;
     }