From 16b3c51d319cc4a461852a56097d254f0b37b79f Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 25 Sep 2023 14:32:04 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/listener/paySuccessMargin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/listener/paySuccessMargin.php b/app/listener/paySuccessMargin.php index bc4c208f..2124ea2f 100644 --- a/app/listener/paySuccessMargin.php +++ b/app/listener/paySuccessMargin.php @@ -26,7 +26,7 @@ class paySuccessMargin Db::name('merchant')->where('mer_id', $marginInfo['mer_id'] ?? 0)->where('uid', $marginInfo['uid'] ?? 0)->update([ 'margin' => $marginAmount ]); - $rechargeAmount = (float)$marginInfo['recharge_margin'] - (float)$merchantInfo['total_price']; + $rechargeAmount = (float)$merchantInfo['recharge_margin'] - (float)$marginInfo['total_price']; Db::name('merchant')->where('mer_id', $marginInfo['mer_id'] ?? 0)->where('uid', $marginInfo['uid'] ?? 0)->update([ 'recharge_margin' => $rechargeAmount ]); From 6f075771858ae9994298e23bc03a86f63ea59204 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 25 Sep 2023 15:10:36 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E9=87=91=E8=AE=A2=E5=8D=95=E4=BA=A4=E6=98=93=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 9 +++++++++ route/api.php | 1 + 2 files changed, 10 insertions(+) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 1d2dd3db..aa092d1f 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -307,6 +307,15 @@ class Auth extends BaseController return app('json')->success($payInfo); } + public function marginList() + { + $user = $this->request->userInfo(); + [$page, $limit] = $this->getPage(); + $count = Db::name('margin_order')->where('uid', $user['uid'])->count(); + $list = Db::name('margin_order')->where('uid', $user['uid'])->page($page, $limit)->select()->toArray(); + return app('json')->success(compact('count', 'list')); + } + /** * @return mixed * @throws DataNotFoundException diff --git a/route/api.php b/route/api.php index a751713a..ccbfe1c0 100644 --- a/route/api.php +++ b/route/api.php @@ -69,6 +69,7 @@ Route::group('api/', function () { Route::post('user/spread', 'api.Auth/spread'); //用户缴纳保证金 Route::post('user/margin', 'api.Auth/doMargin'); + Route::get('user/margin/list', 'api.Auth/marginList'); //优惠券 Route::group('coupon', function () { From 279e339c9cd65a3474b403ec852d0c9e1f38e2be Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 25 Sep 2023 15:16:09 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=9D=99=E6=80=81?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 1b842b3f..d152ac93 100644 --- a/public/index.html +++ b/public/index.html @@ -2,4 +2,4 @@ document.write('') if(window.location.protocol == 'https:'){ document.write('') - }