From 2f4f6f6a29386e06b991ab9996f40cb1a2c3d8b7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 2 Aug 2024 15:49:39 +0800 Subject: [PATCH] 1 --- .../controller/BigwheelController.class.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/webapp/controller/BigwheelController.class.php b/webapp/controller/BigwheelController.class.php index 03168ed5..63bf642f 100644 --- a/webapp/controller/BigwheelController.class.php +++ b/webapp/controller/BigwheelController.class.php @@ -280,6 +280,8 @@ class BigwheelController extends BaseAuthedController { ) )); } + $this->sendNotify($drop1[0]['item_id']); + $this->sendNotify($drop2[0]['item_id']); } public function buyS() @@ -432,4 +434,42 @@ class BigwheelController extends BaseAuthedController { return $priceInfo; } + private function sendNotify($itemId) + { + $itemMeta = myself()->_callMtStatic('Item', 'get', $itemId); + if (empty($itemMeta)) { + return; + } + $elements = array(); + array_push($elements, array( + 'ele_type' => 2, + 'lang_key' => 'Marquee_rewards_get_1', + "lang_params" => array(), + )); + array_push($elements, array( + 'ele_type' => 1, + "text" => myself()->_getUserInfo(array('name'))['name'], + )); + array_push($elements, array( + 'ele_type' => 2, + 'lang_key' => 'Marquee_rewards_get_2', + "lang_params" => array(), + )); + array_push($elements, array( + 'ele_type' => 2, + 'lang_key' => $itemMeta['name'], + "lang_params" => array(), + )); + array_push($elements, array( + 'ele_type' => 2, + 'lang_key' => 'Marquee_rewards_get_3', + "lang_params" => array(), + )); + error_log(json_encode($elements)); + $content = myself()->_callServiceStatic('NoticeService', 'buildCustom', $elements); + $loop = 1; + $interval = 1; + myself()->_callServiceStatic('NoticeService', 'send', $content, $loop, $interval); + } + }