From 0fc11134caf9a9c5899473bb5600c235f2a215c6 Mon Sep 17 00:00:00 2001 From: koogua Date: Wed, 3 Mar 2021 20:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=A8=A1=E6=9D=BFID=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Logic/Notice/AccountLogin.php | 8 ++++---- app/Services/Smser.php | 2 +- app/Services/WeChatNotice.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Services/Logic/Notice/AccountLogin.php b/app/Services/Logic/Notice/AccountLogin.php index 687a4205..45808739 100644 --- a/app/Services/Logic/Notice/AccountLogin.php +++ b/app/Services/Logic/Notice/AccountLogin.php @@ -16,9 +16,9 @@ class AccountLogin extends LogicService public function handleTask(TaskModel $task) { - $wechatOA = $this->getSettings('wechat.oa'); + $wechatNoticeEnabled = $this->wechatNoticeEnabled(); - if ($wechatOA['enabled'] == 0) return; + if (!$wechatNoticeEnabled) return; $params = $task->item_info; @@ -38,9 +38,9 @@ class AccountLogin extends LogicService public function createTask(UserModel $user) { - $wechatOA = $this->getSettings('wechat.oa'); + $wechatNoticeEnabled = $this->wechatNoticeEnabled(); - if ($wechatOA['enabled'] == 0) return; + if (!$wechatNoticeEnabled) return; $task = new TaskModel(); diff --git a/app/Services/Smser.php b/app/Services/Smser.php index d0b26985..727b6bdf 100644 --- a/app/Services/Smser.php +++ b/app/Services/Smser.php @@ -88,7 +88,7 @@ Abstract class Smser extends Service { $template = json_decode($this->settings['template'], true); - return $template[$code] ?? null; + return $template[$code]['id'] ?? null; } protected function getSignature() diff --git a/app/Services/WeChatNotice.php b/app/Services/WeChatNotice.php index f8d42485..1e227d98 100644 --- a/app/Services/WeChatNotice.php +++ b/app/Services/WeChatNotice.php @@ -97,7 +97,7 @@ abstract class WeChatNotice extends Service { $template = json_decode($this->settings['notice_template'], true); - return $template[$code] ?? null; + return $template[$code]['id'] ?? null; } }