From 27867c65c5a031902b205290c2906e368220fa92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=80=81=E8=83=A1?= <1094551889@qq.com> Date: Mon, 9 Dec 2024 15:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BA=A4=E4=BA=92=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- app/model/Order.php | 12 +++++++----- view/order/show_order.html | 35 ++++++++++++++++++++++++----------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/.env b/.env index 5faa42e..3410a9b 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -APP_DEBUG = false +APP_DEBUG = true DB_TYPE = mysql DB_HOST = 127.0.0.1 diff --git a/app/model/Order.php b/app/model/Order.php index 0b26a12..aa310d7 100644 --- a/app/model/Order.php +++ b/app/model/Order.php @@ -101,14 +101,16 @@ class Order extends BaseModel public static function showOrderDetail($id) { $order = self::find($id); - $a_list = PayAccount::with('payChannel')->hasWhere('payChannel', ['id' => $order->cid])->where('PayAccount.id', $order->aid)->find(); + $a_list = PayAccount::find($order->aid); + $c_list = PayChannel::find($order->cid); if (!$order) { return []; } - $order->platform = $a_list->platform ?? '···'; - $order->account = $a_list->account ?? '···'; - $order->channel = $a_list->payChannel[0]->channel ?? '···'; - $order->qrcode = $a_list->payChannel[0]->qrcode ?? '···'; + $order->platform = $a_list['platform'] ?? '···'; + $order->account = $a_list['account'] ?? '···'; + $order->channel = $c_list['channel'] ?? '···'; + $order->qrcode = $c_list['qrcode'] ?? '···'; + $order->url_type = $c_list['type'] ?? '···'; return $order->toArray(); } // 选择收款通道 diff --git a/view/order/show_order.html b/view/order/show_order.html index 91e8711..fea5784 100644 --- a/view/order/show_order.html +++ b/view/order/show_order.html @@ -198,7 +198,8 @@
@@ -215,16 +216,28 @@ util.on({ getQrcode: function () { (async () => { - const qrcode_data = this.getAttribute("data-qrcode") - const qrcode_img = await getQrcode(qrcode_data, QR); - layer.open({ - type: 1, - area: ['200px', '200px'], - title: false, - closeBtn: 0, - shadeClose: true, - content: `