moonsflyer 8 сар өмнө
parent
commit
db860fd92e

+ 9 - 1
app/api/controller/RechargeController.php

@@ -57,7 +57,15 @@ class RechargeController extends BaseApiController
         return $this->data($result);
     }
 
-
+    public function details()
+    {
+        $order_id = $this->request->get('order_id/d', 0);
+        $result = RechargeLogic::detail($order_id);
+        if (false === $result) {
+            return $this->fail(RechargeLogic::getError());
+        }
+        return $this->data($result);
+    }
     /**
      * @notes 充值配置
      * @return \think\response\Json

+ 11 - 0
app/api/logic/RechargeLogic.php

@@ -58,6 +58,17 @@ class RechargeLogic extends BaseLogic
         }
     }
 
+    public static function detail($order_id){
+        try {
+
+            $order = RechargeOrder::find($order_id)->toArray();
+
+            return $order;
+        } catch (\Exception $e) {
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
 
     /**
      * @notes 充值配置