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; } }