From afbc6fba0e77b39762e0da2b920e30e5d7787780 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 4 Jul 2023 18:08:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=B6=E5=80=99=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/adminapi/controller/PublicController.php b/crmeb/app/adminapi/controller/PublicController.php index 1bc31e70f..d13091ba9 100644 --- a/crmeb/app/adminapi/controller/PublicController.php +++ b/crmeb/app/adminapi/controller/PublicController.php @@ -68,7 +68,7 @@ class PublicController if ($service->cacheDriver()->get('scan_upload') != $uploadToken) { return app('json')->fail(410086); } - $service->upload($pid, $file, $upload_type, $type, '', $uploadToken); + $service->upload((int)$pid, $file, $upload_type, $type, '', $uploadToken); return app('json')->success(100032); } } From 7e913a1df337a54791b4df6063b5dd1fe1de4f1e Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 4 Jul 2023 18:09:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=A8=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=B8=8A=E9=9D=A2=E6=8E=88=E6=9D=83=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=B1=95=E7=A4=BA=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E6=94=B9=E4=B8=BA=E6=8E=88=E6=9D=83=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/users/wechat_login/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template/uni-app/pages/users/wechat_login/index.vue b/template/uni-app/pages/users/wechat_login/index.vue index b0e010a20..dd0b978f1 100644 --- a/template/uni-app/pages/users/wechat_login/index.vue +++ b/template/uni-app/pages/users/wechat_login/index.vue @@ -22,11 +22,11 @@ + class="bg-green btn1">{{$t(`授权登录`)}} + class="bg-green btn1">{{$t(`授权登录`)}} + class="bg-green btn1">{{$t(`授权登录`)}} From 6d8a7dd6e1a41dd0fccf7ac4b9d24577c38c453d Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 4 Jul 2023 18:09:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=BF=85=E9=A1=BB=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=9C=AA=E4=B8=AD=E5=A5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/activity/lottery/LuckLotteryServices.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crmeb/app/services/activity/lottery/LuckLotteryServices.php b/crmeb/app/services/activity/lottery/LuckLotteryServices.php index a5114ede3..0bd1f2d36 100644 --- a/crmeb/app/services/activity/lottery/LuckLotteryServices.php +++ b/crmeb/app/services/activity/lottery/LuckLotteryServices.php @@ -210,7 +210,9 @@ class LuckLotteryServices extends BaseServices $luckPrizeServices = app()->make(LuckPrizeServices::class); $data = []; $sort = 1; + $prizeStatus = false; foreach ($prizes as $prize) { + if (isset($prize['type']) && $prize['type'] == 1) $prizeStatus = true; $prize = $luckPrizeServices->checkPrizeData($prize); $prize['lottery_id'] = $lottery->id; unset($prize['id']); @@ -219,6 +221,9 @@ class LuckLotteryServices extends BaseServices $data[] = $prize; $sort++; } + if (!$prizeStatus) { + throw new AdminException('必须设置至少一个未中奖'); + } if (!$luckPrizeServices->saveAll($data)) { throw new AdminException(400536); } @@ -261,7 +266,9 @@ class LuckLotteryServices extends BaseServices $insert = []; $time = time(); $sort = 1; + $prizeStatus = false; foreach ($newPrizes as $prize) { + if (isset($prize['type']) && $prize['type'] == 1) $prizeStatus = true; $prize = $luckPrizeServices->checkPrizeData($prize); $prize['sort'] = $sort; if (isset($prize['id']) && $prize['id']) { @@ -280,6 +287,9 @@ class LuckLotteryServices extends BaseServices } $sort++; } + if (!$prizeStatus) { + throw new AdminException('必须设置至少一个未中奖'); + } if ($insert) { if (!$luckPrizeServices->saveAll($insert)) { throw new AdminException(100022);